using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace PowderCoating.Infrastructure.Migrations
{
    /// <inheritdoc />
    public partial class AddJobIntakeFields : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<string>(
                name: "IntakeCheckedByUserId",
                table: "Jobs",
                type: "nvarchar(450)",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "IntakeConditionNotes",
                table: "Jobs",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<DateTime>(
                name: "IntakeDate",
                table: "Jobs",
                type: "datetime2",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "IntakePartCount",
                table: "Jobs",
                type: "int",
                nullable: true);

            migrationBuilder.UpdateData(
                table: "PricingTiers",
                keyColumn: "Id",
                keyValue: 1,
                column: "CreatedAt",
                value: new DateTime(2026, 4, 8, 20, 53, 42, 294, DateTimeKind.Utc).AddTicks(7842));

            migrationBuilder.UpdateData(
                table: "PricingTiers",
                keyColumn: "Id",
                keyValue: 2,
                column: "CreatedAt",
                value: new DateTime(2026, 4, 8, 20, 53, 42, 294, DateTimeKind.Utc).AddTicks(7847));

            migrationBuilder.UpdateData(
                table: "PricingTiers",
                keyColumn: "Id",
                keyValue: 3,
                column: "CreatedAt",
                value: new DateTime(2026, 4, 8, 20, 53, 42, 294, DateTimeKind.Utc).AddTicks(7849));

            migrationBuilder.CreateIndex(
                name: "IX_Jobs_IntakeCheckedByUserId",
                table: "Jobs",
                column: "IntakeCheckedByUserId");

            migrationBuilder.AddForeignKey(
                name: "FK_Jobs_AspNetUsers_IntakeCheckedByUserId",
                table: "Jobs",
                column: "IntakeCheckedByUserId",
                principalTable: "AspNetUsers",
                principalColumn: "Id");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropForeignKey(
                name: "FK_Jobs_AspNetUsers_IntakeCheckedByUserId",
                table: "Jobs");

            migrationBuilder.DropIndex(
                name: "IX_Jobs_IntakeCheckedByUserId",
                table: "Jobs");

            migrationBuilder.DropColumn(
                name: "IntakeCheckedByUserId",
                table: "Jobs");

            migrationBuilder.DropColumn(
                name: "IntakeConditionNotes",
                table: "Jobs");

            migrationBuilder.DropColumn(
                name: "IntakeDate",
                table: "Jobs");

            migrationBuilder.DropColumn(
                name: "IntakePartCount",
                table: "Jobs");

            migrationBuilder.UpdateData(
                table: "PricingTiers",
                keyColumn: "Id",
                keyValue: 1,
                column: "CreatedAt",
                value: new DateTime(2026, 4, 6, 19, 14, 56, 715, DateTimeKind.Utc).AddTicks(7942));

            migrationBuilder.UpdateData(
                table: "PricingTiers",
                keyColumn: "Id",
                keyValue: 2,
                column: "CreatedAt",
                value: new DateTime(2026, 4, 6, 19, 14, 56, 715, DateTimeKind.Utc).AddTicks(7953));

            migrationBuilder.UpdateData(
                table: "PricingTiers",
                keyColumn: "Id",
                keyValue: 3,
                column: "CreatedAt",
                value: new DateTime(2026, 4, 6, 19, 14, 56, 715, DateTimeKind.Utc).AddTicks(7955));
        }
    }
}
