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
message_drafts.json · 2.1 KB · 63 lines
| 1 | { |
| 2 | "name": "message_drafts", |
| 3 | "title": "Message Drafts", |
| 4 | "version": 1, |
| 5 | "description": "An unsent message the owner is composing -- a faithful port of a private predecessor-system audit's separate MessageDraft model, not part of this repo. The source kept drafts as their own model rather than a status value on Message, and this package follows that same split rather than adding a draft status to schemas/messages.json. thread_id is optional: a reply-in-progress sets it (see objects/site/message_thread.py's Save Draft action); a brand-new compose leaves it blank. Saving a draft here never sends anything -- no SMTP transport exists in this package (see dbbasic-package.json's deferred list); a draft is data only, same as every other collection in this package.", |
| 6 | "fields": [ |
| 7 | { |
| 8 | "name": "id" |
| 9 | }, |
| 10 | { |
| 11 | "name": "thread_id", |
| 12 | "type": "relation", |
| 13 | "relation": {"collection": "message_threads", "display_field": "subject"}, |
| 14 | "label": "Thread", |
| 15 | "help": "Blank for a new compose not yet attached to any thread." |
| 16 | }, |
| 17 | { |
| 18 | "name": "to_addresses", |
| 19 | "type": "text", |
| 20 | "label": "To", |
| 21 | "validation": {"max_length": 500}, |
| 22 | "help": "Comma-separated address snapshot, same convention as messages.json carries for addressing." |
| 23 | }, |
| 24 | { |
| 25 | "name": "cc_addresses", |
| 26 | "type": "text", |
| 27 | "label": "Cc", |
| 28 | "validation": {"max_length": 500} |
| 29 | }, |
| 30 | { |
| 31 | "name": "subject", |
| 32 | "type": "text", |
| 33 | "label": "Subject", |
| 34 | "validation": {"max_length": 300} |
| 35 | }, |
| 36 | { |
| 37 | "name": "body_text", |
| 38 | "type": "textarea", |
| 39 | "label": "Body" |
| 40 | }, |
| 41 | { |
| 42 | "name": "owner_id", |
| 43 | "type": "text", |
| 44 | "label": "Owner" |
| 45 | }, |
| 46 | { |
| 47 | "name": "created_at", |
| 48 | "type": "datetime", |
| 49 | "label": "Created", |
| 50 | "read_only": true |
| 51 | } |
| 52 | ], |
| 53 | "forms": { |
| 54 | "default": {"fields": ["thread_id", "to_addresses", "cc_addresses", "subject", "body_text"]} |
| 55 | }, |
| 56 | "views": { |
| 57 | "list_mode": "table", |
| 58 | "list_fields": ["subject", "to_addresses", "created_at"] |
| 59 | }, |
| 60 | "search": { |
| 61 | "fields": ["subject", "body_text"] |
| 62 | } |
| 63 | } |