Make exports consistent

This commit is contained in:
1ilit
2024-03-15 20:55:43 +02:00
parent 3ec93f42c6
commit 725f01d8da
8 changed files with 31 additions and 64 deletions

View File

@@ -1,7 +1,7 @@
import Dexie from "dexie";
import { templateSeeds } from "./seeds";
const db = new Dexie("drawDB");
export const db = new Dexie("drawDB");
db.version(4).stores({
diagrams: "++id, lastModified",
@@ -11,5 +11,3 @@ db.version(4).stores({
db.on("populate", (transaction) => {
transaction.templates.bulkAdd(templateSeeds).catch((e) => console.log(e));
});
export { db };

View File

@@ -1,4 +1,4 @@
const tableSchema = {
export const tableSchema = {
type: "object",
properties: {
id: { type: "integer" },
@@ -56,7 +56,7 @@ const tableSchema = {
required: ["id", "name", "x", "y", "fields", "comment", "indices", "color"],
};
const areaSchema = {
export const areaSchema = {
type: "object",
properties: {
id: { type: "integer" },
@@ -70,7 +70,7 @@ const areaSchema = {
required: ["id", "name", "x", "y", "width", "height", "color"],
};
const noteSchema = {
export const noteSchema = {
type: "object",
properties: {
id: { type: "integer" },
@@ -84,7 +84,7 @@ const noteSchema = {
required: ["id", "x", "y", "title", "content", "color", "height"],
};
const typeSchema = {
export const typeSchema = {
type: "object",
properties: {
name: { type: "string" },
@@ -108,7 +108,7 @@ const typeSchema = {
required: ["name", "fields", "comment"],
};
const jsonSchema = {
export const jsonSchema = {
type: "object",
properties: {
tables: {
@@ -166,7 +166,7 @@ const jsonSchema = {
required: ["tables", "relationships", "notes", "subjectAreas"],
};
const ddbSchema = {
export const ddbSchema = {
type: "object",
properties: {
author: { type: "string" },
@@ -176,12 +176,3 @@ const ddbSchema = {
...jsonSchema.properties,
},
};
export {
jsonSchema,
ddbSchema,
tableSchema,
noteSchema,
areaSchema,
typeSchema,
};