package services

import (
	"time"

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

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

type ConsentService struct {
	Repo repositories.ConsentRepositoryInterface
}

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