fix: project_id in board schema and fixed get mixin

This commit is contained in:
2025-09-06 11:28:48 +04:00
parent 7990e7d460
commit 7a76da4058
2 changed files with 3 additions and 2 deletions

View File

@ -1,4 +1,4 @@
from typing import Generic, TypeVar, Type, Optional, overload from typing import Generic, TypeVar, Type, Optional
from sqlalchemy import select, Select from sqlalchemy import select, Select
from sqlalchemy.ext.asyncio import AsyncSession from sqlalchemy.ext.asyncio import AsyncSession
@ -64,7 +64,7 @@ class GetAllMixin(RepBaseMixin[EntityType]):
return stmt return stmt
async def get_all(self, *args) -> list[EntityType]: async def get_all(self, *args) -> list[EntityType]:
stmt = select(self.entity_class).order_by(self.entity_class.id) stmt = select(self.entity_class)
if hasattr(self, "is_deleted"): if hasattr(self, "is_deleted"):
stmt = stmt.where(self.entity_class.is_deleted.is_(False)) stmt = stmt.where(self.entity_class.is_deleted.is_(False))

View File

@ -10,6 +10,7 @@ class BoardSchema(BaseSchema):
id: int id: int
name: str name: str
lexorank: str lexorank: str
project_id: int
class CreateBoardSchema(BaseSchema): class CreateBoardSchema(BaseSchema):