diff --git a/backend/src/models/project.py b/backend/src/models/project.py index 9cca0cc..ee972cc 100644 --- a/backend/src/models/project.py +++ b/backend/src/models/project.py @@ -19,16 +19,17 @@ class Project(ProjectBase, table=True): """Model used inside the database.""" id: Optional[int] = Field(default=None, primary_key=True) + creation_date: datetime = Field(default=datetime.now()) -class ProjectRead(ProjectCreate): +class ProjectRead(ProjectBase): """Model used when querying information about a module.""" id: int - name: str # = Field(description="Name of the project", example="Learning") - start_date: datetime # = Field(description="Project creation date", example=datetime.now()) - duration: timedelta # = Field(description="Total tracked duration", example=timedelta(days=3, hours=5, minutes=47)) - records: int # = Field(description="Total number of trackings/records", example=42) + creation_date: datetime # = Field(description="Project creation date", example=datetime.now()) + # duration: timedelta # = Field(description="Total tracked duration", example=timedelta(days=3, hours=5, + # minutes=47)) + # records: int # = Field(description="Total number of trackings/records", example=42) # class Config: # TODO: Adding this config may be done with a decorator # """pydantic config"""