package service import ( "blazing/cool" "blazing/modules/config/model" ) type EffectService struct { *cool.Service } func (s *EffectService) Args(id uint32) (int, []int) { m := dbm(s.Model).Where("se_idx", id) var tt model.PlayerPetSpecialEffect m.Scan(&tt) return int(tt.Eid), tt.Args } func NewEffectService() *EffectService { return &EffectService{ &cool.Service{ Model: model.NewPlayerPetSpecialEffect(), UniqueKey: map[string]string{"idx_se_idx": "索引不能重复"}, PageQueryOp: &cool.QueryOp{ KeyWordField: []string{"desc"}, }, }, } }