alumni_network/app/schemas/user.py

18 lines
307 B
Python

from pydantic import BaseModel, EmailStr
class UserBase(BaseModel):
email: EmailStr
full_name: str
graduation_year: int
class UserCreate(UserBase):
password: str
class User(UserBase):
id: int
is_verified: bool
is_active: bool
class Config:
from_attributes = True