{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://puranwater.com/schemas/postgres/procurement/estimate_line.schema.json","title":"estimate_line","type":"object","properties":{"id":{"type":"integer","x-pg-type":"int4"},"estimate_id":{"type":"integer","x-pg-type":"int4"},"cost_observation_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"x-pg-type":"int8"},"equipment_category_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"x-pg-type":"int4"},"equipment_tag":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"quantity":{"type":"number","x-pg-type":"numeric"},"unit_cost_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"x-pg-type":"numeric"},"total_cost_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"x-pg-type":"numeric"},"cost_basis":{"type":"string","x-pg-type":"text"},"cost_source":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"specs":{"x-pg-type":"jsonb"},"includes":{"x-pg-type":"jsonb"},"installation_factor":{"anyOf":[{"type":"number"},{"type":"null"}],"x-pg-type":"numeric"},"installed_cost_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"x-pg-type":"numeric"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"created_at":{"type":"string","format":"date-time","x-pg-type":"timestamptz"},"producer_tool":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"scope_refs":{"anyOf":[{},{"type":"null"}],"x-pg-type":"jsonb"},"sizing_params":{"anyOf":[{},{"type":"null"}],"x-pg-type":"jsonb"},"upstream_artifact_hashes":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"x-pg-type":"_text"},"scope_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"x-pg-type":"bool"},"scope_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"confidence":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"parametric_range_usd":{"anyOf":[{},{"type":"null"}],"x-pg-type":"jsonb"},"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":["estimate_id"],"x-primary-key":["id"],"x-foreign-keys":[{"column":"cost_observation_id","references_table":"cost_observation","references_column":"id","constraint":"estimate_line_cost_observation_id_fkey"},{"column":"equipment_category_id","references_table":"equipment_category","references_column":"id","constraint":"estimate_line_equipment_category_id_fkey"},{"column":"estimate_id","references_table":"project_estimate","references_column":"id","constraint":"estimate_line_estimate_id_fkey"}]}