feat: generation of modules from the server, moved modules fields from the general tab
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from typing import TYPE_CHECKING
|
||||
from typing import TYPE_CHECKING, Optional
|
||||
|
||||
from sqlalchemy import Table, Column, ForeignKey
|
||||
from sqlalchemy.orm import Mapped, mapped_column, relationship
|
||||
@@ -23,6 +23,7 @@ class Module(BaseModel):
|
||||
id: Mapped[int] = mapped_column(primary_key=True)
|
||||
key: Mapped[str] = mapped_column(unique=True, nullable=False)
|
||||
label: Mapped[str] = mapped_column(nullable=False)
|
||||
icon_name: Mapped[Optional[str]] = mapped_column(unique=True, nullable=False)
|
||||
is_deleted: Mapped[bool] = mapped_column(default=False)
|
||||
|
||||
projects: Mapped[list['Project']] = relationship(
|
||||
|
||||
@@ -39,5 +39,6 @@ class Project(BaseModel):
|
||||
secondary='project_module',
|
||||
back_populates='projects',
|
||||
lazy='selectin',
|
||||
order_by='asc(Module.id)',
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user