fix: default values for product
This commit is contained in:
@ -1,5 +1,3 @@
|
||||
from typing import Optional
|
||||
|
||||
from sqlalchemy import ForeignKey
|
||||
from sqlalchemy.orm import Mapped, mapped_column, relationship
|
||||
|
||||
@ -15,12 +13,12 @@ class Product(BaseModel, IdMixin, SoftDeleteMixin):
|
||||
factory_article: Mapped[str] = mapped_column(
|
||||
index=True, default="", server_default=""
|
||||
)
|
||||
brand: Mapped[Optional[str]] = mapped_column(comment="Бренд")
|
||||
color: Mapped[Optional[str]] = mapped_column(comment="Цвет")
|
||||
composition: Mapped[Optional[str]] = mapped_column(comment="Состав")
|
||||
size: Mapped[Optional[str]] = mapped_column(comment="Размер")
|
||||
additional_info: Mapped[Optional[str]] = mapped_column(
|
||||
comment="Дополнительная информация"
|
||||
brand: Mapped[str] = mapped_column(default="", comment="Бренд")
|
||||
color: Mapped[str] = mapped_column(default="", comment="Цвет")
|
||||
composition: Mapped[str] = mapped_column(default="", comment="Состав")
|
||||
size: Mapped[str] = mapped_column(default="", comment="Размер")
|
||||
additional_info: Mapped[str] = mapped_column(
|
||||
default="", comment="Дополнительная информация"
|
||||
)
|
||||
|
||||
images: Mapped[list["ProductImage"]] = relationship(
|
||||
|
||||
Reference in New Issue
Block a user