{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://puranwater.com/schemas/postgres/procurement/relief_device_spec.schema.json","title":"relief_device_spec","type":"object","properties":{"spec_id":{"type":"string","format":"uuid","x-pg-type":"uuid"},"equipment_uid":{"type":"string","format":"uuid","x-pg-type":"uuid"},"project_ref":{"type":"string","x-pg-type":"text"},"device_type":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"protected_equipment_uid":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"x-pg-type":"uuid"},"protected_equipment_tag":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"relieving_scenario":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"mawp_kpa":{"anyOf":[{"type":"number"},{"type":"null"}],"x-pg-type":"numeric"},"design_pressure_kpa":{"anyOf":[{"type":"number"},{"type":"null"}],"x-pg-type":"numeric"},"design_temp_c":{"anyOf":[{"type":"number"},{"type":"null"}],"x-pg-type":"numeric"},"operating_pressure_kpa":{"anyOf":[{"type":"number"},{"type":"null"}],"x-pg-type":"numeric"},"operating_temp_c":{"anyOf":[{"type":"number"},{"type":"null"}],"x-pg-type":"numeric"},"set_pressure_kpa":{"type":"number","x-pg-type":"numeric"},"accumulation_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"x-pg-type":"numeric"},"overpressure_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"x-pg-type":"numeric"},"required_area_mm2":{"anyOf":[{"type":"number"},{"type":"null"}],"x-pg-type":"numeric"},"selected_orifice":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"effective_area_mm2":{"anyOf":[{"type":"number"},{"type":"null"}],"x-pg-type":"numeric"},"relieving_capacity":{"anyOf":[{"type":"number"},{"type":"null"}],"x-pg-type":"numeric"},"capacity_units":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"service":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"fluid":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"fluid_molecular_weight":{"anyOf":[{"type":"number"},{"type":"null"}],"x-pg-type":"numeric"},"backpressure_type":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"built_up_bp_kpa":{"anyOf":[{"type":"number"},{"type":"null"}],"x-pg-type":"numeric"},"superimposed_bp_kpa":{"anyOf":[{"type":"number"},{"type":"null"}],"x-pg-type":"numeric"},"total_bp_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"x-pg-type":"numeric"},"size_inlet":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"size_outlet":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"inlet_flange_rating":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"outlet_flange_rating":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"material_body":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"material_disc":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"material_spring":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"material_nozzle":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"material_bellows":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"nbbi_number":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"certification_body":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"last_test_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"x-pg-type":"date"},"test_interval_months":{"anyOf":[{"type":"integer"},{"type":"null"}],"x-pg-type":"int4"},"pop_test_pressure_kpa":{"anyOf":[{"type":"number"},{"type":"null"}],"x-pg-type":"numeric"},"burst_pressure_kpa":{"anyOf":[{"type":"number"},{"type":"null"}],"x-pg-type":"numeric"},"burst_temp_c":{"anyOf":[{"type":"number"},{"type":"null"}],"x-pg-type":"numeric"},"manufacturing_range_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"x-pg-type":"numeric"},"disc_material":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"holder_type":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"discharge_destination":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"discharge_piping_size":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"specs_jsonb":{"anyOf":[{},{"type":"null"}],"x-pg-type":"jsonb"},"created_at":{"type":"string","format":"date-time","x-pg-type":"timestamptz"},"lifecycle_stage":{"type":"string","x-pg-type":"text"},"review_state":{"type":"string","x-pg-type":"text"},"reviewed_by":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"reviewed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"x-pg-type":"timestamptz"},"review_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"row_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"is_current":{"type":"boolean","x-pg-type":"bool"},"superseded_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"x-pg-type":"uuid"},"provenance":{"type":"string","x-pg-type":"text"}},"x-table-schema":"public","required":["equipment_uid","project_ref","set_pressure_kpa","provenance"],"x-primary-key":["spec_id"],"x-foreign-keys":[{"column":"project_ref","references_table":"project","references_column":"ref","constraint":"relief_device_spec_project_ref_fkey"},{"column":"superseded_by","references_table":"relief_device_spec","references_column":"spec_id","constraint":"relief_device_spec_superseded_by_fkey"}]}