-
Notifications
You must be signed in to change notification settings - Fork 9
/
RoomTypeVoList.go
52 lines (47 loc) · 1.31 KB
/
RoomTypeVoList.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 tuanhotel
import (
"sync"
)
// RoomTypeVoList 结构体
type RoomTypeVoList struct {
// 是否无线上网
NetworkService string `json:"network_service,omitempty" xml:"network_service,omitempty"`
// 面积
Area string `json:"area,omitempty" xml:"area,omitempty"`
// 床型
Bed string `json:"bed,omitempty" xml:"bed,omitempty"`
// 名称
Name string `json:"name,omitempty" xml:"name,omitempty"`
// 最多可入住人数
MaxOccupancy string `json:"max_occupancy,omitempty" xml:"max_occupancy,omitempty"`
// 楼层
Floor string `json:"floor,omitempty" xml:"floor,omitempty"`
// rId
Rid string `json:"rid,omitempty" xml:"rid,omitempty"`
// 设施
Facility string `json:"facility,omitempty" xml:"facility,omitempty"`
// 是否标准
Standard bool `json:"standard,omitempty" xml:"standard,omitempty"`
}
var poolRoomTypeVoList = sync.Pool{
New: func() any {
return new(RoomTypeVoList)
},
}
// GetRoomTypeVoList() 从对象池中获取RoomTypeVoList
func GetRoomTypeVoList() *RoomTypeVoList {
return poolRoomTypeVoList.Get().(*RoomTypeVoList)
}
// ReleaseRoomTypeVoList 释放RoomTypeVoList
func ReleaseRoomTypeVoList(v *RoomTypeVoList) {
v.NetworkService = ""
v.Area = ""
v.Bed = ""
v.Name = ""
v.MaxOccupancy = ""
v.Floor = ""
v.Rid = ""
v.Facility = ""
v.Standard = false
poolRoomTypeVoList.Put(v)
}