namespace MyOffice.Data.Repositories.Item;

using MyOffice.Data.Models.Notifications;
using MyOffice.DbContext;

public class EmailTemplateRepository : AppRepository<EmailTemplate>, IEmailTemplateRepository
{
	public EmailTemplateRepository(AppDbContext context) : base(context)
	{
	}

	public EmailTemplate? Get(EmailTemplateEnum emailTemplate)
	{
		var emailTemplateStr = emailTemplate.ToString();
		return _context.EmailTemplates.FirstOrDefault(x => x.Id == emailTemplateStr);
	}
}