2023-12-30 19:51:22 +00:00
|
|
|
package adminkindboxvalidator
|
2023-12-27 21:55:15 +00:00
|
|
|
|
|
|
|
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)
|
2023-12-28 13:43:06 +00:00
|
|
|
PendingStatus(id uint) (bool, error)
|
2023-12-27 21:55:15 +00:00
|
|
|
CheckStatus(status string) (bool, error)
|
|
|
|
}
|
|
|
|
|
|
|
|
type Validator struct {
|
|
|
|
repo Repository
|
|
|
|
}
|
|
|
|
|
|
|
|
func New(repo Repository) Validator {
|
|
|
|
return Validator{repo: repo}
|
|
|
|
}
|