This commit is contained in:
2024-07-01 06:01:50 +03:00
parent a6f7a9d65f
commit 386ee7e460
29 changed files with 727 additions and 296 deletions

View File

@@ -1 +1,2 @@
from .models import *
from .enums import *

View File

View File

@@ -0,0 +1,8 @@
from enum import unique, IntEnum
@unique
class BaseMarketplace(IntEnum):
WILDBERRIES = 0
OZON = 1
YANDEX_MARKET = 2

View File

@@ -0,0 +1,12 @@
from enum import IntEnum, unique
@unique
class ProductRelationType(IntEnum):
PRODUCT_SAME_COLOR = 2
RELATION_FIRST = 3
RELATION_SECOND = 4
MAIN_PRODUCT = 5
PRODUCT_DIFFERENT_SIZE = 6
SAME_MIX = 7
SAME_PRODUCT = 8

View File

@@ -44,7 +44,7 @@ class Marketplace(BaseSiproModel):
id: Mapped[int] = mapped_column(primary_key=True)
name: Mapped[str] = mapped_column()
auth_data: Mapped[str] = mapped_column()
base_marketplace: Mapped[int] = mapped_column()
sell_mixes: Mapped[bool] = mapped_column()
sell_blocks: Mapped[bool] = mapped_column()
sell_warehouse_products: Mapped[bool] = mapped_column()

View File

@@ -7,4 +7,3 @@ class DailyStock(BaseStocksModel):
__tablename__ = 'daily_stocks'
product_id: Mapped[int] = mapped_column(primary_key=True)
sold_today: Mapped[int] = mapped_column()
test: Mapped[bool] = mapped_column()