fix: project_id in board schema and fixed get mixin
This commit is contained in:
@ -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))
|
||||||
|
|
||||||
|
|||||||
@ -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):
|
||||||
|
|||||||
Reference in New Issue
Block a user