feat: TASK-101 - optimize Prisma schema, compound indexes, wholesale price and Rx fields
This commit is contained in:
1 parent
5377ddbfbf
commit
08c968300f
3 files changed
+8
-4
No files matched your search
@@ -127,6 +127,8 @@ model Product {
|
||||
categoryId String @map("category_id") @db.Uuid
|
||||
categorySlug String @map("category_slug") @db.VarChar(100)
|
||||
priceValue Decimal @map("price_value") @db.Decimal(15, 2)
|
||||
wholesalePrice Decimal? @map("wholesale_price") @db.Decimal(15, 2)
|
||||
requiresRx Boolean @default(false) @map("requires_rx")
|
||||
buyPrice Decimal @default(0) @map("buy_price") @db.Decimal(15, 2)
|
||||
priceDisplay String @map("price_display") @db.VarChar(50)
|
||||
unit String @db.VarChar(50)
|
||||
@@ -150,6 +152,8 @@ model Product {
|
||||
@@index([categorySlug])
|
||||
@@index([suitableFor])
|
||||
@@index([productGroup])
|
||||
@@index([requiresRx])
|
||||
@@index([categorySlug, suitableFor])
|
||||
@@map("products")
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user