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
|
type Item struct {
Id int64 `thrift:"id,1" frugal:"1,default,i64" json:"id"`
Title string `thrift:"title,2" frugal:"2,default,string" json:"title"`
Description string `thrift:"description,3" frugal:"3,default,string" json:"description"`
Stock int64 `thrift:"stock,4" frugal:"4,default,i64" json:"stock"`
}
func NewItem() *Item {
return &Item{}
}
func (p *Item) InitDefault() {
}
func (p *Item) GetId() (v int64) {
return p.Id
}
func (p *Item) GetTitle() (v string) {
return p.Title
}
func (p *Item) GetDescription() (v string) {
return p.Description
}
func (p *Item) GetStock() (v int64) {
return p.Stock
}
func (p *Item) SetId(val int64) {
p.Id = val
}
func (p *Item) SetTitle(val string) {
p.Title = val
}
func (p *Item) SetDescription(val string) {
p.Description = val
}
func (p *Item) SetStock(val int64) {
p.Stock = val
}
func (p *Item) String() string {
if p == nil {
return "<nil>"
}
return fmt.Sprintf("Item(%+v)", *p)
}
var fieldIDToName_Item = map[int16]string{
1: "id",
2: "title",
3: "description",
4: "stock",
}
|