修改保险后端代码,政府前端代码

This commit is contained in:
2025-09-22 17:56:30 +08:00
parent 3143c3ad0b
commit 02a25515a9
206 changed files with 35119 additions and 43073 deletions

View File

@@ -0,0 +1,82 @@
/**
* 员工模型
* @file Employee.js
* @description 员工数据模型
*/
const { DataTypes } = require('sequelize');
const { sequelize } = require('../config/database');
const Employee = sequelize.define('Employee', {
id: {
type: DataTypes.INTEGER,
primaryKey: true,
autoIncrement: true
},
name: {
type: DataTypes.STRING(50),
allowNull: false,
comment: '员工姓名'
},
employee_id: {
type: DataTypes.STRING(20),
allowNull: false,
unique: true,
comment: '员工编号'
},
department_id: {
type: DataTypes.INTEGER,
allowNull: false,
comment: '部门ID'
},
position_id: {
type: DataTypes.INTEGER,
allowNull: false,
comment: '职位ID'
},
phone: {
type: DataTypes.STRING(20),
allowNull: true,
comment: '联系电话'
},
email: {
type: DataTypes.STRING(100),
allowNull: true,
comment: '邮箱地址'
},
hire_date: {
type: DataTypes.DATEONLY,
allowNull: false,
comment: '入职日期'
},
salary: {
type: DataTypes.BIGINT,
allowNull: false,
defaultValue: 0,
comment: '薪资(分)'
},
status: {
type: DataTypes.ENUM('active', 'inactive', 'resigned'),
allowNull: false,
defaultValue: 'active',
comment: '员工状态:在职、离职、已辞职'
},
created_at: {
type: DataTypes.DATE,
allowNull: false,
defaultValue: DataTypes.NOW
},
updated_at: {
type: DataTypes.DATE,
allowNull: false,
defaultValue: DataTypes.NOW
}
}, {
sequelize,
tableName: 'bank_employees',
modelName: 'Employee',
timestamps: true,
createdAt: 'created_at',
updatedAt: 'updated_at'
});
module.exports = Employee;