This commit is contained in:
Bivekich
2025-07-30 18:32:52 +03:00
parent 38dcfcef2b
commit 593ae16e1e
10 changed files with 192 additions and 48 deletions

View File

@ -106,6 +106,7 @@ model Organization {
supplyOrders SupplyOrder[]
partnerSupplyOrders SupplyOrder[] @relation("SupplyOrderPartner")
fulfillmentSupplyOrders SupplyOrder[] @relation("SupplyOrderFulfillmentCenter")
logisticsSupplyOrders SupplyOrder[] @relation("SupplyOrderLogistics")
wildberriesSupplies WildberriesSupply[]
supplySuppliers SupplySupplier[] @relation("SupplySuppliers")
externalAds ExternalAd[] @relation("ExternalAds")
@ -472,6 +473,7 @@ model SupplyOrder {
totalAmount Decimal @db.Decimal(12, 2)
totalItems Int
fulfillmentCenterId String?
logisticsPartnerId String?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
organizationId String
@ -479,6 +481,7 @@ model SupplyOrder {
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])
logisticsPartner Organization? @relation("SupplyOrderLogistics", fields: [logisticsPartnerId], references: [id])
@@map("supply_orders")
}