56 lines
2.4 KiB
Go
56 lines
2.4 KiB
Go
|
|
package responses
|
|||
|
|
|
|||
|
|
import "time"
|
|||
|
|
|
|||
|
|
// BusinessLicenseResult 营业执照识别结果
|
|||
|
|
type BusinessLicenseResult struct {
|
|||
|
|
CompanyName string `json:"company_name"` // 企业名称
|
|||
|
|
UnifiedSocialCode string `json:"unified_social_code"` // 统一社会信用代码
|
|||
|
|
LegalPersonName string `json:"legal_person_name"` // 法定代表人姓名
|
|||
|
|
LegalPersonID string `json:"legal_person_id"` // 法定代表人身份证号
|
|||
|
|
RegisteredCapital string `json:"registered_capital"` // 注册资本
|
|||
|
|
BusinessScope string `json:"business_scope"` // 经营范围
|
|||
|
|
Address string `json:"address"` // 企业地址
|
|||
|
|
IssueDate string `json:"issue_date"` // 发证日期
|
|||
|
|
ValidPeriod string `json:"valid_period"` // 有效期
|
|||
|
|
Confidence float64 `json:"confidence"` // 识别置信度
|
|||
|
|
ProcessedAt time.Time `json:"processed_at"` // 处理时间
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// IDCardResult 身份证识别结果
|
|||
|
|
type IDCardResult struct {
|
|||
|
|
Name string `json:"name"` // 姓名
|
|||
|
|
IDCardNumber string `json:"id_card_number"` // 身份证号
|
|||
|
|
Gender string `json:"gender"` // 性别
|
|||
|
|
Nation string `json:"nation"` // 民族
|
|||
|
|
Birthday string `json:"birthday"` // 出生日期
|
|||
|
|
Address string `json:"address"` // 住址
|
|||
|
|
IssuingAgency string `json:"issuing_agency"` // 签发机关
|
|||
|
|
ValidPeriod string `json:"valid_period"` // 有效期限
|
|||
|
|
Side string `json:"side"` // 身份证面(front/back)
|
|||
|
|
Confidence float64 `json:"confidence"` // 识别置信度
|
|||
|
|
ProcessedAt time.Time `json:"processed_at"` // 处理时间
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// GeneralTextResult 通用文字识别结果
|
|||
|
|
type GeneralTextResult struct {
|
|||
|
|
Words []TextLine `json:"words"` // 识别的文字行
|
|||
|
|
Confidence float64 `json:"confidence"` // 整体置信度
|
|||
|
|
ProcessedAt time.Time `json:"processed_at"` // 处理时间
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// TextLine 文字行
|
|||
|
|
type TextLine struct {
|
|||
|
|
Text string `json:"text"` // 文字内容
|
|||
|
|
Confidence float64 `json:"confidence"` // 置信度
|
|||
|
|
Position Position `json:"position"` // 位置信息
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// Position 位置信息
|
|||
|
|
type Position struct {
|
|||
|
|
X int `json:"x"` // X坐标
|
|||
|
|
Y int `json:"y"` // Y坐标
|
|||
|
|
Width int `json:"width"` // 宽度
|
|||
|
|
Height int `json:"height"` // 高度
|
|||
|
|
}
|