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.
contacts.json · 3.7 KB · 202 lines
| 1 | { |
| 2 | "name": "contacts", |
| 3 | "title": "Contacts", |
| 4 | "version": 8, |
| 5 | "description": "People: the core CRM record. v8: relation.requires read on the organization and project a contact is filed under.", |
| 6 | "fields": [ |
| 7 | { |
| 8 | "name": "id" |
| 9 | }, |
| 10 | { |
| 11 | "name": "first_name", |
| 12 | "type": "text", |
| 13 | "required": true, |
| 14 | "label": "First Name", |
| 15 | "validation": { |
| 16 | "min_length": 1, |
| 17 | "max_length": 80 |
| 18 | } |
| 19 | }, |
| 20 | { |
| 21 | "name": "last_name", |
| 22 | "type": "text", |
| 23 | "label": "Last Name", |
| 24 | "validation": { |
| 25 | "max_length": 80 |
| 26 | } |
| 27 | }, |
| 28 | { |
| 29 | "name": "full_name", |
| 30 | "type": "computed", |
| 31 | "label": "Name", |
| 32 | "formula": "first_name + \" \" + last_name" |
| 33 | }, |
| 34 | { |
| 35 | "name": "email", |
| 36 | "subject": "email", |
| 37 | "type": "text", |
| 38 | "label": "Email", |
| 39 | "validation": { |
| 40 | "max_length": 254 |
| 41 | } |
| 42 | }, |
| 43 | { |
| 44 | "name": "phone", |
| 45 | "type": "text", |
| 46 | "label": "Phone", |
| 47 | "validation": { |
| 48 | "max_length": 40 |
| 49 | } |
| 50 | }, |
| 51 | { |
| 52 | "name": "job_title", |
| 53 | "type": "text", |
| 54 | "label": "Job Title", |
| 55 | "validation": { |
| 56 | "max_length": 120 |
| 57 | } |
| 58 | }, |
| 59 | { |
| 60 | "name": "organization_id", |
| 61 | "label": "Organization", |
| 62 | "relation": { |
| 63 | "collection": "organizations", |
| 64 | "display_field": "name", |
| 65 | "requires": "read"} |
| 66 | }, |
| 67 | { |
| 68 | "name": "project_id", |
| 69 | "label": "Project", |
| 70 | "relation": { |
| 71 | "collection": "projects", |
| 72 | "display_field": "name", |
| 73 | "requires": "read"} |
| 74 | }, |
| 75 | { |
| 76 | "name": "lead_status", |
| 77 | "type": "enum", |
| 78 | "label": "Lead Status", |
| 79 | "enum": [ |
| 80 | "cold", |
| 81 | "warm", |
| 82 | "hot", |
| 83 | "customer", |
| 84 | "inactive" |
| 85 | ], |
| 86 | "help": "Optional pipeline stage; blank until set, no default is forced", |
| 87 | "transitions": { |
| 88 | "cold": [ |
| 89 | "warm", |
| 90 | "hot", |
| 91 | "customer", |
| 92 | "inactive" |
| 93 | ], |
| 94 | "warm": [ |
| 95 | "cold", |
| 96 | "hot", |
| 97 | "customer", |
| 98 | "inactive" |
| 99 | ], |
| 100 | "hot": [ |
| 101 | "cold", |
| 102 | "warm", |
| 103 | "customer", |
| 104 | "inactive" |
| 105 | ], |
| 106 | "customer": [ |
| 107 | "cold", |
| 108 | "warm", |
| 109 | "hot", |
| 110 | "inactive" |
| 111 | ], |
| 112 | "inactive": [ |
| 113 | "cold", |
| 114 | "warm", |
| 115 | "hot", |
| 116 | "customer" |
| 117 | ] |
| 118 | } |
| 119 | }, |
| 120 | { |
| 121 | "name": "tags", |
| 122 | "type": "text", |
| 123 | "label": "Tags", |
| 124 | "help": "Comma-separated tag names" |
| 125 | }, |
| 126 | { |
| 127 | "name": "notes", |
| 128 | "type": "textarea", |
| 129 | "label": "Notes" |
| 130 | }, |
| 131 | { |
| 132 | "name": "created_at", |
| 133 | "type": "datetime", |
| 134 | "label": "Created", |
| 135 | "read_only": true |
| 136 | }, |
| 137 | { |
| 138 | "name": "owner_id", |
| 139 | "type": "text", |
| 140 | "label": "Owner" |
| 141 | } |
| 142 | ], |
| 143 | "forms": { |
| 144 | "default": { |
| 145 | "fields": [ |
| 146 | "first_name", |
| 147 | "last_name", |
| 148 | "email", |
| 149 | "phone", |
| 150 | "job_title", |
| 151 | "organization_id", |
| 152 | "project_id", |
| 153 | "lead_status", |
| 154 | "tags", |
| 155 | "notes" |
| 156 | ] |
| 157 | } |
| 158 | }, |
| 159 | "views": { |
| 160 | "list_mode": "board", |
| 161 | "list_fields": [ |
| 162 | "first_name", |
| 163 | "last_name", |
| 164 | "email", |
| 165 | "organization_id", |
| 166 | "lead_status" |
| 167 | ], |
| 168 | "detail_fields": [ |
| 169 | "first_name", |
| 170 | "last_name", |
| 171 | "email", |
| 172 | "phone", |
| 173 | "job_title", |
| 174 | "organization_id", |
| 175 | "project_id", |
| 176 | "lead_status", |
| 177 | "tags", |
| 178 | "notes" |
| 179 | ], |
| 180 | "related": [ |
| 181 | { |
| 182 | "collection": "interactions", |
| 183 | "fk_field": "contact_id" |
| 184 | } |
| 185 | ], |
| 186 | "filter_fields": [ |
| 187 | "lead_status" |
| 188 | ] |
| 189 | }, |
| 190 | "search": { |
| 191 | "fields": [ |
| 192 | "first_name", |
| 193 | "last_name", |
| 194 | "email", |
| 195 | "tags", |
| 196 | "notes" |
| 197 | ] |
| 198 | }, |
| 199 | "capabilities": { |
| 200 | "attachments": true |
| 201 | } |
| 202 | } |