ts-lyceum-back/schemas/user_schemas.py
2023-11-30 21:01:57 +03:00

6 lines
336 B
Python

from tortoise.contrib.pydantic import pydantic_model_creator
from db.models.user import User
UserCreateInfo = pydantic_model_creator(User, name="UserCreateInfo", exclude=("id", "first_login"))
UserInfo = pydantic_model_creator(User, name="UserInfo", exclude=("id", "password"))
UserDatabase = pydantic_model_creator(User, name="User")