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.
53 lines
1.1 KiB
53 lines
1.1 KiB
/* eslint-disable*/
|
|
|
|
'use strict';
|
|
|
|
module.exports = dc => {
|
|
const DataTypes = dc.ORM;
|
|
const sequelize = dc.orm;
|
|
const Organization = sequelize.define("organization", {
|
|
id: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: null,
|
|
primaryKey: true,
|
|
field: "id",
|
|
autoIncrement: true,
|
|
unique: "organization_id_uindex"
|
|
},
|
|
name: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: null,
|
|
primaryKey: false,
|
|
field: "name",
|
|
autoIncrement: false
|
|
},
|
|
code: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: null,
|
|
primaryKey: false,
|
|
field: "code",
|
|
autoIncrement: false
|
|
},
|
|
ability: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "职能",
|
|
primaryKey: false,
|
|
field: "ability",
|
|
autoIncrement: false
|
|
}
|
|
}, {
|
|
tableName: "organization",
|
|
comment: "",
|
|
indexes: []
|
|
});
|
|
dc.models.Organization = Organization;
|
|
return Organization;
|
|
};
|