package services

import (
	"time"

	"GoMembership/internal/models"
	"GoMembership/internal/repositories"
)

type ConsentServiceInterface interface {
	RegisterConsent(consent *models.Consent) (uint, error)
}

type ConsentService struct {
	Repo repositories.ConsentRepositoryInterface
}

func (service *ConsentService) RegisterConsent(consent *models.Consent) (uint, error) {
	consent.CreatedAt = time.Now()
	consent.UpdatedAt = time.Now()
	return service.Repo.CreateConsent(consent)
}
