2020-06-15 17:41:31 +02:00
|
|
|
export const FIELDS = {
|
|
|
|
PLAIN_TEXT: {
|
|
|
|
name: "Plain Text",
|
|
|
|
icon: "ri-text",
|
2020-06-16 21:29:18 +02:00
|
|
|
type: "string",
|
|
|
|
constraints: {
|
2020-06-15 17:41:31 +02:00
|
|
|
type: "string",
|
2020-06-16 21:29:18 +02:00
|
|
|
length: {},
|
2020-07-19 18:21:52 +02:00
|
|
|
presence: { allowEmpty: true },
|
2020-06-15 17:41:31 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
NUMBER: {
|
|
|
|
name: "Number",
|
|
|
|
icon: "ri-number-1",
|
2020-06-16 21:29:18 +02:00
|
|
|
type: "number",
|
|
|
|
constraints: {
|
2020-06-15 17:41:31 +02:00
|
|
|
type: "number",
|
2020-07-19 18:21:52 +02:00
|
|
|
presence: { allowEmpty: true },
|
2020-06-16 21:29:18 +02:00
|
|
|
numericality: {},
|
2020-06-15 17:41:31 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
BOOLEAN: {
|
|
|
|
name: "True/False",
|
|
|
|
icon: "ri-toggle-line",
|
2020-06-16 21:29:18 +02:00
|
|
|
type: "boolean",
|
|
|
|
constraints: {
|
2020-06-15 17:41:31 +02:00
|
|
|
type: "boolean",
|
2020-07-19 18:21:52 +02:00
|
|
|
presence: { allowEmpty: true },
|
2020-06-15 17:41:31 +02:00
|
|
|
},
|
|
|
|
},
|
2020-06-22 22:30:23 +02:00
|
|
|
// OPTIONS: {
|
|
|
|
// name: "Options",
|
|
|
|
// icon: "ri-list-check-2",
|
|
|
|
// type: "options",
|
|
|
|
// constraints: {
|
|
|
|
// type: "string",
|
2020-07-19 18:21:52 +02:00
|
|
|
// presence: { allowEmpty: true },
|
2020-06-22 22:30:23 +02:00
|
|
|
// },
|
|
|
|
// },
|
2020-06-18 18:55:46 +02:00
|
|
|
DATETIME: {
|
|
|
|
name: "Date/Time",
|
|
|
|
icon: "ri-calendar-event-fill",
|
2020-06-25 15:36:27 +02:00
|
|
|
type: "string",
|
2020-06-18 18:55:46 +02:00
|
|
|
constraints: {
|
2020-06-25 15:36:27 +02:00
|
|
|
type: "string",
|
|
|
|
length: {},
|
2020-07-19 18:21:52 +02:00
|
|
|
presence: { allowEmpty: true },
|
2020-06-18 18:55:46 +02:00
|
|
|
},
|
|
|
|
},
|
2020-06-22 22:30:23 +02:00
|
|
|
// IMAGE: {
|
|
|
|
// name: "File",
|
|
|
|
// icon: "ri-image-line",
|
|
|
|
// type: "file",
|
|
|
|
// constraints: {
|
|
|
|
// type: "string",
|
2020-07-19 18:21:52 +02:00
|
|
|
// presence: { allowEmpty: true },
|
2020-06-22 22:30:23 +02:00
|
|
|
// },
|
|
|
|
// },
|
|
|
|
// FILE: {
|
|
|
|
// name: "Image",
|
|
|
|
// icon: "ri-file-line",
|
|
|
|
// type: "file",
|
|
|
|
// constraints: {
|
|
|
|
// type: "string",
|
2020-07-19 18:21:52 +02:00
|
|
|
// presence: { allowEmpty: true },
|
2020-06-22 22:30:23 +02:00
|
|
|
// },
|
|
|
|
// },
|
2020-07-14 17:08:07 +02:00
|
|
|
LINKED_FIELDS: {
|
|
|
|
name: "Linked Fields",
|
2020-06-18 18:55:46 +02:00
|
|
|
icon: "ri-link",
|
|
|
|
type: "link",
|
|
|
|
modelId: null,
|
|
|
|
constraints: {
|
|
|
|
type: "array",
|
|
|
|
},
|
|
|
|
},
|
2020-06-15 17:41:31 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export const BLOCKS = {
|
2020-06-17 17:51:10 +02:00
|
|
|
NAME: {
|
|
|
|
name: "Name",
|
|
|
|
icon: "ri-text",
|
|
|
|
type: "string",
|
|
|
|
constraints: {
|
|
|
|
type: "string",
|
|
|
|
length: {},
|
2020-07-19 18:21:52 +02:00
|
|
|
presence: { allowEmpty: true },
|
2020-06-17 17:51:10 +02:00
|
|
|
},
|
|
|
|
},
|
2020-07-12 20:19:12 +02:00
|
|
|
COMPANY: {
|
|
|
|
name: "Company",
|
2020-07-14 17:08:07 +02:00
|
|
|
icon: "ri-store-line",
|
2020-07-12 20:19:12 +02:00
|
|
|
type: "string",
|
|
|
|
constraints: {
|
|
|
|
type: "string",
|
|
|
|
length: {},
|
2020-07-19 18:21:52 +02:00
|
|
|
presence: { allowEmpty: true },
|
2020-07-12 20:19:12 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
EMAIL: {
|
|
|
|
name: "Email",
|
2020-07-14 17:08:07 +02:00
|
|
|
icon: "ri-mail-line",
|
2020-07-12 20:19:12 +02:00
|
|
|
type: "string",
|
|
|
|
constraints: {
|
|
|
|
type: "string",
|
|
|
|
length: {},
|
2020-07-19 18:21:52 +02:00
|
|
|
presence: { allowEmpty: true },
|
2020-07-12 20:19:12 +02:00
|
|
|
},
|
|
|
|
},
|
2020-06-17 17:51:10 +02:00
|
|
|
PHONE_NUMBER: {
|
2020-07-12 20:19:12 +02:00
|
|
|
name: "Phone No.",
|
2020-07-14 17:08:07 +02:00
|
|
|
icon: "ri-phone-line",
|
2020-07-12 20:19:12 +02:00
|
|
|
type: "number",
|
|
|
|
constraints: {
|
|
|
|
type: "number",
|
2020-07-19 18:21:52 +02:00
|
|
|
presence: { allowEmpty: true },
|
2020-07-12 20:19:12 +02:00
|
|
|
numericality: {},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
VALUE: {
|
|
|
|
name: "Value",
|
2020-07-14 17:08:07 +02:00
|
|
|
icon: "ri-number-5",
|
2020-06-17 17:51:10 +02:00
|
|
|
type: "number",
|
|
|
|
constraints: {
|
|
|
|
type: "number",
|
2020-07-19 18:21:52 +02:00
|
|
|
presence: { allowEmpty: true },
|
2020-06-17 17:51:10 +02:00
|
|
|
numericality: {},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
ACTIVE: {
|
|
|
|
name: "Active",
|
|
|
|
icon: "ri-toggle-line",
|
|
|
|
type: "boolean",
|
|
|
|
constraints: {
|
|
|
|
type: "boolean",
|
2020-07-19 18:21:52 +02:00
|
|
|
presence: { allowEmpty: true },
|
2020-06-17 17:51:10 +02:00
|
|
|
},
|
|
|
|
},
|
2020-07-14 17:08:07 +02:00
|
|
|
URL: {
|
|
|
|
name: "URL",
|
|
|
|
icon: "ri-link",
|
|
|
|
type: "string",
|
|
|
|
constraints: {
|
|
|
|
type: "string",
|
|
|
|
length: {},
|
2020-07-19 18:21:52 +02:00
|
|
|
presence: { allowEmpty: true },
|
2020-07-14 17:08:07 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
IMAGE: {
|
|
|
|
name: "Image URL",
|
|
|
|
icon: "ri-image-line",
|
|
|
|
type: "string",
|
|
|
|
constraints: {
|
|
|
|
type: "string",
|
|
|
|
length: {},
|
2020-07-19 18:21:52 +02:00
|
|
|
presence: { allowEmpty: true },
|
2020-07-14 17:08:07 +02:00
|
|
|
},
|
|
|
|
},
|
2020-06-22 22:30:23 +02:00
|
|
|
// PRIORITY: {
|
|
|
|
// name: "Options",
|
|
|
|
// icon: "ri-list-check-2",
|
|
|
|
// type: "options",
|
|
|
|
// constraints: {
|
|
|
|
// type: "string",
|
2020-07-19 18:21:52 +02:00
|
|
|
// presence: { allowEmpty: true },
|
2020-06-22 22:30:23 +02:00
|
|
|
// inclusion: ["low", "medium", "high"],
|
|
|
|
// },
|
|
|
|
// },
|
2020-06-17 17:51:10 +02:00
|
|
|
END_DATE: {
|
|
|
|
name: "End Date",
|
|
|
|
icon: "ri-calendar-event-fill",
|
2020-06-25 15:36:27 +02:00
|
|
|
type: "string",
|
2020-06-17 17:51:10 +02:00
|
|
|
constraints: {
|
2020-06-25 15:36:27 +02:00
|
|
|
type: "string",
|
|
|
|
length: {},
|
2020-07-19 18:21:52 +02:00
|
|
|
presence: { allowEmpty: true },
|
2020-06-17 17:51:10 +02:00
|
|
|
},
|
|
|
|
},
|
2020-06-22 22:30:23 +02:00
|
|
|
// AVATAR: {
|
|
|
|
// name: "Avatar",
|
|
|
|
// icon: "ri-image-line",
|
|
|
|
// type: "image",
|
|
|
|
// constraints: {
|
|
|
|
// type: "string",
|
2020-07-19 18:21:52 +02:00
|
|
|
// presence: { allowEmpty: true },
|
2020-06-22 22:30:23 +02:00
|
|
|
// },
|
|
|
|
// },
|
|
|
|
// PDF: {
|
|
|
|
// name: "PDF",
|
|
|
|
// icon: "ri-file-line",
|
|
|
|
// type: "file",
|
|
|
|
// constraints: {
|
|
|
|
// type: "string",
|
2020-07-19 18:21:52 +02:00
|
|
|
// presence: { allowEmpty: true },
|
2020-06-22 22:30:23 +02:00
|
|
|
// },
|
|
|
|
// },
|
2020-06-15 17:41:31 +02:00
|
|
|
}
|
|
|
|
|
2020-06-17 17:51:10 +02:00
|
|
|
export const MODELS = {
|
|
|
|
CONTACTS: {
|
2020-06-22 22:30:23 +02:00
|
|
|
icon: "ri-contacts-book-line",
|
2020-06-17 17:51:10 +02:00
|
|
|
name: "Contacts",
|
|
|
|
schema: {
|
|
|
|
Name: BLOCKS.NAME,
|
2020-06-18 18:55:46 +02:00
|
|
|
"Phone Number": BLOCKS.PHONE_NUMBER,
|
|
|
|
},
|
2020-06-17 17:51:10 +02:00
|
|
|
},
|
|
|
|
RECIPES: {
|
|
|
|
icon: "ri-link",
|
|
|
|
name: "Recipes",
|
|
|
|
schema: {
|
|
|
|
Name: BLOCKS.NAME,
|
2020-06-22 22:30:23 +02:00
|
|
|
Cuisine: {
|
|
|
|
...FIELDS.PLAIN_TEXT,
|
2020-06-23 17:20:06 +02:00
|
|
|
name: "Cuisine",
|
2020-06-22 22:30:23 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
SPORTS_TEAM: {
|
|
|
|
icon: "ri-basketball-line",
|
|
|
|
name: "Sports Team",
|
|
|
|
schema: {
|
|
|
|
Name: BLOCKS.NAME,
|
|
|
|
Championships: {
|
|
|
|
...FIELDS.NUMBER,
|
2020-06-23 17:20:06 +02:00
|
|
|
name: "Championships",
|
|
|
|
},
|
2020-06-18 18:55:46 +02:00
|
|
|
},
|
|
|
|
},
|
2020-06-17 17:51:10 +02:00
|
|
|
}
|