Cotton code
146 lines · 2.8 KB · JSONRaw
{  "format_version": 1,  "id": "story_place",  "name": "Place",  "plural": "Places",  "builtin": false,  "visibility": "owner",  "engine": null,  "columns": [    {      "key": "story",      "name": "Story",      "type": "link",      "link_to": "story_story",      "required": true    },    {      "key": "name",      "name": "Name",      "type": "text",      "required": true,      "placeholder": "KITCHEN, ROOFTOP, BUS STOP"    },    {      "key": "about",      "name": "About",      "type": "longtext"    },    {      "key": "picture",      "name": "Picture",      "type": "photo"    },    {      "key": "scenes",      "name": "Scenes",      "type": "number",      "readonly": true,      "units": {        "one": "1 scene",        "other": "{n} scenes"      },      "computed": {        "rollup": {          "table": "story_scene",          "link": "place",          "op": "count"        }      }    }  ],  "seal": {    "clear": [      "story",      "scenes",      "picture"    ],    "blind": [      "name",      "about"    ]  },  "title": "name",  "date": null,  "project": null,  "order": null,  "slip": {    "title": "name",    "subtitle": "about",    "trailing": "scenes",    "photo": "picture",    "toggle": null  },  "tile": {    "face": "slip-list"  },  "card": {    "face": "place.card",    "fields": [      {        "slot": "title",        "column": "name"      },      {        "slot": "body",        "column": "about"      },      {        "slot": "note",        "column": "scenes"      }    ]  },  "page": [    {      "heading": null,      "columns": [        "picture",        "name",        "about"      ]    }  ],  "sort": {    "column": "name",    "descending": false  },  "create": {    "label": "New place"  },  "empty": {    "title": "No places yet",    "message": "Places gather here by themselves from your scene headings."  },  "deletion": {    "bin": true  },  "links": [    {      "label": "Deleted",      "table": "bin",      "where": {        "table": "story_place"      }    }  ],  "commands": [    {      "id": "delete",      "label": "Remove",      "kind": "delete",      "verb": "delete_record",      "data": {        "table": "story_place"      },      "confirm": "It can come back from Deleted, and Undo brings it back now. Your scene headings stay as they are.",      "bindings": {        "id": "$id"      },      "receipt": "Removed",      "does": "destroys",      "object": "bin"    }  ],  "instructions": "A place is where scenes of a story happen: its name as the scene heading says it (KITCHEN) and a longer about. The core makes a place on its own when a scene heading names one the story does not have. Renaming a place renames it in the story's scene headings. scenes is worked out, never written."}