feat: added tags for cards, aligned status headers

This commit is contained in:
2025-03-09 19:30:52 +04:00
parent 487174c4ff
commit 6030591e3c
17 changed files with 375 additions and 23 deletions

View File

@@ -9,6 +9,7 @@ if TYPE_CHECKING:
from board import Board
from attribute import Attribute
from module import Module
from card_tag import CardTag
class Project(BaseModel):
@@ -27,7 +28,6 @@ class Project(BaseModel):
attributes: Mapped[list['Attribute']] = relationship(
'Attribute',
uselist=True,
secondary='project_attribute',
back_populates='projects',
lazy='selectin',
@@ -35,10 +35,16 @@ class Project(BaseModel):
modules: Mapped[list['Module']] = relationship(
'Module',
uselist=True,
secondary='project_module',
back_populates='projects',
lazy='selectin',
order_by='asc(Module.id)',
)
tags: Mapped[list['CardTag']] = relationship(
'CardTag',
back_populates='project',
primaryjoin="and_(Project.id == CardTag.project_id, CardTag.is_deleted == False)",
order_by='asc(CardTag.id)',
lazy='selectin',
)