using CvMatcher.Data;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace CvMatcher.Data.Migrations
{
    /// <inheritdoc />
    public partial class AddParseErrorPrompts : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.InsertData(
                schema: MigrationConstants.SchemaName,
                table: "AiPrompts",
                columns: ["Key", "Language", "Value", "Description"],
                values: ["parse-error.summary", "en", "The AI response could not be parsed. Please try again.", "Summary shown in match email when the AI returns an unparseable response"]);

            migrationBuilder.InsertData(
                schema: MigrationConstants.SchemaName,
                table: "AiPrompts",
                columns: ["Key", "Language", "Value", "Description"],
                values: ["parse-error.summary", "ro", "Răspunsul AI nu a putut fi interpretat. Vă rugăm să încercați din nou.", "Sumar afișat în emailul de potrivire când AI returnează un răspuns care nu poate fi interpretat"]);

            migrationBuilder.InsertData(
                schema: MigrationConstants.SchemaName,
                table: "AiPrompts",
                columns: ["Key", "Language", "Value", "Description"],
                values: ["parse-error.recommendation", "en", "If the problem persists, try a different job link or description.", "Recommendation shown in match email when the AI returns an unparseable response"]);

            migrationBuilder.InsertData(
                schema: MigrationConstants.SchemaName,
                table: "AiPrompts",
                columns: ["Key", "Language", "Value", "Description"],
                values: ["parse-error.recommendation", "ro", "Dacă problema persistă, încercați un alt link sau descriere de job.", "Recomandare afișată în emailul de potrivire când AI returnează un răspuns care nu poate fi interpretat"]);
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DeleteData(
                schema: MigrationConstants.SchemaName,
                table: "AiPrompts",
                keyColumns: ["Key", "Language"],
                keyValues: ["parse-error.summary", "en"]);

            migrationBuilder.DeleteData(
                schema: MigrationConstants.SchemaName,
                table: "AiPrompts",
                keyColumns: ["Key", "Language"],
                keyValues: ["parse-error.summary", "ro"]);

            migrationBuilder.DeleteData(
                schema: MigrationConstants.SchemaName,
                table: "AiPrompts",
                keyColumns: ["Key", "Language"],
                keyValues: ["parse-error.recommendation", "en"]);

            migrationBuilder.DeleteData(
                schema: MigrationConstants.SchemaName,
                table: "AiPrompts",
                keyColumns: ["Key", "Language"],
                keyValues: ["parse-error.recommendation", "ro"]);
        }
    }
}
