You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
1.4 KiB
65 lines
1.4 KiB
/* eslint-disable*/
|
|
'use strict';
|
|
|
|
module.exports = dc => {
|
|
const DataTypes = dc.ORM;
|
|
const sequelize = dc.orm;
|
|
const MirrorTree = sequelize.define("mirrorTree", {
|
|
id: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: null,
|
|
primaryKey: true,
|
|
field: "id",
|
|
autoIncrement: true,
|
|
unique: "mirror_tree_id_uindex"
|
|
},
|
|
name: {
|
|
type: DataTypes.STRING,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: null,
|
|
primaryKey: false,
|
|
field: "name",
|
|
autoIncrement: false
|
|
},
|
|
level: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: "层级标注",
|
|
primaryKey: false,
|
|
field: "level",
|
|
autoIncrement: false
|
|
},
|
|
dependence: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: null,
|
|
primaryKey: false,
|
|
field: "dependence",
|
|
autoIncrement: false
|
|
},
|
|
mirrorId: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: null,
|
|
primaryKey: false,
|
|
field: "mirror_id",
|
|
autoIncrement: false,
|
|
references: {
|
|
key: "id",
|
|
model: "mirror"
|
|
}
|
|
}
|
|
}, {
|
|
tableName: "mirror_tree",
|
|
comment: "",
|
|
indexes: []
|
|
});
|
|
dc.models.MirrorTree = MirrorTree;
|
|
return MirrorTree;
|
|
};
|