23 lines
601 B
Go
23 lines
601 B
Go
package service
|
|
|
|
import (
|
|
"github.com/zs/InsightReply/internal/model"
|
|
"github.com/zs/InsightReply/internal/repository"
|
|
)
|
|
|
|
type ProductProfileService struct {
|
|
repo *repository.ProductProfileRepository
|
|
}
|
|
|
|
func NewProductProfileService(repo *repository.ProductProfileRepository) *ProductProfileService {
|
|
return &ProductProfileService{repo: repo}
|
|
}
|
|
|
|
func (s *ProductProfileService) GetProfile(userID string) (*model.UserProductProfile, error) {
|
|
return s.repo.GetByUserID(userID)
|
|
}
|
|
|
|
func (s *ProductProfileService) SaveProfile(profile *model.UserProductProfile) error {
|
|
return s.repo.Save(profile)
|
|
}
|