create table if not exists `ccdi_project_overview_employee_result` (
  `id` bigint not null auto_increment comment '主键ID',
  `project_id` bigint not null comment '项目ID',
  `staff_id_card` varchar(18) not null comment '员工身份证号',
  `staff_code` varchar(64) default null comment '员工工号',
  `staff_name` varchar(64) default null comment '员工姓名',
  `dept_id` bigint default null comment '部门ID',
  `dept_name` varchar(128) default null comment '部门名称',
  `rule_count` int not null default 0 comment '命中规则数',
  `model_count` int not null default 0 comment '命中模型数',
  `hit_count` int not null default 0 comment '命中次数',
  `risk_level_code` varchar(32) not null comment '风险等级编码',
  `risk_point` varchar(1000) default null comment '风险点',
  `model_codes_csv` varchar(1000) default null comment '命中模型编码CSV',
  `model_names_json` json default null comment '命中模型名称快照',
  `hit_rules_json` json default null comment '命中规则快照',
  `model_hit_summary_json` json default null comment '模型命中汇总快照',
  `create_by` varchar(64) default null comment '创建者',
  `create_time` datetime default current_timestamp comment '创建时间',
  `update_by` varchar(64) default null comment '更新者',
  `update_time` datetime default current_timestamp on update current_timestamp comment '更新时间',
  `remark` varchar(500) default null comment '备注',
  primary key (`id`),
  unique key `uk_ccdi_project_overview_employee_result` (`project_id`, `staff_id_card`),
  key `idx_ccdi_project_overview_employee_result_risk_level` (`project_id`, `risk_level_code`),
  key `idx_ccdi_project_overview_employee_result_dept` (`project_id`, `dept_id`)
) engine=innodb default charset=utf8mb4 comment='结果总览员工结果表';
