mirror of
https://github.com/drawdb-io/drawdb.git
synced 2026-02-25 02:00:09 +08:00
Seed templates
This commit is contained in:
154
src/templates/template1.js
Normal file
154
src/templates/template1.js
Normal file
@@ -0,0 +1,154 @@
|
||||
export const template1 = {
|
||||
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: "#175e7a",
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: "table_1",
|
||||
x: 301,
|
||||
y: 167,
|
||||
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: "#175e7a",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: "table_2",
|
||||
x: 594,
|
||||
y: 232,
|
||||
fields: [
|
||||
{
|
||||
name: "id",
|
||||
type: "INT",
|
||||
default: "",
|
||||
check: "",
|
||||
primary: true,
|
||||
unique: true,
|
||||
notNull: true,
|
||||
increment: true,
|
||||
comment: "",
|
||||
id: 0,
|
||||
},
|
||||
],
|
||||
comment: "",
|
||||
indices: [],
|
||||
color: "#175e7a",
|
||||
},
|
||||
],
|
||||
relationships: [
|
||||
{
|
||||
startTableId: 1,
|
||||
startFieldId: 2,
|
||||
endTableId: 0,
|
||||
endFieldId: 0,
|
||||
startX: 316,
|
||||
startY: 308,
|
||||
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,
|
||||
},
|
||||
],
|
||||
subjectAreas: [
|
||||
{
|
||||
id: 0,
|
||||
name: "area_0",
|
||||
x: 0,
|
||||
y: 0,
|
||||
width: 562,
|
||||
height: 390,
|
||||
color: "#175e7a",
|
||||
},
|
||||
],
|
||||
types: [],
|
||||
title: "Template 1",
|
||||
description:
|
||||
"Lorem ipsum dolor sit amet consectetur adipisicing elit. Veniam nulla illo pariatur nostrum.",
|
||||
};
|
||||
Reference in New Issue
Block a user