67 lines
3.1 KiB
Go
67 lines
3.1 KiB
Go
|
|
package responses
|
|||
|
|
|
|||
|
|
import (
|
|||
|
|
"time"
|
|||
|
|
|
|||
|
|
"tyapi-server/internal/domains/certification/enums"
|
|||
|
|
)
|
|||
|
|
|
|||
|
|
// CertificationResponse 认证响应
|
|||
|
|
type CertificationResponse struct {
|
|||
|
|
ID string `json:"id"`
|
|||
|
|
UserID string `json:"user_id"`
|
|||
|
|
Status enums.CertificationStatus `json:"status"`
|
|||
|
|
StatusName string `json:"status_name"`
|
|||
|
|
Progress int `json:"progress"`
|
|||
|
|
IsUserActionRequired bool `json:"is_user_action_required"`
|
|||
|
|
IsAdminActionRequired bool `json:"is_admin_action_required"`
|
|||
|
|
InfoSubmittedAt *time.Time `json:"info_submitted_at,omitempty"`
|
|||
|
|
FaceVerifiedAt *time.Time `json:"face_verified_at,omitempty"`
|
|||
|
|
ContractAppliedAt *time.Time `json:"contract_applied_at,omitempty"`
|
|||
|
|
ContractApprovedAt *time.Time `json:"contract_approved_at,omitempty"`
|
|||
|
|
ContractSignedAt *time.Time `json:"contract_signed_at,omitempty"`
|
|||
|
|
CompletedAt *time.Time `json:"completed_at,omitempty"`
|
|||
|
|
Enterprise *EnterpriseInfoResponse `json:"enterprise,omitempty"`
|
|||
|
|
ContractURL string `json:"contract_url,omitempty"`
|
|||
|
|
SigningURL string `json:"signing_url,omitempty"`
|
|||
|
|
RejectReason string `json:"reject_reason,omitempty"`
|
|||
|
|
CreatedAt time.Time `json:"created_at"`
|
|||
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// EnterpriseInfoResponse 企业信息响应
|
|||
|
|
type EnterpriseInfoResponse struct {
|
|||
|
|
ID string `json:"id"`
|
|||
|
|
CertificationID string `json:"certification_id"`
|
|||
|
|
CompanyName string `json:"company_name"`
|
|||
|
|
UnifiedSocialCode string `json:"unified_social_code"`
|
|||
|
|
LegalPersonName string `json:"legal_person_name"`
|
|||
|
|
LegalPersonID string `json:"legal_person_id"`
|
|||
|
|
LicenseUploadRecordID string `json:"license_upload_record_id"`
|
|||
|
|
IsOCRVerified bool `json:"is_ocr_verified"`
|
|||
|
|
IsFaceVerified bool `json:"is_face_verified"`
|
|||
|
|
CreatedAt time.Time `json:"created_at"`
|
|||
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// UploadLicenseResponse 上传营业执照响应
|
|||
|
|
type UploadLicenseResponse struct {
|
|||
|
|
UploadRecordID string `json:"upload_record_id"`
|
|||
|
|
FileURL string `json:"file_url"`
|
|||
|
|
OCRProcessed bool `json:"ocr_processed"`
|
|||
|
|
OCRSuccess bool `json:"ocr_success"`
|
|||
|
|
// OCR识别结果(如果成功)
|
|||
|
|
EnterpriseName string `json:"enterprise_name,omitempty"`
|
|||
|
|
CreditCode string `json:"credit_code,omitempty"`
|
|||
|
|
LegalPerson string `json:"legal_person,omitempty"`
|
|||
|
|
OCRConfidence float64 `json:"ocr_confidence,omitempty"`
|
|||
|
|
OCRErrorMessage string `json:"ocr_error_message,omitempty"`
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// FaceVerifyResponse 人脸识别响应
|
|||
|
|
type FaceVerifyResponse struct {
|
|||
|
|
CertifyID string `json:"certify_id"`
|
|||
|
|
VerifyURL string `json:"verify_url"`
|
|||
|
|
ExpiresAt time.Time `json:"expires_at"`
|
|||
|
|
}
|