27 lines
1.1 KiB
Python
27 lines
1.1 KiB
Python
mapper_registry.map_imperatively(
|
|
class_=CashBagConform,
|
|
local_table=CASHBAG_CONFORM_TABLE,
|
|
properties={
|
|
"cashflow_collection": relationship(
|
|
CashFlowCollection, lazy=relationship_loading_strategy.value
|
|
),
|
|
"cashbag": relationship(CashBag, lazy=relationship_loading_strategy.value),
|
|
"machine": relationship(Machine, lazy=relationship_loading_strategy.value),
|
|
"count_user": relationship(
|
|
CustomUser,
|
|
lazy=relationship_loading_strategy.value,
|
|
foreign_keys=CASHBAG_CONFORM_TABLE.columns.count_user_id,
|
|
),
|
|
"collect_user": relationship(
|
|
CustomUser,
|
|
lazy=relationship_loading_strategy.value,
|
|
foreign_keys=CASHBAG_CONFORM_TABLE.columns.collect_user_id,
|
|
),
|
|
"denominations": relationship(
|
|
CashBagConformDenomination,
|
|
back_populates="cashbag_conform",
|
|
lazy=relationship_loading_strategy.value,
|
|
),
|
|
},
|
|
)
|