{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://puranwater.com/schemas/postgres/tally_accounting/tally_report_line.schema.json","title":"tally_report_line","type":"object","properties":{"report_line_id":{"type":"string","format":"uuid","x-pg-type":"uuid"},"report_snapshot_id":{"type":"string","format":"uuid","x-pg-type":"uuid"},"parent_line_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"x-pg-type":"uuid"},"line_number":{"type":"integer","x-pg-type":"int4"},"line_kind":{"type":"string","x-pg-type":"text"},"line_label":{"type":"string","x-pg-type":"text"},"group_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"x-pg-type":"uuid"},"ledger_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"x-pg-type":"uuid"},"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"x-pg-type":"numeric"},"debit_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"x-pg-type":"numeric"},"credit_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"x-pg-type":"numeric"},"quantity":{"anyOf":[{"type":"number"},{"type":"null"}],"x-pg-type":"numeric"},"quantity_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"sort_key":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"raw_payload":{"anyOf":[{},{"type":"null"}],"x-pg-type":"jsonb"}},"x-table-schema":"public","required":["report_snapshot_id","line_number","line_kind","line_label"],"x-primary-key":["report_line_id"],"x-foreign-keys":[{"column":"group_id","references_table":"tally_group","references_column":"group_id","constraint":"tally_report_line_group_id_fkey"},{"column":"ledger_id","references_table":"tally_ledger","references_column":"ledger_id","constraint":"tally_report_line_ledger_id_fkey"},{"column":"parent_line_id","references_table":"tally_report_line","references_column":"report_line_id","constraint":"tally_report_line_parent_line_id_fkey"},{"column":"report_snapshot_id","references_table":"tally_report_snapshot","references_column":"report_snapshot_id","constraint":"tally_report_line_report_snapshot_id_fkey"}]}