drawDB/src/templates/template3.js

231 lines
4.2 KiB
JavaScript
Raw Normal View History

2023-12-12 07:14:29 +08:00
export const template3 = {
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: 354,
y: 144,
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: 25,
y: 171,
fields: [
{
name: "id",
type: "INT",
default: "",
check: "",
primary: true,
unique: true,
notNull: true,
increment: true,
comment: "",
id: 0,
},
],
comment: "",
indices: [],
color: "#7c4af0",
},
{
id: 3,
name: "table_3",
x: 356,
y: 30,
fields: [
{
name: "id",
type: "INT",
default: "",
check: "",
primary: true,
unique: true,
notNull: true,
increment: true,
comment: "",
id: 0,
},
],
comment: "",
indices: [],
color: "#175e7a",
},
{
id: 4,
name: "table_4",
x: 628,
y: 6,
fields: [
{
name: "id",
type: "INT",
default: "",
check: "",
primary: true,
unique: true,
notNull: true,
increment: true,
comment: "",
id: 0,
},
{
name: "quantity",
type: "INT",
default: "",
check: "",
primary: false,
unique: false,
notNull: false,
increment: false,
comment: "",
id: 1,
},
],
comment: "",
indices: [],
color: "#175e7a",
},
],
relationships: [
{
startTableId: 1,
startFieldId: 2,
endTableId: 0,
endFieldId: 0,
startX: 369,
startY: 285,
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: 630,
y: 164,
title: "note_0",
content: "hi",
color: "#fcf7ac",
height: 65,
},
{
id: 1,
x: 635,
y: 260,
title: "note_1",
content: "",
color: "#c7d2ff",
height: 88,
},
],
subjectAreas: [
{
id: 0,
name: "area_0",
x: -10,
y: -22,
width: 264,
height: 365,
color: "#7c4af0",
},
{
id: 1,
name: "area_1",
x: 289,
y: -18,
width: 303,
height: 392,
color: "#175e7a",
},
],
types: [],
title: "Template 3",
description:
"Lorem ipsum dolor sit amet consectetur adipisicing elit. Veniam nulla illo pariatur nostrum.",
};