// <auto-generated />
using System;
using Imprink.Infrastructure.Database;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;

#nullable disable

namespace Imprink.Infrastructure.Migrations
{
    [DbContext(typeof(ApplicationDbContext))]
    [Migration("20250625211612_InitialSetup")]
    partial class InitialSetup
    {
        /// <inheritdoc />
        protected override void BuildTargetModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder
                .HasAnnotation("ProductVersion", "9.0.5")
                .HasAnnotation("Relational:MaxIdentifierLength", 128);

            SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);

            modelBuilder.Entity("Imprink.Domain.Entities.Address", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier")
                        .HasDefaultValueSql("NEWID()");

                    b.Property<string>("AddressLine1")
                        .IsRequired()
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("AddressLine2")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("AddressType")
                        .IsRequired()
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("ApartmentNumber")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<string>("BuildingNumber")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<string>("City")
                        .IsRequired()
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("Company")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("Country")
                        .IsRequired()
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<DateTime?>("CreatedAt")
                        .HasColumnType("datetime2");

                    b.Property<string>("CreatedBy")
                        .HasMaxLength(450)
                        .HasColumnType("nvarchar(450)");

                    b.Property<string>("FirstName")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("Floor")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<string>("Instructions")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<bool>("IsActive")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("bit")
                        .HasDefaultValue(true);

                    b.Property<bool>("IsDefault")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("bit")
                        .HasDefaultValue(false);

                    b.Property<string>("LastName")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<DateTime?>("ModifiedAt")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("datetime2")
                        .HasDefaultValueSql("GETUTCDATE()");

                    b.Property<string>("ModifiedBy")
                        .HasMaxLength(450)
                        .HasColumnType("nvarchar(450)");

                    b.Property<string>("PhoneNumber")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<string>("PostalCode")
                        .IsRequired()
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<string>("State")
                        .IsRequired()
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("UserId")
                        .IsRequired()
                        .HasMaxLength(450)
                        .HasColumnType("nvarchar(450)");

                    b.HasKey("Id");

                    b.HasIndex("CreatedAt")
                        .HasDatabaseName("IX_Address_CreatedAt");

                    b.HasIndex("CreatedBy")
                        .HasDatabaseName("IX_Address_CreatedBy");

                    b.HasIndex("ModifiedAt")
                        .HasDatabaseName("IX_Address_ModifiedAt");

                    b.HasIndex("UserId")
                        .HasDatabaseName("IX_Address_UserId");

                    b.HasIndex("UserId", "AddressType")
                        .HasDatabaseName("IX_Address_User_Type");

                    b.HasIndex("UserId", "IsDefault")
                        .HasDatabaseName("IX_Address_User_Default");

                    b.ToTable("Addresses");
                });

            modelBuilder.Entity("Imprink.Domain.Entities.Category", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier")
                        .HasDefaultValueSql("NEWID()");

                    b.Property<DateTime?>("CreatedAt")
                        .HasColumnType("datetime2");

                    b.Property<string>("CreatedBy")
                        .HasMaxLength(450)
                        .HasColumnType("nvarchar(450)");

                    b.Property<string>("Description")
                        .IsRequired()
                        .HasMaxLength(2000)
                        .HasColumnType("nvarchar(2000)");

                    b.Property<string>("ImageUrl")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<bool>("IsActive")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("bit")
                        .HasDefaultValue(true);

                    b.Property<DateTime?>("ModifiedAt")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("datetime2")
                        .HasDefaultValueSql("GETUTCDATE()");

                    b.Property<string>("ModifiedBy")
                        .HasMaxLength(450)
                        .HasColumnType("nvarchar(450)");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<Guid?>("ParentCategoryId")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("SortOrder")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasDefaultValue(0);

                    b.HasKey("Id");

                    b.HasIndex("CreatedAt")
                        .HasDatabaseName("IX_Category_CreatedAt");

                    b.HasIndex("CreatedBy")
                        .HasDatabaseName("IX_Category_CreatedBy");

                    b.HasIndex("IsActive")
                        .HasDatabaseName("IX_Category_IsActive");

                    b.HasIndex("ModifiedAt")
                        .HasDatabaseName("IX_Category_ModifiedAt");

                    b.HasIndex("Name")
                        .HasDatabaseName("IX_Category_Name");

                    b.HasIndex("ParentCategoryId")
                        .HasDatabaseName("IX_Category_ParentCategoryId");

                    b.HasIndex("IsActive", "SortOrder")
                        .HasDatabaseName("IX_Category_Active_SortOrder");

                    b.HasIndex("ParentCategoryId", "SortOrder")
                        .HasDatabaseName("IX_Category_Parent_SortOrder");

                    b.ToTable("Categories");

                    b.HasData(
                        new
                        {
                            Id = new Guid("11111111-1111-1111-1111-111111111111"),
                            CreatedAt = new DateTime(2025, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc),
                            CreatedBy = "system@printbase.com",
                            Description = "Textile and fabric-based products",
                            IsActive = true,
                            ModifiedAt = new DateTime(2025, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc),
                            ModifiedBy = "system@printbase.com",
                            Name = "Textile",
                            SortOrder = 1
                        },
                        new
                        {
                            Id = new Guid("22222222-2222-2222-2222-222222222222"),
                            CreatedAt = new DateTime(2025, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc),
                            CreatedBy = "system@printbase.com",
                            Description = "Products for hard surface printing",
                            IsActive = true,
                            ModifiedAt = new DateTime(2025, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc),
                            ModifiedBy = "system@printbase.com",
                            Name = "Hard Surfaces",
                            SortOrder = 2
                        },
                        new
                        {
                            Id = new Guid("33333333-3333-3333-3333-333333333333"),
                            CreatedAt = new DateTime(2025, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc),
                            CreatedBy = "system@printbase.com",
                            Description = "Paper-based printing products",
                            IsActive = true,
                            ModifiedAt = new DateTime(2025, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc),
                            ModifiedBy = "system@printbase.com",
                            Name = "Paper",
                            SortOrder = 3
                        });
                });

            modelBuilder.Entity("Imprink.Domain.Entities.Order", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier")
                        .HasDefaultValueSql("NEWID()");

                    b.Property<decimal>("Amount")
                        .HasColumnType("decimal(18,2)");

                    b.Property<DateTime?>("CreatedAt")
                        .HasColumnType("datetime2");

                    b.Property<string>("CreatedBy")
                        .HasMaxLength(450)
                        .HasColumnType("nvarchar(450)");

                    b.Property<string>("CustomizationDescription")
                        .HasMaxLength(2000)
                        .HasColumnType("nvarchar(2000)");

                    b.Property<string>("CustomizationImageUrl")
                        .HasMaxLength(1000)
                        .HasColumnType("nvarchar(1000)");

                    b.Property<string>("MerchantId")
                        .HasMaxLength(450)
                        .HasColumnType("nvarchar(450)");

                    b.Property<DateTime?>("ModifiedAt")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("datetime2")
                        .HasDefaultValueSql("GETUTCDATE()");

                    b.Property<string>("ModifiedBy")
                        .HasMaxLength(450)
                        .HasColumnType("nvarchar(450)");

                    b.Property<string>("Notes")
                        .HasMaxLength(1000)
                        .HasColumnType("nvarchar(1000)");

                    b.Property<DateTime>("OrderDate")
                        .HasColumnType("datetime2");

                    b.Property<int>("OrderStatusId")
                        .HasColumnType("int");

                    b.Property<string>("OriginalImageUrls")
                        .IsRequired()
                        .HasColumnType("nvarchar(max)");

                    b.Property<Guid>("ProductId")
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid?>("ProductVariantId")
                        .HasColumnType("uniqueidentifier");

                    b.Property<int>("Quantity")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasDefaultValue(1);

                    b.Property<int>("ShippingStatusId")
                        .HasColumnType("int");

                    b.Property<string>("UserId")
                        .IsRequired()
                        .HasMaxLength(450)
                        .HasColumnType("nvarchar(450)");

                    b.HasKey("Id");

                    b.HasIndex("CreatedAt")
                        .HasDatabaseName("IX_Order_CreatedAt");

                    b.HasIndex("CreatedBy")
                        .HasDatabaseName("IX_Order_CreatedBy");

                    b.HasIndex("MerchantId")
                        .HasDatabaseName("IX_Order_MerchantId");

                    b.HasIndex("ModifiedAt")
                        .HasDatabaseName("IX_Order_ModifiedAt");

                    b.HasIndex("OrderDate")
                        .HasDatabaseName("IX_Order_OrderDate");

                    b.HasIndex("OrderStatusId")
                        .HasDatabaseName("IX_Order_OrderStatusId");

                    b.HasIndex("ProductId")
                        .HasDatabaseName("IX_Order_ProductId");

                    b.HasIndex("ProductVariantId")
                        .HasDatabaseName("IX_Order_ProductVariantId");

                    b.HasIndex("ShippingStatusId")
                        .HasDatabaseName("IX_Order_ShippingStatusId");

                    b.HasIndex("UserId")
                        .HasDatabaseName("IX_Order_UserId");

                    b.HasIndex("MerchantId", "OrderDate")
                        .HasDatabaseName("IX_Order_Merchant_Date");

                    b.HasIndex("ProductId", "OrderDate")
                        .HasDatabaseName("IX_Order_Product_Date");

                    b.HasIndex("UserId", "OrderDate")
                        .HasDatabaseName("IX_Order_User_Date");

                    b.ToTable("Orders");
                });

            modelBuilder.Entity("Imprink.Domain.Entities.OrderAddress", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier")
                        .HasDefaultValueSql("NEWID()");

                    b.Property<string>("AddressLine1")
                        .IsRequired()
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("AddressLine2")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("AddressType")
                        .IsRequired()
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("ApartmentNumber")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<string>("BuildingNumber")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<string>("City")
                        .IsRequired()
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("Company")
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.Property<string>("Country")
                        .IsRequired()
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<DateTime?>("CreatedAt")
                        .HasColumnType("datetime2");

                    b.Property<string>("CreatedBy")
                        .HasMaxLength(450)
                        .HasColumnType("nvarchar(450)");

                    b.Property<string>("FirstName")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("Floor")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<string>("Instructions")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<string>("LastName")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<DateTime?>("ModifiedAt")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("datetime2")
                        .HasDefaultValueSql("GETUTCDATE()");

                    b.Property<string>("ModifiedBy")
                        .HasMaxLength(450)
                        .HasColumnType("nvarchar(450)");

                    b.Property<Guid>("OrderId")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("PhoneNumber")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<string>("PostalCode")
                        .IsRequired()
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.Property<string>("State")
                        .IsRequired()
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.HasKey("Id");

                    b.HasIndex("CreatedAt")
                        .HasDatabaseName("IX_OrderAddress_CreatedAt");

                    b.HasIndex("CreatedBy")
                        .HasDatabaseName("IX_OrderAddress_CreatedBy");

                    b.HasIndex("ModifiedAt")
                        .HasDatabaseName("IX_OrderAddress_ModifiedAt");

                    b.HasIndex("OrderId")
                        .IsUnique()
                        .HasDatabaseName("IX_OrderAddress_OrderId");

                    b.ToTable("OrderAddresses");
                });

            modelBuilder.Entity("Imprink.Domain.Entities.OrderStatus", b =>
                {
                    b.Property<int>("Id")
                        .HasColumnType("int");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.HasKey("Id");

                    b.HasIndex("Name")
                        .IsUnique()
                        .HasDatabaseName("IX_OrderStatus_Name");

                    b.ToTable("OrderStatuses");

                    b.HasData(
                        new
                        {
                            Id = 0,
                            Name = "Pending"
                        },
                        new
                        {
                            Id = 1,
                            Name = "Processing"
                        },
                        new
                        {
                            Id = 2,
                            Name = "Completed"
                        },
                        new
                        {
                            Id = 3,
                            Name = "Cancelled"
                        });
                });

            modelBuilder.Entity("Imprink.Domain.Entities.Product", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier")
                        .HasDefaultValueSql("NEWID()");

                    b.Property<decimal>("BasePrice")
                        .HasColumnType("decimal(18,2)");

                    b.Property<Guid?>("CategoryId")
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime?>("CreatedAt")
                        .HasColumnType("datetime2");

                    b.Property<string>("CreatedBy")
                        .HasMaxLength(450)
                        .HasColumnType("nvarchar(450)");

                    b.Property<string>("Description")
                        .HasMaxLength(2000)
                        .HasColumnType("nvarchar(2000)");

                    b.Property<string>("ImageUrl")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<bool>("IsActive")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("bit")
                        .HasDefaultValue(true);

                    b.Property<bool>("IsCustomizable")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("bit")
                        .HasDefaultValue(false);

                    b.Property<DateTime?>("ModifiedAt")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("datetime2")
                        .HasDefaultValueSql("GETUTCDATE()");

                    b.Property<string>("ModifiedBy")
                        .HasMaxLength(450)
                        .HasColumnType("nvarchar(450)");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasMaxLength(200)
                        .HasColumnType("nvarchar(200)");

                    b.HasKey("Id");

                    b.HasIndex("CategoryId")
                        .HasDatabaseName("IX_Product_CategoryId");

                    b.HasIndex("CreatedAt")
                        .HasDatabaseName("IX_Product_CreatedAt");

                    b.HasIndex("CreatedBy")
                        .HasDatabaseName("IX_Product_CreatedBy");

                    b.HasIndex("IsActive")
                        .HasDatabaseName("IX_Product_IsActive");

                    b.HasIndex("IsCustomizable")
                        .HasDatabaseName("IX_Product_IsCustomizable");

                    b.HasIndex("ModifiedAt")
                        .HasDatabaseName("IX_Product_ModifiedAt");

                    b.HasIndex("Name")
                        .HasDatabaseName("IX_Product_Name");

                    b.HasIndex("CategoryId", "IsActive")
                        .HasDatabaseName("IX_Product_Category_Active");

                    b.HasIndex("IsActive", "IsCustomizable")
                        .HasDatabaseName("IX_Product_Active_Customizable");

                    b.ToTable("Products");
                });

            modelBuilder.Entity("Imprink.Domain.Entities.ProductVariant", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier")
                        .HasDefaultValueSql("NEWID()");

                    b.Property<string>("Color")
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<DateTime?>("CreatedAt")
                        .HasColumnType("datetime2");

                    b.Property<string>("CreatedBy")
                        .HasMaxLength(450)
                        .HasColumnType("nvarchar(450)");

                    b.Property<string>("ImageUrl")
                        .HasMaxLength(500)
                        .HasColumnType("nvarchar(500)");

                    b.Property<bool>("IsActive")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("bit")
                        .HasDefaultValue(true);

                    b.Property<DateTime?>("ModifiedAt")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("datetime2")
                        .HasDefaultValueSql("GETUTCDATE()");

                    b.Property<string>("ModifiedBy")
                        .HasMaxLength(450)
                        .HasColumnType("nvarchar(450)");

                    b.Property<decimal>("Price")
                        .HasColumnType("decimal(18,2)");

                    b.Property<Guid>("ProductId")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("Size")
                        .IsRequired()
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.Property<string>("Sku")
                        .IsRequired()
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<int>("StockQuantity")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasDefaultValue(0);

                    b.HasKey("Id");

                    b.HasIndex("CreatedAt")
                        .HasDatabaseName("IX_ProductVariant_CreatedAt");

                    b.HasIndex("CreatedBy")
                        .HasDatabaseName("IX_ProductVariant_CreatedBy");

                    b.HasIndex("IsActive")
                        .HasDatabaseName("IX_ProductVariant_IsActive");

                    b.HasIndex("ModifiedAt")
                        .HasDatabaseName("IX_ProductVariant_ModifiedAt");

                    b.HasIndex("ProductId")
                        .HasDatabaseName("IX_ProductVariant_ProductId");

                    b.HasIndex("Sku")
                        .IsUnique()
                        .HasDatabaseName("IX_ProductVariant_SKU");

                    b.HasIndex("ProductId", "Size", "Color")
                        .IsUnique()
                        .HasDatabaseName("IX_ProductVariant_Product_Size_Color")
                        .HasFilter("[Color] IS NOT NULL");

                    b.ToTable("ProductVariants");
                });

            modelBuilder.Entity("Imprink.Domain.Entities.Role", b =>
                {
                    b.Property<Guid>("Id")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("RoleName")
                        .IsRequired()
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.HasKey("Id");

                    b.HasIndex("RoleName")
                        .IsUnique()
                        .HasDatabaseName("IX_Role_RoleName");

                    b.ToTable("Roles");

                    b.HasData(
                        new
                        {
                            Id = new Guid("22222222-2222-2222-2222-222222222222"),
                            RoleName = "Merchant"
                        },
                        new
                        {
                            Id = new Guid("33333333-3333-3333-3333-333333333333"),
                            RoleName = "Admin"
                        });
                });

            modelBuilder.Entity("Imprink.Domain.Entities.ShippingStatus", b =>
                {
                    b.Property<int>("Id")
                        .HasColumnType("int");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasMaxLength(50)
                        .HasColumnType("nvarchar(50)");

                    b.HasKey("Id");

                    b.HasIndex("Name")
                        .IsUnique()
                        .HasDatabaseName("IX_ShippingStatus_Name");

                    b.ToTable("ShippingStatuses");

                    b.HasData(
                        new
                        {
                            Id = 0,
                            Name = "Prepping"
                        },
                        new
                        {
                            Id = 1,
                            Name = "Packaging"
                        },
                        new
                        {
                            Id = 2,
                            Name = "Shipped"
                        },
                        new
                        {
                            Id = 3,
                            Name = "Delivered"
                        });
                });

            modelBuilder.Entity("Imprink.Domain.Entities.User", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(450)
                        .HasColumnType("nvarchar(450)");

                    b.Property<string>("Email")
                        .IsRequired()
                        .HasMaxLength(256)
                        .HasColumnType("nvarchar(256)");

                    b.Property<bool>("EmailVerified")
                        .HasColumnType("bit");

                    b.Property<string>("FirstName")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<bool>("IsActive")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("bit")
                        .HasDefaultValue(true);

                    b.Property<string>("LastName")
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("Nickname")
                        .IsRequired()
                        .HasMaxLength(100)
                        .HasColumnType("nvarchar(100)");

                    b.Property<string>("PhoneNumber")
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)");

                    b.HasKey("Id");

                    b.HasIndex("Email")
                        .IsUnique()
                        .HasDatabaseName("IX_User_Email");

                    b.HasIndex("IsActive")
                        .HasDatabaseName("IX_User_IsActive");

                    b.ToTable("Users");
                });

            modelBuilder.Entity("Imprink.Domain.Entities.UserRole", b =>
                {
                    b.Property<string>("UserId")
                        .HasMaxLength(450)
                        .HasColumnType("nvarchar(450)");

                    b.Property<Guid>("RoleId")
                        .HasColumnType("uniqueidentifier");

                    b.HasKey("UserId", "RoleId");

                    b.HasIndex("RoleId")
                        .HasDatabaseName("IX_UserRole_RoleId");

                    b.HasIndex("UserId")
                        .HasDatabaseName("IX_UserRole_UserId");

                    b.ToTable("UserRole");
                });

            modelBuilder.Entity("Imprink.Domain.Entities.Address", b =>
                {
                    b.HasOne("Imprink.Domain.Entities.User", "User")
                        .WithMany("Addresses")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("User");
                });

            modelBuilder.Entity("Imprink.Domain.Entities.Category", b =>
                {
                    b.HasOne("Imprink.Domain.Entities.Category", "ParentCategory")
                        .WithMany("SubCategories")
                        .HasForeignKey("ParentCategoryId")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.Navigation("ParentCategory");
                });

            modelBuilder.Entity("Imprink.Domain.Entities.Order", b =>
                {
                    b.HasOne("Imprink.Domain.Entities.User", "Merchant")
                        .WithMany("MerchantOrders")
                        .HasForeignKey("MerchantId")
                        .OnDelete(DeleteBehavior.SetNull);

                    b.HasOne("Imprink.Domain.Entities.OrderStatus", "OrderStatus")
                        .WithMany("Orders")
                        .HasForeignKey("OrderStatusId")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("Imprink.Domain.Entities.Product", "Product")
                        .WithMany("Orders")
                        .HasForeignKey("ProductId")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("Imprink.Domain.Entities.ProductVariant", "ProductVariant")
                        .WithMany("Orders")
                        .HasForeignKey("ProductVariantId")
                        .OnDelete(DeleteBehavior.Restrict);

                    b.HasOne("Imprink.Domain.Entities.ShippingStatus", "ShippingStatus")
                        .WithMany("Orders")
                        .HasForeignKey("ShippingStatusId")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("Imprink.Domain.Entities.User", "User")
                        .WithMany("Orders")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Merchant");

                    b.Navigation("OrderStatus");

                    b.Navigation("Product");

                    b.Navigation("ProductVariant");

                    b.Navigation("ShippingStatus");

                    b.Navigation("User");
                });

            modelBuilder.Entity("Imprink.Domain.Entities.OrderAddress", b =>
                {
                    b.HasOne("Imprink.Domain.Entities.Order", "Order")
                        .WithOne("OrderAddress")
                        .HasForeignKey("Imprink.Domain.Entities.OrderAddress", "OrderId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Order");
                });

            modelBuilder.Entity("Imprink.Domain.Entities.Product", b =>
                {
                    b.HasOne("Imprink.Domain.Entities.Category", "Category")
                        .WithMany("Products")
                        .HasForeignKey("CategoryId")
                        .OnDelete(DeleteBehavior.SetNull);

                    b.Navigation("Category");
                });

            modelBuilder.Entity("Imprink.Domain.Entities.ProductVariant", b =>
                {
                    b.HasOne("Imprink.Domain.Entities.Product", "Product")
                        .WithMany("ProductVariants")
                        .HasForeignKey("ProductId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Product");
                });

            modelBuilder.Entity("Imprink.Domain.Entities.UserRole", b =>
                {
                    b.HasOne("Imprink.Domain.Entities.Role", "Role")
                        .WithMany("UserRoles")
                        .HasForeignKey("RoleId")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.HasOne("Imprink.Domain.Entities.User", "User")
                        .WithMany("UserRoles")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Role");

                    b.Navigation("User");
                });

            modelBuilder.Entity("Imprink.Domain.Entities.Category", b =>
                {
                    b.Navigation("Products");

                    b.Navigation("SubCategories");
                });

            modelBuilder.Entity("Imprink.Domain.Entities.Order", b =>
                {
                    b.Navigation("OrderAddress")
                        .IsRequired();
                });

            modelBuilder.Entity("Imprink.Domain.Entities.OrderStatus", b =>
                {
                    b.Navigation("Orders");
                });

            modelBuilder.Entity("Imprink.Domain.Entities.Product", b =>
                {
                    b.Navigation("Orders");

                    b.Navigation("ProductVariants");
                });

            modelBuilder.Entity("Imprink.Domain.Entities.ProductVariant", b =>
                {
                    b.Navigation("Orders");
                });

            modelBuilder.Entity("Imprink.Domain.Entities.Role", b =>
                {
                    b.Navigation("UserRoles");
                });

            modelBuilder.Entity("Imprink.Domain.Entities.ShippingStatus", b =>
                {
                    b.Navigation("Orders");
                });

            modelBuilder.Entity("Imprink.Domain.Entities.User", b =>
                {
                    b.Navigation("Addresses");

                    b.Navigation("MerchantOrders");

                    b.Navigation("Orders");

                    b.Navigation("UserRoles");
                });
#pragma warning restore 612, 618
        }
    }
}
