drawDB/src/templates/template2.js

165 lines
3.0 KiB
JavaScript
Raw Normal View History

2023-12-12 07:14:29 +08:00
export const template2 = {
tables: [
{
id: 0,
name: "table_0",
x: 23,
y: 26,
fields: [
{
name: "id",
type: "INT",
default: "",
check: "",
primary: true,
unique: true,
notNull: true,
increment: true,
comment: "",
id: 0,
},
{
name: "name",
type: "VARCHAR",
default: "",
check: "",
primary: false,
unique: false,
notNull: false,
increment: false,
comment: "",
id: 1,
size: 255,
},
],
comment: "",
indices: [],
color: "#3cde7d",
},
{
id: 1,
name: "table_1",
x: 30,
y: 178,
fields: [
{
name: "id",
type: "INT",
default: "",
check: "",
primary: true,
unique: true,
notNull: true,
increment: true,
comment: "",
id: 0,
},
{
name: "age",
type: "INT",
default: "",
check: "",
primary: false,
unique: false,
notNull: false,
increment: false,
comment: "",
id: 1,
},
{
name: "t_id",
type: "INT",
default: "",
check: "",
primary: false,
unique: false,
notNull: false,
increment: false,
comment: "",
id: 2,
},
],
comment: "",
indices: [],
color: "#ffe159",
},
{
id: 2,
name: "table_2",
x: 336,
y: 118,
fields: [
{
name: "id",
type: "INT",
default: "",
check: "",
primary: true,
unique: true,
notNull: true,
increment: true,
comment: "",
id: 0,
},
],
comment: "",
indices: [],
color: "#7c4af0",
},
],
relationships: [
{
startTableId: 1,
startFieldId: 2,
endTableId: 0,
endFieldId: 0,
startX: 45,
startY: 319,
endX: 38,
endY: 95,
name: "table_1_t_id_fk",
cardinality: "One to one",
updateConstraint: "No action",
deleteConstraint: "No action",
mandatory: false,
id: 0,
},
],
notes: [
{
id: 0,
x: 352,
y: 22,
title: "note_0",
content: "hi",
color: "#fcf7ac",
height: 65,
},
{
id: 1,
x: 577,
y: 254,
title: "note_1",
content: "",
color: "#c7d2ff",
height: 88,
},
],
subjectAreas: [
{
id: 0,
name: "area_0",
x: -10,
y: -22,
width: 562,
height: 390,
color: "#7c4af0",
},
],
types: [],
title: "Template 2",
description:
"Lorem ipsum dolor sit amet consectetur adipisicing elit. Veniam nulla illo pariatur nostrum.",
2023-12-19 10:36:10 +08:00
custom: 0,
2023-12-12 07:14:29 +08:00
};