feat: order and item queries

This commit is contained in:
2025-11-10 13:10:34 -07:00
parent 51b9f21596
commit 6313a85e96
4 changed files with 110 additions and 0 deletions

View File

@@ -2,6 +2,7 @@ CREATE TABLE IF NOT EXISTS ordr_user (
id SERIAL NOT NULL PRIMARY KEY,
sub_id TEXT UNIQUE NOT NULL,
user_name TEXT NOT NULL,
position TEXT DEFAULT "",
active BOOLEAN NOT NULL DEFAULT TRUE,
is_admin BOOLEAN NOT NULL DEFAULT FALSE
);
@@ -12,6 +13,7 @@ CREATE TABLE IF NOT EXISTS order_record (
orderer TEXT NOT NULL,
date_due TIMESTAMP NOT NULL,
date_placed TIMESTAMP NOT NULL DEFAULT now(),
amount_paid REAL NOT NULL DEFAULT 0,
filled BOOLEAN NOT NULL DEFAULT FALSE,
delivered BOOLEAN NOT NULL DEFAULT FALSE
);