/* 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" }, pepUserId: { type: DataTypes.INTEGER, allowNull: false, defaultValue: null, comment: "项企对应用户id", primaryKey: false, field: "pep_user_id", autoIncrement: false }, role: { type: DataTypes.ARRAY(DataTypes.STRING), allowNull: true, defaultValue: null, comment: "角色 也对应权限 admin 管理员 / all 全部角色 / data_analyst 数据分析 / after_sale 售后运维 / resource_manage 资源管理 / customer_service 客户服务", primaryKey: false, field: "role", autoIncrement: false }, correlationProject: { type: DataTypes.ARRAY(DataTypes.INTEGER), allowNull: true, defaultValue: null, comment: "关联的项目管理的项目id", primaryKey: false, field: "correlation_project", autoIncrement: false }, lastInTime: { type: DataTypes.DATE, allowNull: true, defaultValue: null, comment: null, primaryKey: false, field: "last_in_time", autoIncrement: false }, inTimes: { type: DataTypes.INTEGER, allowNull: false, defaultValue: "0", comment: null, primaryKey: false, field: "in_times", autoIncrement: false }, onlineDuration: { type: DataTypes.INTEGER, allowNull: true, defaultValue: "0", comment: "在线时长 单位 s", primaryKey: false, field: "online_duration", autoIncrement: false }, lastInAddress: { type: DataTypes.STRING, allowNull: true, defaultValue: null, comment: "上次登录地点", primaryKey: false, field: "last_in_address", autoIncrement: false }, disabled: { type: DataTypes.BOOLEAN, allowNull: false, defaultValue: false, comment: null, primaryKey: false, field: "disabled", autoIncrement: false }, deleted: { type: DataTypes.BOOLEAN, allowNull: false, defaultValue: false, comment: null, primaryKey: false, field: "deleted", autoIncrement: false }, updateTime: { type: DataTypes.DATE, allowNull: true, defaultValue: sequelize.fn('now'), comment: null, primaryKey: false, field: "update_time", autoIncrement: false } }, { tableName: "user", comment: "", indexes: [] }); dc.models.User = User; return User; };