Implement divisions
This commit is contained in:
@@ -2,6 +2,7 @@ from typing import TYPE_CHECKING
|
||||
|
||||
from sqlmodel import (
|
||||
Session,
|
||||
Relationship,
|
||||
)
|
||||
|
||||
from . import mixin
|
||||
@@ -9,6 +10,9 @@ from .base import (
|
||||
BaseSQLModel,
|
||||
)
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from .division import Division
|
||||
|
||||
# region # Association #########################################################
|
||||
|
||||
|
||||
@@ -37,6 +41,7 @@ class Association(mixin.RowId, AssociationBase, table=True):
|
||||
# --- read only items ------------------------------------------------------
|
||||
|
||||
# --- back_populates links -------------------------------------------------
|
||||
divisions: list["Division"] = Relationship(back_populates="association", cascade_delete=True)
|
||||
|
||||
# --- CRUD actions ---------------------------------------------------------
|
||||
@classmethod
|
||||
|
||||
Reference in New Issue
Block a user