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.
88 lines
1.9 KiB
88 lines
1.9 KiB
/* eslint-disable*/
|
|
'use strict';
|
|
|
|
module.exports = dc => {
|
|
const DataTypes = dc.ORM;
|
|
const sequelize = dc.orm;
|
|
const Application = sequelize.define("application", {
|
|
id: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: null,
|
|
primaryKey: true,
|
|
field: "id",
|
|
autoIncrement: true,
|
|
unique: "application_id_uindex"
|
|
},
|
|
name: {
|
|
type: DataTypes.STRING,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: null,
|
|
primaryKey: false,
|
|
field: "name",
|
|
autoIncrement: false
|
|
},
|
|
type: {
|
|
type: DataTypes.ARRAY(DataTypes.STRING),
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "web / app / wxapp / other",
|
|
primaryKey: false,
|
|
field: "type",
|
|
autoIncrement: false
|
|
},
|
|
appKey: {
|
|
type: DataTypes.STRING,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: null,
|
|
primaryKey: false,
|
|
field: "app_key",
|
|
autoIncrement: false
|
|
},
|
|
appSecret: {
|
|
type: DataTypes.STRING,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: null,
|
|
primaryKey: false,
|
|
field: "app_secret",
|
|
autoIncrement: false
|
|
},
|
|
createUserId: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: null,
|
|
primaryKey: false,
|
|
field: "create_user_id",
|
|
autoIncrement: false
|
|
},
|
|
createTime: {
|
|
type: DataTypes.DATE,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: null,
|
|
primaryKey: false,
|
|
field: "create_time",
|
|
autoIncrement: false
|
|
},
|
|
forbidden: {
|
|
type: DataTypes.BOOLEAN,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: null,
|
|
primaryKey: false,
|
|
field: "forbidden",
|
|
autoIncrement: false
|
|
}
|
|
}, {
|
|
tableName: "application",
|
|
comment: "",
|
|
indexes: []
|
|
});
|
|
dc.models.Application = Application;
|
|
return Application;
|
|
};
|