// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using SMS_MVCDTO.Context;

#nullable disable

namespace SMSMVCDTO.Migrations
{
    [DbContext(typeof(ApplicationContext))]
    [Migration("20230322112757_Wait")]
    partial class Wait
    {
        /// <inheritdoc />
        protected override void BuildTargetModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder
                .HasAnnotation("ProductVersion", "7.0.0")
                .HasAnnotation("Relational:MaxIdentifierLength", 64);

            modelBuilder.Entity("SMS_MVCDTO.Models.Entities.Address", b =>
                {
                    b.Property<string>("Id")
                        .HasColumnType("varchar(255)");

                    b.Property<string>("City")
                        .HasColumnType("longtext");

                    b.Property<string>("Country")
                        .HasColumnType("longtext");

                    b.Property<DateTime>("Created")
                        .HasColumnType("datetime(6)");

                    b.Property<bool>("IsDeleted")
                        .HasColumnType("tinyint(1)");

                    b.Property<DateTime>("Modified")
                        .HasColumnType("datetime(6)");

                    b.Property<string>("PostalCode")
                        .HasColumnType("longtext");

                    b.Property<string>("State")
                        .HasColumnType("longtext");

                    b.Property<string>("StreetName")
                        .HasColumnType("longtext");

                    b.Property<string>("UserId")
                        .HasColumnType("varchar(255)");

                    b.HasKey("Id");

                    b.HasIndex("UserId")
                        .IsUnique();

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

            modelBuilder.Entity("SMS_MVCDTO.Models.Entities.Attendant", b =>
                {
                    b.Property<string>("Id")
                        .HasColumnType("varchar(255)");

                    b.Property<string>("CVPath")
                        .HasColumnType("longtext");

                    b.Property<DateTime>("Created")
                        .HasColumnType("datetime(6)");

                    b.Property<DateTime>("DateOfBirth")
                        .HasColumnType("datetime(6)");

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

                    b.Property<string>("GuarantorName")
                        .HasColumnType("longtext");

                    b.Property<string>("GuarantorPhoneNumber")
                        .HasColumnType("longtext");

                    b.Property<bool>("IsDeleted")
                        .HasColumnType("tinyint(1)");

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

                    b.Property<DateTime>("Modified")
                        .HasColumnType("datetime(6)");

                    b.Property<string>("SalesManagerID")
                        .HasColumnType("varchar(255)");

                    b.Property<string>("UserId")
                        .HasColumnType("varchar(255)");

                    b.HasKey("Id");

                    b.HasIndex("SalesManagerID");

                    b.HasIndex("UserId")
                        .IsUnique();

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

            modelBuilder.Entity("SMS_MVCDTO.Models.Entities.AttendantCustomer", b =>
                {
                    b.Property<string>("Id")
                        .HasColumnType("varchar(255)");

                    b.Property<string>("AttendantId")
                        .HasColumnType("varchar(255)");

                    b.Property<DateTime>("Created")
                        .HasColumnType("datetime(6)");

                    b.Property<string>("CustomerId")
                        .HasColumnType("varchar(255)");

                    b.Property<bool>("IsDeleted")
                        .HasColumnType("tinyint(1)");

                    b.Property<DateTime>("Modified")
                        .HasColumnType("datetime(6)");

                    b.HasKey("Id");

                    b.HasIndex("AttendantId");

                    b.HasIndex("CustomerId");

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

            modelBuilder.Entity("SMS_MVCDTO.Models.Entities.BankDetail", b =>
                {
                    b.Property<string>("Id")
                        .HasColumnType("varchar(255)");

                    b.Property<string>("AccountType")
                        .HasColumnType("longtext");

                    b.Property<string>("BankAccountNumber")
                        .HasColumnType("longtext");

                    b.Property<string>("BankName")
                        .HasColumnType("longtext");

                    b.Property<DateTime>("Created")
                        .HasColumnType("datetime(6)");

                    b.Property<bool>("IsDeleted")
                        .HasColumnType("tinyint(1)");

                    b.Property<DateTime>("Modified")
                        .HasColumnType("datetime(6)");

                    b.Property<string>("UserId")
                        .HasColumnType("varchar(255)");

                    b.HasKey("Id");

                    b.HasIndex("UserId")
                        .IsUnique();

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

            modelBuilder.Entity("SMS_MVCDTO.Models.Entities.Cart", b =>
                {
                    b.Property<string>("Id")
                        .HasColumnType("varchar(255)");

                    b.Property<DateTime>("Created")
                        .HasColumnType("datetime(6)");

                    b.Property<string>("CustomerId")
                        .HasColumnType("varchar(255)");

                    b.Property<bool>("IsDeleted")
                        .HasColumnType("tinyint(1)");

                    b.Property<bool>("IsPaid")
                        .HasColumnType("tinyint(1)");

                    b.Property<DateTime>("Modified")
                        .HasColumnType("datetime(6)");

                    b.Property<string>("ProductId")
                        .HasColumnType("varchar(255)");

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

                    b.Property<string>("TransactionId")
                        .HasColumnType("varchar(255)");

                    b.HasKey("Id");

                    b.HasIndex("CustomerId");

                    b.HasIndex("ProductId")
                        .IsUnique();

                    b.HasIndex("TransactionId");

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

            modelBuilder.Entity("SMS_MVCDTO.Models.Entities.Customer", b =>
                {
                    b.Property<string>("Id")
                        .HasColumnType("varchar(255)");

                    b.Property<DateTime>("Created")
                        .HasColumnType("datetime(6)");

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

                    b.Property<bool>("IsDeleted")
                        .HasColumnType("tinyint(1)");

                    b.Property<DateTime>("Modified")
                        .HasColumnType("datetime(6)");

                    b.Property<string>("UserId")
                        .HasColumnType("varchar(255)");

                    b.HasKey("Id");

                    b.HasIndex("UserId")
                        .IsUnique();

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

            modelBuilder.Entity("SMS_MVCDTO.Models.Entities.Product", b =>
                {
                    b.Property<string>("Id")
                        .HasColumnType("varchar(255)");

                    b.Property<string>("Barcode")
                        .HasColumnType("longtext");

                    b.Property<DateTime>("Created")
                        .HasColumnType("datetime(6)");

                    b.Property<string>("Description")
                        .HasColumnType("longtext");

                    b.Property<bool>("IsAvailable")
                        .HasColumnType("tinyint(1)");

                    b.Property<bool>("IsDeleted")
                        .HasColumnType("tinyint(1)");

                    b.Property<DateTime>("Modified")
                        .HasColumnType("datetime(6)");

                    b.Property<string>("Name")
                        .HasColumnType("longtext");

                    b.Property<string>("PicturPath")
                        .HasColumnType("longtext");

                    b.Property<string>("ProductCategoryId")
                        .HasColumnType("varchar(255)");

                    b.Property<double>("Quantity")
                        .HasColumnType("double");

                    b.Property<double>("ReorderLevel")
                        .HasColumnType("double");

                    b.Property<double>("SellingPrice")
                        .HasColumnType("double");

                    b.HasKey("Id");

                    b.HasIndex("ProductCategoryId");

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

            modelBuilder.Entity("SMS_MVCDTO.Models.Entities.ProductCategory", b =>
                {
                    b.Property<string>("Id")
                        .HasColumnType("varchar(255)");

                    b.Property<string>("CategoryCode")
                        .HasColumnType("longtext");

                    b.Property<DateTime>("Created")
                        .HasColumnType("datetime(6)");

                    b.Property<string>("Description")
                        .HasColumnType("longtext");

                    b.Property<bool>("IsActive")
                        .HasColumnType("tinyint(1)");

                    b.Property<bool>("IsDeleted")
                        .HasColumnType("tinyint(1)");

                    b.Property<DateTime>("Modified")
                        .HasColumnType("datetime(6)");

                    b.Property<string>("Name")
                        .HasColumnType("longtext");

                    b.HasKey("Id");

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

            modelBuilder.Entity("SMS_MVCDTO.Models.Entities.Role", b =>
                {
                    b.Property<string>("Id")
                        .HasColumnType("varchar(255)");

                    b.Property<DateTime>("Created")
                        .HasColumnType("datetime(6)");

                    b.Property<bool>("IsDeleted")
                        .HasColumnType("tinyint(1)");

                    b.Property<DateTime>("Modified")
                        .HasColumnType("datetime(6)");

                    b.Property<string>("RoleDescription")
                        .HasColumnType("longtext");

                    b.Property<string>("RoleName")
                        .HasColumnType("longtext");

                    b.HasKey("Id");

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

            modelBuilder.Entity("SMS_MVCDTO.Models.Entities.SalesManager", b =>
                {
                    b.Property<string>("Id")
                        .HasColumnType("varchar(255)");

                    b.Property<string>("CVPath")
                        .HasColumnType("longtext");

                    b.Property<DateTime>("Created")
                        .HasColumnType("datetime(6)");

                    b.Property<DateTime>("DateOfBirth")
                        .HasColumnType("datetime(6)");

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

                    b.Property<string>("GuarantorName")
                        .HasColumnType("longtext");

                    b.Property<string>("GuarantorPhoneNumber")
                        .HasColumnType("longtext");

                    b.Property<bool>("IsDeleted")
                        .HasColumnType("tinyint(1)");

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

                    b.Property<DateTime>("Modified")
                        .HasColumnType("datetime(6)");

                    b.Property<string>("UserId")
                        .HasColumnType("varchar(255)");

                    b.HasKey("Id");

                    b.HasIndex("UserId")
                        .IsUnique();

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

            modelBuilder.Entity("SMS_MVCDTO.Models.Entities.SuperAdmin", b =>
                {
                    b.Property<string>("Id")
                        .HasColumnType("varchar(255)");

                    b.Property<DateTime>("Created")
                        .HasColumnType("datetime(6)");

                    b.Property<DateTime>("DateOfBirth")
                        .HasColumnType("datetime(6)");

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

                    b.Property<bool>("IsDeleted")
                        .HasColumnType("tinyint(1)");

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

                    b.Property<DateTime>("Modified")
                        .HasColumnType("datetime(6)");

                    b.Property<string>("UserId")
                        .HasColumnType("varchar(255)");

                    b.HasKey("Id");

                    b.HasIndex("UserId")
                        .IsUnique();

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

            modelBuilder.Entity("SMS_MVCDTO.Models.Entities.Transaction", b =>
                {
                    b.Property<string>("Id")
                        .HasColumnType("varchar(255)");

                    b.Property<double>("AmountPaid")
                        .HasColumnType("double");

                    b.Property<string>("AttendantId")
                        .HasColumnType("varchar(255)");

                    b.Property<DateTime>("Created")
                        .HasColumnType("datetime(6)");

                    b.Property<string>("CustomerId")
                        .HasColumnType("varchar(255)");

                    b.Property<bool>("IsDeleted")
                        .HasColumnType("tinyint(1)");

                    b.Property<DateTime>("Modified")
                        .HasColumnType("datetime(6)");

                    b.Property<string>("ReferenceNo")
                        .HasColumnType("longtext");

                    b.Property<double>("TotalAmount")
                        .HasColumnType("double");

                    b.HasKey("Id");

                    b.HasIndex("AttendantId");

                    b.HasIndex("CustomerId");

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

            modelBuilder.Entity("SMS_MVCDTO.Models.Entities.User", b =>
                {
                    b.Property<string>("Id")
                        .HasColumnType("varchar(255)");

                    b.Property<DateTime>("Created")
                        .HasColumnType("datetime(6)");

                    b.Property<string>("Email")
                        .HasColumnType("longtext");

                    b.Property<string>("FirstName")
                        .HasColumnType("longtext");

                    b.Property<bool>("IsActive")
                        .HasColumnType("tinyint(1)");

                    b.Property<bool>("IsDeleted")
                        .HasColumnType("tinyint(1)");

                    b.Property<string>("LastName")
                        .HasColumnType("longtext");

                    b.Property<DateTime>("Modified")
                        .HasColumnType("datetime(6)");

                    b.Property<string>("Password")
                        .HasColumnType("longtext");

                    b.Property<string>("PasswordResetToken")
                        .HasColumnType("longtext");

                    b.Property<string>("PhoneNumber")
                        .HasColumnType("longtext");

                    b.Property<byte[]>("ProfilePicture")
                        .HasColumnType("longblob");

                    b.Property<string>("RoleId")
                        .HasColumnType("varchar(255)");

                    b.Property<string>("StaffId")
                        .HasColumnType("longtext");

                    b.HasKey("Id");

                    b.HasIndex("RoleId");

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

            modelBuilder.Entity("SMS_MVCDTO.Models.Entities.Wallet", b =>
                {
                    b.Property<string>("Id")
                        .HasColumnType("varchar(255)");

                    b.Property<double>("Balance")
                        .HasColumnType("double");

                    b.Property<DateTime>("Created")
                        .HasColumnType("datetime(6)");

                    b.Property<double>("Credit")
                        .HasColumnType("double");

                    b.Property<double>("Debit")
                        .HasColumnType("double");

                    b.Property<bool>("IsDeleted")
                        .HasColumnType("tinyint(1)");

                    b.Property<DateTime>("Modified")
                        .HasColumnType("datetime(6)");

                    b.HasKey("Id");

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

            modelBuilder.Entity("SMS_MVCDTO.Models.Entities.Address", b =>
                {
                    b.HasOne("SMS_MVCDTO.Models.Entities.User", "User")
                        .WithOne("Address")
                        .HasForeignKey("SMS_MVCDTO.Models.Entities.Address", "UserId");

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

            modelBuilder.Entity("SMS_MVCDTO.Models.Entities.Attendant", b =>
                {
                    b.HasOne("SMS_MVCDTO.Models.Entities.SalesManager", "SalesManager")
                        .WithMany("Attendants")
                        .HasForeignKey("SalesManagerID");

                    b.HasOne("SMS_MVCDTO.Models.Entities.User", "User")
                        .WithOne("Attendant")
                        .HasForeignKey("SMS_MVCDTO.Models.Entities.Attendant", "UserId");

                    b.Navigation("SalesManager");

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

            modelBuilder.Entity("SMS_MVCDTO.Models.Entities.AttendantCustomer", b =>
                {
                    b.HasOne("SMS_MVCDTO.Models.Entities.Attendant", "Attendant")
                        .WithMany("AttendantCustomers")
                        .HasForeignKey("AttendantId");

                    b.HasOne("SMS_MVCDTO.Models.Entities.Customer", "Customer")
                        .WithMany("AttendantCustomers")
                        .HasForeignKey("CustomerId");

                    b.Navigation("Attendant");

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

            modelBuilder.Entity("SMS_MVCDTO.Models.Entities.BankDetail", b =>
                {
                    b.HasOne("SMS_MVCDTO.Models.Entities.User", "User")
                        .WithOne("BankDetail")
                        .HasForeignKey("SMS_MVCDTO.Models.Entities.BankDetail", "UserId");

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

            modelBuilder.Entity("SMS_MVCDTO.Models.Entities.Cart", b =>
                {
                    b.HasOne("SMS_MVCDTO.Models.Entities.Customer", "Customer")
                        .WithMany("Carts")
                        .HasForeignKey("CustomerId");

                    b.HasOne("SMS_MVCDTO.Models.Entities.Product", "Product")
                        .WithOne("Cart")
                        .HasForeignKey("SMS_MVCDTO.Models.Entities.Cart", "ProductId");

                    b.HasOne("SMS_MVCDTO.Models.Entities.Transaction", "Transaction")
                        .WithMany("Carts")
                        .HasForeignKey("TransactionId");

                    b.Navigation("Customer");

                    b.Navigation("Product");

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

            modelBuilder.Entity("SMS_MVCDTO.Models.Entities.Customer", b =>
                {
                    b.HasOne("SMS_MVCDTO.Models.Entities.User", "User")
                        .WithOne("Customer")
                        .HasForeignKey("SMS_MVCDTO.Models.Entities.Customer", "UserId");

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

            modelBuilder.Entity("SMS_MVCDTO.Models.Entities.Product", b =>
                {
                    b.HasOne("SMS_MVCDTO.Models.Entities.ProductCategory", "ProductCategory")
                        .WithMany("Products")
                        .HasForeignKey("ProductCategoryId");

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

            modelBuilder.Entity("SMS_MVCDTO.Models.Entities.SalesManager", b =>
                {
                    b.HasOne("SMS_MVCDTO.Models.Entities.User", "User")
                        .WithOne("SalesManager")
                        .HasForeignKey("SMS_MVCDTO.Models.Entities.SalesManager", "UserId");

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

            modelBuilder.Entity("SMS_MVCDTO.Models.Entities.SuperAdmin", b =>
                {
                    b.HasOne("SMS_MVCDTO.Models.Entities.User", "User")
                        .WithOne("SuperAdmin")
                        .HasForeignKey("SMS_MVCDTO.Models.Entities.SuperAdmin", "UserId");

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

            modelBuilder.Entity("SMS_MVCDTO.Models.Entities.Transaction", b =>
                {
                    b.HasOne("SMS_MVCDTO.Models.Entities.Attendant", "Attendant")
                        .WithMany("Transaction")
                        .HasForeignKey("AttendantId");

                    b.HasOne("SMS_MVCDTO.Models.Entities.Customer", "Customer")
                        .WithMany("Transactions")
                        .HasForeignKey("CustomerId");

                    b.Navigation("Attendant");

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

            modelBuilder.Entity("SMS_MVCDTO.Models.Entities.User", b =>
                {
                    b.HasOne("SMS_MVCDTO.Models.Entities.Role", "Role")
                        .WithMany("Users")
                        .HasForeignKey("RoleId");

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

            modelBuilder.Entity("SMS_MVCDTO.Models.Entities.Attendant", b =>
                {
                    b.Navigation("AttendantCustomers");

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

            modelBuilder.Entity("SMS_MVCDTO.Models.Entities.Customer", b =>
                {
                    b.Navigation("AttendantCustomers");

                    b.Navigation("Carts");

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

            modelBuilder.Entity("SMS_MVCDTO.Models.Entities.Product", b =>
                {
                    b.Navigation("Cart");
                });

            modelBuilder.Entity("SMS_MVCDTO.Models.Entities.ProductCategory", b =>
                {
                    b.Navigation("Products");
                });

            modelBuilder.Entity("SMS_MVCDTO.Models.Entities.Role", b =>
                {
                    b.Navigation("Users");
                });

            modelBuilder.Entity("SMS_MVCDTO.Models.Entities.SalesManager", b =>
                {
                    b.Navigation("Attendants");
                });

            modelBuilder.Entity("SMS_MVCDTO.Models.Entities.Transaction", b =>
                {
                    b.Navigation("Carts");
                });

            modelBuilder.Entity("SMS_MVCDTO.Models.Entities.User", b =>
                {
                    b.Navigation("Address");

                    b.Navigation("Attendant");

                    b.Navigation("BankDetail");

                    b.Navigation("Customer");

                    b.Navigation("SalesManager");

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