/*
 Navicat Premium Data Transfer

 Source Server         : 本机
 Source Server Type    : MySQL
 Source Server Version : 50741
 Source Host           : localhost:3306
 Source Schema         : kd_dev

 Target Server Type    : MySQL
 Target Server Version : 50741
 File Encoding         : 65001

 Date: 19/06/2025 19:53:49
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for kd_salary
-- ----------------------------
DROP TABLE IF EXISTS `kd_salary`;
CREATE TABLE `kd_salary`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID',
  `name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '姓名',
  `number` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '工号',
  `identity_card` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '身份证号码',
  `department` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门',
  `year_and_month` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属年月，只需要年份，如2025',
  `personnel_type` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '人员类型',
  `average_monthly_salary` decimal(10, 2) NULL DEFAULT NULL COMMENT '上一年度月均工资(元)',
  `pension_insurance` decimal(10, 2) NULL DEFAULT NULL COMMENT '上一年度月均单位承担部分养老保险',
  `medical_insurance` decimal(10, 2) NULL DEFAULT NULL COMMENT '上一年度月均单位承担部分医疗保险',
  `unemployment_insurance` decimal(10, 2) NULL DEFAULT NULL COMMENT '上一年度月均单位承担部分失业保险',
  `injury_insurance` decimal(10, 2) NULL DEFAULT NULL COMMENT '上一年度月均单位承担部分工伤保险',
  `maternity_insurance` decimal(10, 2) NULL DEFAULT NULL COMMENT '上一年度月均单位承担部分生育保险',
  `provident_fund` decimal(10, 2) NULL DEFAULT NULL COMMENT '上一年度月均单位承担部分公积金',
  `create_user` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
  `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '创建部门',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_user` bigint(20) NULL DEFAULT NULL COMMENT '修改人',
  `update_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
  `status` int(11) NULL DEFAULT 1 COMMENT '状态',
  `is_deleted` int(11) NULL DEFAULT 0 COMMENT '是否已删除',
  `average_monthly_salary_edit` tinyint(1) NULL DEFAULT NULL COMMENT '上一年度月均工资(元)，是否修改过，0：否，1：是',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1935631410673958914 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '技术人员工资表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of kd_salary
-- ----------------------------
INSERT INTO `kd_salary` VALUES (1935631410673958913, '000000', '张三', 'zhangsan', '430122198901266026', '技术中心', NULL, '研发人员', 8000.00, 100.00, 80.00, 20.00, 60.00, 20.00, 960.00, 1123598821738675201, 1123598813738675201, '2025-06-19 17:31:05', 1123598821738675201, '2025-06-19 17:31:05', 1, 0, NULL);

SET FOREIGN_KEY_CHECKS = 1;
