Skip to content

Commit 503d55b

Browse files
committed
Seed templates
1 parent 705251a commit 503d55b

File tree

10 files changed

+2197
-382
lines changed

10 files changed

+2197
-382
lines changed

src/data/seeds.js

+19-333
Original file line numberDiff line numberDiff line change
@@ -1,335 +1,21 @@
1-
const t1 = {
2-
tables: [
3-
{
4-
id: 0,
5-
name: "table_0",
6-
x: 73,
7-
y: 69,
8-
fields: [
9-
{
10-
name: "id",
11-
type: "INT",
12-
default: "",
13-
check: "",
14-
primary: true,
15-
unique: true,
16-
notNull: true,
17-
increment: true,
18-
comment: "",
19-
id: 0,
20-
},
21-
],
22-
comment: "",
23-
indices: [],
24-
color: "#175e7a",
25-
},
26-
{
27-
id: 1,
28-
name: "table_1",
29-
x: 366,
30-
y: 117,
31-
fields: [
32-
{
33-
name: "id",
34-
type: "INT",
35-
default: "",
36-
check: "",
37-
primary: true,
38-
unique: true,
39-
notNull: true,
40-
increment: true,
41-
comment: "",
42-
id: 0,
43-
},
44-
],
45-
comment: "",
46-
indices: [],
47-
color: "#175e7a",
48-
},
49-
],
50-
relationships: [
51-
{
52-
startTableId: 0,
53-
startFieldId: 0,
54-
endTableId: 1,
55-
endFieldId: 0,
56-
startX: 88,
57-
startY: 138,
58-
endX: 381,
59-
endY: 186,
60-
name: "table_0_id_fk",
61-
cardinality: "One to one",
62-
updateConstraint: "No action",
63-
deleteConstraint: "No action",
64-
mandatory: false,
65-
id: 0,
66-
},
67-
],
68-
notes: [
69-
{
70-
id: 0,
71-
x: 526,
72-
y: 240,
73-
title: "note_0",
74-
content: "hi",
75-
color: "#fcf7ac",
76-
height: 65,
77-
},
78-
],
79-
subjectAreas: [
80-
{
81-
id: 0,
82-
name: "area_0",
83-
x: 43,
84-
y: 28,
85-
width: 558,
86-
height: 206,
87-
color: "#175e7a",
88-
},
89-
],
90-
types: [],
91-
title: "Template 1",
92-
description: "Lorem ipsum",
93-
};
94-
95-
const t2 = {
96-
tables: [
97-
{
98-
id: 0,
99-
name: "template_2",
100-
x: 57,
101-
y: 63,
102-
fields: [
103-
{
104-
name: "id",
105-
type: "INT",
106-
default: "",
107-
check: "",
108-
primary: true,
109-
unique: true,
110-
notNull: true,
111-
increment: true,
112-
comment: "",
113-
id: 0,
114-
},
115-
],
116-
comment: "",
117-
indices: [],
118-
color: "#ff4f81",
119-
},
120-
],
121-
relationships: [],
122-
notes: [],
123-
subjectAreas: [],
124-
types: [],
125-
title: "Template 2",
126-
description: "Lorem ipsum",
127-
};
128-
129-
const t3 = {
130-
tables: [
131-
{
132-
id: 0,
133-
name: "template_3",
134-
x: 57,
135-
y: 63,
136-
fields: [
137-
{
138-
name: "id",
139-
type: "INT",
140-
default: "",
141-
check: "",
142-
primary: true,
143-
unique: true,
144-
notNull: true,
145-
increment: true,
146-
comment: "",
147-
id: 0,
148-
},
149-
],
150-
comment: "",
151-
indices: [],
152-
color: "#bc49c4",
153-
},
154-
],
155-
relationships: [],
156-
notes: [],
157-
subjectAreas: [],
158-
types: [],
159-
title: "Template 3",
160-
description: "Lorem ipsum",
161-
};
162-
163-
const t4 = {
164-
tables: [
165-
{
166-
id: 0,
167-
name: "template_4",
168-
x: 57,
169-
y: 63,
170-
fields: [
171-
{
172-
name: "id",
173-
type: "INT",
174-
default: "",
175-
check: "",
176-
primary: true,
177-
unique: true,
178-
notNull: true,
179-
increment: true,
180-
comment: "",
181-
id: 0,
182-
},
183-
],
184-
comment: "",
185-
indices: [],
186-
color: "#a751e8",
187-
},
188-
],
189-
relationships: [],
190-
notes: [],
191-
subjectAreas: [],
192-
types: [],
193-
title: "Template 4",
194-
description: "Lorem ipsum",
195-
};
196-
197-
const t5 = {
198-
tables: [
199-
{
200-
id: 0,
201-
name: "template_5",
202-
x: 57,
203-
y: 63,
204-
fields: [
205-
{
206-
name: "id",
207-
type: "INT",
208-
default: "",
209-
check: "",
210-
primary: true,
211-
unique: true,
212-
notNull: true,
213-
increment: true,
214-
comment: "",
215-
id: 0,
216-
},
217-
],
218-
comment: "",
219-
indices: [],
220-
color: "#7c4af0",
221-
},
222-
],
223-
relationships: [],
224-
notes: [],
225-
subjectAreas: [],
226-
types: [],
227-
title: "Template 5",
228-
description: "Lorem ipsum",
229-
};
230-
231-
const t6 = {
232-
tables: [
233-
{
234-
id: 0,
235-
name: "template_6",
236-
x: 57,
237-
y: 63,
238-
fields: [
239-
{
240-
name: "id",
241-
type: "INT",
242-
default: "",
243-
check: "",
244-
primary: true,
245-
unique: true,
246-
notNull: true,
247-
increment: true,
248-
comment: "",
249-
id: 0,
250-
},
251-
],
252-
comment: "",
253-
indices: [],
254-
color: "#6360f7",
255-
},
256-
],
257-
relationships: [],
258-
notes: [],
259-
subjectAreas: [],
260-
types: [],
261-
title: "Template 6",
262-
description: "Lorem ipsum",
263-
};
264-
265-
const t7 = {
266-
tables: [
267-
{
268-
id: 0,
269-
name: "template_7",
270-
x: 57,
271-
y: 63,
272-
fields: [
273-
{
274-
name: "id",
275-
type: "INT",
276-
default: "",
277-
check: "",
278-
primary: true,
279-
unique: true,
280-
notNull: true,
281-
increment: true,
282-
comment: "",
283-
id: 0,
284-
},
285-
],
286-
comment: "",
287-
indices: [],
288-
color: "#7d9dff",
289-
},
290-
],
291-
relationships: [],
292-
notes: [],
293-
subjectAreas: [],
294-
types: [],
295-
title: "Template 7",
296-
description: "Lorem ipsum",
297-
};
298-
299-
const t8 = {
300-
tables: [
301-
{
302-
id: 0,
303-
name: "template_8",
304-
x: 57,
305-
y: 63,
306-
fields: [
307-
{
308-
name: "id",
309-
type: "INT",
310-
default: "",
311-
check: "",
312-
primary: true,
313-
unique: true,
314-
notNull: true,
315-
increment: true,
316-
comment: "",
317-
id: 0,
318-
},
319-
],
320-
comment: "",
321-
indices: [],
322-
color: "#32c9b0",
323-
},
324-
],
325-
relationships: [],
326-
notes: [],
327-
subjectAreas: [],
328-
types: [],
329-
title: "Template 8",
330-
description: "Lorem ipsum",
331-
};
332-
333-
const templateSeeds = [t1, t2, t3, t4, t5, t6, t7, t8];
1+
import { template1 } from "../templates/template1";
2+
import { template2 } from "../templates/template2";
3+
import { template3 } from "../templates/template3";
4+
import { template4 } from "../templates/template4";
5+
import { template5 } from "../templates/template5";
6+
import { template6 } from "../templates/template6";
7+
import { template7 } from "../templates/template7";
8+
import { template8 } from "../templates/template8";
9+
10+
const templateSeeds = [
11+
template1,
12+
template2,
13+
template3,
14+
template4,
15+
template5,
16+
template6,
17+
template7,
18+
template8,
19+
];
33420

33521
export { templateSeeds };

0 commit comments

Comments
 (0)