``refactor(pet): 重构宠物服务结构,将PetService独立封装并继承cool.Service``

This commit is contained in:
1
2025-10-17 19:40:27 +00:00
parent 7f18af2507
commit 696e6225e5
3 changed files with 14 additions and 9 deletions

View File

@@ -22,6 +22,7 @@ type IService interface {
GetModel() IModel // 获取model
}
type Service struct {
Models *gdb.Model
Model IModel
ListQueryOp *QueryOp
PageQueryOp *QueryOp
@@ -420,8 +421,8 @@ func (s *Service) ModifyAfter(ctx context.Context, method string, param g.MapStr
func (s *Service) GetModel() IModel {
return s.Model
}
// GetModel 获取model
// GetModel 获取model
// NewService 新建一个service
func NewService(model IModel) *Service {