Initial 2
This commit is contained in:
26
example/cashbag_conform/mapper.py
Normal file
26
example/cashbag_conform/mapper.py
Normal file
@ -0,0 +1,26 @@
|
||||
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,
|
||||
),
|
||||
},
|
||||
)
|
||||
Reference in New Issue
Block a user