Browse Source

工作年限改为float

master
巴林闲侠 3 years ago
parent
commit
28cc8a6a6d
  1. 16
      api/.vscode/launch.json
  2. 418
      api/app/lib/models/member.js
  3. 2
      api/sequelize-automate.config.js

16
api/.vscode/launch.json

@ -28,9 +28,9 @@
// "--qndmn http://resources.anxinyun.cn", // "--qndmn http://resources.anxinyun.cn",
"--qndmn http://rjkwed13l.hn-bkt.clouddn.com", "--qndmn http://rjkwed13l.hn-bkt.clouddn.com",
// click // click
// "--clickHouseUrl http://10.8.30.71", "--clickHouseUrl http://10.8.30.71",
// click // click
"--clickHouseUrl http://10.8.30.161", // "--clickHouseUrl http://10.8.30.161",
// "--clickHouseUrl https://clickhouse01.anxinyun.cn/play", // "--clickHouseUrl https://clickhouse01.anxinyun.cn/play",
"--clickHousePort 30123", "--clickHousePort 30123",
@ -39,14 +39,14 @@
// "--clickHousePassword ", // "--clickHousePassword ",
// //
// "--clickHousePepEmis pepca10", "--clickHousePepEmis pepca_dev",
// "--clickHouseCamworkflow camworkflow",
// "--clickHouseHr hr_dev",
//
"--clickHousePepEmis pepca8",
"--clickHouseCamworkflow camworkflow", "--clickHouseCamworkflow camworkflow",
"--clickHouseHr hr_dev", "--clickHouseHr hr_dev",
//
// "--clickHousePepEmis pepca8",
// "--clickHouseCamworkflow camworkflow",
// "--clickHouseHr hr_dev",
] ]
}, },
{ {

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

@ -2,213 +2,213 @@
'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: null,
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.INTEGER, 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
} }
}, { }, {
tableName: "member", tableName: "member",
comment: "", comment: "",
indexes: [] indexes: []
}); });
dc.models.Member = Member; dc.models.Member = Member;
return Member; return Member;
}; };

2
api/sequelize-automate.config.js

@ -26,7 +26,7 @@ module.exports = {
dir: './app/lib/models', // 指定输出 models 文件的目录 dir: './app/lib/models', // 指定输出 models 文件的目录
typesDir: 'models', // 指定输出 TypeScript 类型定义的文件目录,只有 TypeScript / Midway 等会有类型定义 typesDir: 'models', // 指定输出 TypeScript 类型定义的文件目录,只有 TypeScript / Midway 等会有类型定义
emptyDir: false, // !!! 谨慎操作 生成 models 之前是否清空 `dir` 以及 `typesDir` emptyDir: false, // !!! 谨慎操作 生成 models 之前是否清空 `dir` 以及 `typesDir`
tables: ['overtime','vacate'], // 指定生成哪些表的 models,如 ['user', 'user_post'];如果为 null,则忽略改属性 tables: ['member'], // 指定生成哪些表的 models,如 ['user', 'user_post'];如果为 null,则忽略改属性
skipTables: [], // 指定跳过哪些表的 models,如 ['user'];如果为 null,则忽略改属性 skipTables: [], // 指定跳过哪些表的 models,如 ['user'];如果为 null,则忽略改属性
tsNoCheck: false, // 是否添加 `@ts-nocheck` 注释到 models 文件中 tsNoCheck: false, // 是否添加 `@ts-nocheck` 注释到 models 文件中
ignorePrefix: [], // 生成的模型名称忽略的前缀,因为 项目中有以下表名是以 t_ 开头的,在实际模型中不需要, 可以添加多个 [ 't_data_', 't_',] ,长度较长的 前缀放前面 ignorePrefix: [], // 生成的模型名称忽略的前缀,因为 项目中有以下表名是以 t_ 开头的,在实际模型中不需要, 可以添加多个 [ 't_data_', 't_',] ,长度较长的 前缀放前面

Loading…
Cancel
Save