{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://puranwater.com/schemas/postgres/project_finance/proforma_figure_basis.schema.json","title":"proforma_figure_basis","type":"object","properties":{"basis_row_id":{"type":"string","format":"uuid","x-pg-type":"uuid"},"model_run_id":{"type":"string","format":"uuid","x-pg-type":"uuid"},"canonical_hash":{"type":"string","x-pg-type":"text"},"project_ref":{"type":"string","x-pg-type":"text"},"scenario_name":{"type":"string","x-pg-type":"text"},"figure_id":{"type":"string","x-pg-type":"text"},"figure_path_snapshot":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"figure_label":{"type":"string","x-pg-type":"text"},"figure_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"figure_value":{"x-pg-type":"jsonb"},"basis_text":{"type":"string","x-pg-type":"text"},"basis_type":{"type":"string","x-pg-type":"text"},"basis_subtype":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"basis_fingerprint":{"type":"string","x-pg-type":"text"},"source_uris":{"type":"array","items":{"type":"string"},"x-pg-type":"_text"},"decided_by":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"decided_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"x-pg-type":"timestamptz"},"needs_review":{"type":"boolean","x-pg-type":"bool"},"review_due_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"x-pg-type":"timestamptz"},"reviewed_by":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"review_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"last_reviewed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"x-pg-type":"timestamptz"},"superseded_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"x-pg-type":"uuid"},"inserted_at":{"type":"string","format":"date-time","x-pg-type":"timestamptz"},"inserted_by":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"}},"x-table-schema":"public","required":["model_run_id","canonical_hash","project_ref","scenario_name","figure_id","figure_label","figure_value","basis_text","basis_type","basis_fingerprint","source_uris"],"x-primary-key":["basis_row_id"],"x-foreign-keys":[{"column":"model_run_id","references_table":"proforma_model_run","references_column":"model_run_id","constraint":"proforma_figure_basis_model_run_id_fkey"},{"column":"superseded_by","references_table":"proforma_figure_basis","references_column":"basis_row_id","constraint":"proforma_figure_basis_superseded_by_fkey"}]}