-
Notifications
You must be signed in to change notification settings - Fork 9
/
WorkerRegisterForTopReqDto.go
52 lines (47 loc) · 1.71 KB
/
WorkerRegisterForTopReqDto.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
package tmallservice
import (
"sync"
)
// WorkerRegisterForTopReqDto 结构体
type WorkerRegisterForTopReqDto struct {
// 身份证
IdNumber string `json:"id_number,omitempty" xml:"id_number,omitempty"`
// 工人图像
ProfilePictureUrl string `json:"profile_picture_url,omitempty" xml:"profile_picture_url,omitempty"`
// 姓名
RealName string `json:"real_name,omitempty" xml:"real_name,omitempty"`
// 支付宝账号
AlipayAccount string `json:"alipay_account,omitempty" xml:"alipay_account,omitempty"`
// 详细地址
Address string `json:"address,omitempty" xml:"address,omitempty"`
// 工人手机号
Phone string `json:"phone,omitempty" xml:"phone,omitempty"`
// 详细地址编码
AddressId int64 `json:"address_id,omitempty" xml:"address_id,omitempty"`
// 工人能力model
WorkerServiceAbility *WorkerServiceAbility `json:"worker_service_ability,omitempty" xml:"worker_service_ability,omitempty"`
// 工人加入网点model
JoinedStore *JoinedStore `json:"joined_store,omitempty" xml:"joined_store,omitempty"`
}
var poolWorkerRegisterForTopReqDto = sync.Pool{
New: func() any {
return new(WorkerRegisterForTopReqDto)
},
}
// GetWorkerRegisterForTopReqDto() 从对象池中获取WorkerRegisterForTopReqDto
func GetWorkerRegisterForTopReqDto() *WorkerRegisterForTopReqDto {
return poolWorkerRegisterForTopReqDto.Get().(*WorkerRegisterForTopReqDto)
}
// ReleaseWorkerRegisterForTopReqDto 释放WorkerRegisterForTopReqDto
func ReleaseWorkerRegisterForTopReqDto(v *WorkerRegisterForTopReqDto) {
v.IdNumber = ""
v.ProfilePictureUrl = ""
v.RealName = ""
v.AlipayAccount = ""
v.Address = ""
v.Phone = ""
v.AddressId = 0
v.WorkerServiceAbility = nil
v.JoinedStore = nil
poolWorkerRegisterForTopReqDto.Put(v)
}