forked from ebhomengo/niki
1
0
Fork 0
niki/service/benefactor/address/service.go

25 lines
651 B
Go

package benefactoraddressservice
import (
"context"
"git.gocasts.ir/ebhomengo/niki/entity"
)
type Repository interface {
CreateBenefactorAddress(ctx context.Context, address entity.Address) (entity.Address, error)
GetAddressByID(ctx context.Context, id uint) (*entity.Address, error)
GetAllProvinces(ctx context.Context) ([]entity.Province, error)
GetAllCities(ctx context.Context) ([]entity.City, error)
IsExistProvinceByID(ctx context.Context, id uint) (bool, error)
IsExistCityByID(ctx context.Context, id uint) (bool, error)
}
type Service struct {
repo Repository
}
func New(repo Repository) Service {
return Service{repo: repo}
}