From c120e609115c0d18f5f59effc7be0382fe3a7496 Mon Sep 17 00:00:00 2001 From: Valentin CZERYBA Date: Mon, 23 Oct 2023 23:45:13 +0200 Subject: [PATCH] add datetime --- app/models/users.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/models/users.py b/app/models/users.py index 5e7f358..225a0ed 100644 --- a/app/models/users.py +++ b/app/models/users.py @@ -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