mirror of
https://github.com/drawdb-io/drawdb.git
synced 2025-12-22 03:00:50 +08:00
Make exports consistent
This commit is contained in:
@@ -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 };
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user