using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace PowderCoating.Infrastructure.Migrations
{
    /// <inheritdoc />
    public partial class AddQuotePricingSnapshot : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<decimal>(
                name: "ItemsSubtotal",
                table: "Quotes",
                type: "decimal(18,2)",
                nullable: false,
                defaultValue: 0m);

            migrationBuilder.AddColumn<decimal>(
                name: "OvenBatchCost",
                table: "Quotes",
                type: "decimal(18,2)",
                nullable: false,
                defaultValue: 0m);

            migrationBuilder.AddColumn<decimal>(
                name: "OverheadAmount",
                table: "Quotes",
                type: "decimal(18,2)",
                nullable: false,
                defaultValue: 0m);

            migrationBuilder.AddColumn<decimal>(
                name: "OverheadPercent",
                table: "Quotes",
                type: "decimal(18,2)",
                nullable: false,
                defaultValue: 0m);

            migrationBuilder.AddColumn<decimal>(
                name: "ProfitMargin",
                table: "Quotes",
                type: "decimal(18,2)",
                nullable: false,
                defaultValue: 0m);

            migrationBuilder.AddColumn<decimal>(
                name: "ProfitPercent",
                table: "Quotes",
                type: "decimal(18,2)",
                nullable: false,
                defaultValue: 0m);

            migrationBuilder.AddColumn<decimal>(
                name: "ShopSuppliesAmount",
                table: "Quotes",
                type: "decimal(18,2)",
                nullable: false,
                defaultValue: 0m);

            migrationBuilder.AddColumn<decimal>(
                name: "ShopSuppliesPercent",
                table: "Quotes",
                type: "decimal(18,2)",
                nullable: false,
                defaultValue: 0m);

            migrationBuilder.UpdateData(
                table: "PricingTiers",
                keyColumn: "Id",
                keyValue: 1,
                column: "CreatedAt",
                value: new DateTime(2026, 3, 20, 1, 10, 54, 146, DateTimeKind.Utc).AddTicks(8159));

            migrationBuilder.UpdateData(
                table: "PricingTiers",
                keyColumn: "Id",
                keyValue: 2,
                column: "CreatedAt",
                value: new DateTime(2026, 3, 20, 1, 10, 54, 146, DateTimeKind.Utc).AddTicks(8166));

            migrationBuilder.UpdateData(
                table: "PricingTiers",
                keyColumn: "Id",
                keyValue: 3,
                column: "CreatedAt",
                value: new DateTime(2026, 3, 20, 1, 10, 54, 146, DateTimeKind.Utc).AddTicks(8176));
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "ItemsSubtotal",
                table: "Quotes");

            migrationBuilder.DropColumn(
                name: "OvenBatchCost",
                table: "Quotes");

            migrationBuilder.DropColumn(
                name: "OverheadAmount",
                table: "Quotes");

            migrationBuilder.DropColumn(
                name: "OverheadPercent",
                table: "Quotes");

            migrationBuilder.DropColumn(
                name: "ProfitMargin",
                table: "Quotes");

            migrationBuilder.DropColumn(
                name: "ProfitPercent",
                table: "Quotes");

            migrationBuilder.DropColumn(
                name: "ShopSuppliesAmount",
                table: "Quotes");

            migrationBuilder.DropColumn(
                name: "ShopSuppliesPercent",
                table: "Quotes");

            migrationBuilder.UpdateData(
                table: "PricingTiers",
                keyColumn: "Id",
                keyValue: 1,
                column: "CreatedAt",
                value: new DateTime(2026, 3, 20, 0, 51, 3, 242, DateTimeKind.Utc).AddTicks(3766));

            migrationBuilder.UpdateData(
                table: "PricingTiers",
                keyColumn: "Id",
                keyValue: 2,
                column: "CreatedAt",
                value: new DateTime(2026, 3, 20, 0, 51, 3, 242, DateTimeKind.Utc).AddTicks(3772));

            migrationBuilder.UpdateData(
                table: "PricingTiers",
                keyColumn: "Id",
                keyValue: 3,
                column: "CreatedAt",
                value: new DateTime(2026, 3, 20, 0, 51, 3, 242, DateTimeKind.Utc).AddTicks(3774));
        }
    }
}
