Добавлено новое поле fulfillmentCenterId в модель SupplyOrder и соответствующий реляционный объект fulfillmentCenter для улучшения обработки заказов. Обновлены компоненты FulfillmentSuppliesTab и RealSupplyOrdersTab для интеграции нового функционала. Оптимизированы стили и структура кода для повышения удобства использования.

This commit is contained in:
Bivekich
2025-07-24 15:10:58 +03:00
parent 74fb071552
commit c6b1b15c80
11 changed files with 481 additions and 47 deletions

View File

@ -99,6 +99,7 @@ model Organization {
logistics Logistics[]
supplyOrders SupplyOrder[]
partnerSupplyOrders SupplyOrder[] @relation("SupplyOrderPartner")
fulfillmentSupplyOrders SupplyOrder[] @relation("SupplyOrderFulfillmentCenter")
wildberriesSupplies WildberriesSupply[]
@@map("organizations")
@ -446,18 +447,20 @@ model Logistics {
}
model SupplyOrder {
id String @id @default(cuid())
partnerId String
deliveryDate DateTime
status SupplyOrderStatus @default(PENDING)
totalAmount Decimal @db.Decimal(12, 2)
totalItems Int
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
organizationId String
items SupplyOrderItem[]
organization Organization @relation(fields: [organizationId], references: [id], onDelete: Cascade)
partner Organization @relation("SupplyOrderPartner", fields: [partnerId], references: [id])
id String @id @default(cuid())
partnerId String
deliveryDate DateTime
status SupplyOrderStatus @default(PENDING)
totalAmount Decimal @db.Decimal(12, 2)
totalItems Int
fulfillmentCenterId String?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
organizationId String
items SupplyOrderItem[]
organization Organization @relation(fields: [organizationId], references: [id], onDelete: Cascade)
partner Organization @relation("SupplyOrderPartner", fields: [partnerId], references: [id])
fulfillmentCenter Organization? @relation("SupplyOrderFulfillmentCenter", fields: [fulfillmentCenterId], references: [id])
@@map("supply_orders")
}