const Sequelize = require('sequelize')
const { defineModel } = require('./base')

const User = defineModel('user', {
  sallary: {
    type: Sequelize.STRING(50),
    comment: '期望薪资'
  },
  name: {
    type: Sequelize.STRING(50),
    comment: '姓名'
  },
  department: {
    type: Sequelize.STRING(50),
    comment: '应聘岗位'
  },
  identity: {
    type: Sequelize.STRING(50),
    comment: '身份证号'
  },
  idPhoto: {
    type: Sequelize.STRING(255),
    comment: '证件照'
  },
  lifePhoto: {
    type: Sequelize.STRING(255),
    comment: '生活照',
    allowNull: true
  },
  personalInfo: {
    type: Sequelize.STRING(1200),
    comment: '基本信息'
  },
  email: {
    type: Sequelize.STRING(50),
    comment: '个人邮箱'
  },
  phone: {
    type: Sequelize.STRING(50),
    comment: '手机号码'
  },
  urgentPhone: {
    type: Sequelize.STRING(50),
    comment: '其他联系人号码/关系',
    allowNull: true
  },
  plan: {
    type: Sequelize.STRING(255),
    comment: '三年内职业规划'
  },
  eduExperience: {
    type: Sequelize.STRING(1200),
    comment: '教育经历'
  },
  workExperience: {
    type: Sequelize.STRING(1200),
    comment: '工作经历',
    allowNull: true
  },
  description: {
    type: Sequelize.STRING(255),
    comment: '工作业绩与自我评价'
  },
  resume: {
    type: Sequelize.STRING(255),
    comment: '上传简历',
    allowNull: true
  }
})
User.sync()

module.exports = User
