feat: processing of modules in card, renaming
This commit is contained in:
@@ -62,6 +62,7 @@ class Card(BaseModel):
|
||||
|
||||
# module servicesAndProducts
|
||||
is_locked: Mapped[bool] = mapped_column(default=False, server_default='0')
|
||||
is_services_profit_accounted: Mapped[bool] = mapped_column(default=True, server_default='1')
|
||||
|
||||
shipping_warehouse_id: Mapped[int] = mapped_column(ForeignKey('shipping_warehouses.id'), nullable=True)
|
||||
shipping_warehouse: Mapped["ShippingWarehouse"] = relationship()
|
||||
@@ -86,9 +87,9 @@ class Card(BaseModel):
|
||||
bill_request: Mapped[Optional['CardBillRequest']] = relationship(back_populates='card', lazy='joined')
|
||||
|
||||
# module client
|
||||
client_id: Mapped[int] = mapped_column(
|
||||
client_id: Mapped[Optional[int]] = mapped_column(
|
||||
ForeignKey('clients.id', ondelete='CASCADE'),
|
||||
nullable=False,
|
||||
nullable=True,
|
||||
comment='ID клиента',
|
||||
)
|
||||
client: Mapped['Client'] = relationship('Client', backref=backref('cards', cascade="all, delete-orphan"))
|
||||
|
||||
Reference in New Issue
Block a user