feat: removed price categories
This commit is contained in:
		@@ -15,18 +15,11 @@ from .shipping_warehouse import ShippingWarehouse
 | 
			
		||||
if TYPE_CHECKING:
 | 
			
		||||
    from . import (
 | 
			
		||||
        DealBillRequest,
 | 
			
		||||
        ServicePriceCategory,
 | 
			
		||||
        DealGroup,
 | 
			
		||||
        User,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class DealPriceCategory(BaseModel):
 | 
			
		||||
    __tablename__ = 'deal_price_category'
 | 
			
		||||
    deal_id: Mapped[int] = mapped_column(ForeignKey('deals.id'), primary_key=True, unique=True)
 | 
			
		||||
    category_id: Mapped[int] = mapped_column(ForeignKey('service_price_category.id'), primary_key=True)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class Deal(BaseModel):
 | 
			
		||||
    __tablename__ = 'deals'
 | 
			
		||||
    id = Column(Integer, autoincrement=True, primary_key=True, index=True)
 | 
			
		||||
@@ -85,9 +78,7 @@ class Deal(BaseModel):
 | 
			
		||||
 | 
			
		||||
    comment = Column(String, nullable=False, server_default='', comment='Коментарий к заданию')
 | 
			
		||||
    bill_request: Mapped[Optional['DealBillRequest']] = relationship(back_populates='deal', lazy='joined')
 | 
			
		||||
    category: Mapped[Optional["ServicePriceCategory"]] = relationship('ServicePriceCategory',
 | 
			
		||||
                                                                      secondary=DealPriceCategory.__table__,
 | 
			
		||||
                                                                      lazy='joined')
 | 
			
		||||
 | 
			
		||||
    group: Mapped[Optional["DealGroup"]] = relationship(
 | 
			
		||||
        'DealGroup',
 | 
			
		||||
        secondary='deal_relations',
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user