niki/service/kind_box/service.go

22 lines
504 B
Go

package kindboxservice
import "git.gocasts.ir/ebhomengo/niki/entity"
type Repository interface {
AddKindBox(kindBox entity.KindBox) (entity.KindBox, error)
EditKindBox(kindBoxID uint, kindBoxInput entity.KindBox) (entity.KindBox, error)
DeleteKindBox(kindBoxID uint) error
GetAllKindBox() ([]entity.KindBox, error)
GetKindBoxByID(kindBox uint) (entity.KindBox, error)
}
type Service struct {
repo Repository
}
func New(repository Repository) Service {
return Service{
repo: repository,
}
}