mirror of
https://github.com/kevin-DL/fast_api_api_template.git
synced 2026-01-11 17:54:35 +00:00
24 lines
322 B
Python
24 lines
322 B
Python
import uuid
|
|
|
|
from pydantic import BaseModel
|
|
|
|
from schemas.items import Item
|
|
|
|
|
|
class UserBase(BaseModel):
|
|
display_name: str
|
|
|
|
|
|
class UserCreate(UserBase):
|
|
password: str
|
|
email: str
|
|
|
|
|
|
class User(UserBase):
|
|
id: uuid.UUID
|
|
is_active: bool
|
|
items: list[Item] = []
|
|
|
|
class Config:
|
|
orm_mode = True
|