feat: service categories endpoints and service creation endpoint

This commit is contained in:
2025-09-27 18:21:20 +04:00
parent 8cf589c54e
commit fbadddeada
10 changed files with 194 additions and 20 deletions

View File

@ -3,4 +3,4 @@ from .deal_service import (
DealService as DealService,
)
from .product import Product as Product
from .service import Service as Service
from .service import Service as Service, ServiceCategory as ServiceCategory

View File

@ -38,14 +38,10 @@ class Service(BaseModel, IdMixin, SoftDeleteMixin, PriceMixin, CostMixin):
lexorank: Mapped[str] = mapped_column(comment="Ранг услуги")
class ServiceCategory(BaseModel, IdMixin):
class ServiceCategory(BaseModel, IdMixin, SoftDeleteMixin):
__tablename__ = "fulfillment_base_service_categories"
name: Mapped[str] = mapped_column()
is_deleted: Mapped[bool] = mapped_column(
default=False, comment="Удалена ли категория"
)
deal_service_rank: Mapped[str] = mapped_column(comment="Ранг услуги для сделки")
product_service_rank: Mapped[str] = mapped_column(comment="Ранг услуги для товара")