Files
bl/modules/config/service/egg.go
昔念 ffe3ff18bf
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
1
2026-02-08 17:57:42 +08:00

33 lines
462 B
Go

package service
import (
"blazing/cool"
"blazing/modules/config/model"
)
type EggService struct {
*cool.Service
}
func NewEggService() *EggService {
return &EggService{
&cool.Service{
Model: model.NewEgg(),
PageQueryOp: &cool.QueryOp{
KeyWordField: []string{"desc"},
},
},
}
}
func (s *EggService) Get(id uint32) *model.Egg {
if id == 0 {
return nil
}
var item *model.Egg
dbm(s.Model).Where("id", id).Scan(&item)
return item
}