Added more functionality
This commit is contained in:
@@ -64,6 +64,8 @@ CREATE TABLE IF NOT EXISTS service_order_items (
|
||||
service_order_id UUID NOT NULL REFERENCES service_orders(service_order_id) ON DELETE CASCADE,
|
||||
item_type TEXT NOT NULL CHECK (item_type IN ('labor', 'part')),
|
||||
description TEXT NOT NULL,
|
||||
part_number TEXT,
|
||||
labor_time_minutes INTEGER CHECK (labor_time_minutes IS NULL OR labor_time_minutes > 0),
|
||||
quantity NUMERIC(10, 2) NOT NULL DEFAULT 1 CHECK (quantity > 0),
|
||||
unit_price NUMERIC(12, 2) NOT NULL CHECK (unit_price >= 0),
|
||||
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
|
||||
|
||||
Reference in New Issue
Block a user