{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://puranwater.com/schemas/postgres/procurement/cost_observation.schema.json","title":"cost_observation","type":"object","properties":{"id":{"type":"integer","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"},"project_ref":{"type":"string","x-pg-type":"text"},"observation_type":{"type":"string","x-pg-type":"text"},"unit_cost_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"x-pg-type":"numeric"},"quantity":{"type":"number","x-pg-type":"numeric"},"uom":{"type":"string","x-pg-type":"text"},"total_cost_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"x-pg-type":"numeric"},"currency":{"type":"string","x-pg-type":"text"},"fx_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"x-pg-type":"numeric"},"fx_rate_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"x-pg-type":"date"},"cost_basis":{"type":"string","x-pg-type":"text"},"includes":{"x-pg-type":"jsonb"},"specs":{"x-pg-type":"jsonb"},"effective_at":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"x-pg-type":"date"},"recorded_at":{"type":"string","format":"date-time","x-pg-type":"timestamptz"},"observation_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"x-pg-type":"date"},"cepci_at_observation":{"anyOf":[{"type":"number"},{"type":"null"}],"x-pg-type":"numeric"},"source_system":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"source_channel":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"source_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"source_line_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"source_revision":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"vendor_quote_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"x-pg-type":"int4"},"vendor_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"x-pg-type":"int4"},"calibration_factor_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"x-pg-type":"int4"},"reverses_observation_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"x-pg-type":"int8"},"idempotency_key":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"parametric_model_key":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"sizing_params":{"anyOf":[{},{"type":"null"}],"x-pg-type":"jsonb"},"model_output":{"anyOf":[{},{"type":"null"}],"x-pg-type":"jsonb"},"aace_class":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"confidence_note":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"entered_by":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"estimate_low_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"x-pg-type":"numeric"},"estimate_high_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"x-pg-type":"numeric"},"country_of_origin":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"}},"x-table-schema":"public","required":["project_ref","observation_type"],"x-primary-key":["id"],"x-foreign-keys":[{"column":"calibration_factor_id","references_table":"calibration_factor","references_column":"id","constraint":"cost_observation_calibration_factor_id_fkey"},{"column":"equipment_category_id","references_table":"equipment_category","references_column":"id","constraint":"cost_observation_equipment_category_id_fkey"},{"column":"reverses_observation_id","references_table":"cost_observation","references_column":"id","constraint":"cost_observation_reverses_observation_id_fkey"},{"column":"vendor_id","references_table":"vendor","references_column":"id","constraint":"cost_observation_vendor_id_fkey"},{"column":"vendor_quote_id","references_table":"vendor_quote","references_column":"id","constraint":"cost_observation_vendor_quote_id_fkey"}]}