initial commit
This commit is contained in:
88
dist/example-def.js
vendored
Normal file
88
dist/example-def.js
vendored
Normal file
@ -0,0 +1,88 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var def = {
|
||||
storage: {
|
||||
tables: [
|
||||
{
|
||||
name: "tasks",
|
||||
relations: [
|
||||
{
|
||||
type: 'belongs-to',
|
||||
table: 'lists',
|
||||
}
|
||||
],
|
||||
columns: [
|
||||
{
|
||||
name: "name",
|
||||
type: "string",
|
||||
nullable: false,
|
||||
},
|
||||
{
|
||||
name: "description",
|
||||
type: "string",
|
||||
nullable: true,
|
||||
},
|
||||
{
|
||||
name: "completed",
|
||||
type: "boolean",
|
||||
nullable: false,
|
||||
},
|
||||
{
|
||||
name: "completed_date",
|
||||
type: "date",
|
||||
nullable: true,
|
||||
},
|
||||
{
|
||||
name: "metadata",
|
||||
type: "blob",
|
||||
nullable: true,
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "lists",
|
||||
relations: [],
|
||||
columns: [
|
||||
{
|
||||
name: "name",
|
||||
type: "string",
|
||||
unique: false,
|
||||
nullable: false,
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "users",
|
||||
relations: [],
|
||||
columns: [
|
||||
{
|
||||
name: "name",
|
||||
type: "string",
|
||||
nullable: false,
|
||||
},
|
||||
{
|
||||
name: "password",
|
||||
type: "string",
|
||||
nullable: false,
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
relations: [
|
||||
{
|
||||
left: 'lists',
|
||||
relation: 'many-to-many',
|
||||
right: 'users',
|
||||
columns: [
|
||||
{
|
||||
name: 'access',
|
||||
type: 'string',
|
||||
unique: false,
|
||||
nullable: false,
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
exports.default = def;
|
Reference in New Issue
Block a user