57 lines
1.7 KiB
Plaintext
57 lines
1.7 KiB
Plaintext
// This is your Prisma schema file,
|
|
// learn more about it in the docs: https://pris.ly/d/prisma-schema
|
|
|
|
generator client {
|
|
provider = "prisma-client-js"
|
|
}
|
|
|
|
datasource db {
|
|
provider = "sqlite"
|
|
url = env("DATABASE_URL")
|
|
}
|
|
|
|
model StockItem {
|
|
id Int @id @default(autoincrement())
|
|
name String
|
|
category String
|
|
price Float
|
|
unit String @default("kg")
|
|
available Boolean @default(true)
|
|
description String
|
|
bulk1Threshold Float @default(0)
|
|
bulk1Price Float @default(0)
|
|
bulk2Threshold Float @default(0)
|
|
bulk2Price Float @default(0)
|
|
maxStock Float? // null = unlimited
|
|
}
|
|
|
|
model Order {
|
|
id Int @id @default(autoincrement())
|
|
orderNumber String?
|
|
name String
|
|
phone String
|
|
items String
|
|
totalWeight Float
|
|
estimatedTotal Float
|
|
status String @default("Pending")
|
|
timestamp DateTime @default(now())
|
|
}
|
|
|
|
model Config {
|
|
id Int @id @default(1)
|
|
adminCode String @default("1234")
|
|
finalDepositDate String?
|
|
cookDay String?
|
|
payIdInfo String? @default("Your PayID Here")
|
|
termsOfService String? @default("To secure your order, a 30% non-refundable deposit is required upfront before smoking begins. Payments can be made via PayID or Cash. The remaining balance is payable upon pickup.")
|
|
orderingPolicy String? @default("Deposits cover material costs and are final. PayID details provided after ordering.")
|
|
depositPercentage Int @default(30)
|
|
}
|
|
|
|
model FAQ {
|
|
id Int @id @default(autoincrement())
|
|
question String
|
|
answer String
|
|
order Int @default(0)
|
|
}
|