179 lines · 4.1 KB · JSONRaw
{ "format_version": 1, "id": "person_note", "name": "Person note", "plural": "Person notes", "record_route": "/people/person/[id]", "picture": null, "builtin": true, "delete": false, "engine": "people", "columns": [ { "key": "person_id", "name": "Person", "type": "link", "link_to": "person", "readonly": true }, { "key": "body", "name": "Note", "type": "longtext", "required": true, "readonly": true }, { "key": "noted_at", "name": "Day", "type": "date", "readonly": true, "fact": true, "reading": "{value}", "format": "calendar-datetime"} ], "title": "body", "date": "noted_at", "project": null, "order": null, "slip": { "title": "body", "subtitle": null, "trailing": "noted_at", "photo": null, "toggle": null }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "body", "noted_at", "person_id" ] } ], "instructions": "A person note is one short fact or moment about a person, shown on that person's page. The day is the day the note is about, not the day it was written. Keep each note to one thing and link it to the right person.", "tables": [ { "name": "cotton_person_notes", "columns": [ { "name": "id", "type": "TEXT", "default": null, "nullable": true, "primary_key": true, "declaration": "\n id TEXT PRIMARY KEY", "position": 0 }, { "name": "person_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n person_id TEXT NOT NULL", "position": 1 }, { "name": "body", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n body TEXT NOT NULL", "position": 2 }, { "name": "noted_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n noted_at TEXT NOT NULL", "position": 3 }, { "name": "created_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n created_at TEXT NOT NULL", "position": 4 }, { "name": "source_inbox_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n source_inbox_id TEXT", "position": 5 }, { "name": "_hlc", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n _hlc TEXT NOT NULL DEFAULT ''", "position": 6 }, { "name": "_born", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n _born TEXT", "position": 7 } ], "constraints": [ { "declaration": "\n FOREIGN KEY (person_id) REFERENCES cotton_people(id)\n ", "position": 8 } ], "prefix": "CREATE TABLE cotton_person_notes (", "suffix": ")", "indexes": [ "CREATE INDEX idx_cotton_person_notes_person ON cotton_person_notes (person_id)", "CREATE INDEX IF NOT EXISTS idx_cotton_person_notes_author ON cotton_person_notes (substr(_hlc, 20), _hlc)" ], "full_text": [], "triggers": [] } ], "parts": { "shape": "desk", "head": { "facts": [ "noted_at" ] }, "links": [], "body": "body", "lists": [], "acts": { "more": [ "person" ] }, "strip": [] }, "commands": [ { "id": "person", "label": "Open person", "kind": "open", "opens": "person_id" } ]}