("Value")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Key", "Language");
+
+ b.ToTable("EmailTemplates", "emailApi");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/Apis/email-api-data/Migrations/20260528130652_SeedEmailTemplates.cs b/Apis/email-api-data/Migrations/20260528130652_SeedEmailTemplates.cs
new file mode 100644
index 0000000..fe8ce5d
--- /dev/null
+++ b/Apis/email-api-data/Migrations/20260528130652_SeedEmailTemplates.cs
@@ -0,0 +1,176 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace EmailApi.Data.Migrations
+{
+ ///
+ public partial class SeedEmailTemplates : Migration
+ {
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ Seed(migrationBuilder);
+ }
+
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ // Delete all seeded templates (only those we know we added)
+ migrationBuilder.DeleteData(
+ table: "EmailTemplates",
+ keyColumns: new[] { "Key", "Language" },
+ keyValues: new object[] { "email.html-shell.start", "*" });
+ }
+
+ private static void Seed(MigrationBuilder m)
+ {
+ const string op = "contact@myai.ro";
+
+ void Row(string key, string lang, string value, string description = "", string operatorCopy = "")
+ => m.InsertData("EmailTemplates",
+ ["Key", "Language", "Value", "Description", "OperatorCopy"],
+ [key, lang, value, description, operatorCopy],
+ "emailApi");
+
+ // ── HTML shell (no operator copy — these are layout fragments, not addressable emails) ──
+ Row("email.html-shell.start", "*",
+ "\n\n\n\n \n \n \n \n myAi\n | \n | ",
+ "Opening HTML shell fragment — wrapped around every HtmlBody before sending");
+
+ Row("email.html-shell.end", "*",
+ " | \n | \n Automated message from myAi.\n | \n \n |
\n
\n\n",
+ "Closing HTML shell fragment — appended after every HtmlBody before sending");
+
+ // ── CV match result email ──
+ Row("email.match.subject", "en",
+ "MyAi.ro CV Match: {{score}}% - {{jobLabel}}",
+ "Subject for the CV match result email",
+ op);
+
+ Row("email.match.subject", "ro",
+ "MyAi.ro Potrivire CV: {{score}}% - {{jobLabel}}",
+ "Subiect email rezultat potrivire CV",
+ op);
+
+ Row("email.match.body", "en",
+ "CV Match Report
" +
+ "" +
+ "" +
+ "| CV ID | " +
+ "{{cvDocumentId}} | " +
+ "
" +
+ "" +
+ "| Job | " +
+ "{{jobLabel}} | " +
+ "
" +
+ "" +
+ "| URL | " +
+ "{{jobUrl}} | " +
+ "
" +
+ "" +
+ "| Score | " +
+ "{{score}}% | " +
+ "
" +
+ "
" +
+ "Summary
" +
+ "{{summary}}
" +
+ "Strengths
{{strengths}}" +
+ "Gaps
{{gaps}}" +
+ "Recommendations
{{recommendations}}",
+ "Body for the CV match result email",
+ op);
+
+ Row("email.match.body", "ro",
+ "Raport Potrivire CV
" +
+ "" +
+ "" +
+ "| ID Document CV | " +
+ "{{cvDocumentId}} | " +
+ "
" +
+ "" +
+ "| Job | " +
+ "{{jobLabel}} | " +
+ "
" +
+ "" +
+ "| URL | " +
+ "{{jobUrl}} | " +
+ "
" +
+ "" +
+ "| Scor | " +
+ "{{score}}% | " +
+ "
" +
+ "
" +
+ "Rezumat
" +
+ "{{summary}}
" +
+ "Puncte forte
{{strengths}}" +
+ "Lipsuri
{{gaps}}" +
+ "Recomandări
{{recommendations}}",
+ "Corpul emailului pentru rezultatul potrivirii CV",
+ op);
+
+ Row("email.match.job-search-footer", "en",
+ "" +
+ "
" +
+ "Want to find matching jobs automatically? " +
+ "Start a job search →
" +
+ "Link valid for {{expiryDays}} days." +
+ "
" +
+ "
",
+ "Job search CTA appended to match result email",
+ op);
+
+ Row("email.match.job-search-footer", "ro",
+ "",
+ "CTA cautare joburi adaugat la emailul de potrivire CV",
+ op);
+
+ // ── Job search results email ──
+ Row("email.search-results.subject", "en",
+ "MyAi.ro: {{count}} jobs matching your CV",
+ "Subject for job search results email",
+ op);
+
+ Row("email.search-results.subject", "ro",
+ "MyAi.ro: {{count}} joburi potrivite CV-ului tau",
+ "Subiect email rezultate cautare joburi",
+ op);
+
+ Row("email.search-results.body", "en",
+ "Job Search Results
" +
+ "Found {{count}} matching job(s):
" +
+ "{{items}}",
+ "Body preamble for job search results email",
+ op);
+
+ Row("email.search-results.body", "ro",
+ "Rezultate Căutare Joburi
" +
+ "Am găsit {{count}} job(uri) potrivite:
" +
+ "{{items}}",
+ "Corpul emailului de rezultate cautare joburi",
+ op);
+
+ Row("email.search-results.empty", "en",
+ "" +
+ "
No matching jobs found
" +
+ "
Your job search completed but no matching jobs were found. Try again later or adjust your CV.
" +
+ "
",
+ "No results message for job search results email",
+ op);
+
+ Row("email.search-results.empty", "ro",
+ "" +
+ "
Niciun job potrivit găsit
" +
+ "
Căutarea s-a finalizat dar nu au fost găsite joburi potrivite. Încearcă mai târziu sau ajustează CV-ul.
" +
+ "
",
+ "Mesaj fara rezultate pentru emailul de cautare joburi",
+ op);
+ }
+ }
+}
diff --git a/Apis/email-api-data/Migrations/EmailApiDbContextModelSnapshot.cs b/Apis/email-api-data/Migrations/EmailApiDbContextModelSnapshot.cs
index 1f1a1f4..dfee958 100644
--- a/Apis/email-api-data/Migrations/EmailApiDbContextModelSnapshot.cs
+++ b/Apis/email-api-data/Migrations/EmailApiDbContextModelSnapshot.cs
@@ -1,4 +1,4 @@
-//
+//
using System;
using EmailApi.Data;
using Microsoft.EntityFrameworkCore;
diff --git a/Apis/email-api/email-api.csproj b/Apis/email-api/email-api.csproj
index 489268c..9717aac 100644
--- a/Apis/email-api/email-api.csproj
+++ b/Apis/email-api/email-api.csproj
@@ -10,6 +10,7 @@
+