{ "format_version": 1, "id": "screenplay_character", "name": "Character", "plural": "Characters", "builtin": true, "visibility": "owner", "title": "name", "columns": [ { "key": "screenplay_id", "name": "Screenplay", "type": "link", "link_to": "screenplay", "required": true, "readonly": true }, { "key": "name", "type": "text", "required": true }, { "key": "aliases", "name": "Other spellings", "type": "text" }, { "key": "bio", "type": "longtext" }, { "key": "trashed_at", "type": "date", "format": "calendar-datetime", "readonly": true }, { "key": "want", "type": "longtext" }, { "key": "arc", "type": "longtext" }, { "key": "age", "type": "text" }, { "key": "casting_thoughts", "name": "Casting thoughts", "type": "longtext" }, { "key": "picture_photo_id", "name": "Picture", "type": "link", "link_to": "photo", "contributes": false }, { "key": "status", "type": "choice", "choices": [ "named", "heard" ], "readonly": true }, { "key": "first_scene", "name": "First seen", "type": "number", "readonly": true }, { "key": "scene_count", "name": "Scenes", "type": "number", "readonly": true, "units": { "one": "scene", "other": "scenes" } } ], "instructions": "A character is one person in a screenplay: a name, the other spellings its cues may use, a short bio, what they want, their arc, their age, a picture (a photo record) and casting thoughts. Cues in the scenes that match the name or an alias count as that character. Rows with status \"heard\" are cues the scenes use that no character names yet; they are read-only and become a character when one is written with that name.", "parts": { "shape": "sheet", "head": { "facts": [ "age" ] }, "links": [ "screenplay_id" ], "lists": [], "acts": { "more": [], "away": "delete" }, "cards": [ { "column": "want" }, { "column": "arc" }, { "column": "casting_thoughts" } ], "strip": [], "body": "bio" }, "card": { "face": "character.card", "fields": [ { "slot": "photo", "column": "picture_photo_id" }, { "slot": "title", "column": "name" }, { "slot": "subtitle", "column": "age" }, { "slot": "facts", "column": "want", "also": [ "arc" ] }, { "slot": "body", "column": "bio" }, { "slot": "number", "column": "first_scene", "line": "field.first_seen" }, { "slot": "count", "column": "scene_count" } ] }, "tables": [ { "name": "cotton_screenplay_characters", "columns": [ { "name": "id", "type": "TEXT", "default": null, "nullable": true, "primary_key": true, "declaration": "\n id TEXT PRIMARY KEY", "position": 0 }, { "name": "workspace_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n workspace_id TEXT NOT NULL", "position": 1 }, { "name": "screenplay_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n screenplay_id TEXT NOT NULL", "position": 2 }, { "name": "name", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n name TEXT NOT NULL", "position": 3 }, { "name": "aliases", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n aliases TEXT", "position": 4 }, { "name": "bio", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n bio TEXT", "position": 5 }, { "name": "created_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n created_at TEXT NOT NULL", "position": 6 }, { "name": "updated_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n updated_at TEXT NOT NULL", "position": 7 }, { "name": "_hlc", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n _hlc TEXT NOT NULL DEFAULT ''", "position": 8 }, { "name": "_born", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n _born TEXT", "position": 9 }, { "name": "trashed_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n trashed_at TEXT", "position": 10 }, { "name": "want", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n want TEXT", "position": 11 }, { "name": "arc", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n arc TEXT", "position": 12 }, { "name": "age", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n age TEXT", "position": 13 }, { "name": "casting_thoughts", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n casting_thoughts TEXT", "position": 14 }, { "name": "picture_photo_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n picture_photo_id TEXT", "position": 15 } ], "constraints": [ { "declaration": "\n UNIQUE (screenplay_id, name)", "position": 16 }, { "declaration": "\n CHECK (length(trim(name)) > 0)", "position": 17 }, { "declaration": "\n CHECK (aliases IS NULL OR json_type(aliases) = 'array')", "position": 18 }, { "declaration": "\n FOREIGN KEY (workspace_id) REFERENCES cotton_workspaces(id) ON DELETE CASCADE", "position": 19 }, { "declaration": "\n FOREIGN KEY (screenplay_id) REFERENCES cotton_screenplays(id)\n ", "position": 20 } ], "prefix": "CREATE TABLE cotton_screenplay_characters (", "suffix": ")", "indexes": [ "CREATE INDEX idx_cotton_screenplay_characters_screenplay ON cotton_screenplay_characters (screenplay_id, name)", "CREATE INDEX IF NOT EXISTS idx_cotton_screenplay_characters_author ON cotton_screenplay_characters (substr(_hlc, 20), _hlc)" ], "full_text": [], "triggers": [] } ], "picture": null, "engine": "screenplay", "voice_words": [ "name", "aliases" ], "date": null, "project": null, "order": null, "slip": { "title": "name", "subtitle": "aliases", "trailing": null, "photo": null, "toggle": null, "subtitle_fallback": "bio" }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "name", "aliases", "bio" ] }, { "heading": "In the story", "columns": [ "want", "arc", "age" ] }, { "heading": "Casting", "columns": [ "picture_photo_id", "casting_thoughts" ] } ], "group": { "column": "status", "sections": [ { "heading": null, "values": [ "named" ], "note": "Cues that match a name or one of its other spellings count as that character." }, { "heading": "Heard in the scenes", "values": [ "heard" ], "note": "Speaks here, but nobody has named them yet." } ] }, "add": false, "empty": { "title": "No characters yet", "message": "Nobody speaks in the scenes yet." }, "create": { "label": "New character" }, "delete_when": { "column": "status", "values": [ "named" ] }, "deletion": { "bin": true }, "links": [ { "label": "Deleted", "table": "bin", "where": { "table": "screenplay_character" } } ], "commands": [ { "id": "delete", "label": "Delete", "kind": "delete", "verb": "delete_record", "data": { "table": "screenplay_character" }, "confirm": "It can come back from the Bin. Undo on the receipt brings it back now.", "bindings": { "id": "$id" }, "when": { "status": "named" }, "receipt": "Deleted", "does": "destroys", "object": "bin" } ] }