{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://puranwater.com/schemas/postgres/legal/flowdown_link.schema.json","title":"flowdown_link","type":"object","properties":{"link_id":{"type":"string","format":"uuid","x-pg-type":"uuid"},"project_ref":{"type":"string","x-pg-type":"text"},"upstream_clause_id":{"type":"string","format":"uuid","x-pg-type":"uuid"},"downstream_clause_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"x-pg-type":"uuid"},"upstream_contract_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"x-pg-type":"uuid"},"downstream_contract_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"x-pg-type":"uuid"},"flowdown_kind":{"type":"string","x-pg-type":"text"},"sub_cap_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"x-pg-type":"numeric"},"sub_recoverable_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"x-pg-type":"numeric"},"content_hash":{"type":"string","x-pg-type":"text"},"privilege_class":{"type":"string","x-pg-type":"text"},"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":{"type":"string","x-pg-type":"text"}},"x-table-schema":"public","required":["project_ref","upstream_clause_id","flowdown_kind","content_hash"],"x-primary-key":["link_id"],"x-foreign-keys":[{"column":"downstream_clause_id","references_table":"clause","references_column":"clause_id","constraint":"flowdown_link_downstream_clause_id_fkey"},{"column":"superseded_by","references_table":"flowdown_link","references_column":"link_id","constraint":"flowdown_link_superseded_by_fkey"},{"column":"upstream_clause_id","references_table":"clause","references_column":"clause_id","constraint":"flowdown_link_upstream_clause_id_fkey"}]}