using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Meezi.Infrastructure.Data.Migrations
{
    /// <inheritdoc />
    public partial class AddPrinterSettings : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<bool>(
                name: "AutoCutEnabled",
                table: "Branches",
                type: "boolean",
                nullable: false,
                defaultValue: false);

            migrationBuilder.AddColumn<string>(
                name: "KitchenPrinterIp",
                table: "Branches",
                type: "character varying(45)",
                maxLength: 45,
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "KitchenPrinterPort",
                table: "Branches",
                type: "integer",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "PaperWidthMm",
                table: "Branches",
                type: "integer",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<string>(
                name: "ReceiptFooter",
                table: "Branches",
                type: "character varying(500)",
                maxLength: 500,
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "ReceiptHeader",
                table: "Branches",
                type: "character varying(500)",
                maxLength: 500,
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "ReceiptPrinterIp",
                table: "Branches",
                type: "character varying(45)",
                maxLength: 45,
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "ReceiptPrinterPort",
                table: "Branches",
                type: "integer",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "WifiPassword",
                table: "Branches",
                type: "character varying(100)",
                maxLength: 100,
                nullable: true);
        }

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

            migrationBuilder.DropColumn(
                name: "KitchenPrinterIp",
                table: "Branches");

            migrationBuilder.DropColumn(
                name: "KitchenPrinterPort",
                table: "Branches");

            migrationBuilder.DropColumn(
                name: "PaperWidthMm",
                table: "Branches");

            migrationBuilder.DropColumn(
                name: "ReceiptFooter",
                table: "Branches");

            migrationBuilder.DropColumn(
                name: "ReceiptHeader",
                table: "Branches");

            migrationBuilder.DropColumn(
                name: "ReceiptPrinterIp",
                table: "Branches");

            migrationBuilder.DropColumn(
                name: "ReceiptPrinterPort",
                table: "Branches");

            migrationBuilder.DropColumn(
                name: "WifiPassword",
                table: "Branches");
        }
    }
}
