Repository navigation
Expand file tree
/
Copy pathdemo_cost_seed.sql
More file actions
22 lines (22 loc) · 5.64 KB
/
Copy pathdemo_cost_seed.sql
File metadata and controls
22 lines (22 loc) · 5.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
-- Additive, optional synthetic fixture for opsatlas_demo after migration 001.
-- Explicitly illustrative: these are NOT current quotes, tariffs, forecasts, or actual invoices.
BEGIN;
INSERT INTO opsatlas.cost_books(id,tenant_id,name,version,status,currency,geography,price_basis,valid_from,source_policy)
VALUES ('c0000000-0000-4000-8000-000000000001','00000000-0000-4000-8000-000000000001','Synthetic facility lifecycle workbook','demo-2026.1','approved','USD','EG','benchmark',current_date-30,'{"synthetic":true,"label":"NOT LIVE; replace with dated sourced prices"}') ON CONFLICT DO NOTHING;
INSERT INTO opsatlas.price_observations(id,tenant_id,cost_book_id,item_code,description,category,manufacturer,model,classification_system,classification_code,quantity_unit,unit_price,currency,geography,delivery_basis,observed_at,valid_from,source_kind,source_name,source_ref,confidence,currency_basis_date,normalized_unit_price,quality_status,provenance)
VALUES
('c0000000-0000-4000-8000-000000000002','00000000-0000-4000-8000-000000000001','c0000000-0000-4000-8000-000000000001','POWER-TRAIN-KW','Synthetic electrical power train allowance','electrical','Synthetic fixture','POWER-TRAIN-KW','UNIFORMAT-II','D5010','kW',2400,'USD','EG','installed',now(),current_date-30,'synthetic_demo','A2Z demo seed','synthetic://demo/power',0.25,current_date,2400,'approved','{"synthetic":true,"label":"NOT LIVE"}'),
('c0000000-0000-4000-8000-000000000003','00000000-0000-4000-8000-000000000001','c0000000-0000-4000-8000-000000000001','COOLING-KW','Synthetic cooling capacity allowance','mechanical','Synthetic fixture','COOLING-KW','UNIFORMAT-II','D3050','kW',1800,'USD','EG','installed',now(),current_date-30,'synthetic_demo','A2Z demo seed','synthetic://demo/cooling',0.25,current_date,1800,'approved','{"synthetic":true,"label":"NOT LIVE"}'),
('c0000000-0000-4000-8000-000000000004','00000000-0000-4000-8000-000000000001','c0000000-0000-4000-8000-000000000001','GRID-KWH','Synthetic annual blended energy allowance','energy',NULL,'GRID-KWH',NULL,NULL,'kWh',0.12,'USD','EG','metered',now(),current_date-30,'synthetic_demo','A2Z demo seed','synthetic://demo/energy',0.20,current_date,0.12,'approved','{"synthetic":true,"label":"NOT LIVE","not_a_tariff":true}') ON CONFLICT DO NOTHING;
INSERT INTO opsatlas.estimate_scenarios(id,tenant_id,facility_id,scenario_key,name,lifecycle_phase,status,version,currency,geography,price_as_of,base_date,horizon_months,it_capacity_kw,facility_area_m2,rack_count,annual_energy_kwh,annual_useful_work,discount_rate,contingency_pct,assumptions,calculation_version)
VALUES ('c0000000-0000-4000-8000-000000000005','00000000-0000-4000-8000-000000000001','00000000-0000-4000-8000-000000000031','DC-DEMO-LCC','Synthetic 1.2 MW facility lifecycle estimate','design','review',1,'USD','EG',current_date,current_date,240,1200,1200,100,10512000,1000000000,0.05,0.15,'{"synthetic":true,"label":"NOT LIVE","assumptions":["24x7 annual-energy simplification","no tax, financing, land, schedule escalation or residual value","not suitable for procurement/investment"]}','a2z-cost-v1') ON CONFLICT DO NOTHING;
INSERT INTO opsatlas.estimate_line_items(id,tenant_id,estimate_id,line_no,phase,description,classification_system,classification_code,quantity,quantity_unit,waste_factor,base_unit_cost,low_unit_cost,high_unit_cost,low_total,high_total,currency,pricing_status,cost_behavior,recurrence_months,start_month,escalation_pct,price_observation_id,assumptions)
VALUES
('c0000000-0000-4000-8000-000000000006','00000000-0000-4000-8000-000000000001','c0000000-0000-4000-8000-000000000005',10,'electrical','Electrical distribution and power train','UNIFORMAT-II','D5010',1200,'kW',0,2400,1800,3200,2160000,3840000,'USD','synthetic','capitalized',NULL,0,0,'c0000000-0000-4000-8000-000000000002','{"synthetic":true,"label":"NOT LIVE"}'),
('c0000000-0000-4000-8000-000000000007','00000000-0000-4000-8000-000000000001','c0000000-0000-4000-8000-000000000005',20,'mechanical','Cooling and heat rejection','UNIFORMAT-II','D3050',1200,'kW',0,1800,1300,2500,1560000,3000000,'USD','synthetic','capitalized',NULL,0,0,'c0000000-0000-4000-8000-000000000003','{"synthetic":true,"label":"NOT LIVE"}'),
('c0000000-0000-4000-8000-000000000008','00000000-0000-4000-8000-000000000001','c0000000-0000-4000-8000-000000000005',30,'energy','Annual electricity, recurring for 20 years','UNIFORMAT-II','D5010',10512000,'kWh',0,0.12,0.08,0.18,840960,1892160,'USD','synthetic','variable',12,12,0.03,'c0000000-0000-4000-8000-000000000004','{"synthetic":true,"label":"NOT LIVE","excludes_demand_charges_and_taxes":true}') ON CONFLICT DO NOTHING;
INSERT INTO opsatlas.cost_actuals(id,tenant_id,facility_id,estimate_id,estimate_line_id,occurred_at,accounting_period,cost_type,phase,amount,currency,source_system,source_ref,accrual_state,provenance)
VALUES ('c0000000-0000-4000-8000-000000000009','00000000-0000-4000-8000-000000000001','00000000-0000-4000-8000-000000000031','c0000000-0000-4000-8000-000000000005','c0000000-0000-4000-8000-000000000008',now(),date_trunc('month',now())::date,'energy','operations',123456.78,'USD','synthetic-demo','synthetic://demo/actual-energy','invoiced','{"synthetic":true,"label":"NOT LIVE","fixture_only":true}') ON CONFLICT DO NOTHING;
INSERT INTO opsatlas.cost_allocations(id,tenant_id,cost_actual_id,workload_ref,allocation_basis,allocated_amount,currency,allocation_fraction,window_start,window_end,method_version,evidence)
VALUES ('c0000000-0000-4000-8000-000000000010','00000000-0000-4000-8000-000000000001','c0000000-0000-4000-8000-000000000009','synthetic-workload-001','capacity_share',49382.712,'USD',0.4,date_trunc('month',now()),now(),'demo-allocation-v1','{"synthetic":true,"label":"NOT LIVE","illustrative_fraction":0.4}') ON CONFLICT DO NOTHING;
COMMIT;