Initial commit: Meat Monster TypeScript Fullstack
This commit is contained in:
commit
eed1ef4266
41 files changed
+8319
No files matched your search
@@ -0,0 +1,31 @@
|
||||
-- CreateTable
|
||||
CREATE TABLE "StockItem" (
|
||||
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
||||
"name" TEXT NOT NULL,
|
||||
"category" TEXT NOT NULL,
|
||||
"price" REAL NOT NULL,
|
||||
"unit" TEXT NOT NULL DEFAULT 'kg',
|
||||
"available" BOOLEAN NOT NULL DEFAULT true,
|
||||
"description" TEXT NOT NULL,
|
||||
"bulk1Threshold" REAL NOT NULL DEFAULT 0,
|
||||
"bulk1Price" REAL NOT NULL DEFAULT 0,
|
||||
"bulk2Threshold" REAL NOT NULL DEFAULT 0,
|
||||
"bulk2Price" REAL NOT NULL DEFAULT 0
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "Order" (
|
||||
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
||||
"name" TEXT NOT NULL,
|
||||
"phone" TEXT NOT NULL,
|
||||
"totalWeight" REAL NOT NULL,
|
||||
"estimatedTotal" REAL NOT NULL,
|
||||
"timestamp" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"items" TEXT NOT NULL
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "Config" (
|
||||
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
||||
"adminCode" TEXT NOT NULL DEFAULT '1234'
|
||||
);
|
||||
@@ -0,0 +1,3 @@
|
||||
# Please do not edit this file manually
|
||||
# It should be added in your version-control system (e.g., Git)
|
||||
provider = "sqlite"
|
||||
@@ -0,0 +1,39 @@
|
||||
// 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"
|
||||
}
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
model Order {
|
||||
id Int @id @default(autoincrement())
|
||||
name String
|
||||
phone String
|
||||
totalWeight Float
|
||||
estimatedTotal Float
|
||||
timestamp DateTime @default(now())
|
||||
items String // Storing items as a JSON string for simplicity with SQLite
|
||||
}
|
||||
|
||||
model Config {
|
||||
id Int @id @default(autoincrement())
|
||||
adminCode String @default("1234")
|
||||
}
|
||||
Reference in new issue
Block a user