Created
July 29, 2019 15:49
-
-
Save c3s4r/4eb1d86723e1d6b693c7e1a6cae849a9 to your computer and use it in GitHub Desktop.
Table Definition Sample - Smartmate 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
id: candidates | |
type: table | |
spec: | |
tableName: Candidates | |
itemName: Candidate | |
summary: | |
title: ${firstName} ${lastName} | |
subtitle: ${email} | |
fields: | |
- firstName: | |
type: text # widget will be input, data type will be string | |
label: First Name | |
required: true | |
- middleName: | |
type: text # widget will be input, data type will be string | |
label: Middle Name | |
- lastName: | |
type: text # widget will be input, data type will be string | |
label: Last Name | |
required: true | |
- email: | |
type: email # widget will be input with email validation, data type will be string | |
required: true | |
- identificationDocumentType: | |
type: text # widget will be dropdown (because it has options), data type will be string (because options are strings) | |
label: Document Type | |
options: | |
- passport: Passport | |
- cedula: Cedula | |
- driverLicense: Driver License | |
- other: Other | |
- identificationNumber: | |
type: text # widget will be input, data type will be string | |
label: Document Number | |
- bio: | |
type: html # widget will be html editor, data type will be string | |
- score: | |
type: rating # widget will be rating slider, data type will be smallint (because of min/max) | |
min: 1 | |
max: 10 | |
step: 1 | |
icon: star | |
- salary: | |
type: money # widget will be input formatted for money, data type will be money | |
min: 0 | |
- friends: | |
type: user # widget will be input with autocomplete, data type will be array[UUID]. Array because of `allowMultiple:true`, and UUID because that's how we reference users. | |
allowMultiple: true | |
form: | |
rows: | |
- title: Personal Info | |
- fields: | |
- firstName | |
- middleName | |
- lastName | |
- fields: | |
- fields: | |
- identificationDocumentType | |
- identificationNumber | |
- title: Scores and other information | |
- message: Please enter the bio and other important user information | |
- fields: | |
- bio | |
- fields: | |
- score | |
- salary | |
- fields: | |
- friends | |
testData: | |
1: | |
firstName: Juan | |
lastName: Perez | |
email: juanperez@gmail.com | |
identificationDocumentType: cedula | |
identificationNumber: 1712345678 | |
2: | |
firstName: Pedro | |
lastName: Perez | |
email: pedroperez@gmail.com |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment