{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://puranwater.com/schemas/postgres/procurement/process_datasheet.schema.json","title":"process_datasheet","type":"object","properties":{"datasheet_id":{"type":"string","format":"uuid","x-pg-type":"uuid"},"equipment_uid":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"x-pg-type":"uuid"},"equipment_tag":{"type":"string","x-pg-type":"text"},"project_ref":{"type":"string","x-pg-type":"text"},"template_id":{"type":"string","x-pg-type":"text"},"equipment_category_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"x-pg-type":"int4"},"document_number":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"revision":{"type":"string","x-pg-type":"text"},"revision_stage":{"type":"string","x-pg-type":"text"},"datasheet_stage":{"type":"string","x-pg-type":"text"},"source_channel":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"datasheet_jsonb":{"x-pg-type":"jsonb"},"vendor_quote_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"x-pg-type":"int4"},"cost_observation_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"x-pg-type":"int8"},"is_current":{"type":"boolean","x-pg-type":"bool"},"superseded_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"x-pg-type":"uuid"},"created_at":{"type":"string","format":"date-time","x-pg-type":"timestamptz"},"updated_at":{"type":"string","format":"date-time","x-pg-type":"timestamptz"},"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"}},"x-table-schema":"public","required":["equipment_tag","project_ref","template_id"],"x-primary-key":["datasheet_id"],"x-foreign-keys":[{"column":"cost_observation_id","references_table":"cost_observation","references_column":"id","constraint":"process_datasheet_cost_observation_id_fkey"},{"column":"equipment_category_id","references_table":"equipment_category","references_column":"id","constraint":"process_datasheet_equipment_category_id_fkey"},{"column":"project_ref","references_table":"project","references_column":"ref","constraint":"process_datasheet_project_ref_fkey"},{"column":"superseded_by","references_table":"process_datasheet","references_column":"datasheet_id","constraint":"process_datasheet_superseded_by_fkey"},{"column":"template_id","references_table":"datasheet_template","references_column":"template_id","constraint":"process_datasheet_template_id_fkey"},{"column":"vendor_quote_id","references_table":"vendor_quote","references_column":"id","constraint":"process_datasheet_vendor_quote_id_fkey"}]}