Files
tyapi-server/internal/application/certification/dto/commands/certification_commands.go
2025-07-13 16:36:20 +08:00

63 lines
4.3 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package commands
// CreateCertificationCommand 创建认证申请命令
// 用于用户发起企业认证流程的初始请求
type CreateCertificationCommand struct {
UserID string `json:"user_id" binding:"required" comment:"用户唯一标识从JWT token获取"`
}
// UploadLicenseCommand 上传营业执照命令
// 用于处理营业执照文件上传的业务逻辑
type UploadLicenseCommand struct {
UserID string `json:"-" comment:"用户唯一标识从JWT token获取不在JSON中暴露"`
FileBytes []byte `json:"-" comment:"营业执照文件的二进制内容从multipart/form-data获取"`
FileName string `json:"-" comment:"营业执照文件的原始文件名从multipart/form-data获取"`
FileSize int64 `json:"-" comment:"营业执照文件的大小字节从multipart/form-data获取"`
}
// SubmitEnterpriseInfoCommand 提交企业信息命令
// 用于用户提交企业四要素信息,完成企业信息验证
type SubmitEnterpriseInfoCommand struct {
UserID string `json:"-" comment:"用户唯一标识从JWT token获取不在JSON中暴露"`
CertificationID string `json:"-" comment:"认证申请唯一标识从URL路径获取不在JSON中暴露"`
CompanyName string `json:"company_name" binding:"required" comment:"企业名称,如:北京科技有限公司"`
UnifiedSocialCode string `json:"unified_social_code" binding:"required" comment:"统一社会信用代码18位企业唯一标识91110000123456789X"`
LegalPersonName string `json:"legal_person_name" binding:"required" comment:"法定代表人姓名,如:张三"`
LegalPersonID string `json:"legal_person_id" binding:"required" comment:"法定代表人身份证号码18位110101199001011234"`
LicenseUploadRecordID string `json:"license_upload_record_id" binding:"required" comment:"营业执照上传记录唯一标识,关联已上传的营业执照文件"`
}
// InitiateFaceVerifyCommand 初始化人脸识别命令
// 用于发起人脸识别验证流程,验证法定代表人身份
type InitiateFaceVerifyCommand struct {
CertificationID string `json:"-" comment:"认证申请唯一标识从URL路径获取不在JSON中暴露"`
RealName string `json:"real_name" binding:"required" comment:"真实姓名,必须与营业执照上的法定代表人姓名一致"`
IDCardNumber string `json:"id_card_number" binding:"required" comment:"身份证号码18位用于人脸识别身份验证"`
ReturnURL string `json:"return_url" binding:"required" comment:"人脸识别完成后的回调地址,用于跳转回应用"`
}
// ApplyContractCommand 申请合同命令
// 用于用户申请电子合同,进入合同签署流程
type ApplyContractCommand struct {
CertificationID string `json:"-" comment:"认证申请唯一标识从URL路径获取不在JSON中暴露"`
}
// RetryStepCommand 重试认证步骤命令
// 用于用户重试失败的认证步骤,如人脸识别失败后的重试
type RetryStepCommand struct {
UserID string `json:"-" comment:"用户唯一标识从JWT token获取不在JSON中暴露"`
CertificationID string `json:"-" comment:"认证申请唯一标识从URL路径获取不在JSON中暴露"`
Step string `json:"step" binding:"required" comment:"重试的步骤名称face_verify人脸识别、contract_sign合同签署"`
}
// CreateEnterpriseInfoCommand 创建企业信息命令
// 用于创建企业基本信息,通常在企业认证流程中使用
// @Description 创建企业信息请求参数
type CreateEnterpriseInfoCommand struct {
UserID string `json:"-" comment:"用户唯一标识从JWT token获取不在JSON中暴露"`
CompanyName string `json:"company_name" binding:"required" example:"示例企业有限公司" comment:"企业名称,如:示例企业有限公司"`
UnifiedSocialCode string `json:"unified_social_code" binding:"required" example:"91110000123456789X" comment:"统一社会信用代码18位企业唯一标识91110000123456789X"`
LegalPersonName string `json:"legal_person_name" binding:"required" example:"张三" comment:"法定代表人姓名,如:张三"`
LegalPersonID string `json:"legal_person_id" binding:"required" example:"110101199001011234" comment:"法定代表人身份证号码18位110101199001011234"`
}