feat: shipping warehouse and cost

This commit is contained in:
2024-07-18 04:57:05 +03:00
parent ba73d5cb09
commit e7235021f9
18 changed files with 148 additions and 1298 deletions

View File

@@ -13,12 +13,22 @@ class Service(BaseModel):
category_id = Column(Integer, ForeignKey('service_categories.id'), nullable=False, comment='ID категории услуги')
category = relationship('ServiceCategory', lazy='joined')
price = Column(Double, nullable=False, comment='Стоимость услуги')
price = Column(
Double,
nullable=False,
comment='Стоимость услуги'
)
cost = Column(
Double,
nullable=False,
server_default='0',
comment='Себестоимость услуги'
)
service_type = Column(Integer,
server_default=f'{enums.service.ServiceType.DEAL_SERVICE}',
nullable=False,
comment='Тип услуги')
price_ranges = relationship('ServicePriceRange',
back_populates='service',
lazy='selectin',