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.
89 lines
1.9 KiB
89 lines
1.9 KiB
/* eslint-disable*/
|
|
|
|
'use strict';
|
|
|
|
module.exports = dc => {
|
|
const DataTypes = dc.ORM;
|
|
const sequelize = dc.orm;
|
|
const Backups = sequelize.define("backups", {
|
|
id: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: null,
|
|
primaryKey: true,
|
|
field: "id",
|
|
autoIncrement: true,
|
|
unique: "backups_id_uindex"
|
|
},
|
|
note: {
|
|
type: DataTypes.STRING,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: "备注信息",
|
|
primaryKey: false,
|
|
field: "note",
|
|
autoIncrement: false
|
|
},
|
|
databases: {
|
|
type: DataTypes.JSONB,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: null,
|
|
primaryKey: false,
|
|
field: "databases",
|
|
autoIncrement: false
|
|
},
|
|
size: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: null,
|
|
primaryKey: false,
|
|
field: "size",
|
|
autoIncrement: false
|
|
},
|
|
createTime: {
|
|
type: DataTypes.DATE,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: null,
|
|
primaryKey: false,
|
|
field: "create_time",
|
|
autoIncrement: false
|
|
},
|
|
completeTime: {
|
|
type: DataTypes.DATE,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "备份完成时间",
|
|
primaryKey: false,
|
|
field: "complete_time",
|
|
autoIncrement: false
|
|
},
|
|
state: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: null,
|
|
primaryKey: false,
|
|
field: "state",
|
|
autoIncrement: false
|
|
},
|
|
source: {
|
|
type: DataTypes.TEXT,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "备份文件路径",
|
|
primaryKey: false,
|
|
field: "source",
|
|
autoIncrement: false
|
|
}
|
|
}, {
|
|
tableName: "backups",
|
|
comment: "",
|
|
indexes: []
|
|
});
|
|
dc.models.Backups = Backups;
|
|
return Backups;
|
|
};
|