feat: attr options and selects editing
This commit is contained in:
@ -13,7 +13,7 @@ if TYPE_CHECKING:
|
||||
class AttributeSelect(BaseModel, IdMixin, SoftDeleteMixin):
|
||||
__tablename__ = "attribute_selects"
|
||||
|
||||
label: Mapped[str] = mapped_column()
|
||||
name: Mapped[str] = mapped_column()
|
||||
is_built_in: Mapped[bool] = mapped_column(
|
||||
default=False,
|
||||
comment="Если встроенный select, то запрещено редактировать пользователю",
|
||||
@ -33,7 +33,7 @@ class AttributeSelect(BaseModel, IdMixin, SoftDeleteMixin):
|
||||
class AttributeOption(BaseModel, IdMixin, SoftDeleteMixin):
|
||||
__tablename__ = "attribute_options"
|
||||
|
||||
label: Mapped[str] = mapped_column()
|
||||
name: Mapped[str] = mapped_column()
|
||||
|
||||
select_id: Mapped[int] = mapped_column(ForeignKey("attribute_selects.id"))
|
||||
select: Mapped[AttributeSelect] = relationship(
|
||||
|
||||
Reference in New Issue
Block a user