add datetime
This commit is contained in:
parent
e12c1c91b3
commit
c120e60911
@ -1,5 +1,6 @@
|
||||
from pydantic import BaseModel, EmailStr
|
||||
from pydantic_mongo import AbstractRepository, ObjectIdField
|
||||
from datetime import datetime
|
||||
|
||||
class User(BaseModel):
|
||||
id: ObjectIdField = None
|
||||
@ -8,6 +9,11 @@ class User(BaseModel):
|
||||
roles: str = "User"
|
||||
status: int = 0
|
||||
email: EmailStr
|
||||
birth: datetime = None
|
||||
created_at: datetime = datetime.today()
|
||||
connected_at: datetime = None
|
||||
updated_at: datetime = datetime.today()
|
||||
deleted_at: datetime = None
|
||||
|
||||
class UserOut(BaseModel):
|
||||
id: ObjectIdField = None
|
||||
|
Loading…
x
Reference in New Issue
Block a user