fix: 补充缺失的DB字段 idType + contractCategory

测试验证发现两个字段声明在优化计划中标记完成但实际未添加到schema:
- Employee.idType:证件类型(ID_CARD/PASSPORT/HK_MACAO_TAIWAN/OTHER)
- LaborContract.contractCategory:合同分类(LABOR_CONTRACT/LABOR_AGREEMENT/INTERNSHIP/FLEXIBLE)

已通过 prisma db push 应用到数据库,历史数据为NULL(兼容)

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
selfrelease
2026-08-15 17:12:56 +08:00
parent fa0dc82d38
commit 101cfcf508
+2
View File
@@ -241,6 +241,7 @@ model Employee {
gender String?
phone String?
idCardNumber String? // AES-256 加密存储
idType String? // 证件类型:ID_CARD(身份证,默认)/PASSPORT/HK_MACAO_TAIWAN/OTHER
idCardHash String? // SHA-256 哈希,用于按身份证号查询匹配
emergencyContact String?
emergencyPhone String?
@@ -316,6 +317,7 @@ model LaborContract {
startDate DateTime
endDate DateTime?
contractType ContractType
contractCategory String? // 合同分类:LABOR_CONTRACT(劳动合同,默认)/LABOR_AGREEMENT(劳务协议)/INTERNSHIP(实习协议)/FLEXIBLE(灵活用工)
signMethod SignMethod @default(PAPER)
contractYears Int @default(3)
probationMonths Int @default(0)