2023-09-19 20:47:50 +08:00
|
|
|
const sqlDataTypes = [
|
2023-09-19 20:47:54 +08:00
|
|
|
"INT",
|
|
|
|
"SMALLINT",
|
|
|
|
"BIGINT",
|
|
|
|
"DECIMAL",
|
|
|
|
"NUMERIC",
|
|
|
|
"FLOAT",
|
|
|
|
"REAL",
|
|
|
|
"DOUBLE PRECISION",
|
|
|
|
"CHAR",
|
|
|
|
"VARCHAR",
|
|
|
|
"TEXT",
|
|
|
|
"DATE",
|
|
|
|
"TIME",
|
|
|
|
"TIMESTAMP",
|
|
|
|
"INTERVAL",
|
|
|
|
"BOOLEAN",
|
|
|
|
"BINARY",
|
|
|
|
"VARBINARY",
|
|
|
|
"BLOB",
|
|
|
|
"CLOB",
|
|
|
|
"UUID",
|
|
|
|
"XML",
|
|
|
|
"JSON",
|
|
|
|
];
|
|
|
|
|
|
|
|
const tableThemes = [
|
|
|
|
"#f03c3c",
|
|
|
|
"#ff4f81",
|
|
|
|
"#bc49c4",
|
|
|
|
"#a751e8",
|
|
|
|
"#7c4af0",
|
|
|
|
"#6360f7",
|
|
|
|
"#7d9dff",
|
|
|
|
"#32c9b0",
|
|
|
|
"#3cde7d",
|
|
|
|
"#89e667",
|
|
|
|
"#ffe159",
|
|
|
|
"#ff9159",
|
|
|
|
];
|
|
|
|
|
2023-09-19 20:50:09 +08:00
|
|
|
const noteThemes = ["#ffdfd9", "#fcf7ac", "#cffcb1", "#c7d2ff", "#e7c7ff"];
|
2023-09-19 20:49:11 +08:00
|
|
|
|
2023-09-19 20:48:44 +08:00
|
|
|
const defaultTableTheme = "#175e7a";
|
2023-09-19 20:49:11 +08:00
|
|
|
const defaultNoteTheme = "#fcf7ac";
|
2023-09-19 20:48:20 +08:00
|
|
|
const bgBlue = "#124559";
|
2023-09-19 20:47:50 +08:00
|
|
|
|
2023-09-19 20:48:01 +08:00
|
|
|
const Cardinality = {
|
|
|
|
ONE_TO_ONE: "One to one",
|
|
|
|
ONE_TO_MANY: "One to many",
|
|
|
|
MANY_TO_ONE: "Many to one",
|
|
|
|
MANY_TO_MANY: "Many to many",
|
|
|
|
};
|
|
|
|
|
|
|
|
const Constraint = {
|
|
|
|
none: "None",
|
|
|
|
restrict: "Restrict",
|
|
|
|
cascade: "Cascade",
|
|
|
|
setNull: "Set null",
|
|
|
|
setDefault: "Set default",
|
|
|
|
};
|
|
|
|
|
2023-09-19 20:48:57 +08:00
|
|
|
const Tab = {
|
|
|
|
tables: "1",
|
|
|
|
relationships: "2",
|
|
|
|
subject_areas: "3",
|
2023-09-19 20:50:37 +08:00
|
|
|
notes: "4",
|
2023-09-19 20:48:57 +08:00
|
|
|
};
|
|
|
|
|
2023-09-19 20:48:59 +08:00
|
|
|
const ObjectType = {
|
|
|
|
NONE: 0,
|
|
|
|
TABLE: 1,
|
|
|
|
AREA: 2,
|
2023-09-19 20:49:00 +08:00
|
|
|
NOTE: 3,
|
2023-09-19 20:49:52 +08:00
|
|
|
RELATIONSHIP: 4,
|
2023-09-19 20:48:59 +08:00
|
|
|
};
|
|
|
|
|
2023-09-19 20:49:44 +08:00
|
|
|
const Action = {
|
|
|
|
ADD: 0,
|
|
|
|
MOVE: 1,
|
2023-09-19 20:49:52 +08:00
|
|
|
DELETE: 2,
|
2023-09-19 20:50:00 +08:00
|
|
|
EDIT: 3,
|
|
|
|
PAN: 4,
|
2023-09-19 20:49:52 +08:00
|
|
|
};
|
2023-09-19 20:49:44 +08:00
|
|
|
|
2023-09-19 20:48:25 +08:00
|
|
|
export {
|
|
|
|
bgBlue,
|
|
|
|
sqlDataTypes,
|
|
|
|
tableThemes,
|
2023-09-19 20:49:11 +08:00
|
|
|
noteThemes,
|
2023-09-19 20:48:25 +08:00
|
|
|
defaultTableTheme,
|
2023-09-19 20:49:11 +08:00
|
|
|
defaultNoteTheme,
|
2023-09-19 20:48:25 +08:00
|
|
|
Cardinality,
|
|
|
|
Constraint,
|
2023-09-19 20:49:11 +08:00
|
|
|
Tab,
|
|
|
|
ObjectType,
|
2023-09-19 20:49:52 +08:00
|
|
|
Action,
|
2023-09-19 20:48:25 +08:00
|
|
|
};
|