tmpl-fastapi/app/sql/schemas.py

15 lines
185 B
Python
Raw Normal View History

2023-02-19 16:49:44 +03:00
from pydantic import BaseModel
2023-02-20 11:09:43 +03:00
class UserCreate(BaseModel):
2023-02-19 16:49:44 +03:00
email: str
name: str
age: int
2023-02-20 11:09:43 +03:00
class User(UserCreate):
id: int
2023-02-19 16:49:44 +03:00
class Config:
orm_mode = True