/* eslint-disable*/
'use strict';
module.exports = dc => {
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const User = sequelize.define("user", {
id: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: true,
field: "id",
autoIncrement: true,
unique: "user_id_uindex"
},
name: {
type: DataTypes.STRING,
primaryKey: false,
field: "name",
autoIncrement: false
username: {
comment: "用户名 账号",
field: "username",
password: {
field: "password",
departmentId: {
comment: "部门id",
field: "department_id",
email: {
allowNull: true,
field: "email",
enable: {
type: DataTypes.BOOLEAN,
comment: "启用状态",
field: "enable",
delete: {
field: "delete",
phone: {
comment: "手机号(小程序使用手机号登录)",
field: "phone",
post: {
comment: "职位",
field: "post",
}
}, {
tableName: "user",
comment: "",
indexes: []
});
dc.models.User = User;
return User;
};