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