askrobots / dbbasic-object-server
Public
Runs live, versioned Python application objects on one VM, with a suite of apps: projects, notes, tasks, files and more.
danq9
signup: the person chooses the password and name on the confirm page
83c7aa6
2 weeks, 5 days ago
History
bank_statement_imports.json · 2.7 KB · 35 lines
| 1 | { |
| 2 | "name": "bank_statement_imports", |
| 3 | "title": "Statement Imports", |
| 4 | "version": 1, |
| 5 | "storage": "append", |
| 6 | "description": "One row per import run -- the provenance record every bank line points at. Append-only: an import is a historical event, not a document to edit. status is computed by the gates, never chosen by the importer: accepted when every check that COULD run passed, flagged when arithmetic disagrees with the file. flags records which checks RAN as well as which passed, because a balance-less CSV that passed nothing must not read as trustworthy as a tied-out statement (see object_banking.run_gates). Lines from a flagged import still land -- evidence is evidence -- but the reconciliation view marks them lower-assurance rather than hiding the problem.", |
| 7 | "fields": [ |
| 8 | {"name": "id"}, |
| 9 | {"name": "bank_account_id", "required": true, "label": "Bank Account", |
| 10 | "relation": {"collection": "value_accounts", "display_field": "name"}}, |
| 11 | {"name": "profile_id", "label": "Profile", |
| 12 | "relation": {"collection": "bank_import_profiles", "display_field": "name"}}, |
| 13 | {"name": "source_format", "type": "text", "label": "Format"}, |
| 14 | {"name": "file_hash", "type": "text", "label": "File Hash", |
| 15 | "help": "sha256 of the statement file. Re-importing the same file is a no-op -- the same idempotency-by-provenance posture composed journals get from generated_from."}, |
| 16 | {"name": "period_start", "type": "date", "label": "Period Start"}, |
| 17 | {"name": "period_end", "type": "date", "label": "Period End"}, |
| 18 | {"name": "opening_balance_cents", "type": "integer", "label": "Opening Balance (cents)"}, |
| 19 | {"name": "closing_balance_cents", "type": "integer", "label": "Closing Balance (cents)"}, |
| 20 | {"name": "line_count", "type": "integer", "label": "Lines"}, |
| 21 | {"name": "status", "type": "enum", "default": "accepted", "label": "Status", |
| 22 | "enum": ["accepted", "flagged"], |
| 23 | "help": "Set by the gates, not by hand: flagged means tie-out or continuity failed (truncated file, missing period, edited export)."}, |
| 24 | {"name": "flags", "type": "textarea", "label": "Checks (JSON)"}, |
| 25 | {"name": "owner_id", "type": "text", "label": "Owner"}, |
| 26 | {"name": "entity_id", "type": "text", "label": "Entity", |
| 27 | "relation": {"collection": "entities", "display_field": "name"}}, |
| 28 | {"name": "created_at", "type": "datetime", "read_only": true, "label": "Imported"} |
| 29 | ], |
| 30 | "forms": {"default": {"fields": ["bank_account_id", "profile_id", "period_start", "period_end", |
| 31 | "opening_balance_cents", "closing_balance_cents"]}}, |
| 32 | "views": {"list_mode": "table", |
| 33 | "list_fields": ["bank_account_id", "period_start", "period_end", "line_count", "status"], |
| 34 | "filter_fields": ["bank_account_id", "status"]} |
| 35 | } |