{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://puranwater.com/schemas/postgres/legal/contract_document.schema.json","title":"contract_document","type":"object","properties":{"document_id":{"type":"string","format":"uuid","x-pg-type":"uuid"},"project_ref":{"type":"string","x-pg-type":"text"},"contract_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"x-pg-type":"uuid"},"counterparty_vendor_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"x-pg-type":"int4"},"document_role":{"type":"string","x-pg-type":"text"},"title":{"type":"string","x-pg-type":"text"},"document_version":{"type":"string","x-pg-type":"text"},"precedence_rank":{"anyOf":[{"type":"integer"},{"type":"null"}],"x-pg-type":"int4"},"governing_law":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"jurisdiction":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"privilege_class":{"type":"string","x-pg-type":"text"},"paperless_document_id":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"file_hash":{"type":"string","x-pg-type":"text"},"effective_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"x-pg-type":"date"},"superseded_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"x-pg-type":"uuid"},"created_at":{"type":"string","format":"date-time","x-pg-type":"timestamptz"},"created_by":{"type":"string","x-pg-type":"text"}},"x-table-schema":"public","required":["project_ref","document_role","title","document_version","file_hash"],"x-primary-key":["document_id"],"x-foreign-keys":[{"column":"superseded_by","references_table":"contract_document","references_column":"document_id","constraint":"contract_document_superseded_by_fkey"}]}