feat: deal status history and default created_at in db

This commit is contained in:
2025-08-26 18:12:28 +04:00
parent b776ad6758
commit 4c7a997be6
7 changed files with 54 additions and 18 deletions

View File

@ -25,9 +25,7 @@ class ProjectRepository(BaseRepository):
return result.scalar_one_or_none()
async def create(self, data: CreateProjectSchema) -> Project:
project_data = data.model_dump()
project_data["created_at"] = datetime.now(timezone.utc)
project = Project(**project_data)
project = Project(**data.model_dump())
self.session.add(project)
await self.session.commit()
await self.session.refresh(project)