add datetime

This commit is contained in:
Valentin CZERYBA 2023-10-23 23:45:13 +02:00
parent e12c1c91b3
commit c120e60911

View File

@ -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