niki/validator/admin/kind_box/validator.go

20 lines
491 B
Go
Raw Normal View History

package adminkindboxvalidator
type Repository interface {
KindBoxRequestExist(id uint) (bool, error)
EmployeeExist(id uint) (bool, error)
BenefactorExist(id uint) (bool, error)
KindBoxExist(id uint) (bool, error)
KindBoxBelongToBenefactor(benefactorID uint, kindboxID uint) (bool, error)
PendingStatus(id uint) (bool, error)
CheckStatus(status string) (bool, error)
}
type Validator struct {
repo Repository
}
func New(repo Repository) Validator {
return Validator{repo: repo}
}