niki/service/kind_box_req/service.go

22 lines
555 B
Go
Raw Normal View History

package kindboxreqservice
import "git.gocasts.ir/ebhomengo/niki/entity"
type Repository interface {
AddKindBoxReq(kindBoxReq entity.KindBoxReq) (entity.KindBoxReq, error)
EditKindBoxReq(kindBoxReqID uint, kindBoxReqInput entity.KindBoxReq) (entity.KindBoxReq, error)
DeleteKindBoxReq(kindBoxReqID uint) error
GetAllKindBoxReq() ([]entity.KindBoxReq, error)
GetKindBoxReqByID(kindBoxReq uint) (entity.KindBoxReq, error)
}
type Service struct {
repo Repository
}
func New(repository Repository) Service {
return Service{
repo: repository,
}
}