feat: attrs on product

This commit is contained in:
2024-05-10 16:18:26 +03:00
parent bde69f9db8
commit 74982b9acf
6 changed files with 54 additions and 0 deletions

View File

@@ -17,6 +17,12 @@ class Product(BaseModel):
barcode_template_id = Column(Integer, ForeignKey('barcode_templates.id'), nullable=True)
barcode_template = relationship('BarcodeTemplate', lazy='joined')
# Attributes
# TODO move to another table
brand = Column(String, nullable=True, comment='Бренд')
color = Column(String, nullable=True, comment='Цвет')
composition = Column(String, nullable=True, comment='Состав')
class ProductBarcode(BaseModel):
__tablename__ = 'product_barcodes'