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.
vehicles.json · 1.9 KB · 26 lines
| 1 | { |
| 2 | "name": "vehicles", |
| 3 | "title": "Vehicles", |
| 4 | "version": 1, |
| 5 | "description": "A vehicle somebody drives on business, and whose it is. The difference decides what a mileage log means: miles driven on business in a PERSONAL vehicle are reimbursed per mile at the year's rate (mileage_rates), because the driver paid for the fuel, the wear and the insurance; miles in a BUSINESS vehicle are not reimbursed at all (the business already pays its costs), and the log is the evidence of business use -- and of the personal use that may be a fringe benefit (fringe_benefits). Deactivate a vehicle rather than delete it; its logs point at it.", |
| 6 | "fields": [ |
| 7 | {"name": "id"}, |
| 8 | {"name": "name", "type": "text", "required": true, "label": "Name", |
| 9 | "validation": {"max_length": 120}, |
| 10 | "help": "What people call it: \"Ann's Civic\", \"the van\"."}, |
| 11 | {"name": "ownership", "type": "enum", "required": true, "default": "personal", "label": "Whose vehicle", |
| 12 | "enum": ["personal", "business"], |
| 13 | "help": "personal: the driver's own; approved business miles are reimbursed at the year's rate. business: the company's; logs record its business use and nothing is reimbursed."}, |
| 14 | {"name": "registration", "type": "text", "label": "Plate or registration", |
| 15 | "validation": {"max_length": 40}}, |
| 16 | {"name": "active", "type": "boolean", "default": "true", "label": "Active"}, |
| 17 | {"name": "notes", "type": "textarea", "label": "Notes"}, |
| 18 | {"name": "owner_id", "type": "text", "label": "Driver"}, |
| 19 | {"name": "created_at", "type": "datetime", "read_only": true, "label": "Created"} |
| 20 | ], |
| 21 | "search": {"fields": ["name", "registration", "notes"]}, |
| 22 | "forms": {"default": {"fields": ["name", "ownership", "registration", "active", "notes"]}}, |
| 23 | "views": {"list_mode": "table", |
| 24 | "list_fields": ["name", "ownership", "registration", "active", "owner_id"], |
| 25 | "filter_fields": ["ownership", "active"]} |
| 26 | } |