models.py 343 B

12345678910111213
  1. from pydantic import BaseModel
  2. from typing import Optional
  3. import datetime
  4. class User(BaseModel):
  5. username: str
  6. password: str
  7. changPwdTime: Optional[datetime.datetime] = None
  8. isAdmin: Optional[bool] = None
  9. isEnable: Optional[bool] = True
  10. updateTime: Optional[datetime.datetime] = None
  11. token: Optional[str] = None