1
0
Fork 0
mirror of synced 2024-09-30 09:07:25 +13:00
budibase/packages/builder/src/constants/backend/index.js

83 lines
1.7 KiB
JavaScript
Raw Normal View History

2020-06-16 03:41:31 +12:00
export const FIELDS = {
2020-08-08 03:13:57 +12:00
STRING: {
2020-06-16 03:41:31 +12:00
name: "Plain Text",
icon: "ri-text",
2020-06-17 07:29:18 +12:00
type: "string",
constraints: {
2020-06-16 03:41:31 +12:00
type: "string",
2020-06-17 07:29:18 +12:00
length: {},
2020-07-20 04:21:52 +12:00
presence: { allowEmpty: true },
2020-06-16 03:41:31 +12:00
},
},
NUMBER: {
name: "Number",
icon: "ri-number-1",
2020-06-17 07:29:18 +12:00
type: "number",
constraints: {
2020-06-16 03:41:31 +12:00
type: "number",
2020-07-20 04:21:52 +12:00
presence: { allowEmpty: true },
numericality: { greaterThanOrEqualTo: "", lessThanOrEqualTo: "" },
2020-06-16 03:41:31 +12:00
},
},
BOOLEAN: {
name: "True/False",
icon: "ri-toggle-line",
2020-06-17 07:29:18 +12:00
type: "boolean",
constraints: {
2020-06-16 03:41:31 +12:00
type: "boolean",
2020-07-20 04:21:52 +12:00
presence: { allowEmpty: true },
2020-06-16 03:41:31 +12:00
},
},
2020-06-23 08:30:23 +12:00
// OPTIONS: {
// name: "Options",
// icon: "ri-list-check-2",
// type: "options",
// constraints: {
// type: "string",
2020-07-20 04:21:52 +12:00
// presence: { allowEmpty: true },
2020-06-23 08:30:23 +12:00
// },
// },
2020-08-21 02:49:18 +12:00
// DATETIME: {
// name: "Date/Time",
// icon: "ri-calendar-event-fill",
// type: "string",
// value: "datetime",
// constraints: {
// type: "string",
// length: {},
// presence: { allowEmpty: true },
// datetime: {
// latest: "",
// earliest: "",
// },
// },
// },
2020-06-23 08:30:23 +12:00
// IMAGE: {
// name: "File",
// icon: "ri-image-line",
// type: "file",
// constraints: {
// type: "string",
2020-07-20 04:21:52 +12:00
// presence: { allowEmpty: true },
2020-06-23 08:30:23 +12:00
// },
// },
// FILE: {
// name: "Image",
// icon: "ri-file-line",
// type: "file",
// constraints: {
// type: "string",
2020-07-20 04:21:52 +12:00
// presence: { allowEmpty: true },
2020-06-23 08:30:23 +12:00
// },
// },
2020-08-11 02:34:37 +12:00
// LINKED_FIELDS: {
// name: "Linked Fields",
// icon: "ri-link",
// type: "link",
// modelId: null,
// constraints: {
// type: "array",
// },
// },
2020-06-16 03:41:31 +12:00
}