fix(aihr): prevent duplicate employee principal links

This commit is contained in:
2026-07-14 06:29:03 +08:00
parent 3540b072f3
commit e332efb731
5 changed files with 43 additions and 10 deletions
@@ -38,5 +38,5 @@ CREATE TABLE IF NOT EXISTS `aihr_candidate_employee_link` (
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`),
UNIQUE KEY `uk_aihr_candidate_employee_link_candidate` (`tenant_id`, `candidate_id`),
KEY `idx_aihr_candidate_employee_link_party` (`tenant_id`, `ext_party_id`)
UNIQUE KEY `uk_aihr_candidate_employee_link_party` (`tenant_id`, `ext_party_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='AI HR 候选人与员工主体关联';