Cotton code
124 lines · 2.2 KB · JSONRaw
{  "format_version": 1,  "id": "restaurant",  "name": "Restaurant",  "plural": "Restaurants",  "picture": null,  "builtin": true,  "engine": null,  "columns": [    {      "key": "name",      "name": "Name",      "type": "text",      "required": true    },    {  "key": "cuisine",  "name": "Cuisine",  "type": "text",  "fact": true,  "reading": "{value}"},    {      "key": "usual",      "name": "Usual",      "type": "link",      "link_to": "order",      "contributes": false    }  ],  "title": "name",  "date": null,  "project": null,  "order": null,  "slip": {    "title": "name",    "subtitle": [      "cuisine"    ],    "trailing": null,    "photo": null,    "toggle": null  },  "tile": {    "face": "slip-list"  },  "page": [    {      "heading": null,      "columns": [        "name",        "cuisine",        "usual"      ]    }  ],  "add": true,  "delete": false,  "parts": {  "shape": "sheet",  "head": {    "facts": [      "cuisine"    ]  },  "links": [],  "lists": [    {      "table": "order",      "relation": "restaurant",      "heading": "Orders"    }  ],  "acts": {    "main": "order_food",    "more": [      "open-usual"    ]  },  "cards": [],  "strip": []},  "tables": [],  "instructions": "Restaurants and their saved usual order. Set usual only to an order from this restaurant; an engine may fill an empty link after two delivered orders with the same item names and quantities. A person's saved usual always stands.",  "commands": [  {    "id": "order_food",    "label": "Request food",    "kind": "create",    "verb": "order_food",    "bindings": {      "restaurant": "$id"    },    "pick": {      "kind": "record",      "table": "location",      "argument": "location"    },    "receipt": "Quote request prepared",    "spoken": {      "verbs": [        "order"      ],      "record": "from",      "pick": "to",      "pick_unsaid": true,      "counted": {        "argument": "items",        "absent": [          "my usual",          "the usual",          "usual"        ]      }    }  },  {    "id": "open-usual",    "label": "Open usual",    "kind": "open",    "opens": "usual"  }]}