-
Notifications
You must be signed in to change notification settings - Fork 9
/
WorkcardExtraChargeCreateTuple.go
40 lines (35 loc) · 1.29 KB
/
WorkcardExtraChargeCreateTuple.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
package tmallservice
import (
"sync"
)
// WorkcardExtraChargeCreateTuple 结构体
type WorkcardExtraChargeCreateTuple struct {
// 图片地址回传集合
PicUrls []string `json:"pic_urls,omitempty" xml:"pic_urls>string,omitempty"`
// 费用项名称
ChargeItemName string `json:"charge_item_name,omitempty" xml:"charge_item_name,omitempty"`
// 扩展字段
Attributes string `json:"attributes,omitempty" xml:"attributes,omitempty"`
// 费用项单价(分)
UnitPrice int64 `json:"unit_price,omitempty" xml:"unit_price,omitempty"`
// 购买数量
BuyAmount int64 `json:"buy_amount,omitempty" xml:"buy_amount,omitempty"`
}
var poolWorkcardExtraChargeCreateTuple = sync.Pool{
New: func() any {
return new(WorkcardExtraChargeCreateTuple)
},
}
// GetWorkcardExtraChargeCreateTuple() 从对象池中获取WorkcardExtraChargeCreateTuple
func GetWorkcardExtraChargeCreateTuple() *WorkcardExtraChargeCreateTuple {
return poolWorkcardExtraChargeCreateTuple.Get().(*WorkcardExtraChargeCreateTuple)
}
// ReleaseWorkcardExtraChargeCreateTuple 释放WorkcardExtraChargeCreateTuple
func ReleaseWorkcardExtraChargeCreateTuple(v *WorkcardExtraChargeCreateTuple) {
v.PicUrls = v.PicUrls[:0]
v.ChargeItemName = ""
v.Attributes = ""
v.UnitPrice = 0
v.BuyAmount = 0
poolWorkcardExtraChargeCreateTuple.Put(v)
}