Browse Source

(*)员工信息增加gradePoint绩点字段

master
zmh 2 years ago
parent
commit
3498b32a9d
  1. 2
      api/app/lib/controllers/member/index.js
  2. 445
      api/app/lib/models/member.js

2
api/app/lib/controllers/member/index.js

@ -531,7 +531,7 @@ async function exportData(ctx) {
key: 'userActiveStatus', key: 'userActiveStatus',
}, { }, {
title: '绩点', title: '绩点',
key: 'point', key: 'gradePoint',
}, { }, {
title: '归属机构', title: '归属机构',
key: 'userOrganization', key: 'userOrganization',

445
api/app/lib/models/member.js

@ -2,222 +2,231 @@
'use strict'; 'use strict';
module.exports = dc => { module.exports = dc => {
const DataTypes = dc.ORM; const DataTypes = dc.ORM;
const sequelize = dc.orm; const sequelize = dc.orm;
const Member = sequelize.define("member", { const Member = sequelize.define("member", {
pepUserId: { pepUserId: {
type: DataTypes.INTEGER, type: DataTypes.INTEGER,
allowNull: false, allowNull: false,
defaultValue: null, defaultValue: null,
comment: "项企用户id", comment: "项企用户id",
primaryKey: true, primaryKey: true,
field: "pep_user_id", field: "pep_user_id",
autoIncrement: false, autoIncrement: false,
unique: "member_pep_user_id_uindex" unique: "member_pep_user_id_uindex"
}, },
idNumber: { idNumber: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "证件号", comment: "证件号",
primaryKey: false, primaryKey: false,
field: "id_number", field: "id_number",
autoIncrement: false autoIncrement: false
}, },
idPhoto: { idPhoto: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "证件照", comment: "证件照",
primaryKey: false, primaryKey: false,
field: "id_photo", field: "id_photo",
autoIncrement: false autoIncrement: false
}, },
gender: { gender: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "性别", comment: "性别",
primaryKey: false, primaryKey: false,
field: "gender", field: "gender",
autoIncrement: false autoIncrement: false
}, },
birthday: { birthday: {
type: DataTypes.DATEONLY, type: DataTypes.DATEONLY,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "出生年月", comment: "出生年月",
primaryKey: false, primaryKey: false,
field: "birthday", field: "birthday",
autoIncrement: false autoIncrement: false
}, },
nativePlace: { nativePlace: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "籍贯", comment: "籍贯",
primaryKey: false, primaryKey: false,
field: "native_place", field: "native_place",
autoIncrement: false autoIncrement: false
}, },
marital: { marital: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "婚育状态", comment: "婚育状态",
primaryKey: false, primaryKey: false,
field: "marital", field: "marital",
autoIncrement: false autoIncrement: false
}, },
politicsStatus: { politicsStatus: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "整治面貌", comment: "整治面貌",
primaryKey: false, primaryKey: false,
field: "politics_status", field: "politics_status",
autoIncrement: false autoIncrement: false
}, },
phoneNumber: { phoneNumber: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: '联系方式', comment: '联系方式',
primaryKey: false, primaryKey: false,
field: "phone_number", field: "phone_number",
autoIncrement: false autoIncrement: false
}, },
workPlace: { workPlace: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "工作地点", comment: "工作地点",
primaryKey: false, primaryKey: false,
field: "work_place", field: "work_place",
autoIncrement: false autoIncrement: false
}, },
graduatedFrom: { graduatedFrom: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "毕业院校", comment: "毕业院校",
primaryKey: false, primaryKey: false,
field: "graduated_from", field: "graduated_from",
autoIncrement: false autoIncrement: false
}, },
educationBackground: { educationBackground: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "学历", comment: "学历",
primaryKey: false, primaryKey: false,
field: "education_background", field: "education_background",
autoIncrement: false autoIncrement: false
}, },
specialty: { specialty: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "专业", comment: "专业",
primaryKey: false, primaryKey: false,
field: "specialty", field: "specialty",
autoIncrement: false autoIncrement: false
}, },
graduationDate: { graduationDate: {
type: DataTypes.DATEONLY, type: DataTypes.DATEONLY,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "毕业时间", comment: "毕业时间",
primaryKey: false, primaryKey: false,
field: "graduation_date", field: "graduation_date",
autoIncrement: false autoIncrement: false
}, },
hiredate: { hiredate: {
type: DataTypes.DATEONLY, type: DataTypes.DATEONLY,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "入职时间", comment: "入职时间",
primaryKey: false, primaryKey: false,
field: "hiredate", field: "hiredate",
autoIncrement: false autoIncrement: false
}, },
turnProbationPeriod: { turnProbationPeriod: {
type: DataTypes.DATEONLY, type: DataTypes.DATEONLY,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "转试用期时间", comment: "转试用期时间",
primaryKey: false, primaryKey: false,
field: "turn_probation_period", field: "turn_probation_period",
autoIncrement: false autoIncrement: false
}, },
regularDate: { regularDate: {
type: DataTypes.DATEONLY, type: DataTypes.DATEONLY,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "转正时间", comment: "转正时间",
primaryKey: false, primaryKey: false,
field: "regular_date", field: "regular_date",
autoIncrement: false autoIncrement: false
}, },
dimissionDate: { dimissionDate: {
type: DataTypes.DATEONLY, type: DataTypes.DATEONLY,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "离职时间", comment: "离职时间",
primaryKey: false, primaryKey: false,
field: "dimission_date", field: "dimission_date",
autoIncrement: false autoIncrement: false
}, },
experienceYear: { experienceYear: {
type: DataTypes.DOUBLE, type: DataTypes.DOUBLE,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "工作经验/年", comment: "工作经验/年",
primaryKey: false, primaryKey: false,
field: "experience_year", field: "experience_year",
autoIncrement: false autoIncrement: false
}, },
occupationalHistory: { occupationalHistory: {
type: DataTypes.TEXT, type: DataTypes.TEXT,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "工作经历", comment: "工作经历",
primaryKey: false, primaryKey: false,
field: "occupational_history", field: "occupational_history",
autoIncrement: false autoIncrement: false
}, },
vitae: { vitae: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "简历", comment: "简历",
primaryKey: false, primaryKey: false,
field: "vitae", field: "vitae",
autoIncrement: false autoIncrement: false
}, },
del: { del: {
type: DataTypes.BOOLEAN, type: DataTypes.BOOLEAN,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: null, comment: null,
primaryKey: false, primaryKey: false,
field: "del", field: "del",
autoIncrement: false autoIncrement: false
}, },
technicalGrade: { technicalGrade: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "技术职级等级", comment: "技术职级等级",
primaryKey: false, primaryKey: false,
field: "technical_grade", field: "technical_grade",
autoIncrement: false autoIncrement: false
} },
}, { gradePoint: {
tableName: "member", type: DataTypes.STRING,
comment: "", allowNull: true,
indexes: [] defaultValue: null,
}); comment: "绩点",
dc.models.Member = Member; primaryKey: false,
return Member; field: "grade_point",
autoIncrement: false
}
}, {
tableName: "member",
comment: "",
indexes: []
});
dc.models.Member = Member;
return Member;
}; };
Loading…
Cancel
Save