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://rjkwed13l.hn-bkt.clouddn.com",
// click
// "--clickHouseUrl http://10.8.30.71",
"--clickHouseUrl http://10.8.30.71",
// click
"--clickHouseUrl http://10.8.30.161",
// "--clickHouseUrl http://10.8.30.161",
// "--clickHouseUrl https://clickhouse01.anxinyun.cn/play",
"--clickHousePort 30123",
@ -39,14 +39,14 @@
// "--clickHousePassword ",
//
// "--clickHousePepEmis pepca10",
// "--clickHouseCamworkflow camworkflow",
// "--clickHouseHr hr_dev",
//
"--clickHousePepEmis pepca8",
"--clickHousePepEmis pepca_dev",
"--clickHouseCamworkflow camworkflow",
"--clickHouseHr hr_dev",
//
// "--clickHousePepEmis pepca8",
// "--clickHouseCamworkflow camworkflow",
// "--clickHouseHr hr_dev",
]
},
{

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

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

2
api/sequelize-automate.config.js

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

Loading…
Cancel
Save