2023-12-20 08:41:50 +00:00
|
|
|
package kindboxreqservice
|
2023-12-20 08:27:13 +00:00
|
|
|
|
|
|
|
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,
|
|
|
|
}
|
|
|
|
}
|