-
Notifications
You must be signed in to change notification settings - Fork 9
/
OrderAddressDto.go
76 lines (71 loc) · 2.38 KB
/
OrderAddressDto.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
package aesolution
import (
"sync"
)
// OrderAddressDto 结构体
type OrderAddressDto struct {
// English country/region name
CountryName string `json:"country_name,omitempty" xml:"country_name,omitempty"`
// mobile number
MobileNo string `json:"mobile_no,omitempty" xml:"mobile_no,omitempty"`
// Recipient
ContactPerson string `json:"contact_person,omitempty" xml:"contact_person,omitempty"`
// Phone country/region code
PhoneCountry string `json:"phone_country,omitempty" xml:"phone_country,omitempty"`
// Phone area code
PhoneArea string `json:"phone_area,omitempty" xml:"phone_area,omitempty"`
// province
Province string `json:"province,omitempty" xml:"province,omitempty"`
// address 1
Address string `json:"address,omitempty" xml:"address,omitempty"`
// phone number
PhoneNumber string `json:"phone_number,omitempty" xml:"phone_number,omitempty"`
// Fax number
FaxNumber string `json:"fax_number,omitempty" xml:"fax_number,omitempty"`
// Street detailed address
DetailAddress string `json:"detail_address,omitempty" xml:"detail_address,omitempty"`
// city
City string `json:"city,omitempty" xml:"city,omitempty"`
// country/region
Country string `json:"country,omitempty" xml:"country,omitempty"`
// address 2
Address2 string `json:"address2,omitempty" xml:"address2,omitempty"`
// Fax country/region code
FaxCountry string `json:"fax_country,omitempty" xml:"fax_country,omitempty"`
// Postal code
Zip string `json:"zip,omitempty" xml:"zip,omitempty"`
// Fax area code
FaxArea string `json:"fax_area,omitempty" xml:"fax_area,omitempty"`
// localized address, currently for buyer whose address is in Russia.
LocalizedAddress string `json:"localized_address,omitempty" xml:"localized_address,omitempty"`
}
var poolOrderAddressDto = sync.Pool{
New: func() any {
return new(OrderAddressDto)
},
}
// GetOrderAddressDto() 从对象池中获取OrderAddressDto
func GetOrderAddressDto() *OrderAddressDto {
return poolOrderAddressDto.Get().(*OrderAddressDto)
}
// ReleaseOrderAddressDto 释放OrderAddressDto
func ReleaseOrderAddressDto(v *OrderAddressDto) {
v.CountryName = ""
v.MobileNo = ""
v.ContactPerson = ""
v.PhoneCountry = ""
v.PhoneArea = ""
v.Province = ""
v.Address = ""
v.PhoneNumber = ""
v.FaxNumber = ""
v.DetailAddress = ""
v.City = ""
v.Country = ""
v.Address2 = ""
v.FaxCountry = ""
v.Zip = ""
v.FaxArea = ""
v.LocalizedAddress = ""
poolOrderAddressDto.Put(v)
}