commit
601298f90a
17
index.html
17
index.html
@ -9,6 +9,11 @@
|
|||||||
name="description"
|
name="description"
|
||||||
content="Online database entity-realtionship diagram editor and SQL generator. Design, visualize, and export scripts without an account and completely free of charge."
|
content="Online database entity-realtionship diagram editor and SQL generator. Design, visualize, and export scripts without an account and completely free of charge."
|
||||||
/>
|
/>
|
||||||
|
<meta property="og:type" content="website" />
|
||||||
|
<meta property="og:url" content="https://drawdb.vercel.app/" />
|
||||||
|
<meta property="og:title" content="drawDB | Online database diagram editor and SQL generator" />
|
||||||
|
<meta property="og:description" content="Online database entity-realtionship diagram editor and SQL generator. Design, visualize, and export scripts without an account and completely free of charge." />
|
||||||
|
<meta property="og:image" content="/hero_ss.png" />
|
||||||
<link rel="apple-touch-icon" href="src/assets/favicon.ico" />
|
<link rel="apple-touch-icon" href="src/assets/favicon.ico" />
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
@ -19,17 +24,7 @@
|
|||||||
</head>
|
</head>
|
||||||
<body theme-mode="light">
|
<body theme-mode="light">
|
||||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||||
<div id="root" class="h-full"></div>
|
<div id="root"></div>
|
||||||
<!--
|
|
||||||
This HTML file is a template.
|
|
||||||
If you open it directly in the browser, you will see an empty page.
|
|
||||||
|
|
||||||
You can add webfonts, meta tags, or analytics to this file.
|
|
||||||
The build step will place the bundled scripts into the <body> tag.
|
|
||||||
|
|
||||||
To begin the development, run `npm start` or `yarn start`.
|
|
||||||
To create a production bundle, use `npm run build` or `yarn build`.
|
|
||||||
-->
|
|
||||||
<script type="module" src="/src/main.jsx"></script>
|
<script type="module" src="/src/main.jsx"></script>
|
||||||
<script
|
<script
|
||||||
src="https://kit.fontawesome.com/e35edcd75e.js"
|
src="https://kit.fontawesome.com/e35edcd75e.js"
|
||||||
|
BIN
public/hero_ss.png
Normal file
BIN
public/hero_ss.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 115 KiB |
BIN
src/assets/logo_dark_160.png
Normal file
BIN
src/assets/logo_dark_160.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
BIN
src/assets/logo_light_160.png
Normal file
BIN
src/assets/logo_light_160.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 23 KiB |
@ -113,7 +113,7 @@ export default function ControlPanel({
|
|||||||
const [showEditName, setShowEditName] = useState(false);
|
const [showEditName, setShowEditName] = useState(false);
|
||||||
const [exportData, setExportData] = useState({
|
const [exportData, setExportData] = useState({
|
||||||
data: null,
|
data: null,
|
||||||
filename: `diagram_${new Date().toISOString()}`,
|
filename: `${title}_${new Date().toISOString()}`,
|
||||||
extension: "",
|
extension: "",
|
||||||
});
|
});
|
||||||
const [error, setError] = useState({
|
const [error, setError] = useState({
|
||||||
@ -163,6 +163,9 @@ export default function ControlPanel({
|
|||||||
setRelationships(data.relationships);
|
setRelationships(data.relationships);
|
||||||
setAreas(data.subjectAreas);
|
setAreas(data.subjectAreas);
|
||||||
setNotes(data.notes);
|
setNotes(data.notes);
|
||||||
|
if (data.title) {
|
||||||
|
setTitle(data.title);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const undo = () => {
|
const undo = () => {
|
||||||
@ -880,6 +883,7 @@ export default function ControlPanel({
|
|||||||
notes: notes,
|
notes: notes,
|
||||||
subjectAreas: areas,
|
subjectAreas: areas,
|
||||||
types: types,
|
types: types,
|
||||||
|
title: title,
|
||||||
},
|
},
|
||||||
null,
|
null,
|
||||||
2
|
2
|
||||||
@ -931,7 +935,7 @@ export default function ControlPanel({
|
|||||||
const result = JSON.stringify(
|
const result = JSON.stringify(
|
||||||
{
|
{
|
||||||
author: "Unnamed",
|
author: "Unnamed",
|
||||||
filename: title,
|
title: title,
|
||||||
date: new Date().toISOString(),
|
date: new Date().toISOString(),
|
||||||
tables: tables,
|
tables: tables,
|
||||||
relationships: relationships,
|
relationships: relationships,
|
||||||
@ -1995,7 +1999,7 @@ export default function ControlPanel({
|
|||||||
setExportData(() => ({
|
setExportData(() => ({
|
||||||
data: "",
|
data: "",
|
||||||
extension: "",
|
extension: "",
|
||||||
filename: `diagram_${new Date().toISOString()}`,
|
filename: `${title}_${new Date().toISOString()}`,
|
||||||
}));
|
}));
|
||||||
setError({
|
setError({
|
||||||
type: STATUS.NONE,
|
type: STATUS.NONE,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import logo from "../assets/logo_light_46.png";
|
import logo from "../assets/logo_light_160.png";
|
||||||
import { SideSheet } from "@douyinfe/semi-ui";
|
import { SideSheet } from "@douyinfe/semi-ui";
|
||||||
import { IconMenu } from "@douyinfe/semi-icons";
|
import { IconMenu } from "@douyinfe/semi-icons";
|
||||||
|
|
||||||
@ -12,7 +12,7 @@ export default function Navbar() {
|
|||||||
<div className="py-5 px-8 sm:px-4 flex justify-between items-center">
|
<div className="py-5 px-8 sm:px-4 flex justify-between items-center">
|
||||||
<div className="flex items-center justify-start">
|
<div className="flex items-center justify-start">
|
||||||
<Link to="/">
|
<Link to="/">
|
||||||
<img src={logo} alt="logo" className="me-2 sm:h-[32px]" />
|
<img src={logo} alt="logo" className="me-2 h-[48px] sm:h-[32px]" />
|
||||||
</Link>
|
</Link>
|
||||||
<div className="md:hidden">
|
<div className="md:hidden">
|
||||||
<Link
|
<Link
|
||||||
@ -53,7 +53,15 @@ export default function Navbar() {
|
|||||||
onCancel={() => setOpenMenu(false)}
|
onCancel={() => setOpenMenu(false)}
|
||||||
width={window.innerWidth}
|
width={window.innerWidth}
|
||||||
>
|
>
|
||||||
<Link className="hover:bg-zinc-100 block p-3 text-base font-semibold">
|
<Link
|
||||||
|
className="hover:bg-zinc-100 block p-3 text-base font-semibold"
|
||||||
|
onClick={() => {
|
||||||
|
document
|
||||||
|
.getElementById("features")
|
||||||
|
.scrollIntoView({ behavior: "smooth" });
|
||||||
|
setOpenMenu(false);
|
||||||
|
}}
|
||||||
|
>
|
||||||
Features
|
Features
|
||||||
</Link>
|
</Link>
|
||||||
<hr />
|
<hr />
|
||||||
|
@ -95,12 +95,12 @@ export default function Table(props) {
|
|||||||
>
|
>
|
||||||
<div className="px-3">
|
<div className="px-3">
|
||||||
{isHovered
|
{isHovered
|
||||||
? props.tableData.name.length < 10
|
? props.tableData.name.length <= 10
|
||||||
? props.tableData.name
|
? props.tableData.name
|
||||||
: `${props.tableData.name.substring(0, 10)}...`
|
: `${props.tableData.name.substring(0, 10)}...`
|
||||||
: props.tableData.name.length < 16
|
: props.tableData.name.length <= 18
|
||||||
? props.tableData.name
|
? props.tableData.name
|
||||||
: `${props.tableData.name.substring(0, 16)}...`}
|
: `${props.tableData.name.substring(0, 19)}...`}
|
||||||
</div>
|
</div>
|
||||||
{isHovered && (
|
{isHovered && (
|
||||||
<div className="flex justify-end items-center mx-2">
|
<div className="flex justify-end items-center mx-2">
|
||||||
@ -1275,7 +1275,9 @@ export default function Table(props) {
|
|||||||
}));
|
}));
|
||||||
}}
|
}}
|
||||||
></button>
|
></button>
|
||||||
{fieldData.name}
|
{fieldData.name.length <= 11
|
||||||
|
? fieldData.name
|
||||||
|
: fieldData.name.substring(0, 11)}
|
||||||
</div>
|
</div>
|
||||||
<div className="text-zinc-400">
|
<div className="text-zinc-400">
|
||||||
{hoveredField === index ? (
|
{hoveredField === index ? (
|
||||||
|
@ -125,7 +125,7 @@ export function Thumbnail({ diagram, i, zoom }) {
|
|||||||
)}
|
)}
|
||||||
fill="none"
|
fill="none"
|
||||||
strokeWidth={1}
|
strokeWidth={1}
|
||||||
stroke="gray"
|
stroke="#ddd"
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
{diagram.notes?.map((n) => {
|
{diagram.notes?.map((n) => {
|
||||||
|
@ -161,6 +161,7 @@ const jsonSchema = {
|
|||||||
type: "array",
|
type: "array",
|
||||||
items: { ...areaSchema },
|
items: { ...areaSchema },
|
||||||
},
|
},
|
||||||
|
title: { type: "string" },
|
||||||
},
|
},
|
||||||
required: ["tables", "relationships", "notes", "subjectAreas"],
|
required: ["tables", "relationships", "notes", "subjectAreas"],
|
||||||
};
|
};
|
||||||
@ -170,7 +171,7 @@ const ddbSchema = {
|
|||||||
properties: {
|
properties: {
|
||||||
author: { type: "string" },
|
author: { type: "string" },
|
||||||
project: { type: "string" },
|
project: { type: "string" },
|
||||||
filename: { type: "string" },
|
title: { type: "string" },
|
||||||
date: { type: "string" },
|
date: { type: "string" },
|
||||||
...jsonSchema.properties,
|
...jsonSchema.properties,
|
||||||
},
|
},
|
||||||
|
@ -4,8 +4,6 @@ import { template3 } from "../templates/template3";
|
|||||||
import { template4 } from "../templates/template4";
|
import { template4 } from "../templates/template4";
|
||||||
import { template5 } from "../templates/template5";
|
import { template5 } from "../templates/template5";
|
||||||
import { template6 } from "../templates/template6";
|
import { template6 } from "../templates/template6";
|
||||||
import { template7 } from "../templates/template7";
|
|
||||||
import { template8 } from "../templates/template8";
|
|
||||||
|
|
||||||
const templateSeeds = [
|
const templateSeeds = [
|
||||||
template1,
|
template1,
|
||||||
@ -14,8 +12,6 @@ const templateSeeds = [
|
|||||||
template4,
|
template4,
|
||||||
template5,
|
template5,
|
||||||
template6,
|
template6,
|
||||||
template7,
|
|
||||||
template8,
|
|
||||||
];
|
];
|
||||||
|
|
||||||
export { templateSeeds };
|
export { templateSeeds };
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { useEffect, useState, useCallback, useRef } from "react";
|
import { useEffect, useState, useCallback, useRef } from "react";
|
||||||
import logo_light from "../assets/logo_light_46.png";
|
import logo_light from "../assets/logo_light_160.png";
|
||||||
import logo_dark from "../assets/logo_dark_46.png";
|
import logo_dark from "../assets/logo_dark_160.png";
|
||||||
import { Banner, Button, Input, Upload, Toast, Spin } from "@douyinfe/semi-ui";
|
import { Banner, Button, Input, Upload, Toast, Spin } from "@douyinfe/semi-ui";
|
||||||
import {
|
import {
|
||||||
IconSun,
|
IconSun,
|
||||||
@ -177,7 +177,7 @@ export default function BugReport() {
|
|||||||
<img
|
<img
|
||||||
src={theme === "dark" ? logo_dark : logo_light}
|
src={theme === "dark" ? logo_dark : logo_light}
|
||||||
alt="logo"
|
alt="logo"
|
||||||
className="me-2 sm:h-[28px] md:h-[46px]"
|
className="me-2 sm:h-[28px] md:h-[46px] h-[48px]"
|
||||||
/>
|
/>
|
||||||
</Link>
|
</Link>
|
||||||
<div className="ms-4 sm:text-sm xl:text-lg font-semibold">
|
<div className="ms-4 sm:text-sm xl:text-lg font-semibold">
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { useCookies } from "react-cookie";
|
import { useCookies } from "react-cookie";
|
||||||
import logo_light from "../assets/logo_light_46.png";
|
import logo_light from "../assets/logo_light_160.png";
|
||||||
import logo_dark from "../assets/logo_dark_46.png";
|
import logo_dark from "../assets/logo_dark_160.png";
|
||||||
|
|
||||||
const Page = {
|
const Page = {
|
||||||
MY_FILES: 0,
|
MY_FILES: 0,
|
||||||
|
@ -640,8 +640,8 @@ export default function Editor() {
|
|||||||
setNotes(diagram.notes);
|
setNotes(diagram.notes);
|
||||||
setSettings((prev) => ({
|
setSettings((prev) => ({
|
||||||
...prev,
|
...prev,
|
||||||
pan: diagram.pan,
|
pan: {x: 0, y: 0},
|
||||||
zoom: diagram.zoom,
|
zoom: 1,
|
||||||
}));
|
}));
|
||||||
setUndoStack([]);
|
setUndoStack([]);
|
||||||
setRedoStack([]);
|
setRedoStack([]);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import logo_light from "../assets/logo_light_46.png";
|
import logo_light from "../assets/logo_light_160.png";
|
||||||
import logo_dark from "../assets/logo_dark_46.png";
|
import logo_dark from "../assets/logo_dark_160.png";
|
||||||
import { AutoComplete, Button } from "@douyinfe/semi-ui";
|
import { AutoComplete, Button } from "@douyinfe/semi-ui";
|
||||||
import { IconSearch, IconSun, IconMoon } from "@douyinfe/semi-icons";
|
import { IconSearch, IconSun, IconMoon } from "@douyinfe/semi-icons";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
@ -117,7 +117,7 @@ export default function Shortcuts() {
|
|||||||
<img
|
<img
|
||||||
src={theme === "dark" ? logo_dark : logo_light}
|
src={theme === "dark" ? logo_dark : logo_light}
|
||||||
alt="logo"
|
alt="logo"
|
||||||
className="me-2 sm:h-[28px] md:h-[46px]"
|
className="me-2 sm:h-[28px] md:h-[46px] h-[48px]"
|
||||||
/>
|
/>
|
||||||
</Link>
|
</Link>
|
||||||
<div className="ms-4 sm:text-sm xl:text-lg font-semibold">
|
<div className="ms-4 sm:text-sm xl:text-lg font-semibold">
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { useEffect, useState, useCallback, useMemo } from "react";
|
import { useEffect, useState, useCallback, useMemo } from "react";
|
||||||
import logo_light from "../assets/logo_light_46.png";
|
import logo_light from "../assets/logo_light_160.png";
|
||||||
import logo_dark from "../assets/logo_dark_46.png";
|
import logo_dark from "../assets/logo_dark_160.png";
|
||||||
import {
|
import {
|
||||||
Banner,
|
Banner,
|
||||||
Button,
|
Button,
|
||||||
@ -280,7 +280,7 @@ export default function Survey() {
|
|||||||
<img
|
<img
|
||||||
src={theme === "dark" ? logo_dark : logo_light}
|
src={theme === "dark" ? logo_dark : logo_light}
|
||||||
alt="logo"
|
alt="logo"
|
||||||
className="me-2 sm:h-[28px] md:h-[46px]"
|
className="me-2 sm:h-[28px] md:h-[46px] h-[48px]"
|
||||||
/>
|
/>
|
||||||
</Link>
|
</Link>
|
||||||
<div className="ms-4 sm:text-sm xl:text-lg font-semibold">
|
<div className="ms-4 sm:text-sm xl:text-lg font-semibold">
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { useEffect } from "react";
|
import { useEffect } from "react";
|
||||||
import logo_light from "../assets/logo_light_46.png";
|
import logo_light from "../assets/logo_light_160.png";
|
||||||
import template_screenshot from "../assets/template_screenshot.png"
|
import template_screenshot from "../assets/template_screenshot.png"
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import { Tabs, TabPane, Banner, Steps } from "@douyinfe/semi-ui";
|
import { Tabs, TabPane, Banner, Steps } from "@douyinfe/semi-ui";
|
||||||
@ -197,7 +197,7 @@ export default function Templates() {
|
|||||||
<img
|
<img
|
||||||
src={logo_light}
|
src={logo_light}
|
||||||
alt="logo"
|
alt="logo"
|
||||||
className="me-2 sm:h-[28px] md:h-[46px]"
|
className="me-2 sm:h-[28px] md:h-[46px] h-[48px]"
|
||||||
/>
|
/>
|
||||||
</Link>
|
</Link>
|
||||||
<div className="ms-4 sm:text-sm xl:text-xl text-xl font-semibold">
|
<div className="ms-4 sm:text-sm xl:text-xl text-xl font-semibold">
|
||||||
|
@ -2,9 +2,219 @@ export const template1 = {
|
|||||||
tables: [
|
tables: [
|
||||||
{
|
{
|
||||||
id: 0,
|
id: 0,
|
||||||
name: "table_0",
|
name: "users",
|
||||||
x: 23,
|
x: 114.92525,
|
||||||
y: 26,
|
y: 281.2977500000002,
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
name: "id",
|
||||||
|
type: "INT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: true,
|
||||||
|
unique: true,
|
||||||
|
notNull: true,
|
||||||
|
increment: true,
|
||||||
|
comment: "",
|
||||||
|
id: 0,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "username",
|
||||||
|
type: "VARCHAR",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 1,
|
||||||
|
size: 255,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "password",
|
||||||
|
type: "VARCHAR",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 2,
|
||||||
|
size: 255,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "email",
|
||||||
|
type: "VARCHAR",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 3,
|
||||||
|
size: 255,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "last_login",
|
||||||
|
type: "TIMESTAMP",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 4,
|
||||||
|
size: "",
|
||||||
|
values: [],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
comment: "",
|
||||||
|
indices: [],
|
||||||
|
color: "#6360f7",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 1,
|
||||||
|
name: "blog_posts",
|
||||||
|
x: 277.57925,
|
||||||
|
y: 19.206750000000113,
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
name: "id",
|
||||||
|
type: "INT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: true,
|
||||||
|
unique: true,
|
||||||
|
notNull: true,
|
||||||
|
increment: true,
|
||||||
|
comment: "",
|
||||||
|
id: 0,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "user_id",
|
||||||
|
type: "INT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "title",
|
||||||
|
type: "VARCHAR",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 2,
|
||||||
|
size: 255,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "content",
|
||||||
|
type: "VARCHAR",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 3,
|
||||||
|
size: 255,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "cover",
|
||||||
|
type: "VARCHAR",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 4,
|
||||||
|
size: 255,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
comment: "",
|
||||||
|
indices: [],
|
||||||
|
color: "#bc49c4",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 2,
|
||||||
|
name: "comments",
|
||||||
|
x: 505.62112500000035,
|
||||||
|
y: 341.6078750000002,
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
name: "id",
|
||||||
|
type: "INT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: true,
|
||||||
|
unique: true,
|
||||||
|
notNull: true,
|
||||||
|
increment: true,
|
||||||
|
comment: "",
|
||||||
|
id: 0,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "blog_id",
|
||||||
|
type: "INT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "user_id",
|
||||||
|
type: "INT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 2,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "content",
|
||||||
|
type: "VARCHAR",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 3,
|
||||||
|
size: 255,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
comment: "",
|
||||||
|
indices: [],
|
||||||
|
color: "#3cde7d",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 3,
|
||||||
|
name: "tags",
|
||||||
|
x: 743.2832500000009,
|
||||||
|
y: 318.1841250000001,
|
||||||
fields: [
|
fields: [
|
||||||
{
|
{
|
||||||
name: "id",
|
name: "id",
|
||||||
@ -34,122 +244,131 @@ export const template1 = {
|
|||||||
],
|
],
|
||||||
comment: "",
|
comment: "",
|
||||||
indices: [],
|
indices: [],
|
||||||
color: "#175e7a",
|
color: "#7d9dff",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 4,
|
||||||
name: "table_1",
|
name: "blog_tag",
|
||||||
x: 301,
|
x: 812.1175000000004,
|
||||||
y: 167,
|
y: 131.55062500000008,
|
||||||
fields: [
|
fields: [
|
||||||
{
|
{
|
||||||
name: "id",
|
name: "blog_id",
|
||||||
type: "INT",
|
type: "INT",
|
||||||
default: "",
|
default: "",
|
||||||
check: "",
|
check: "",
|
||||||
primary: true,
|
primary: true,
|
||||||
unique: true,
|
unique: false,
|
||||||
notNull: true,
|
notNull: false,
|
||||||
increment: true,
|
increment: false,
|
||||||
comment: "",
|
comment: "",
|
||||||
id: 0,
|
id: 0,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "age",
|
name: "tag_id",
|
||||||
type: "INT",
|
type: "INT",
|
||||||
default: "",
|
default: "",
|
||||||
check: "",
|
check: "",
|
||||||
primary: false,
|
primary: true,
|
||||||
unique: false,
|
unique: false,
|
||||||
notNull: false,
|
notNull: false,
|
||||||
increment: false,
|
increment: false,
|
||||||
comment: "",
|
comment: "",
|
||||||
id: 1,
|
id: 1,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: "t_id",
|
|
||||||
type: "INT",
|
|
||||||
default: "",
|
|
||||||
check: "",
|
|
||||||
primary: false,
|
|
||||||
unique: false,
|
|
||||||
notNull: false,
|
|
||||||
increment: false,
|
|
||||||
comment: "",
|
|
||||||
id: 2,
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
comment: "",
|
comment: "",
|
||||||
indices: [],
|
indices: [],
|
||||||
color: "#175e7a",
|
color: "#ffe159",
|
||||||
},
|
|
||||||
{
|
|
||||||
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: [
|
relationships: [
|
||||||
{
|
{
|
||||||
startTableId: 1,
|
startTableId: 1,
|
||||||
startFieldId: 2,
|
startFieldId: 1,
|
||||||
endTableId: 0,
|
endTableId: 0,
|
||||||
endFieldId: 0,
|
endFieldId: 0,
|
||||||
startX: 316,
|
startX: 292.57925,
|
||||||
startY: 308,
|
startY: 124.20675000000011,
|
||||||
endX: 38,
|
endX: 129.92525,
|
||||||
endY: 95,
|
endY: 350.2977500000002,
|
||||||
name: "table_1_t_id_fk",
|
name: "blog_posts_user_id_fk",
|
||||||
cardinality: "One to one",
|
cardinality: "Many to one",
|
||||||
updateConstraint: "No action",
|
updateConstraint: "No action",
|
||||||
deleteConstraint: "No action",
|
deleteConstraint: "No action",
|
||||||
mandatory: false,
|
mandatory: false,
|
||||||
id: 0,
|
id: 0,
|
||||||
},
|
},
|
||||||
],
|
|
||||||
notes: [
|
|
||||||
{
|
{
|
||||||
id: 0,
|
startTableId: 2,
|
||||||
x: 352,
|
startFieldId: 1,
|
||||||
y: 22,
|
endTableId: 1,
|
||||||
title: "note_0",
|
endFieldId: 0,
|
||||||
content: "hi",
|
startX: 520.6211250000003,
|
||||||
color: "#fcf7ac",
|
startY: 446.6078750000002,
|
||||||
height: 65,
|
endX: 292.57925,
|
||||||
},
|
endY: 88.20675000000011,
|
||||||
],
|
name: "comments_blog_id_fk",
|
||||||
subjectAreas: [
|
cardinality: "Many to one",
|
||||||
{
|
updateConstraint: "No action",
|
||||||
id: 0,
|
deleteConstraint: "No action",
|
||||||
name: "area_0",
|
mandatory: false,
|
||||||
x: 0,
|
id: 1,
|
||||||
y: 0,
|
},
|
||||||
width: 562,
|
{
|
||||||
height: 390,
|
startTableId: 2,
|
||||||
color: "#175e7a",
|
startFieldId: 2,
|
||||||
|
endTableId: 0,
|
||||||
|
endFieldId: 0,
|
||||||
|
startX: 520.6211250000003,
|
||||||
|
startY: 482.6078750000002,
|
||||||
|
endX: 129.92525,
|
||||||
|
endY: 350.2977500000002,
|
||||||
|
name: "comments_user_id_fk",
|
||||||
|
cardinality: "Many to one",
|
||||||
|
updateConstraint: "No action",
|
||||||
|
deleteConstraint: "No action",
|
||||||
|
mandatory: false,
|
||||||
|
id: 2,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
startTableId: 4,
|
||||||
|
startFieldId: 1,
|
||||||
|
endTableId: 3,
|
||||||
|
endFieldId: 0,
|
||||||
|
startX: 827.1175000000004,
|
||||||
|
startY: 236.55062500000008,
|
||||||
|
endX: 758.2832500000009,
|
||||||
|
endY: 387.1841250000001,
|
||||||
|
name: "blog_tag_tag_id_fk",
|
||||||
|
cardinality: "Many to one",
|
||||||
|
updateConstraint: "No action",
|
||||||
|
deleteConstraint: "No action",
|
||||||
|
mandatory: false,
|
||||||
|
id: 3,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
startTableId: 4,
|
||||||
|
startFieldId: 0,
|
||||||
|
endTableId: 1,
|
||||||
|
endFieldId: 0,
|
||||||
|
startX: 827.1175000000004,
|
||||||
|
startY: 200.55062500000008,
|
||||||
|
endX: 292.57925,
|
||||||
|
endY: 88.20675000000011,
|
||||||
|
name: "blog_tag_blog_id_fk",
|
||||||
|
cardinality: "Many to one",
|
||||||
|
updateConstraint: "No action",
|
||||||
|
deleteConstraint: "No action",
|
||||||
|
mandatory: false,
|
||||||
|
id: 4,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
notes: [],
|
||||||
|
subjectAreas: [],
|
||||||
types: [],
|
types: [],
|
||||||
title: "Template 1",
|
title: "Blog database schema",
|
||||||
description:
|
description:
|
||||||
"Lorem ipsum dolor sit amet consectetur adipisicing elit. Veniam nulla illo pariatur nostrum.",
|
"A blog database including tables such as posts, users, comments, and tags to facilitate the storage and retrieval of blog-related information.",
|
||||||
custom: 0,
|
custom: 0,
|
||||||
};
|
};
|
||||||
|
@ -2,9 +2,96 @@ export const template2 = {
|
|||||||
tables: [
|
tables: [
|
||||||
{
|
{
|
||||||
id: 0,
|
id: 0,
|
||||||
name: "table_0",
|
name: "employees",
|
||||||
x: 23,
|
x: 365,
|
||||||
y: 26,
|
y: 20,
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
name: "id",
|
||||||
|
type: "INT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: true,
|
||||||
|
unique: true,
|
||||||
|
notNull: true,
|
||||||
|
increment: true,
|
||||||
|
comment: "",
|
||||||
|
id: 0,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "first_name",
|
||||||
|
type: "VARCHAR",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 1,
|
||||||
|
size: 255,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "last_name",
|
||||||
|
type: "VARCHAR",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 2,
|
||||||
|
size: 255,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "dob",
|
||||||
|
type: "DATE",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 3,
|
||||||
|
size: "",
|
||||||
|
values: [],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "dep_id",
|
||||||
|
type: "INT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 4,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "pos_id",
|
||||||
|
type: "INT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 5,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
comment: "",
|
||||||
|
indices: [],
|
||||||
|
color: "#a751e8",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 1,
|
||||||
|
name: "department",
|
||||||
|
x: 41,
|
||||||
|
y: 59,
|
||||||
fields: [
|
fields: [
|
||||||
{
|
{
|
||||||
name: "id",
|
name: "id",
|
||||||
@ -34,13 +121,13 @@ export const template2 = {
|
|||||||
],
|
],
|
||||||
comment: "",
|
comment: "",
|
||||||
indices: [],
|
indices: [],
|
||||||
color: "#3cde7d",
|
color: "#6360f7",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 2,
|
||||||
name: "table_1",
|
name: "positions",
|
||||||
x: 30,
|
x: 37,
|
||||||
y: 178,
|
y: 284,
|
||||||
fields: [
|
fields: [
|
||||||
{
|
{
|
||||||
name: "id",
|
name: "id",
|
||||||
@ -55,7 +142,133 @@ export const template2 = {
|
|||||||
id: 0,
|
id: 0,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "age",
|
name: "name",
|
||||||
|
type: "VARCHAR",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 1,
|
||||||
|
size: 255,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "salary",
|
||||||
|
type: "DOUBLE",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 2,
|
||||||
|
size: "",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
comment: "",
|
||||||
|
indices: [],
|
||||||
|
color: "#3cde7d",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 3,
|
||||||
|
name: "projects",
|
||||||
|
x: 668,
|
||||||
|
y: 28,
|
||||||
|
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,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "description",
|
||||||
|
type: "TEXT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 2,
|
||||||
|
size: 65535,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "start_date",
|
||||||
|
type: "DATE",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 3,
|
||||||
|
size: "",
|
||||||
|
values: [],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "end_date",
|
||||||
|
type: "DATE",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 4,
|
||||||
|
size: "",
|
||||||
|
values: [],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
comment: "",
|
||||||
|
indices: [],
|
||||||
|
color: "#7d9dff",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 4,
|
||||||
|
name: "project_assignment",
|
||||||
|
x: 684,
|
||||||
|
y: 295,
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
name: "id",
|
||||||
|
type: "INT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: true,
|
||||||
|
unique: true,
|
||||||
|
notNull: true,
|
||||||
|
increment: true,
|
||||||
|
comment: "",
|
||||||
|
id: 0,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "project_id",
|
||||||
type: "INT",
|
type: "INT",
|
||||||
default: "",
|
default: "",
|
||||||
check: "",
|
check: "",
|
||||||
@ -67,7 +280,7 @@ export const template2 = {
|
|||||||
id: 1,
|
id: 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "t_id",
|
name: "employee_id",
|
||||||
type: "INT",
|
type: "INT",
|
||||||
default: "",
|
default: "",
|
||||||
check: "",
|
check: "",
|
||||||
@ -81,84 +294,80 @@ export const template2 = {
|
|||||||
],
|
],
|
||||||
comment: "",
|
comment: "",
|
||||||
indices: [],
|
indices: [],
|
||||||
color: "#ffe159",
|
color: "#32c9b0",
|
||||||
},
|
|
||||||
{
|
|
||||||
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: [
|
relationships: [
|
||||||
{
|
{
|
||||||
startTableId: 1,
|
startTableId: 0,
|
||||||
startFieldId: 2,
|
startFieldId: 4,
|
||||||
endTableId: 0,
|
endTableId: 1,
|
||||||
endFieldId: 0,
|
endFieldId: 0,
|
||||||
startX: 45,
|
startX: 380,
|
||||||
startY: 319,
|
startY: 233,
|
||||||
endX: 38,
|
endX: 56,
|
||||||
endY: 95,
|
endY: 128,
|
||||||
name: "table_1_t_id_fk",
|
name: "employees_dep_id_fk",
|
||||||
cardinality: "One to one",
|
cardinality: "Many to one",
|
||||||
updateConstraint: "No action",
|
updateConstraint: "No action",
|
||||||
deleteConstraint: "No action",
|
deleteConstraint: "No action",
|
||||||
mandatory: false,
|
mandatory: false,
|
||||||
id: 0,
|
id: 0,
|
||||||
},
|
},
|
||||||
],
|
|
||||||
notes: [
|
|
||||||
{
|
|
||||||
id: 0,
|
|
||||||
x: 352,
|
|
||||||
y: 22,
|
|
||||||
title: "note_0",
|
|
||||||
content: "hi",
|
|
||||||
color: "#fcf7ac",
|
|
||||||
height: 65,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
|
startTableId: 0,
|
||||||
|
startFieldId: 5,
|
||||||
|
endTableId: 2,
|
||||||
|
endFieldId: 0,
|
||||||
|
startX: 380,
|
||||||
|
startY: 269,
|
||||||
|
endX: 52,
|
||||||
|
endY: 353,
|
||||||
|
name: "employees_pos_id_fk",
|
||||||
|
cardinality: "One to one",
|
||||||
|
updateConstraint: "No action",
|
||||||
|
deleteConstraint: "No action",
|
||||||
|
mandatory: false,
|
||||||
id: 1,
|
id: 1,
|
||||||
x: 577,
|
|
||||||
y: 254,
|
|
||||||
title: "note_1",
|
|
||||||
content: "",
|
|
||||||
color: "#c7d2ff",
|
|
||||||
height: 88,
|
|
||||||
},
|
},
|
||||||
],
|
|
||||||
subjectAreas: [
|
|
||||||
{
|
{
|
||||||
id: 0,
|
startTableId: 4,
|
||||||
name: "area_0",
|
startFieldId: 1,
|
||||||
x: -10,
|
endTableId: 3,
|
||||||
y: -22,
|
endFieldId: 0,
|
||||||
width: 562,
|
startX: 699,
|
||||||
height: 390,
|
startY: 400,
|
||||||
color: "#7c4af0",
|
endX: 683,
|
||||||
|
endY: 97,
|
||||||
|
name: "project_assignment_project_id_fk",
|
||||||
|
cardinality: "One to one",
|
||||||
|
updateConstraint: "No action",
|
||||||
|
deleteConstraint: "No action",
|
||||||
|
mandatory: false,
|
||||||
|
id: 2,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
startTableId: 4,
|
||||||
|
startFieldId: 2,
|
||||||
|
endTableId: 0,
|
||||||
|
endFieldId: 0,
|
||||||
|
startX: 699,
|
||||||
|
startY: 436,
|
||||||
|
endX: 380,
|
||||||
|
endY: 89,
|
||||||
|
name: "project_assignment_employee_id_fk",
|
||||||
|
cardinality: "Many to one",
|
||||||
|
updateConstraint: "No action",
|
||||||
|
deleteConstraint: "No action",
|
||||||
|
mandatory: false,
|
||||||
|
id: 3,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
notes: [],
|
||||||
|
subjectAreas: [],
|
||||||
types: [],
|
types: [],
|
||||||
title: "Template 2",
|
title: "Human resources schema",
|
||||||
description:
|
description:
|
||||||
"Lorem ipsum dolor sit amet consectetur adipisicing elit. Veniam nulla illo pariatur nostrum.",
|
"A Human Resources (HR) schema designed to manage employee and project related information within an organization.",
|
||||||
custom: 0,
|
custom: 0,
|
||||||
};
|
};
|
||||||
|
@ -2,9 +2,83 @@ export const template3 = {
|
|||||||
tables: [
|
tables: [
|
||||||
{
|
{
|
||||||
id: 0,
|
id: 0,
|
||||||
name: "table_0",
|
name: "products",
|
||||||
x: 23,
|
x: 331,
|
||||||
y: 26,
|
y: 300,
|
||||||
|
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,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "description",
|
||||||
|
type: "TEXT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 2,
|
||||||
|
size: 65535,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "price",
|
||||||
|
type: "DOUBLE",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 3,
|
||||||
|
size: "",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "category_id",
|
||||||
|
type: "INT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 4,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
comment: "",
|
||||||
|
indices: [],
|
||||||
|
color: "#32c9b0",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 1,
|
||||||
|
name: "categories",
|
||||||
|
x: 649,
|
||||||
|
y: 391,
|
||||||
fields: [
|
fields: [
|
||||||
{
|
{
|
||||||
name: "id",
|
name: "id",
|
||||||
@ -34,13 +108,13 @@ export const template3 = {
|
|||||||
],
|
],
|
||||||
comment: "",
|
comment: "",
|
||||||
indices: [],
|
indices: [],
|
||||||
color: "#3cde7d",
|
color: "#89e667",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 2,
|
||||||
name: "table_1",
|
name: "orders",
|
||||||
x: 354,
|
x: 756,
|
||||||
y: 144,
|
y: 47,
|
||||||
fields: [
|
fields: [
|
||||||
{
|
{
|
||||||
name: "id",
|
name: "id",
|
||||||
@ -55,8 +129,8 @@ export const template3 = {
|
|||||||
id: 0,
|
id: 0,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "age",
|
name: "date",
|
||||||
type: "INT",
|
type: "DATETIME",
|
||||||
default: "",
|
default: "",
|
||||||
check: "",
|
check: "",
|
||||||
primary: false,
|
primary: false,
|
||||||
@ -65,9 +139,11 @@ export const template3 = {
|
|||||||
increment: false,
|
increment: false,
|
||||||
comment: "",
|
comment: "",
|
||||||
id: 1,
|
id: 1,
|
||||||
|
size: "",
|
||||||
|
values: [],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "t_id",
|
name: "customer_id",
|
||||||
type: "INT",
|
type: "INT",
|
||||||
default: "",
|
default: "",
|
||||||
check: "",
|
check: "",
|
||||||
@ -78,62 +154,53 @@ export const template3 = {
|
|||||||
comment: "",
|
comment: "",
|
||||||
id: 2,
|
id: 2,
|
||||||
},
|
},
|
||||||
],
|
|
||||||
comment: "",
|
|
||||||
indices: [],
|
|
||||||
color: "#ffe159",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 2,
|
|
||||||
name: "table_2",
|
|
||||||
x: 25,
|
|
||||||
y: 171,
|
|
||||||
fields: [
|
|
||||||
{
|
{
|
||||||
name: "id",
|
name: "amount",
|
||||||
type: "INT",
|
type: "INT",
|
||||||
default: "",
|
default: "",
|
||||||
check: "",
|
check: "",
|
||||||
primary: true,
|
primary: false,
|
||||||
unique: true,
|
unique: false,
|
||||||
notNull: true,
|
notNull: false,
|
||||||
increment: true,
|
increment: false,
|
||||||
comment: "",
|
comment: "",
|
||||||
id: 0,
|
id: 3,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "status",
|
||||||
|
type: "ENUM",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 4,
|
||||||
|
values: ["delivered", "recieved", "processing"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "product_id",
|
||||||
|
type: "INT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 5,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
comment: "",
|
comment: "",
|
||||||
indices: [],
|
indices: [],
|
||||||
color: "#7c4af0",
|
color: "#6360f7",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 3,
|
id: 3,
|
||||||
name: "table_3",
|
name: "reviews",
|
||||||
x: 356,
|
x: 33,
|
||||||
y: 30,
|
y: 93,
|
||||||
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: [
|
fields: [
|
||||||
{
|
{
|
||||||
name: "id",
|
name: "id",
|
||||||
@ -148,7 +215,7 @@ export const template3 = {
|
|||||||
id: 0,
|
id: 0,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "quantity",
|
name: "customer_id",
|
||||||
type: "INT",
|
type: "INT",
|
||||||
default: "",
|
default: "",
|
||||||
check: "",
|
check: "",
|
||||||
@ -159,73 +226,225 @@ export const template3 = {
|
|||||||
comment: "",
|
comment: "",
|
||||||
id: 1,
|
id: 1,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "product_id",
|
||||||
|
type: "INT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 2,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "rating",
|
||||||
|
type: "INT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 3,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "content",
|
||||||
|
type: "VARCHAR",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 4,
|
||||||
|
size: 255,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "date",
|
||||||
|
type: "DATETIME",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 5,
|
||||||
|
size: "",
|
||||||
|
values: [],
|
||||||
|
},
|
||||||
],
|
],
|
||||||
comment: "",
|
comment: "",
|
||||||
indices: [],
|
indices: [],
|
||||||
color: "#175e7a",
|
color: "#ffe159",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 4,
|
||||||
|
name: "customers",
|
||||||
|
x: 402,
|
||||||
|
y: 16,
|
||||||
|
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,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "address",
|
||||||
|
type: "VARCHAR",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 2,
|
||||||
|
size: 255,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "email",
|
||||||
|
type: "VARCHAR",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 3,
|
||||||
|
size: 255,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "phone",
|
||||||
|
type: "VARCHAR",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 4,
|
||||||
|
size: 255,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
comment: "",
|
||||||
|
indices: [],
|
||||||
|
color: "#ff4f81",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
relationships: [
|
relationships: [
|
||||||
{
|
{
|
||||||
startTableId: 1,
|
startTableId: 2,
|
||||||
startFieldId: 2,
|
startFieldId: 5,
|
||||||
endTableId: 0,
|
endTableId: 0,
|
||||||
endFieldId: 0,
|
endFieldId: 0,
|
||||||
startX: 369,
|
startX: 771,
|
||||||
startY: 285,
|
startY: 296,
|
||||||
endX: 38,
|
endX: 346,
|
||||||
endY: 95,
|
endY: 369,
|
||||||
name: "table_1_t_id_fk",
|
name: "order_product_id_fk",
|
||||||
cardinality: "One to one",
|
cardinality: "One to one",
|
||||||
updateConstraint: "No action",
|
updateConstraint: "No action",
|
||||||
deleteConstraint: "No action",
|
deleteConstraint: "No action",
|
||||||
mandatory: false,
|
mandatory: false,
|
||||||
id: 0,
|
id: 0,
|
||||||
},
|
},
|
||||||
],
|
|
||||||
notes: [
|
|
||||||
{
|
|
||||||
id: 0,
|
|
||||||
x: 630,
|
|
||||||
y: 164,
|
|
||||||
title: "note_0",
|
|
||||||
content: "hi",
|
|
||||||
color: "#fcf7ac",
|
|
||||||
height: 65,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
|
startTableId: 0,
|
||||||
|
startFieldId: 4,
|
||||||
|
endTableId: 1,
|
||||||
|
endFieldId: 0,
|
||||||
|
startX: 346,
|
||||||
|
startY: 513,
|
||||||
|
endX: 664,
|
||||||
|
endY: 460,
|
||||||
|
name: "products_category_id_fk",
|
||||||
|
cardinality: "Many to one",
|
||||||
|
updateConstraint: "No action",
|
||||||
|
deleteConstraint: "No action",
|
||||||
|
mandatory: false,
|
||||||
id: 1,
|
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,
|
startTableId: 3,
|
||||||
name: "area_1",
|
startFieldId: 1,
|
||||||
x: 289,
|
endTableId: 4,
|
||||||
y: -18,
|
endFieldId: 0,
|
||||||
width: 303,
|
startX: 48,
|
||||||
height: 392,
|
startY: 198,
|
||||||
color: "#175e7a",
|
endX: 417,
|
||||||
|
endY: 85,
|
||||||
|
name: "reviews_customer_id_fk",
|
||||||
|
cardinality: "Many to one",
|
||||||
|
updateConstraint: "No action",
|
||||||
|
deleteConstraint: "No action",
|
||||||
|
mandatory: false,
|
||||||
|
id: 2,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
startTableId: 3,
|
||||||
|
startFieldId: 2,
|
||||||
|
endTableId: 0,
|
||||||
|
endFieldId: 0,
|
||||||
|
startX: 48,
|
||||||
|
startY: 234,
|
||||||
|
endX: 346,
|
||||||
|
endY: 369,
|
||||||
|
name: "reviews_product_id_fk",
|
||||||
|
cardinality: "One to one",
|
||||||
|
updateConstraint: "No action",
|
||||||
|
deleteConstraint: "No action",
|
||||||
|
mandatory: false,
|
||||||
|
id: 3,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
startTableId: 2,
|
||||||
|
startFieldId: 2,
|
||||||
|
endTableId: 4,
|
||||||
|
endFieldId: 0,
|
||||||
|
startX: 771,
|
||||||
|
startY: 188,
|
||||||
|
endX: 417,
|
||||||
|
endY: 85,
|
||||||
|
name: "orders_customer_id_fk",
|
||||||
|
cardinality: "Many to one",
|
||||||
|
updateConstraint: "No action",
|
||||||
|
deleteConstraint: "No action",
|
||||||
|
mandatory: false,
|
||||||
|
id: 4,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
notes: [],
|
||||||
|
subjectAreas: [],
|
||||||
types: [],
|
types: [],
|
||||||
title: "Template 3",
|
title: "E-commerce schema",
|
||||||
description:
|
description:
|
||||||
"Lorem ipsum dolor sit amet consectetur adipisicing elit. Veniam nulla illo pariatur nostrum.",
|
"An e-commerce schema designed to manage various aspects of an online store, including products, orders, and customers.",
|
||||||
custom: 0,
|
custom: 0,
|
||||||
};
|
};
|
||||||
|
@ -2,9 +2,82 @@ export const template4 = {
|
|||||||
tables: [
|
tables: [
|
||||||
{
|
{
|
||||||
id: 0,
|
id: 0,
|
||||||
name: "table_0",
|
name: "books",
|
||||||
x: 23,
|
x: 167,
|
||||||
y: 26,
|
y: 88,
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
name: "id",
|
||||||
|
type: "INT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: true,
|
||||||
|
unique: true,
|
||||||
|
notNull: true,
|
||||||
|
increment: true,
|
||||||
|
comment: "",
|
||||||
|
id: 0,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "title",
|
||||||
|
type: "VARCHAR",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 1,
|
||||||
|
size: 255,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "isbn",
|
||||||
|
type: "VARCHAR",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 2,
|
||||||
|
size: 255,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "author_id",
|
||||||
|
type: "INT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 3,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "genre_id",
|
||||||
|
type: "INT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 4,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
comment: "",
|
||||||
|
indices: [],
|
||||||
|
color: "#6360f7",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 1,
|
||||||
|
name: "genres",
|
||||||
|
x: 78,
|
||||||
|
y: 379,
|
||||||
fields: [
|
fields: [
|
||||||
{
|
{
|
||||||
name: "id",
|
name: "id",
|
||||||
@ -34,106 +107,13 @@ export const template4 = {
|
|||||||
],
|
],
|
||||||
comment: "",
|
comment: "",
|
||||||
indices: [],
|
indices: [],
|
||||||
color: "#3cde7d",
|
color: "#bc49c4",
|
||||||
},
|
|
||||||
{
|
|
||||||
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,
|
id: 2,
|
||||||
name: "table_2",
|
name: "authors",
|
||||||
x: 25,
|
x: 475,
|
||||||
y: 171,
|
y: 342,
|
||||||
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: [
|
fields: [
|
||||||
{
|
{
|
||||||
name: "id",
|
name: "id",
|
||||||
@ -148,65 +128,7 @@ export const template4 = {
|
|||||||
id: 0,
|
id: 0,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "quantity",
|
name: "name",
|
||||||
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",
|
type: "VARCHAR",
|
||||||
default: "",
|
default: "",
|
||||||
check: "",
|
check: "",
|
||||||
@ -219,8 +141,8 @@ export const template4 = {
|
|||||||
size: 255,
|
size: 255,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "type",
|
name: "birthday",
|
||||||
type: "ENUM",
|
type: "DATE",
|
||||||
default: "",
|
default: "",
|
||||||
check: "",
|
check: "",
|
||||||
primary: false,
|
primary: false,
|
||||||
@ -230,82 +152,234 @@ export const template4 = {
|
|||||||
comment: "",
|
comment: "",
|
||||||
id: 2,
|
id: 2,
|
||||||
size: "",
|
size: "",
|
||||||
values: ["hi", "hello"],
|
values: [],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "nationality",
|
||||||
|
type: "VARCHAR",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 3,
|
||||||
|
size: 255,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
comment: "",
|
comment: "",
|
||||||
indices: [],
|
indices: [],
|
||||||
color: "#a751e8",
|
color: "#ffe159",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 3,
|
||||||
|
name: "reservations",
|
||||||
|
x: 501,
|
||||||
|
y: 14,
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
name: "id",
|
||||||
|
type: "INT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: true,
|
||||||
|
unique: true,
|
||||||
|
notNull: true,
|
||||||
|
increment: true,
|
||||||
|
comment: "",
|
||||||
|
id: 0,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "book_id",
|
||||||
|
type: "INT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "patron_id",
|
||||||
|
type: "INT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 2,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "date",
|
||||||
|
type: "DATE",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 3,
|
||||||
|
size: "",
|
||||||
|
values: [],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "email",
|
||||||
|
type: "VARCHAR",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 4,
|
||||||
|
size: 255,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
comment: "",
|
||||||
|
indices: [],
|
||||||
|
color: "#89e667",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 4,
|
||||||
|
name: "patrons",
|
||||||
|
x: 780,
|
||||||
|
y: 220,
|
||||||
|
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,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "email",
|
||||||
|
type: "VARCHAR",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 2,
|
||||||
|
size: 255,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "phone",
|
||||||
|
type: "VARCHAR",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 3,
|
||||||
|
size: 255,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
comment: "",
|
||||||
|
indices: [],
|
||||||
|
color: "#ff9159",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
relationships: [
|
relationships: [
|
||||||
{
|
{
|
||||||
startTableId: 1,
|
startTableId: 0,
|
||||||
startFieldId: 2,
|
startFieldId: 3,
|
||||||
|
endTableId: 2,
|
||||||
|
endFieldId: 0,
|
||||||
|
startX: 182,
|
||||||
|
startY: 265,
|
||||||
|
endX: 490,
|
||||||
|
endY: 411,
|
||||||
|
name: "books_author_id_fk",
|
||||||
|
cardinality: "Many to one",
|
||||||
|
updateConstraint: "No action",
|
||||||
|
deleteConstraint: "No action",
|
||||||
|
mandatory: false,
|
||||||
|
id: 0,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
startTableId: 3,
|
||||||
|
startFieldId: 1,
|
||||||
endTableId: 0,
|
endTableId: 0,
|
||||||
endFieldId: 0,
|
endFieldId: 0,
|
||||||
startX: 36,
|
startX: 516,
|
||||||
startY: 422,
|
startY: 119,
|
||||||
endX: 38,
|
endX: 182,
|
||||||
endY: 95,
|
endY: 157,
|
||||||
name: "table_1_t_id_fk",
|
name: "reservations_book_id_fk",
|
||||||
cardinality: "One to one",
|
cardinality: "One to one",
|
||||||
updateConstraint: "No action",
|
updateConstraint: "No action",
|
||||||
deleteConstraint: "No action",
|
deleteConstraint: "No action",
|
||||||
mandatory: false,
|
mandatory: false,
|
||||||
id: 0,
|
id: 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
startTableId: 4,
|
startTableId: 3,
|
||||||
startFieldId: 0,
|
startFieldId: 2,
|
||||||
endTableId: 5,
|
endTableId: 4,
|
||||||
endFieldId: 0,
|
endFieldId: 0,
|
||||||
startX: 277,
|
startX: 516,
|
||||||
startY: 209,
|
startY: 155,
|
||||||
endX: 567,
|
endX: 795,
|
||||||
endY: 402,
|
endY: 289,
|
||||||
name: "table_4_id_fk",
|
name: "reservations_patron_id_fk",
|
||||||
cardinality: "One to one",
|
cardinality: "One to one",
|
||||||
updateConstraint: "No action",
|
updateConstraint: "No action",
|
||||||
deleteConstraint: "No action",
|
deleteConstraint: "No action",
|
||||||
mandatory: false,
|
mandatory: false,
|
||||||
id: 1,
|
id: 2,
|
||||||
},
|
|
||||||
],
|
|
||||||
notes: [
|
|
||||||
{
|
|
||||||
id: 0,
|
|
||||||
x: 558,
|
|
||||||
y: 21,
|
|
||||||
title: "note_0",
|
|
||||||
content: "hi",
|
|
||||||
color: "#fcf7ac",
|
|
||||||
height: 65,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 1,
|
startTableId: 0,
|
||||||
x: 268,
|
startFieldId: 4,
|
||||||
y: 308,
|
endTableId: 1,
|
||||||
title: "note_1",
|
endFieldId: 0,
|
||||||
content: "",
|
startX: 182,
|
||||||
color: "#c7d2ff",
|
startY: 301,
|
||||||
height: 88,
|
endX: 93,
|
||||||
},
|
endY: 448,
|
||||||
],
|
name: "books_genre_id_fk",
|
||||||
subjectAreas: [
|
cardinality: "Many to one",
|
||||||
{
|
updateConstraint: "No action",
|
||||||
id: 0,
|
deleteConstraint: "No action",
|
||||||
name: "area_0",
|
mandatory: false,
|
||||||
x: -10,
|
id: 3,
|
||||||
y: -9,
|
|
||||||
width: 855,
|
|
||||||
height: 471,
|
|
||||||
color: "#7d9dff",
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
notes: [],
|
||||||
|
subjectAreas: [],
|
||||||
types: [],
|
types: [],
|
||||||
title: "Template 4",
|
title: "Library schema",
|
||||||
description:
|
description:
|
||||||
"Lorem ipsum dolor sit amet consectetur adipisicing elit. Veniam nulla illo pariatur nostrum.",
|
"A library schema designed to manage the books, genres, reservations, and other aspects of a library system",
|
||||||
custom: 0,
|
custom: 0,
|
||||||
};
|
};
|
||||||
|
@ -2,9 +2,9 @@ export const template5 = {
|
|||||||
tables: [
|
tables: [
|
||||||
{
|
{
|
||||||
id: 0,
|
id: 0,
|
||||||
name: "table_0",
|
name: "accounts",
|
||||||
x: 55,
|
x: 129,
|
||||||
y: 51,
|
y: 92,
|
||||||
fields: [
|
fields: [
|
||||||
{
|
{
|
||||||
name: "id",
|
name: "id",
|
||||||
@ -19,43 +19,7 @@ export const template5 = {
|
|||||||
id: 0,
|
id: 0,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "name",
|
name: "customer_id",
|
||||||
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",
|
type: "INT",
|
||||||
default: "",
|
default: "",
|
||||||
check: "",
|
check: "",
|
||||||
@ -66,135 +30,6 @@ export const template5 = {
|
|||||||
comment: "",
|
comment: "",
|
||||||
id: 1,
|
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",
|
name: "type",
|
||||||
type: "ENUM",
|
type: "ENUM",
|
||||||
@ -206,27 +41,524 @@ export const template5 = {
|
|||||||
increment: false,
|
increment: false,
|
||||||
comment: "",
|
comment: "",
|
||||||
id: 2,
|
id: 2,
|
||||||
|
values: ["checking", "savings"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "number",
|
||||||
|
type: "BIGINT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 3,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "balance",
|
||||||
|
type: "FLOAT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 4,
|
||||||
size: "",
|
size: "",
|
||||||
values: ["hi", "hello"],
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
comment: "",
|
comment: "",
|
||||||
indices: [],
|
indices: [],
|
||||||
color: "#a751e8",
|
color: "#7d9dff",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 1,
|
||||||
|
name: "customers",
|
||||||
|
x: 384,
|
||||||
|
y: 315,
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
name: "id",
|
||||||
|
type: "INT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: true,
|
||||||
|
unique: true,
|
||||||
|
notNull: true,
|
||||||
|
increment: true,
|
||||||
|
comment: "",
|
||||||
|
id: 0,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "first_name",
|
||||||
|
type: "VARCHAR",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 1,
|
||||||
|
size: 255,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "last_name",
|
||||||
|
type: "VARCHAR",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 2,
|
||||||
|
size: 255,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "phone",
|
||||||
|
type: "VARCHAR",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 3,
|
||||||
|
size: 255,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "address",
|
||||||
|
type: "VARCHAR",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 4,
|
||||||
|
size: 255,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
comment: "",
|
||||||
|
indices: [],
|
||||||
|
color: "#32c9b0",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 2,
|
||||||
|
name: "transactions",
|
||||||
|
x: 431,
|
||||||
|
y: 4,
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
name: "id",
|
||||||
|
type: "INT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: true,
|
||||||
|
unique: true,
|
||||||
|
notNull: true,
|
||||||
|
increment: true,
|
||||||
|
comment: "",
|
||||||
|
id: 0,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "account_id",
|
||||||
|
type: "INT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "time",
|
||||||
|
type: "DATETIME",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 2,
|
||||||
|
size: "",
|
||||||
|
values: [],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "type",
|
||||||
|
type: "ENUM",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 3,
|
||||||
|
values: ["withdrawal", "deposit"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "amount",
|
||||||
|
type: "FLOAT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 4,
|
||||||
|
size: "",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
comment: "",
|
||||||
|
indices: [],
|
||||||
|
color: "#3cde7d",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 3,
|
||||||
|
name: "transfers",
|
||||||
|
x: 112,
|
||||||
|
y: 358,
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
name: "id",
|
||||||
|
type: "INT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: true,
|
||||||
|
unique: true,
|
||||||
|
notNull: true,
|
||||||
|
increment: true,
|
||||||
|
comment: "",
|
||||||
|
id: 0,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "from",
|
||||||
|
type: "INT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "to",
|
||||||
|
type: "INT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 2,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "time",
|
||||||
|
type: "DATETIME",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 3,
|
||||||
|
size: "",
|
||||||
|
values: [],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "amount",
|
||||||
|
type: "FLOAT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 4,
|
||||||
|
size: "",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
comment: "",
|
||||||
|
indices: [],
|
||||||
|
color: "#89e667",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 4,
|
||||||
|
name: "cards",
|
||||||
|
x: 772,
|
||||||
|
y: 29,
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
name: "id",
|
||||||
|
type: "INT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: true,
|
||||||
|
unique: true,
|
||||||
|
notNull: true,
|
||||||
|
increment: true,
|
||||||
|
comment: "",
|
||||||
|
id: 0,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "type",
|
||||||
|
type: "ENUM",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 1,
|
||||||
|
values: ["visa", "master"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "customer_id",
|
||||||
|
type: "INT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 2,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "number",
|
||||||
|
type: "BIGINT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 3,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "limit",
|
||||||
|
type: "FLOAT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 4,
|
||||||
|
size: "",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
comment: "",
|
||||||
|
indices: [],
|
||||||
|
color: "#ffe159",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 5,
|
||||||
|
name: "loans",
|
||||||
|
x: 919,
|
||||||
|
y: 281,
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
name: "id",
|
||||||
|
type: "INT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: true,
|
||||||
|
unique: true,
|
||||||
|
notNull: true,
|
||||||
|
increment: true,
|
||||||
|
comment: "",
|
||||||
|
id: 0,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "customer_id",
|
||||||
|
type: "INT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "amount",
|
||||||
|
type: "FLOAT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 2,
|
||||||
|
size: "",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "rate",
|
||||||
|
type: "FLOAT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 3,
|
||||||
|
size: "",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "term",
|
||||||
|
type: "DATE",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 4,
|
||||||
|
size: "",
|
||||||
|
values: [],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "status",
|
||||||
|
type: "ENUM",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 5,
|
||||||
|
values: ["paid", "approved"],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
comment: "",
|
||||||
|
indices: [],
|
||||||
|
color: "#ff9159",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 6,
|
||||||
|
name: "investments",
|
||||||
|
x: 664,
|
||||||
|
y: 395,
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
name: "id",
|
||||||
|
type: "INT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: true,
|
||||||
|
unique: true,
|
||||||
|
notNull: true,
|
||||||
|
increment: true,
|
||||||
|
comment: "",
|
||||||
|
id: 0,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "customer_id",
|
||||||
|
type: "INT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "type",
|
||||||
|
type: "ENUM",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 2,
|
||||||
|
values: ["mutual-fund", "stock"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "amount",
|
||||||
|
type: "FLOAT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 3,
|
||||||
|
size: "",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "date",
|
||||||
|
type: "DATE",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 4,
|
||||||
|
size: "",
|
||||||
|
values: [],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "current_val",
|
||||||
|
type: "FLOAT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 5,
|
||||||
|
size: "",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
comment: "",
|
||||||
|
indices: [],
|
||||||
|
color: "#f03c3c",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
relationships: [
|
relationships: [
|
||||||
{
|
{
|
||||||
startTableId: 1,
|
startTableId: 0,
|
||||||
startFieldId: 2,
|
startFieldId: 1,
|
||||||
endTableId: 0,
|
endTableId: 1,
|
||||||
endFieldId: 0,
|
endFieldId: 0,
|
||||||
startX: 340,
|
startX: 144,
|
||||||
startY: 198,
|
startY: 197,
|
||||||
endX: 70,
|
endX: 399,
|
||||||
endY: 120,
|
endY: 384,
|
||||||
name: "table_1_t_id_fk",
|
name: "accounts_customer_id_fk",
|
||||||
cardinality: "One to one",
|
cardinality: "Many to one",
|
||||||
updateConstraint: "No action",
|
updateConstraint: "No action",
|
||||||
deleteConstraint: "No action",
|
deleteConstraint: "No action",
|
||||||
mandatory: false,
|
mandatory: false,
|
||||||
@ -234,36 +566,106 @@ export const template5 = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
startTableId: 4,
|
startTableId: 4,
|
||||||
startFieldId: 0,
|
startFieldId: 2,
|
||||||
endTableId: 5,
|
endTableId: 1,
|
||||||
endFieldId: 0,
|
endFieldId: 0,
|
||||||
startX: 599,
|
startX: 787,
|
||||||
startY: 406,
|
startY: 170,
|
||||||
endX: 594,
|
endX: 399,
|
||||||
endY: 222,
|
endY: 384,
|
||||||
name: "table_4_id_fk",
|
name: "cards_customer_id_fk",
|
||||||
cardinality: "One to one",
|
cardinality: "Many to one",
|
||||||
updateConstraint: "No action",
|
updateConstraint: "No action",
|
||||||
deleteConstraint: "No action",
|
deleteConstraint: "No action",
|
||||||
mandatory: false,
|
mandatory: false,
|
||||||
id: 1,
|
id: 1,
|
||||||
},
|
},
|
||||||
],
|
|
||||||
notes: [],
|
|
||||||
subjectAreas: [
|
|
||||||
{
|
{
|
||||||
id: 0,
|
startTableId: 5,
|
||||||
name: "area_0",
|
startFieldId: 1,
|
||||||
x: 24,
|
endTableId: 1,
|
||||||
y: 10,
|
endFieldId: 0,
|
||||||
width: 533,
|
startX: 934,
|
||||||
height: 291,
|
startY: 386,
|
||||||
color: "#32c9b0",
|
endX: 399,
|
||||||
|
endY: 384,
|
||||||
|
name: "loans_customer_id_fk",
|
||||||
|
cardinality: "Many to one",
|
||||||
|
updateConstraint: "No action",
|
||||||
|
deleteConstraint: "No action",
|
||||||
|
mandatory: false,
|
||||||
|
id: 2,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
startTableId: 6,
|
||||||
|
startFieldId: 1,
|
||||||
|
endTableId: 1,
|
||||||
|
endFieldId: 0,
|
||||||
|
startX: 679,
|
||||||
|
startY: 500,
|
||||||
|
endX: 399,
|
||||||
|
endY: 384,
|
||||||
|
name: "investments_customer_id_fk",
|
||||||
|
cardinality: "Many to one",
|
||||||
|
updateConstraint: "No action",
|
||||||
|
deleteConstraint: "No action",
|
||||||
|
mandatory: false,
|
||||||
|
id: 3,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
startTableId: 2,
|
||||||
|
startFieldId: 1,
|
||||||
|
endTableId: 0,
|
||||||
|
endFieldId: 0,
|
||||||
|
startX: 446,
|
||||||
|
startY: 109,
|
||||||
|
endX: 144,
|
||||||
|
endY: 161,
|
||||||
|
name: "transactions_account_id_fk",
|
||||||
|
cardinality: "Many to one",
|
||||||
|
updateConstraint: "No action",
|
||||||
|
deleteConstraint: "No action",
|
||||||
|
mandatory: false,
|
||||||
|
id: 4,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
startTableId: 3,
|
||||||
|
startFieldId: 2,
|
||||||
|
endTableId: 0,
|
||||||
|
endFieldId: 0,
|
||||||
|
startX: 127,
|
||||||
|
startY: 499,
|
||||||
|
endX: 144,
|
||||||
|
endY: 161,
|
||||||
|
name: "transfers_to_fk",
|
||||||
|
cardinality: "Many to one",
|
||||||
|
updateConstraint: "No action",
|
||||||
|
deleteConstraint: "No action",
|
||||||
|
mandatory: false,
|
||||||
|
id: 5,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
startTableId: 3,
|
||||||
|
startFieldId: 1,
|
||||||
|
endTableId: 0,
|
||||||
|
endFieldId: 0,
|
||||||
|
startX: 127,
|
||||||
|
startY: 463,
|
||||||
|
endX: 144,
|
||||||
|
endY: 161,
|
||||||
|
name: "transfers_from_fk",
|
||||||
|
cardinality: "Many to one",
|
||||||
|
updateConstraint: "No action",
|
||||||
|
deleteConstraint: "No action",
|
||||||
|
mandatory: false,
|
||||||
|
id: 6,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
notes: [],
|
||||||
|
subjectAreas: [],
|
||||||
types: [],
|
types: [],
|
||||||
title: "Template 5",
|
title: "Bank schema",
|
||||||
description:
|
description:
|
||||||
"Lorem ipsum dolor sit amet consectetur adipisicing elit. Veniam nulla illo pariatur nostrum.",
|
"A financial schema designed to manage financial transactions, accounts, customers, and other aspects of financial data.",
|
||||||
custom: 0,
|
custom: 0,
|
||||||
};
|
};
|
||||||
|
@ -2,9 +2,365 @@ export const template6 = {
|
|||||||
tables: [
|
tables: [
|
||||||
{
|
{
|
||||||
id: 0,
|
id: 0,
|
||||||
name: "table_0",
|
name: "students",
|
||||||
x: 55,
|
x: 200,
|
||||||
y: 23,
|
y: 10,
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
name: "id",
|
||||||
|
type: "INT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: true,
|
||||||
|
unique: true,
|
||||||
|
notNull: true,
|
||||||
|
increment: true,
|
||||||
|
comment: "",
|
||||||
|
id: 0,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "first_name",
|
||||||
|
type: "VARCHAR",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 1,
|
||||||
|
size: 255,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "last_name",
|
||||||
|
type: "VARCHAR",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 2,
|
||||||
|
size: 255,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "email",
|
||||||
|
type: "VARCHAR",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 3,
|
||||||
|
size: 255,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "phone",
|
||||||
|
type: "VARCHAR",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 4,
|
||||||
|
size: 255,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "address",
|
||||||
|
type: "VARCHAR",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 5,
|
||||||
|
size: 255,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "dob",
|
||||||
|
type: "DATE",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 6,
|
||||||
|
size: "",
|
||||||
|
values: [],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "major_id",
|
||||||
|
type: "INT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 7,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
comment: "",
|
||||||
|
indices: [],
|
||||||
|
color: "#ff4f81",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 1,
|
||||||
|
name: "courses",
|
||||||
|
x: 477,
|
||||||
|
y: 354,
|
||||||
|
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,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "dep_id",
|
||||||
|
type: "INT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 2,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "credits",
|
||||||
|
type: "INT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 3,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
comment: "",
|
||||||
|
indices: [],
|
||||||
|
color: "#bc49c4",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 2,
|
||||||
|
name: "enrollment",
|
||||||
|
x: 81,
|
||||||
|
y: 377,
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
name: "id",
|
||||||
|
type: "INT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: true,
|
||||||
|
unique: true,
|
||||||
|
notNull: true,
|
||||||
|
increment: true,
|
||||||
|
comment: "",
|
||||||
|
id: 0,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "course_id",
|
||||||
|
type: "INT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "student_id",
|
||||||
|
type: "INT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 2,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "term",
|
||||||
|
type: "VARCHAR",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 3,
|
||||||
|
size: 255,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
comment: "",
|
||||||
|
indices: [],
|
||||||
|
color: "#7c4af0",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 3,
|
||||||
|
name: "instructors",
|
||||||
|
x: 771,
|
||||||
|
y: 50,
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
name: "id",
|
||||||
|
type: "INT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: true,
|
||||||
|
unique: true,
|
||||||
|
notNull: true,
|
||||||
|
increment: true,
|
||||||
|
comment: "",
|
||||||
|
id: 0,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "first_name",
|
||||||
|
type: "VARCHAR",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 1,
|
||||||
|
size: 255,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "last_name",
|
||||||
|
type: "VARCHAR",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 2,
|
||||||
|
size: 255,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "email",
|
||||||
|
type: "VARCHAR",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 3,
|
||||||
|
size: 255,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "dep_id",
|
||||||
|
type: "INT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 4,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
comment: "",
|
||||||
|
indices: [],
|
||||||
|
color: "#7d9dff",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 4,
|
||||||
|
name: "departments",
|
||||||
|
x: 785,
|
||||||
|
y: 338,
|
||||||
|
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,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "chairperson",
|
||||||
|
type: "INT",
|
||||||
|
default: "",
|
||||||
|
check: "",
|
||||||
|
primary: false,
|
||||||
|
unique: false,
|
||||||
|
notNull: false,
|
||||||
|
increment: false,
|
||||||
|
comment: "",
|
||||||
|
id: 2,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
comment: "",
|
||||||
|
indices: [],
|
||||||
|
color: "#32c9b0",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 5,
|
||||||
|
name: "major",
|
||||||
|
x: 495,
|
||||||
|
y: 78,
|
||||||
fields: [
|
fields: [
|
||||||
{
|
{
|
||||||
name: "id",
|
name: "id",
|
||||||
@ -34,272 +390,96 @@ export const template6 = {
|
|||||||
],
|
],
|
||||||
comment: "",
|
comment: "",
|
||||||
indices: [],
|
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",
|
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: [
|
relationships: [
|
||||||
{
|
{
|
||||||
startTableId: 1,
|
startTableId: 2,
|
||||||
startFieldId: 2,
|
startFieldId: 2,
|
||||||
endTableId: 0,
|
endTableId: 0,
|
||||||
endFieldId: 0,
|
endFieldId: 0,
|
||||||
startX: 337,
|
startX: 96,
|
||||||
startY: 286,
|
startY: 518,
|
||||||
endX: 70,
|
endX: 215,
|
||||||
endY: 92,
|
endY: 79,
|
||||||
name: "table_1_t_id_fk",
|
name: "enrollment_student_id_fk",
|
||||||
cardinality: "One to one",
|
cardinality: "Many to one",
|
||||||
updateConstraint: "No action",
|
updateConstraint: "No action",
|
||||||
deleteConstraint: "No action",
|
deleteConstraint: "No action",
|
||||||
mandatory: false,
|
mandatory: false,
|
||||||
id: 0,
|
id: 0,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
startTableId: 4,
|
startTableId: 2,
|
||||||
startFieldId: 0,
|
startFieldId: 1,
|
||||||
endTableId: 5,
|
endTableId: 1,
|
||||||
endFieldId: 0,
|
endFieldId: 0,
|
||||||
startX: 339,
|
startX: 96,
|
||||||
startY: 407,
|
startY: 482,
|
||||||
endX: 77,
|
endX: 492,
|
||||||
endY: 356,
|
endY: 423,
|
||||||
name: "table_4_id_fk",
|
name: "enrollment_course_id_fk",
|
||||||
cardinality: "One to one",
|
cardinality: "Many to one",
|
||||||
updateConstraint: "No action",
|
updateConstraint: "No action",
|
||||||
deleteConstraint: "No action",
|
deleteConstraint: "No action",
|
||||||
mandatory: false,
|
mandatory: false,
|
||||||
id: 1,
|
id: 1,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
startTableId: 3,
|
||||||
|
startFieldId: 4,
|
||||||
|
endTableId: 4,
|
||||||
|
endFieldId: 0,
|
||||||
|
startX: 786,
|
||||||
|
startY: 263,
|
||||||
|
endX: 800,
|
||||||
|
endY: 407,
|
||||||
|
name: "instructors_dep_id_fk",
|
||||||
|
cardinality: "One to one",
|
||||||
|
updateConstraint: "No action",
|
||||||
|
deleteConstraint: "No action",
|
||||||
|
mandatory: false,
|
||||||
|
id: 2,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
startTableId: 1,
|
||||||
|
startFieldId: 2,
|
||||||
|
endTableId: 4,
|
||||||
|
endFieldId: 0,
|
||||||
|
startX: 492,
|
||||||
|
startY: 495,
|
||||||
|
endX: 800,
|
||||||
|
endY: 407,
|
||||||
|
name: "courses_dep_id_fk",
|
||||||
|
cardinality: "One to one",
|
||||||
|
updateConstraint: "No action",
|
||||||
|
deleteConstraint: "No action",
|
||||||
|
mandatory: false,
|
||||||
|
id: 3,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
startTableId: 0,
|
||||||
|
startFieldId: 7,
|
||||||
|
endTableId: 5,
|
||||||
|
endFieldId: 0,
|
||||||
|
startX: 215,
|
||||||
|
startY: 331,
|
||||||
|
endX: 510,
|
||||||
|
endY: 147,
|
||||||
|
name: "students_major_id_fk",
|
||||||
|
cardinality: "Many to one",
|
||||||
|
updateConstraint: "No action",
|
||||||
|
deleteConstraint: "No action",
|
||||||
|
mandatory: false,
|
||||||
|
id: 4,
|
||||||
|
},
|
||||||
],
|
],
|
||||||
notes: [],
|
notes: [],
|
||||||
subjectAreas: [],
|
subjectAreas: [],
|
||||||
types: [],
|
types: [],
|
||||||
title: "Template 6",
|
title: "University schema",
|
||||||
description:
|
description:
|
||||||
"Lorem ipsum dolor sit amet consectetur adipisicing elit. Veniam nulla illo pariatur nostrum.",
|
"A university schema designed to manage information about students, courses, instructors, and other aspects of university-related data.",
|
||||||
custom: 0,
|
custom: 0,
|
||||||
};
|
};
|
||||||
|
@ -1,315 +0,0 @@
|
|||||||
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.",
|
|
||||||
custom: 0,
|
|
||||||
};
|
|
@ -1,370 +0,0 @@
|
|||||||
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.",
|
|
||||||
custom: 0,
|
|
||||||
};
|
|
Loading…
Reference in New Issue
Block a user