1
0
Fork 0
mirror of synced 2024-06-29 11:31:06 +12:00
budibase/packages/builder/src/constants/backend/index.js

102 lines
1.7 KiB
JavaScript
Raw Normal View History

2020-06-16 03:41:31 +12:00
const FIELD_TYPES = ["string", "number", "boolean"]
export const FIELDS = {
PLAIN_TEXT: {
name: "Plain Text",
icon: "ri-text",
definition: {
type: "string",
constraints: {
type: "string",
length: {},
presence: false,
},
},
},
NUMBER: {
name: "Number",
icon: "ri-number-1",
definition: {
type: "number",
constraints: {
type: "number",
presence: false,
numericality: {},
},
},
},
BOOLEAN: {
name: "True/False",
icon: "ri-toggle-line",
definition: {
type: "boolean",
constraints: {
type: "boolean",
presence: false,
},
},
},
OPTIONS: {
name: "Options",
icon: "ri-list-check-2",
definition: {
type: "options",
constraints: {
type: "string",
presence: false,
},
},
},
DATETIME: {
name: "Date/Time",
icon: "ri-calendar-event-fill",
definition: {
type: "date",
constraints: {
type: "date",
datetime: {},
presence: false,
},
},
},
IMAGE: {
name: "Image",
icon: "ri-image-line",
definition: {
type: "image",
constraints: {
type: "string",
presence: false,
},
},
},
FILE: {
name: "Image",
icon: "ri-file-line",
definition: {
type: "file",
constraints: {
type: "string",
presence: false,
},
},
},
DATA_LINK: {
name: "Data Links",
icon: "ri-link",
definition: {
type: "link",
modelId: null,
constraints: {
type: "array",
},
},
},
}
export const BLOCKS = {
}
export const TABLES = {}