Files
system-builder/dist/processDef.d.ts
2020-06-11 01:14:23 -06:00

32 lines
654 B
TypeScript

interface SystemDef {
storage: StorageDef;
}
interface StorageDef {
tables: TableDef[];
relations: ManyToManyDef[];
}
interface TableDef {
name: string;
columns: ColumnDef[];
relations: BelongsToDef[];
}
interface ColumnDef {
name: string;
type: "blob" | "boolean" | "date" | "dateTIME" | "number" | "string";
nullable: boolean;
unique?: boolean;
autoIncrement?: boolean;
default?: string;
}
interface BelongsToDef {
type: 'belongs-to';
table: string;
}
interface ManyToManyDef {
left: string;
relation: 'many-to-many';
right: string;
columns?: ColumnDef[];
}
export { SystemDef };