feat: add email-api-data project with EmailTemplates repository and service

New data project owning the emailApi schema:
- EmailTemplateEntity with Key, Language, Value, Description, UpdatedAt, OperatorCopy
- EmailApiDbContext (schema: emailApi, custom migration table _EmailApiMigrations)
- IEmailTemplateRepository / EfEmailTemplateRepository (scoped)
- IEmailTemplateService / EmailTemplateService (singleton, 10-min cache)
  - GetOperatorCopy falls back to first non-empty OperatorCopy across all rows
- Initial migration CreateEmailTemplates: creates table + seeds all email.*
  templates (match + search-results in en/ro) and html-shell fragments
  with OperatorCopy = "contact@myai.ro" for addressable rows

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-28 08:39:15 +03:00
parent e260982a91
commit 19e73aca17
11 changed files with 530 additions and 0 deletions
@@ -0,0 +1,8 @@
using EmailApi.Data.Entities;
namespace EmailApi.Data.Repositories.Contracts;
public interface IEmailTemplateRepository
{
Task<IReadOnlyList<EmailTemplateEntity>> GetAllAsync(CancellationToken ct);
}