forked from ebhomengo/niki
1
0
Fork 0
niki/service/kind_box/service.go

22 lines
504 B
Go
Raw Normal View History

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,
}
}