Seed templates
This commit is contained in:
parent
705251a275
commit
503d55b528
@ -1,335 +1,21 @@
|
||||
const t1 = {
|
||||
tables: [
|
||||
{
|
||||
id: 0,
|
||||
name: "table_0",
|
||||
x: 73,
|
||||
y: 69,
|
||||
fields: [
|
||||
{
|
||||
name: "id",
|
||||
type: "INT",
|
||||
default: "",
|
||||
check: "",
|
||||
primary: true,
|
||||
unique: true,
|
||||
notNull: true,
|
||||
increment: true,
|
||||
comment: "",
|
||||
id: 0,
|
||||
},
|
||||
],
|
||||
comment: "",
|
||||
indices: [],
|
||||
color: "#175e7a",
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: "table_1",
|
||||
x: 366,
|
||||
y: 117,
|
||||
fields: [
|
||||
{
|
||||
name: "id",
|
||||
type: "INT",
|
||||
default: "",
|
||||
check: "",
|
||||
primary: true,
|
||||
unique: true,
|
||||
notNull: true,
|
||||
increment: true,
|
||||
comment: "",
|
||||
id: 0,
|
||||
},
|
||||
],
|
||||
comment: "",
|
||||
indices: [],
|
||||
color: "#175e7a",
|
||||
},
|
||||
],
|
||||
relationships: [
|
||||
{
|
||||
startTableId: 0,
|
||||
startFieldId: 0,
|
||||
endTableId: 1,
|
||||
endFieldId: 0,
|
||||
startX: 88,
|
||||
startY: 138,
|
||||
endX: 381,
|
||||
endY: 186,
|
||||
name: "table_0_id_fk",
|
||||
cardinality: "One to one",
|
||||
updateConstraint: "No action",
|
||||
deleteConstraint: "No action",
|
||||
mandatory: false,
|
||||
id: 0,
|
||||
},
|
||||
],
|
||||
notes: [
|
||||
{
|
||||
id: 0,
|
||||
x: 526,
|
||||
y: 240,
|
||||
title: "note_0",
|
||||
content: "hi",
|
||||
color: "#fcf7ac",
|
||||
height: 65,
|
||||
},
|
||||
],
|
||||
subjectAreas: [
|
||||
{
|
||||
id: 0,
|
||||
name: "area_0",
|
||||
x: 43,
|
||||
y: 28,
|
||||
width: 558,
|
||||
height: 206,
|
||||
color: "#175e7a",
|
||||
},
|
||||
],
|
||||
types: [],
|
||||
title: "Template 1",
|
||||
description: "Lorem ipsum",
|
||||
};
|
||||
import { template1 } from "../templates/template1";
|
||||
import { template2 } from "../templates/template2";
|
||||
import { template3 } from "../templates/template3";
|
||||
import { template4 } from "../templates/template4";
|
||||
import { template5 } from "../templates/template5";
|
||||
import { template6 } from "../templates/template6";
|
||||
import { template7 } from "../templates/template7";
|
||||
import { template8 } from "../templates/template8";
|
||||
|
||||
const t2 = {
|
||||
tables: [
|
||||
{
|
||||
id: 0,
|
||||
name: "template_2",
|
||||
x: 57,
|
||||
y: 63,
|
||||
fields: [
|
||||
{
|
||||
name: "id",
|
||||
type: "INT",
|
||||
default: "",
|
||||
check: "",
|
||||
primary: true,
|
||||
unique: true,
|
||||
notNull: true,
|
||||
increment: true,
|
||||
comment: "",
|
||||
id: 0,
|
||||
},
|
||||
],
|
||||
comment: "",
|
||||
indices: [],
|
||||
color: "#ff4f81",
|
||||
},
|
||||
],
|
||||
relationships: [],
|
||||
notes: [],
|
||||
subjectAreas: [],
|
||||
types: [],
|
||||
title: "Template 2",
|
||||
description: "Lorem ipsum",
|
||||
};
|
||||
|
||||
const t3 = {
|
||||
tables: [
|
||||
{
|
||||
id: 0,
|
||||
name: "template_3",
|
||||
x: 57,
|
||||
y: 63,
|
||||
fields: [
|
||||
{
|
||||
name: "id",
|
||||
type: "INT",
|
||||
default: "",
|
||||
check: "",
|
||||
primary: true,
|
||||
unique: true,
|
||||
notNull: true,
|
||||
increment: true,
|
||||
comment: "",
|
||||
id: 0,
|
||||
},
|
||||
],
|
||||
comment: "",
|
||||
indices: [],
|
||||
color: "#bc49c4",
|
||||
},
|
||||
],
|
||||
relationships: [],
|
||||
notes: [],
|
||||
subjectAreas: [],
|
||||
types: [],
|
||||
title: "Template 3",
|
||||
description: "Lorem ipsum",
|
||||
};
|
||||
|
||||
const t4 = {
|
||||
tables: [
|
||||
{
|
||||
id: 0,
|
||||
name: "template_4",
|
||||
x: 57,
|
||||
y: 63,
|
||||
fields: [
|
||||
{
|
||||
name: "id",
|
||||
type: "INT",
|
||||
default: "",
|
||||
check: "",
|
||||
primary: true,
|
||||
unique: true,
|
||||
notNull: true,
|
||||
increment: true,
|
||||
comment: "",
|
||||
id: 0,
|
||||
},
|
||||
],
|
||||
comment: "",
|
||||
indices: [],
|
||||
color: "#a751e8",
|
||||
},
|
||||
],
|
||||
relationships: [],
|
||||
notes: [],
|
||||
subjectAreas: [],
|
||||
types: [],
|
||||
title: "Template 4",
|
||||
description: "Lorem ipsum",
|
||||
};
|
||||
|
||||
const t5 = {
|
||||
tables: [
|
||||
{
|
||||
id: 0,
|
||||
name: "template_5",
|
||||
x: 57,
|
||||
y: 63,
|
||||
fields: [
|
||||
{
|
||||
name: "id",
|
||||
type: "INT",
|
||||
default: "",
|
||||
check: "",
|
||||
primary: true,
|
||||
unique: true,
|
||||
notNull: true,
|
||||
increment: true,
|
||||
comment: "",
|
||||
id: 0,
|
||||
},
|
||||
],
|
||||
comment: "",
|
||||
indices: [],
|
||||
color: "#7c4af0",
|
||||
},
|
||||
],
|
||||
relationships: [],
|
||||
notes: [],
|
||||
subjectAreas: [],
|
||||
types: [],
|
||||
title: "Template 5",
|
||||
description: "Lorem ipsum",
|
||||
};
|
||||
|
||||
const t6 = {
|
||||
tables: [
|
||||
{
|
||||
id: 0,
|
||||
name: "template_6",
|
||||
x: 57,
|
||||
y: 63,
|
||||
fields: [
|
||||
{
|
||||
name: "id",
|
||||
type: "INT",
|
||||
default: "",
|
||||
check: "",
|
||||
primary: true,
|
||||
unique: true,
|
||||
notNull: true,
|
||||
increment: true,
|
||||
comment: "",
|
||||
id: 0,
|
||||
},
|
||||
],
|
||||
comment: "",
|
||||
indices: [],
|
||||
color: "#6360f7",
|
||||
},
|
||||
],
|
||||
relationships: [],
|
||||
notes: [],
|
||||
subjectAreas: [],
|
||||
types: [],
|
||||
title: "Template 6",
|
||||
description: "Lorem ipsum",
|
||||
};
|
||||
|
||||
const t7 = {
|
||||
tables: [
|
||||
{
|
||||
id: 0,
|
||||
name: "template_7",
|
||||
x: 57,
|
||||
y: 63,
|
||||
fields: [
|
||||
{
|
||||
name: "id",
|
||||
type: "INT",
|
||||
default: "",
|
||||
check: "",
|
||||
primary: true,
|
||||
unique: true,
|
||||
notNull: true,
|
||||
increment: true,
|
||||
comment: "",
|
||||
id: 0,
|
||||
},
|
||||
],
|
||||
comment: "",
|
||||
indices: [],
|
||||
color: "#7d9dff",
|
||||
},
|
||||
],
|
||||
relationships: [],
|
||||
notes: [],
|
||||
subjectAreas: [],
|
||||
types: [],
|
||||
title: "Template 7",
|
||||
description: "Lorem ipsum",
|
||||
};
|
||||
|
||||
const t8 = {
|
||||
tables: [
|
||||
{
|
||||
id: 0,
|
||||
name: "template_8",
|
||||
x: 57,
|
||||
y: 63,
|
||||
fields: [
|
||||
{
|
||||
name: "id",
|
||||
type: "INT",
|
||||
default: "",
|
||||
check: "",
|
||||
primary: true,
|
||||
unique: true,
|
||||
notNull: true,
|
||||
increment: true,
|
||||
comment: "",
|
||||
id: 0,
|
||||
},
|
||||
],
|
||||
comment: "",
|
||||
indices: [],
|
||||
color: "#32c9b0",
|
||||
},
|
||||
],
|
||||
relationships: [],
|
||||
notes: [],
|
||||
subjectAreas: [],
|
||||
types: [],
|
||||
title: "Template 8",
|
||||
description: "Lorem ipsum",
|
||||
};
|
||||
|
||||
const templateSeeds = [t1, t2, t3, t4, t5, t6, t7, t8];
|
||||
const templateSeeds = [
|
||||
template1,
|
||||
template2,
|
||||
template3,
|
||||
template4,
|
||||
template5,
|
||||
template6,
|
||||
template7,
|
||||
template8,
|
||||
];
|
||||
|
||||
export { templateSeeds };
|
||||
|
@ -9,8 +9,8 @@ import { calcPath } from "../utils";
|
||||
function Thumbnail({ diagram }) {
|
||||
const zoom = 0.3;
|
||||
return (
|
||||
<div className="w-full select-none">
|
||||
<svg className="bg-white w-full">
|
||||
<div className="w-full select-none h-[190px]">
|
||||
<svg className="bg-white w-full h-full rounded-t-md">
|
||||
<defs>
|
||||
<pattern
|
||||
id="pattern-circles"
|
||||
@ -80,7 +80,9 @@ function Thumbnail({ diagram }) {
|
||||
</div>
|
||||
{table.fields.map((f, j) => (
|
||||
<div
|
||||
className="flex justify-between items-center py-[2px] px-[3px]"
|
||||
className={`flex justify-between items-center py-[2px] px-[3px] ${
|
||||
j < table.fields.length - 1 ? "border-b" : ""
|
||||
}`}
|
||||
key={j}
|
||||
>
|
||||
<div className="flex items-center justify-start">
|
||||
@ -164,56 +166,71 @@ export default function Templates() {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div className="sm:py-3 py-5 px-12 xl:px-20 sm:px-6 flex justify-between items-center select-none">
|
||||
<div className="flex items-center justify-start">
|
||||
<Link to="/">
|
||||
<img
|
||||
src={logo_light}
|
||||
alt="logo"
|
||||
className="me-2 sm:h-[28px] md:h-[46px]"
|
||||
/>
|
||||
</Link>
|
||||
<div className="ms-4 sm:text-sm xl:text-xl text-xl font-semibold">
|
||||
Templates
|
||||
<div className="min-h-screen">
|
||||
<div className="sm:py-3 py-5 px-12 xl:px-20 sm:px-6 flex justify-between items-center select-none">
|
||||
<div className="flex items-center justify-start">
|
||||
<Link to="/">
|
||||
<img
|
||||
src={logo_light}
|
||||
alt="logo"
|
||||
className="me-2 sm:h-[28px] md:h-[46px]"
|
||||
/>
|
||||
</Link>
|
||||
<div className="ms-4 sm:text-sm xl:text-xl text-xl font-semibold">
|
||||
Templates
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr className="border-zinc-300" />
|
||||
<div className="xl:px-20 sm:px-6 px-12 py-6">
|
||||
<div className="w-full md:w-[75%] xl:w-[50%] mb-2">
|
||||
<div className="text-2xl sm:text-lg font-semibold mb-2 text-neutral-800">
|
||||
Database schema templates
|
||||
</div>
|
||||
<div className="text-sm text-neutral-700">
|
||||
A compilation of database entity relationship diagrams to give you
|
||||
a quick start or inspire your application's architecture.
|
||||
</div>
|
||||
</div>
|
||||
<Tabs>
|
||||
<TabPane
|
||||
tab={<span className="mx-2">Default templates</span>}
|
||||
itemKey="1"
|
||||
>
|
||||
<div className="grid xl:grid-cols-3 grid-cols-2 sm:grid-cols-1 gap-4 my-3">
|
||||
{templates?.map((t, i) => (
|
||||
<div
|
||||
key={i}
|
||||
className="bg-gray-100 hover:translate-y-[-6px] transition-all duration-300 border rounded-md"
|
||||
>
|
||||
<Thumbnail diagram={t} />
|
||||
<div className="px-4 py-3">
|
||||
<div className="flex justify-between">
|
||||
<div className="text-lg font-bold text-zinc-700">
|
||||
{t.title}
|
||||
</div>
|
||||
<button className="border rounded px-2 py-1 bg-white hover:bg-gray-200 transition-all duration-300">
|
||||
<i className="fa-solid fa-code-fork"></i>
|
||||
</button>
|
||||
</div>
|
||||
<div>{t.description}</div>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</TabPane>
|
||||
<TabPane
|
||||
tab={<span className="mx-2">Your templates</span>}
|
||||
itemKey="2"
|
||||
>
|
||||
<div className=" flex flex-col h-full">Your templates</div>
|
||||
</TabPane>
|
||||
</Tabs>
|
||||
</div>
|
||||
</div>
|
||||
<hr className="border-zinc-300" />
|
||||
<div className="xl:px-20 sm:px-6 px-12 py-6">
|
||||
<div className="w-full md:w-[75%] xl:w-[50%] mb-2">
|
||||
<div className="text-2xl sm:text-lg font-semibold mb-2 text-neutral-800">
|
||||
Database schema templates
|
||||
</div>
|
||||
<div className="text-sm text-neutral-700">
|
||||
A compilation of database entity relationship diagrams to give you a
|
||||
quick start or inspire your application's architecture.
|
||||
</div>
|
||||
</div>
|
||||
<Tabs>
|
||||
<TabPane
|
||||
tab={<span className="mx-2">Default templates</span>}
|
||||
itemKey="1"
|
||||
>
|
||||
<div className="grid xl:grid-cols-3 grid-cols-2 sm:grid-cols-1 gap-4 my-3">
|
||||
{templates?.map((t, i) => (
|
||||
<div
|
||||
key={i}
|
||||
className="p-4 bg-gray-200 hover:translate-y-[-6px] transition-all duration-300"
|
||||
>
|
||||
<Thumbnail diagram={t} />
|
||||
<div>{t.title}</div>
|
||||
<div>{t.description}</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</TabPane>
|
||||
<TabPane
|
||||
tab={<span className="mx-2">Your templates</span>}
|
||||
itemKey="2"
|
||||
>
|
||||
Your templates
|
||||
</TabPane>
|
||||
</Tabs>
|
||||
<hr className="border-zinc-300 my-1" />
|
||||
<div className="text-center text-sm py-3">
|
||||
© 2024 <strong>drawDB</strong> - All right reserved.
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
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.",
|
||||
};
|
163
src/templates/template2.js
Normal file
163
src/templates/template2.js
Normal file
@ -0,0 +1,163 @@
|
||||
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.",
|
||||
};
|
230
src/templates/template3.js
Normal file
230
src/templates/template3.js
Normal file
@ -0,0 +1,230 @@
|
||||
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.",
|
||||
};
|
310
src/templates/template4.js
Normal file
310
src/templates/template4.js
Normal file
@ -0,0 +1,310 @@
|
||||
export const template4 = {
|
||||
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: 21,
|
||||
y: 281,
|
||||
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: 258,
|
||||
y: 28,
|
||||
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: 262,
|
||||
y: 140,
|
||||
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",
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
name: "table_5",
|
||||
x: 552,
|
||||
y: 333,
|
||||
fields: [
|
||||
{
|
||||
name: "id",
|
||||
type: "INT",
|
||||
default: "",
|
||||
check: "",
|
||||
primary: true,
|
||||
unique: true,
|
||||
notNull: true,
|
||||
increment: true,
|
||||
comment: "",
|
||||
id: 0,
|
||||
},
|
||||
],
|
||||
comment: "",
|
||||
indices: [],
|
||||
color: "#7d9dff",
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
name: "table_6",
|
||||
x: 553,
|
||||
y: 127,
|
||||
fields: [
|
||||
{
|
||||
name: "id",
|
||||
type: "INT",
|
||||
default: "",
|
||||
check: "",
|
||||
primary: true,
|
||||
unique: true,
|
||||
notNull: true,
|
||||
increment: true,
|
||||
comment: "",
|
||||
id: 0,
|
||||
},
|
||||
{
|
||||
name: "field",
|
||||
type: "VARCHAR",
|
||||
default: "",
|
||||
check: "",
|
||||
primary: false,
|
||||
unique: false,
|
||||
notNull: false,
|
||||
increment: false,
|
||||
comment: "",
|
||||
id: 1,
|
||||
size: 255,
|
||||
},
|
||||
{
|
||||
name: "type",
|
||||
type: "ENUM",
|
||||
default: "",
|
||||
check: "",
|
||||
primary: false,
|
||||
unique: false,
|
||||
notNull: false,
|
||||
increment: false,
|
||||
comment: "",
|
||||
id: 2,
|
||||
size: "",
|
||||
values: ["hi", "hello"],
|
||||
},
|
||||
],
|
||||
comment: "",
|
||||
indices: [],
|
||||
color: "#a751e8",
|
||||
},
|
||||
],
|
||||
relationships: [
|
||||
{
|
||||
startTableId: 1,
|
||||
startFieldId: 2,
|
||||
endTableId: 0,
|
||||
endFieldId: 0,
|
||||
startX: 36,
|
||||
startY: 422,
|
||||
endX: 38,
|
||||
endY: 95,
|
||||
name: "table_1_t_id_fk",
|
||||
cardinality: "One to one",
|
||||
updateConstraint: "No action",
|
||||
deleteConstraint: "No action",
|
||||
mandatory: false,
|
||||
id: 0,
|
||||
},
|
||||
{
|
||||
startTableId: 4,
|
||||
startFieldId: 0,
|
||||
endTableId: 5,
|
||||
endFieldId: 0,
|
||||
startX: 277,
|
||||
startY: 209,
|
||||
endX: 567,
|
||||
endY: 402,
|
||||
name: "table_4_id_fk",
|
||||
cardinality: "One to one",
|
||||
updateConstraint: "No action",
|
||||
deleteConstraint: "No action",
|
||||
mandatory: false,
|
||||
id: 1,
|
||||
},
|
||||
],
|
||||
notes: [
|
||||
{
|
||||
id: 0,
|
||||
x: 558,
|
||||
y: 21,
|
||||
title: "note_0",
|
||||
content: "hi",
|
||||
color: "#fcf7ac",
|
||||
height: 65,
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
x: 268,
|
||||
y: 308,
|
||||
title: "note_1",
|
||||
content: "",
|
||||
color: "#c7d2ff",
|
||||
height: 88,
|
||||
},
|
||||
],
|
||||
subjectAreas: [
|
||||
{
|
||||
id: 0,
|
||||
name: "area_0",
|
||||
x: -10,
|
||||
y: -9,
|
||||
width: 855,
|
||||
height: 471,
|
||||
color: "#7d9dff",
|
||||
},
|
||||
],
|
||||
types: [],
|
||||
title: "Template 4",
|
||||
description:
|
||||
"Lorem ipsum dolor sit amet consectetur adipisicing elit. Veniam nulla illo pariatur nostrum.",
|
||||
};
|
268
src/templates/template5.js
Normal file
268
src/templates/template5.js
Normal file
@ -0,0 +1,268 @@
|
||||
export const template5 = {
|
||||
tables: [
|
||||
{
|
||||
id: 0,
|
||||
name: "table_0",
|
||||
x: 55,
|
||||
y: 51,
|
||||
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: 325,
|
||||
y: 57,
|
||||
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: 52,
|
||||
y: 191,
|
||||
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_4",
|
||||
x: 582,
|
||||
y: 11,
|
||||
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",
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
name: "table_5",
|
||||
x: 584,
|
||||
y: 337,
|
||||
fields: [
|
||||
{
|
||||
name: "id",
|
||||
type: "INT",
|
||||
default: "",
|
||||
check: "",
|
||||
primary: true,
|
||||
unique: true,
|
||||
notNull: true,
|
||||
increment: true,
|
||||
comment: "",
|
||||
id: 0,
|
||||
},
|
||||
],
|
||||
comment: "",
|
||||
indices: [],
|
||||
color: "#7d9dff",
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
name: "table_6",
|
||||
x: 579,
|
||||
y: 153,
|
||||
fields: [
|
||||
{
|
||||
name: "id",
|
||||
type: "INT",
|
||||
default: "",
|
||||
check: "",
|
||||
primary: true,
|
||||
unique: true,
|
||||
notNull: true,
|
||||
increment: true,
|
||||
comment: "",
|
||||
id: 0,
|
||||
},
|
||||
{
|
||||
name: "field",
|
||||
type: "VARCHAR",
|
||||
default: "",
|
||||
check: "",
|
||||
primary: false,
|
||||
unique: false,
|
||||
notNull: false,
|
||||
increment: false,
|
||||
comment: "",
|
||||
id: 1,
|
||||
size: 255,
|
||||
},
|
||||
{
|
||||
name: "type",
|
||||
type: "ENUM",
|
||||
default: "",
|
||||
check: "",
|
||||
primary: false,
|
||||
unique: false,
|
||||
notNull: false,
|
||||
increment: false,
|
||||
comment: "",
|
||||
id: 2,
|
||||
size: "",
|
||||
values: ["hi", "hello"],
|
||||
},
|
||||
],
|
||||
comment: "",
|
||||
indices: [],
|
||||
color: "#a751e8",
|
||||
},
|
||||
],
|
||||
relationships: [
|
||||
{
|
||||
startTableId: 1,
|
||||
startFieldId: 2,
|
||||
endTableId: 0,
|
||||
endFieldId: 0,
|
||||
startX: 340,
|
||||
startY: 198,
|
||||
endX: 70,
|
||||
endY: 120,
|
||||
name: "table_1_t_id_fk",
|
||||
cardinality: "One to one",
|
||||
updateConstraint: "No action",
|
||||
deleteConstraint: "No action",
|
||||
mandatory: false,
|
||||
id: 0,
|
||||
},
|
||||
{
|
||||
startTableId: 4,
|
||||
startFieldId: 0,
|
||||
endTableId: 5,
|
||||
endFieldId: 0,
|
||||
startX: 599,
|
||||
startY: 406,
|
||||
endX: 594,
|
||||
endY: 222,
|
||||
name: "table_4_id_fk",
|
||||
cardinality: "One to one",
|
||||
updateConstraint: "No action",
|
||||
deleteConstraint: "No action",
|
||||
mandatory: false,
|
||||
id: 1,
|
||||
},
|
||||
],
|
||||
notes: [],
|
||||
subjectAreas: [
|
||||
{
|
||||
id: 0,
|
||||
name: "area_0",
|
||||
x: 24,
|
||||
y: 10,
|
||||
width: 533,
|
||||
height: 291,
|
||||
color: "#32c9b0",
|
||||
},
|
||||
],
|
||||
types: [],
|
||||
title: "Template 5",
|
||||
description:
|
||||
"Lorem ipsum dolor sit amet consectetur adipisicing elit. Veniam nulla illo pariatur nostrum.",
|
||||
};
|
304
src/templates/template6.js
Normal file
304
src/templates/template6.js
Normal file
@ -0,0 +1,304 @@
|
||||
export const template6 = {
|
||||
tables: [
|
||||
{
|
||||
id: 0,
|
||||
name: "table_0",
|
||||
x: 55,
|
||||
y: 23,
|
||||
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: 322,
|
||||
y: 145,
|
||||
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: 59,
|
||||
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_4",
|
||||
x: 580,
|
||||
y: 28,
|
||||
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",
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
name: "table_5",
|
||||
x: 324,
|
||||
y: 338,
|
||||
fields: [
|
||||
{
|
||||
name: "id",
|
||||
type: "INT",
|
||||
default: "",
|
||||
check: "",
|
||||
primary: true,
|
||||
unique: true,
|
||||
notNull: true,
|
||||
increment: true,
|
||||
comment: "",
|
||||
id: 0,
|
||||
},
|
||||
],
|
||||
comment: "",
|
||||
indices: [],
|
||||
color: "#7d9dff",
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
name: "table_6",
|
||||
x: 62,
|
||||
y: 287,
|
||||
fields: [
|
||||
{
|
||||
name: "id",
|
||||
type: "INT",
|
||||
default: "",
|
||||
check: "",
|
||||
primary: true,
|
||||
unique: true,
|
||||
notNull: true,
|
||||
increment: true,
|
||||
comment: "",
|
||||
id: 0,
|
||||
},
|
||||
{
|
||||
name: "field",
|
||||
type: "VARCHAR",
|
||||
default: "",
|
||||
check: "",
|
||||
primary: false,
|
||||
unique: false,
|
||||
notNull: false,
|
||||
increment: false,
|
||||
comment: "",
|
||||
id: 1,
|
||||
size: 255,
|
||||
},
|
||||
{
|
||||
name: "type",
|
||||
type: "ENUM",
|
||||
default: "",
|
||||
check: "",
|
||||
primary: false,
|
||||
unique: false,
|
||||
notNull: false,
|
||||
increment: false,
|
||||
comment: "",
|
||||
id: 2,
|
||||
size: "",
|
||||
values: ["hi", "hello"],
|
||||
},
|
||||
],
|
||||
comment: "",
|
||||
indices: [],
|
||||
color: "#a751e8",
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
name: "table_6",
|
||||
x: 580,
|
||||
y: 182,
|
||||
fields: [
|
||||
{
|
||||
name: "id",
|
||||
type: "INT",
|
||||
default: "",
|
||||
check: "",
|
||||
primary: true,
|
||||
unique: true,
|
||||
notNull: true,
|
||||
increment: true,
|
||||
comment: "",
|
||||
id: 0,
|
||||
},
|
||||
],
|
||||
comment: "",
|
||||
indices: [],
|
||||
color: "#175e7a",
|
||||
},
|
||||
{
|
||||
id: 7,
|
||||
name: "table_7",
|
||||
x: 321,
|
||||
y: 25,
|
||||
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: 337,
|
||||
startY: 286,
|
||||
endX: 70,
|
||||
endY: 92,
|
||||
name: "table_1_t_id_fk",
|
||||
cardinality: "One to one",
|
||||
updateConstraint: "No action",
|
||||
deleteConstraint: "No action",
|
||||
mandatory: false,
|
||||
id: 0,
|
||||
},
|
||||
{
|
||||
startTableId: 4,
|
||||
startFieldId: 0,
|
||||
endTableId: 5,
|
||||
endFieldId: 0,
|
||||
startX: 339,
|
||||
startY: 407,
|
||||
endX: 77,
|
||||
endY: 356,
|
||||
name: "table_4_id_fk",
|
||||
cardinality: "One to one",
|
||||
updateConstraint: "No action",
|
||||
deleteConstraint: "No action",
|
||||
mandatory: false,
|
||||
id: 1,
|
||||
},
|
||||
],
|
||||
notes: [],
|
||||
subjectAreas: [],
|
||||
types: [],
|
||||
title: "Template 6",
|
||||
description:
|
||||
"Lorem ipsum dolor sit amet consectetur adipisicing elit. Veniam nulla illo pariatur nostrum.",
|
||||
};
|
314
src/templates/template7.js
Normal file
314
src/templates/template7.js
Normal file
@ -0,0 +1,314 @@
|
||||
export const template7 = {
|
||||
tables: [
|
||||
{
|
||||
id: 0,
|
||||
name: "table_0",
|
||||
x: 55,
|
||||
y: 23,
|
||||
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: "#f03c3c",
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: "table_1",
|
||||
x: 330,
|
||||
y: 147,
|
||||
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: "#3cde7d",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: "table_2",
|
||||
x: 576,
|
||||
y: 311,
|
||||
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_4",
|
||||
x: 580,
|
||||
y: 28,
|
||||
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: "#ff9159",
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
name: "table_5",
|
||||
x: 324,
|
||||
y: 338,
|
||||
fields: [
|
||||
{
|
||||
name: "id",
|
||||
type: "INT",
|
||||
default: "",
|
||||
check: "",
|
||||
primary: true,
|
||||
unique: true,
|
||||
notNull: true,
|
||||
increment: true,
|
||||
comment: "",
|
||||
id: 0,
|
||||
},
|
||||
],
|
||||
comment: "",
|
||||
indices: [],
|
||||
color: "#7d9dff",
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
name: "table_6",
|
||||
x: 58,
|
||||
y: 284,
|
||||
fields: [
|
||||
{
|
||||
name: "id",
|
||||
type: "INT",
|
||||
default: "",
|
||||
check: "",
|
||||
primary: true,
|
||||
unique: true,
|
||||
notNull: true,
|
||||
increment: true,
|
||||
comment: "",
|
||||
id: 0,
|
||||
},
|
||||
{
|
||||
name: "field",
|
||||
type: "VARCHAR",
|
||||
default: "",
|
||||
check: "",
|
||||
primary: false,
|
||||
unique: false,
|
||||
notNull: false,
|
||||
increment: false,
|
||||
comment: "",
|
||||
id: 1,
|
||||
size: 255,
|
||||
},
|
||||
{
|
||||
name: "type",
|
||||
type: "ENUM",
|
||||
default: "",
|
||||
check: "",
|
||||
primary: false,
|
||||
unique: false,
|
||||
notNull: false,
|
||||
increment: false,
|
||||
comment: "",
|
||||
id: 2,
|
||||
size: "",
|
||||
values: ["hi", "hello"],
|
||||
},
|
||||
],
|
||||
comment: "",
|
||||
indices: [],
|
||||
color: "#ff4f81",
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
name: "table_6",
|
||||
x: 580,
|
||||
y: 182,
|
||||
fields: [
|
||||
{
|
||||
name: "id",
|
||||
type: "INT",
|
||||
default: "",
|
||||
check: "",
|
||||
primary: true,
|
||||
unique: true,
|
||||
notNull: true,
|
||||
increment: true,
|
||||
comment: "",
|
||||
id: 0,
|
||||
},
|
||||
],
|
||||
comment: "",
|
||||
indices: [],
|
||||
color: "#175e7a",
|
||||
},
|
||||
{
|
||||
id: 7,
|
||||
name: "table_7",
|
||||
x: 324,
|
||||
y: 26,
|
||||
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: 345,
|
||||
startY: 288,
|
||||
endX: 70,
|
||||
endY: 92,
|
||||
name: "table_1_t_id_fk",
|
||||
cardinality: "One to one",
|
||||
updateConstraint: "No action",
|
||||
deleteConstraint: "No action",
|
||||
mandatory: false,
|
||||
id: 0,
|
||||
},
|
||||
{
|
||||
startTableId: 4,
|
||||
startFieldId: 0,
|
||||
endTableId: 5,
|
||||
endFieldId: 0,
|
||||
startX: 339,
|
||||
startY: 407,
|
||||
endX: 73,
|
||||
endY: 353,
|
||||
name: "table_4_id_fk",
|
||||
cardinality: "One to one",
|
||||
updateConstraint: "No action",
|
||||
deleteConstraint: "No action",
|
||||
mandatory: false,
|
||||
id: 1,
|
||||
},
|
||||
],
|
||||
notes: [
|
||||
{
|
||||
id: 0,
|
||||
x: 60,
|
||||
y: 181,
|
||||
title: "note_0",
|
||||
content: "bruh",
|
||||
color: "#fcf7ac",
|
||||
height: 65,
|
||||
},
|
||||
],
|
||||
subjectAreas: [],
|
||||
types: [],
|
||||
title: "Template 7",
|
||||
description:
|
||||
"Lorem ipsum dolor sit amet consectetur adipisicing elit. Veniam nulla illo pariatur nostrum.",
|
||||
};
|
369
src/templates/template8.js
Normal file
369
src/templates/template8.js
Normal file
@ -0,0 +1,369 @@
|
||||
export const template8 = {
|
||||
tables: [
|
||||
{
|
||||
id: 0,
|
||||
name: "table_0",
|
||||
x: 55,
|
||||
y: 23,
|
||||
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: "#f03c3c",
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: "table_1",
|
||||
x: 331,
|
||||
y: 147,
|
||||
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: "#3cde7d",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: "table_2",
|
||||
x: 57,
|
||||
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_4",
|
||||
x: 580,
|
||||
y: 28,
|
||||
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: "#ff9159",
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
name: "table_5",
|
||||
x: 324,
|
||||
y: 338,
|
||||
fields: [
|
||||
{
|
||||
name: "id",
|
||||
type: "INT",
|
||||
default: "",
|
||||
check: "",
|
||||
primary: true,
|
||||
unique: true,
|
||||
notNull: true,
|
||||
increment: true,
|
||||
comment: "",
|
||||
id: 0,
|
||||
},
|
||||
],
|
||||
comment: "",
|
||||
indices: [],
|
||||
color: "#7d9dff",
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
name: "table_6",
|
||||
x: 58,
|
||||
y: 284,
|
||||
fields: [
|
||||
{
|
||||
name: "id",
|
||||
type: "INT",
|
||||
default: "",
|
||||
check: "",
|
||||
primary: true,
|
||||
unique: true,
|
||||
notNull: true,
|
||||
increment: true,
|
||||
comment: "",
|
||||
id: 0,
|
||||
},
|
||||
{
|
||||
name: "field",
|
||||
type: "VARCHAR",
|
||||
default: "",
|
||||
check: "",
|
||||
primary: false,
|
||||
unique: false,
|
||||
notNull: false,
|
||||
increment: false,
|
||||
comment: "",
|
||||
id: 1,
|
||||
size: 255,
|
||||
},
|
||||
{
|
||||
name: "type",
|
||||
type: "ENUM",
|
||||
default: "",
|
||||
check: "",
|
||||
primary: false,
|
||||
unique: false,
|
||||
notNull: false,
|
||||
increment: false,
|
||||
comment: "",
|
||||
id: 2,
|
||||
size: "",
|
||||
values: ["hi", "hello"],
|
||||
},
|
||||
],
|
||||
comment: "",
|
||||
indices: [],
|
||||
color: "#ff4f81",
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
name: "table_3",
|
||||
x: 580,
|
||||
y: 182,
|
||||
fields: [
|
||||
{
|
||||
name: "id",
|
||||
type: "INT",
|
||||
default: "",
|
||||
check: "",
|
||||
primary: true,
|
||||
unique: true,
|
||||
notNull: true,
|
||||
increment: true,
|
||||
comment: "",
|
||||
id: 0,
|
||||
},
|
||||
],
|
||||
comment: "",
|
||||
indices: [],
|
||||
color: "#175e7a",
|
||||
},
|
||||
{
|
||||
id: 7,
|
||||
name: "table_7",
|
||||
x: 324,
|
||||
y: 26,
|
||||
fields: [
|
||||
{
|
||||
name: "id",
|
||||
type: "INT",
|
||||
default: "",
|
||||
check: "",
|
||||
primary: true,
|
||||
unique: true,
|
||||
notNull: true,
|
||||
increment: true,
|
||||
comment: "",
|
||||
id: 0,
|
||||
},
|
||||
],
|
||||
comment: "",
|
||||
indices: [],
|
||||
color: "#175e7a",
|
||||
},
|
||||
{
|
||||
id: 8,
|
||||
name: "table_8",
|
||||
x: 575,
|
||||
y: 297,
|
||||
fields: [
|
||||
{
|
||||
name: "id",
|
||||
type: "INT",
|
||||
default: "",
|
||||
check: "",
|
||||
primary: true,
|
||||
unique: true,
|
||||
notNull: true,
|
||||
increment: true,
|
||||
comment: "",
|
||||
id: 0,
|
||||
},
|
||||
{
|
||||
name: "field1",
|
||||
type: "FLOAT",
|
||||
default: "",
|
||||
check: "",
|
||||
primary: false,
|
||||
unique: false,
|
||||
notNull: false,
|
||||
increment: false,
|
||||
comment: "",
|
||||
id: 1,
|
||||
size: "",
|
||||
},
|
||||
{
|
||||
name: "field2",
|
||||
type: "DOUBLE",
|
||||
default: "",
|
||||
check: "",
|
||||
primary: false,
|
||||
unique: false,
|
||||
notNull: false,
|
||||
increment: false,
|
||||
comment: "",
|
||||
id: 2,
|
||||
size: "",
|
||||
},
|
||||
],
|
||||
comment: "",
|
||||
indices: [],
|
||||
color: "#ffe159",
|
||||
},
|
||||
],
|
||||
relationships: [
|
||||
{
|
||||
startTableId: 1,
|
||||
startFieldId: 2,
|
||||
endTableId: 0,
|
||||
endFieldId: 0,
|
||||
startX: 346,
|
||||
startY: 288,
|
||||
endX: 70,
|
||||
endY: 92,
|
||||
name: "table_1_t_id_fk",
|
||||
cardinality: "One to one",
|
||||
updateConstraint: "No action",
|
||||
deleteConstraint: "No action",
|
||||
mandatory: false,
|
||||
id: 0,
|
||||
},
|
||||
{
|
||||
startTableId: 4,
|
||||
startFieldId: 0,
|
||||
endTableId: 5,
|
||||
endFieldId: 0,
|
||||
startX: 339,
|
||||
startY: 407,
|
||||
endX: 73,
|
||||
endY: 353,
|
||||
name: "table_4_id_fk",
|
||||
cardinality: "One to one",
|
||||
updateConstraint: "No action",
|
||||
deleteConstraint: "No action",
|
||||
mandatory: false,
|
||||
id: 1,
|
||||
},
|
||||
{
|
||||
startTableId: 6,
|
||||
startFieldId: 0,
|
||||
endTableId: 8,
|
||||
endFieldId: 0,
|
||||
startX: 595,
|
||||
startY: 251,
|
||||
endX: 590,
|
||||
endY: 366,
|
||||
name: "table_3_id_fk",
|
||||
cardinality: "One to one",
|
||||
updateConstraint: "No action",
|
||||
deleteConstraint: "No action",
|
||||
mandatory: false,
|
||||
id: 2,
|
||||
},
|
||||
],
|
||||
notes: [],
|
||||
subjectAreas: [],
|
||||
types: [],
|
||||
title: "Template 8",
|
||||
description:
|
||||
"Lorem ipsum dolor sit amet consectetur adipisicing elit. Veniam nulla illo pariatur nostrum.",
|
||||
};
|
Loading…
Reference in New Issue
Block a user