chore: upload parte 2 - assets

This commit is contained in:
2026-06-01 15:36:16 +01:00
parent 9c14a19a87
commit 91b09365a6
37 changed files with 567 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
CREATE TABLE IF NOT EXISTS pick_lists (
id SERIAL PRIMARY KEY,
name VARCHAR(255) NOT NULL,
status VARCHAR(50) NOT NULL DEFAULT 'accepted',
products_json JSONB NOT NULL DEFAULT '[]',
created_at TIMESTAMP DEFAULT NOW()
);
CREATE TABLE IF NOT EXISTS pick_list_items (
id SERIAL PRIMARY KEY,
pick_list_id INTEGER NOT NULL REFERENCES pick_lists(id) ON DELETE CASCADE,
component_id INTEGER NOT NULL REFERENCES components(id),
part_number VARCHAR(255) NOT NULL,
component_name VARCHAR(255) NOT NULL,
category_name VARCHAR(255),
package_type VARCHAR(100),
shelf_location VARCHAR(100),
quantity_needed NUMERIC NOT NULL DEFAULT 0,
is_internal BOOLEAN NOT NULL DEFAULT false,
sources_json JSONB NOT NULL DEFAULT '[]',
created_at TIMESTAMP DEFAULT NOW()
);
CREATE INDEX IF NOT EXISTS idx_pick_list_items_pick_list ON pick_list_items(pick_list_id);
CREATE INDEX IF NOT EXISTS idx_pick_lists_created ON pick_lists(created_at DESC);