28 lines
784 B
Go
28 lines
784 B
Go
package service
|
|
|
|
import (
|
|
"context"
|
|
"github.com/tiger1103/gfast/v3/internal/app/businesses/model"
|
|
)
|
|
|
|
type ISpeciesName interface {
|
|
List(ctx context.Context, req *model.SpeciesNameSearchReq) (res *model.SpeciesNameSearchRes, err error)
|
|
GetById(ctx context.Context, Id int) (res *model.SpeciesNameInfoRes, err error)
|
|
Add(ctx context.Context, req *model.SpeciesNameAddReq) (err error)
|
|
Edit(ctx context.Context, req *model.SpeciesNameEditReq) (err error)
|
|
Delete(ctx context.Context, Id []int) (err error)
|
|
}
|
|
|
|
var localSpeciesName ISpeciesName
|
|
|
|
func SpeciesName() ISpeciesName {
|
|
if localSpeciesName == nil {
|
|
panic("implement not found for interface ISpeciesName, forgot register?")
|
|
}
|
|
return localSpeciesName
|
|
}
|
|
|
|
func RegisterSpeciesName(i ISpeciesName) {
|
|
localSpeciesName = i
|
|
}
|