1
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

This commit is contained in:
昔念
2026-02-08 17:57:42 +08:00
parent 2edd1ba852
commit ffe3ff18bf
25 changed files with 180 additions and 117 deletions

View File

@@ -0,0 +1,32 @@
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
}