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
fin_recurring.json · 3.4 KB · 108 lines
| 1 | { |
| 2 | "name": "fin_recurring", |
| 3 | "title": "Recurring Journals", |
| 4 | "version": 2, |
| 5 | "description": "Recurring journal templates: a JSON line template plus a schedule (frequency/next_run/last_run) and an auto_post flag. Reconciled against a private predecessor-system audit, not part of this repo (its RecurringJournal model: 'JSON template + frequency + auto_post', materialized by a daily scheduled task). This package carries the fields only -- the materialization job itself (reading due templates and creating real fin_journals/fin_journal_lines rows) is a daemon-pass concern and is NOT built here; see dbbasic-package.json's Deferred list. next_run/last_run are therefore plain owner-writable fields, not stamped by anything in this package yet.", |
| 6 | "fields": [ |
| 7 | { |
| 8 | "name": "id" |
| 9 | }, |
| 10 | { |
| 11 | "name": "name", |
| 12 | "type": "text", |
| 13 | "required": true, |
| 14 | "label": "Name", |
| 15 | "validation": { |
| 16 | "min_length": 1, |
| 17 | "max_length": 200 |
| 18 | } |
| 19 | }, |
| 20 | { |
| 21 | "name": "template_lines", |
| 22 | "type": "textarea", |
| 23 | "label": "Template Lines (JSON)", |
| 24 | "help": "The recurring line template as JSON (account/debit/credit/memo shapes), per the predecessor system's RecurringJournal.template field. Stored as opaque text -- this package does not parse or validate its structure, since nothing here materializes it yet." |
| 25 | }, |
| 26 | { |
| 27 | "name": "frequency", |
| 28 | "type": "enum", |
| 29 | "label": "Frequency", |
| 30 | "default": "monthly", |
| 31 | "enum": [ |
| 32 | "daily", |
| 33 | "weekly", |
| 34 | "monthly", |
| 35 | "quarterly", |
| 36 | "yearly" |
| 37 | ] |
| 38 | }, |
| 39 | { |
| 40 | "name": "next_run", |
| 41 | "type": "date", |
| 42 | "label": "Next Run", |
| 43 | "help": "When the materialization job would next create a journal from this template. No job reads or writes this field yet in this package -- see the module description's Deferred note." |
| 44 | }, |
| 45 | { |
| 46 | "name": "last_run", |
| 47 | "type": "date", |
| 48 | "label": "Last Run", |
| 49 | "help": "When the materialization job last created a journal from this template. No job reads or writes this field yet in this package -- see the module description's Deferred note." |
| 50 | }, |
| 51 | { |
| 52 | "name": "auto_post", |
| 53 | "type": "boolean", |
| 54 | "default": "false", |
| 55 | "label": "Auto-post", |
| 56 | "help": "Whether a materialized journal should be posted immediately rather than left in draft. Carried as a plain flag; has no effect until the materialization job exists." |
| 57 | }, |
| 58 | { |
| 59 | "name": "is_active", |
| 60 | "type": "boolean", |
| 61 | "default": "true", |
| 62 | "label": "Active" |
| 63 | }, |
| 64 | { |
| 65 | "name": "owner_id", |
| 66 | "type": "text", |
| 67 | "label": "Owner" |
| 68 | }, |
| 69 | { |
| 70 | "name": "entity_id", |
| 71 | "type": "text", |
| 72 | "label": "Entity", |
| 73 | "relation": { |
| 74 | "collection": "entities", |
| 75 | "display_field": "name" |
| 76 | }, |
| 77 | "help": "The set of books this belongs to (65 multi-entity). Optional during rollout; backfilled to the owner's default entity, set by the entity switcher on new writes." |
| 78 | }, |
| 79 | { |
| 80 | "name": "created_at", |
| 81 | "type": "datetime", |
| 82 | "label": "Created", |
| 83 | "read_only": true |
| 84 | } |
| 85 | ], |
| 86 | "forms": { |
| 87 | "default": { |
| 88 | "fields": [ |
| 89 | "name", |
| 90 | "template_lines", |
| 91 | "frequency", |
| 92 | "next_run", |
| 93 | "auto_post", |
| 94 | "is_active" |
| 95 | ] |
| 96 | } |
| 97 | }, |
| 98 | "views": { |
| 99 | "list_mode": "table", |
| 100 | "list_fields": [ |
| 101 | "name", |
| 102 | "frequency", |
| 103 | "next_run", |
| 104 | "auto_post", |
| 105 | "is_active" |
| 106 | ] |
| 107 | } |
| 108 | } |