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.
160 lines
3.6 KiB
160 lines
3.6 KiB
/* eslint-disable*/
|
|
|
|
'use strict';
|
|
|
|
module.exports = dc => {
|
|
const DataTypes = dc.ORM;
|
|
const sequelize = dc.orm;
|
|
const TenderUser = sequelize.define("tenderUser", {
|
|
id: {
|
|
type: DataTypes.BIGINT,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: null,
|
|
primaryKey: true,
|
|
field: "id",
|
|
autoIncrement: true
|
|
},
|
|
pepId: {
|
|
type: DataTypes.STRING(32),
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "项企用户ID",
|
|
primaryKey: false,
|
|
field: "pep_id",
|
|
autoIncrement: false
|
|
},
|
|
externalUserId: {
|
|
type: DataTypes.STRING(64),
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "外部用户ID(如官网userid)",
|
|
primaryKey: false,
|
|
field: "external_user_id",
|
|
autoIncrement: false
|
|
},
|
|
status: {
|
|
type: DataTypes.SMALLINT,
|
|
allowNull: false,
|
|
defaultValue: 1,
|
|
comment: "状态:1正常 0禁用",
|
|
primaryKey: false,
|
|
field: "status",
|
|
autoIncrement: false
|
|
},
|
|
displayName: {
|
|
type: DataTypes.STRING(64),
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "显示名称",
|
|
primaryKey: false,
|
|
field: "display_name",
|
|
autoIncrement: false
|
|
},
|
|
realName: {
|
|
type: DataTypes.STRING(64),
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "真实姓名",
|
|
primaryKey: false,
|
|
field: "real_name",
|
|
autoIncrement: false
|
|
},
|
|
phone: {
|
|
type: DataTypes.STRING(20),
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "手机号",
|
|
primaryKey: false,
|
|
field: "phone",
|
|
autoIncrement: false
|
|
},
|
|
password: {
|
|
type: DataTypes.STRING(64),
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "密码md5",
|
|
primaryKey: false,
|
|
field: "password",
|
|
autoIncrement: false
|
|
},
|
|
email: {
|
|
type: DataTypes.STRING(128),
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: null,
|
|
primaryKey: false,
|
|
field: "email",
|
|
autoIncrement: false
|
|
},
|
|
departmentId: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "部门ID",
|
|
primaryKey: false,
|
|
field: "department_id",
|
|
autoIncrement: false
|
|
},
|
|
avatarUrl: {
|
|
type: DataTypes.STRING(255),
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "头像",
|
|
primaryKey: false,
|
|
field: "avatar_url",
|
|
autoIncrement: false
|
|
},
|
|
registerSource: {
|
|
type: DataTypes.STRING(16),
|
|
allowNull: false,
|
|
defaultValue: "PHONE",
|
|
comment: "注册来源",
|
|
primaryKey: false,
|
|
field: "register_source",
|
|
autoIncrement: false
|
|
},
|
|
lastLoginAt: {
|
|
type: DataTypes.DATE,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "最近登录时间",
|
|
primaryKey: false,
|
|
field: "last_login_at",
|
|
autoIncrement: false
|
|
},
|
|
createdAt: {
|
|
type: DataTypes.DATE,
|
|
allowNull: false,
|
|
defaultValue: DataTypes.NOW,
|
|
comment: null,
|
|
primaryKey: false,
|
|
field: "created_at",
|
|
autoIncrement: false
|
|
},
|
|
updatedAt: {
|
|
type: DataTypes.DATE,
|
|
allowNull: false,
|
|
defaultValue: DataTypes.NOW,
|
|
comment: null,
|
|
primaryKey: false,
|
|
field: "updated_at",
|
|
autoIncrement: false
|
|
},
|
|
deletedAt: {
|
|
type: DataTypes.DATE,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: null,
|
|
primaryKey: false,
|
|
field: "deleted_at",
|
|
autoIncrement: false
|
|
}
|
|
}, {
|
|
tableName: "tender_user",
|
|
comment: "",
|
|
indexes: []
|
|
});
|
|
dc.models.TenderUser = TenderUser;
|
|
return TenderUser;
|
|
};
|
|
|