Add catalog product type settings
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
-- CreateTable
|
||||
CREATE TABLE "CatalogProductTypeSetting" (
|
||||
"id" TEXT NOT NULL,
|
||||
"productType" TEXT NOT NULL,
|
||||
"showQuantityPerBox" BOOLEAN NOT NULL DEFAULT false,
|
||||
"allowCustomLength" BOOLEAN NOT NULL DEFAULT false,
|
||||
"customLengthMinM" INTEGER,
|
||||
"customLengthMaxM" INTEGER,
|
||||
"customLengthStepM" INTEGER,
|
||||
"allowCustomSleeveBrand" BOOLEAN NOT NULL DEFAULT false,
|
||||
"allowCustomLabel" BOOLEAN NOT NULL DEFAULT false,
|
||||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updatedAt" TIMESTAMP(3) NOT NULL,
|
||||
|
||||
CONSTRAINT "CatalogProductTypeSetting_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "CatalogProductTypeSetting_productType_key" ON "CatalogProductTypeSetting"("productType");
|
||||
|
||||
@@ -190,6 +190,20 @@ model Product {
|
||||
updatedAt DateTime @updatedAt
|
||||
}
|
||||
|
||||
model CatalogProductTypeSetting {
|
||||
id String @id @default(cuid())
|
||||
productType String @unique
|
||||
showQuantityPerBox Boolean @default(false)
|
||||
allowCustomLength Boolean @default(false)
|
||||
customLengthMinM Int?
|
||||
customLengthMaxM Int?
|
||||
customLengthStepM Int?
|
||||
allowCustomSleeveBrand Boolean @default(false)
|
||||
allowCustomLabel Boolean @default(false)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
}
|
||||
|
||||
model Cart {
|
||||
id String @id @default(cuid())
|
||||
userId String @unique
|
||||
|
||||
Reference in New Issue
Block a user