{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://puranwater.com/schemas/postgres/procurement/instrument_spec.schema.json","title":"instrument_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"},"instrument_type":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"manufacturer":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"service_description":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"fluid":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"fluid_state":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"operating_pressure_kpa":{"anyOf":[{"type":"number"},{"type":"null"}],"x-pg-type":"numeric"},"operating_temp_c":{"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"},"measurement_principle":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"range_low":{"anyOf":[{"type":"number"},{"type":"null"}],"x-pg-type":"numeric"},"range_high":{"anyOf":[{"type":"number"},{"type":"null"}],"x-pg-type":"numeric"},"range_units":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"span":{"anyOf":[{"type":"number"},{"type":"null"}],"x-pg-type":"numeric"},"lrv":{"anyOf":[{"type":"number"},{"type":"null"}],"x-pg-type":"numeric"},"urv":{"anyOf":[{"type":"number"},{"type":"null"}],"x-pg-type":"numeric"},"accuracy_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"x-pg-type":"numeric"},"repeatability_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"x-pg-type":"numeric"},"response_time_s":{"anyOf":[{"type":"number"},{"type":"null"}],"x-pg-type":"numeric"},"damping_s":{"anyOf":[{"type":"number"},{"type":"null"}],"x-pg-type":"numeric"},"output_signal":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"power_supply":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"communication_protocol":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"process_connection":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"wetted_materials":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"housing_material":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"enclosure_rating":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"area_classification":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"protection_method":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"temp_class":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"approval_agency":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"mounting_type":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"cable_entry":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"calibration_interval_months":{"anyOf":[{"type":"integer"},{"type":"null"}],"x-pg-type":"int4"},"sil_rating":{"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","provenance"],"x-primary-key":["spec_id"],"x-foreign-keys":[{"column":"project_ref","references_table":"project","references_column":"ref","constraint":"instrument_spec_project_ref_fkey"},{"column":"superseded_by","references_table":"instrument_spec","references_column":"spec_id","constraint":"instrument_spec_superseded_by_fkey"}]}