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
package res_m
import (
"git.hilo.cn/hilo-common/domain"
"git.hilo.cn/hilo-common/resource/mysql"
)
type ResMicEmoji struct {
mysql.Entity
*domain.Model `gorm:"-"`
Name mysql.Str
IconUrl mysql.Str
SvagUrl mysql.Str
N mysql.Num
Status mysql.UserYesNo
}
//不可用
func (resMicEmoji *ResMicEmoji) Disable() *ResMicEmoji {
resMicEmoji.Status = mysql.NOUSER
return resMicEmoji
}
//上架
func (resMicEmoji *ResMicEmoji) Enable() *ResMicEmoji {
resMicEmoji.Status = mysql.USER
return resMicEmoji
}
func (resMicEmoji *ResMicEmoji) EditN(n uint32) *ResMicEmoji {
resMicEmoji.N = n
return resMicEmoji
}
func (resMicEmoji *ResMicEmoji) EditName(name string) *ResMicEmoji {
resMicEmoji.Name = name
return resMicEmoji
}
func (resMicEmoji *ResMicEmoji) EditIconUrl(iconUrl string) *ResMicEmoji {
resMicEmoji.IconUrl = iconUrl
return resMicEmoji
}
func (resMicEmoji *ResMicEmoji) EditSvagUrl(svagUrl string) *ResMicEmoji {
resMicEmoji.SvagUrl = svagUrl
return resMicEmoji
}