создана часть бекенда

This commit is contained in:
2025-11-30 19:31:06 +03:00
parent 4ae09c36b3
commit dc85e7c0c9
35 changed files with 1573 additions and 149 deletions
+3 -4
View File
@@ -11,14 +11,13 @@ class Toolkit(Base):
id = Column(Integer, primary_key=True, index=True)
title = Column(String, unique=True, index=True)
description = Column(Text)
description = Column(Text, nullable=True)
specifications = Column(JSONB, default={})
category_id = Column(Integer, ForeignKey("categories.id", ondelete="CASCADE"))
category_data = relationship(
"Category", cascade="all, delete-orphan", lazy="joined", uselist=False
)
image = Column(
JSONB, default={"main": "images/tools/default.png", "additional": []}
)
image = Column(JSONB)
quantity_min = Column(Integer, nullable=True)
quantity_min_extra = Column(Integer, nullable=True)
external_link = Column(String, nullable=True)