feat: attrs on product

This commit is contained in:
2024-05-11 00:24:59 +03:00
parent dca4070db7
commit 7ce9258096
12 changed files with 25 additions and 22 deletions

View File

@@ -43,8 +43,8 @@ class BarcodeTemplate(BaseModel):
lazy='selectin',
back_populates='barcode_template',
cascade="all, delete")
additional_field = Column(String, nullable=True, comment='Дополнительное поле')
is_default = Column(Boolean, nullable=False, default=False, comment='По умолчанию')
size_id = Column(Integer, ForeignKey('barcode_template_sizes.id'), nullable=False)
size = relationship('BarcodeTemplateSize', lazy='joined')

View File

@@ -22,6 +22,7 @@ class Product(BaseModel):
brand = Column(String, nullable=True, comment='Бренд')
color = Column(String, nullable=True, comment='Цвет')
composition = Column(String, nullable=True, comment='Состав')
size = Column(String, nullable=True, comment='Размер')
class ProductBarcode(BaseModel):