forked from ebhomengo/niki
22 lines
555 B
Go
22 lines
555 B
Go
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,
|
|
}
|
|
}
|