user.py 285 B

123456789101112131415161718192021
  1. from pydantic import BaseModel
  2. from app.schemas.item import Item
  3. class UserBase(BaseModel):
  4. email: str
  5. class UserCreate(UserBase):
  6. password: str
  7. class User(UserBase):
  8. id: int
  9. is_active: bool
  10. items: list[Item] = []
  11. class Config:
  12. orm_mode = True