package repository

import (
	"context"

	"go.mongodb.org/mongo-driver/mongo"
)

type HealthRepository struct {
	MongoDB *mongo.Database
}

func NewHealthRepository(database *mongo.Database) *HealthRepository {
	return &HealthRepository{MongoDB: database}
}

func (receiver *HealthRepository) Check(ctx context.Context) error {
	return receiver.MongoDB.Client().Ping(ctx, nil)
}
