add 合同类型

This commit is contained in:
2025-08-02 19:58:14 +08:00
parent 46915672cc
commit 719cd14269
5 changed files with 226 additions and 157 deletions

View File

@@ -13,6 +13,7 @@ type ContractType string
const (
ContractTypeCooperation ContractType = "cooperation" // 合作协议
ContractTypeReSign ContractType = "resign" // 补签协议
)
// ContractInfo 合同信息聚合根
@@ -228,6 +229,8 @@ func (c *ContractInfo) GetContractTypeName() string {
switch c.ContractType {
case ContractTypeCooperation:
return "合作协议"
case ContractTypeReSign:
return "补签协议"
default:
return "未知类型"
}
@@ -265,6 +268,8 @@ func isValidContractType(contractType ContractType) bool {
switch contractType {
case ContractTypeCooperation:
return true
case ContractTypeReSign:
return true
default:
return false
}