-
Notifications
You must be signed in to change notification settings - Fork 147
/
responseOCR.go
122 lines (96 loc) · 3.25 KB
/
responseOCR.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
package response
import "github.com/ArtisanCloud/PowerWeChat/v3/src/kernel/response"
type ResponseOCRIDCard struct {
response.ResponseOfficialAccount
Type string `json:"type"`
Name string `json:"name"`
ID string `json:"id"`
Addr string `json:"addr"`
Gender string `json:"gender"`
Nationality string `json:"nationality"`
}
// ----------------------------------------
type ResponseOCRBankCard struct {
response.ResponseOfficialAccount
Number string `json:"number"`
}
// ----------------------------------------
type ResponseOCRVehicleLicense struct {
response.ResponseOfficialAccount
IDNum string `json:"id_num"`
Name string `json:"name"`
Sex string `json:"sex"`
Nationality string `json:"nationality"`
Address string `json:"address"`
BirthDate string `json:"birth_date"`
IssueDate string `json:"issue_date"`
CarClass string `json:"car_class"`
ValidFrom string `json:"valid_from"`
ValidTo string `json:"valid_to"`
OfficialSeal string `json:"official_seal"`
}
// ----------------------------------------
type ResponseOCRDriving struct {
response.ResponseOfficialAccount
IDNum string `json:"id_num"`
Name string `json:"name"`
Sex string `json:"sex"`
Nationality string `json:"nationality"`
Address string `json:"address"`
BirthDate string `json:"birth_date"`
IssueDate string `json:"issue_date"`
CarClass string `json:"car_class"`
ValidFrom string `json:"valid_from"`
ValidTo string `json:"valid_to"`
OfficialSeal string `json:"official_seal"`
}
// ----------------------------------------
type Point struct {
X int `json:"x"`
Y int `json:"y"`
}
type Position struct {
LeftTop *Point `json:"left_top"`
RightTop *Point `json:"right_top"`
RightBottom *Point `json:"right_bottom"`
LeftBottom *Point `json:"left_bottom"`
}
type CertPosition struct {
Pos *Position `json:"pos"`
}
type ImgSize struct {
W int `json:"w"`
H int `json:"h"`
}
type ResponseOCRBizLicense struct {
response.ResponseOfficialAccount
RegNum string `json:"reg_num"`
Serial string `json:"serial"`
LegalRepresentative string `json:"legal_representative"`
EnterpriseName string `json:"enterprise_name"`
TypeOfOrganization string `json:"type_of_organization"`
Address string `json:"address"`
TypeOfEnterprise string `json:"type_of_enterprise"`
BusinessScope string `json:"business_scope"`
RegisteredCapital string `json:"registered_capital"`
PaidInCapital string `json:"paid_in_capital"`
ValidPeriod string `json:"valid_period"`
RegisteredDate string `json:"registered_date"`
CertPosition *CertPosition `json:"cert_position"`
ImgSize *ImgSize `json:"img_size"`
}
// ----------------------------------------
type Item struct {
Text string `json:"text"`
Pos Position `json:"pos"`
}
type ResponseOCRCommon struct {
response.ResponseOfficialAccount
Items []Item `json:"items"`
ImgSize ImgSize `json:"img_size"`
}
// ----------------------------------------
type ResponseOCRPlateNumber struct {
response.ResponseOfficialAccount
Number string `json:"number"`
}