niki/service/benefactor/address/service.go

24 lines
617 B
Go
Raw Normal View History

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)
2024-01-17 20:17:06 +00:00
GetAllProvinces(ctx context.Context) ([]entity.Province, error)
2024-01-18 10:16:36 +00:00
GetAllCities(ctx context.Context) ([]entity.City, error)
2024-06-01 00:29:11 +00:00
GetAddress(ctx context.Context, addressID uint, benefactorID uint) (entity.Address, error)
}
type Service struct {
repo Repository
}
func New(repo Repository) Service {
return Service{repo: repo}
}