//
using System;
using BusinessERP.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace BusinessERP.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
[Migration("20221101191211_InitialCreate")]
partial class InitialCreate
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "6.0.8")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
modelBuilder.Entity("BusinessERP.Models.ApplicationUser", b =>
{
b.Property("Id")
.HasColumnType("nvarchar(450)");
b.Property("AccessFailedCount")
.HasColumnType("int");
b.Property("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnType("nvarchar(max)");
b.Property("Email")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.Property("EmailConfirmed")
.HasColumnType("bit");
b.Property("LockoutEnabled")
.HasColumnType("bit");
b.Property("LockoutEnd")
.HasColumnType("datetimeoffset");
b.Property("NormalizedEmail")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.Property("NormalizedUserName")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.Property("PasswordHash")
.HasColumnType("nvarchar(max)");
b.Property("PhoneNumber")
.HasColumnType("nvarchar(max)");
b.Property("PhoneNumberConfirmed")
.HasColumnType("bit");
b.Property("SecurityStamp")
.HasColumnType("nvarchar(max)");
b.Property("TwoFactorEnabled")
.HasColumnType("bit");
b.Property("UserName")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.HasKey("Id");
b.HasIndex("NormalizedEmail")
.HasDatabaseName("EmailIndex");
b.HasIndex("NormalizedUserName")
.IsUnique()
.HasDatabaseName("UserNameIndex")
.HasFilter("[NormalizedUserName] IS NOT NULL");
b.ToTable("AspNetUsers", (string)null);
});
modelBuilder.Entity("BusinessERP.Models.Attendance", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1);
b.Property("Cancelled")
.HasColumnType("bit");
b.Property("CheckIn")
.HasColumnType("datetime2");
b.Property("CheckOut")
.HasColumnType("datetime2");
b.Property("CreatedBy")
.HasColumnType("nvarchar(max)");
b.Property("CreatedDate")
.HasColumnType("datetime2");
b.Property("EmployeeId")
.HasColumnType("bigint");
b.Property("ModifiedBy")
.HasColumnType("nvarchar(max)");
b.Property("ModifiedDate")
.HasColumnType("datetime2");
b.Property("StayTime")
.HasColumnType("time");
b.HasKey("Id");
b.ToTable("Attendance");
});
modelBuilder.Entity("BusinessERP.Models.AuditLogs", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1);
b.Property("AffectedColumns")
.HasColumnType("nvarchar(max)");
b.Property("DateTime")
.HasColumnType("datetime2");
b.Property("NewValues")
.HasColumnType("nvarchar(max)");
b.Property("OldValues")
.HasColumnType("nvarchar(max)");
b.Property("PrimaryKey")
.HasColumnType("nvarchar(max)");
b.Property("TableName")
.HasColumnType("nvarchar(max)");
b.Property("Type")
.HasColumnType("nvarchar(max)");
b.Property("UserId")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("AuditLogs");
});
modelBuilder.Entity("BusinessERP.Models.Branch", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1);
b.Property("Address")
.HasColumnType("nvarchar(max)");
b.Property("Cancelled")
.HasColumnType("bit");
b.Property("ContactPerson")
.HasColumnType("nvarchar(max)");
b.Property("CreatedBy")
.HasColumnType("nvarchar(max)");
b.Property("CreatedDate")
.HasColumnType("datetime2");
b.Property("ModifiedBy")
.HasColumnType("nvarchar(max)");
b.Property("ModifiedDate")
.HasColumnType("datetime2");
b.Property("Name")
.HasColumnType("nvarchar(max)");
b.Property("PhoneNumber")
.HasColumnType("nvarchar(max)");
b.Property("ShortDescription")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("Branch");
});
modelBuilder.Entity("BusinessERP.Models.Categories", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1);
b.Property("Cancelled")
.HasColumnType("bit");
b.Property("CreatedBy")
.HasColumnType("nvarchar(max)");
b.Property("CreatedDate")
.HasColumnType("datetime2");
b.Property("Description")
.HasColumnType("nvarchar(max)");
b.Property("ModifiedBy")
.HasColumnType("nvarchar(max)");
b.Property("ModifiedDate")
.HasColumnType("datetime2");
b.Property("Name")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("Categories");
});
modelBuilder.Entity("BusinessERP.Models.CommonViewModel.ItemDropdownListViewModel", b =>
{
b.Property("Id")
.HasColumnType("bigint");
b.Property("Name")
.HasColumnType("nvarchar(max)");
b.ToTable("ItemDropdownListViewModel");
});
modelBuilder.Entity("BusinessERP.Models.CompanyInfo", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1);
b.Property("Address")
.HasColumnType("nvarchar(max)");
b.Property("Cancelled")
.HasColumnType("bit");
b.Property("CardPercentage")
.HasColumnType("nvarchar(max)");
b.Property("City")
.HasColumnType("nvarchar(max)");
b.Property("CompanyNumber")
.HasColumnType("nvarchar(max)");
b.Property("Country")
.HasColumnType("nvarchar(max)");
b.Property("CreatedBy")
.HasColumnType("nvarchar(max)");
b.Property("CreatedDate")
.HasColumnType("datetime2");
b.Property("Email")
.HasColumnType("nvarchar(max)");
b.Property("Fax")
.HasColumnType("nvarchar(max)");
b.Property("HostName")
.HasColumnType("nvarchar(max)");
b.Property("InvoiceNoPrefix")
.HasColumnType("nvarchar(max)");
b.Property("IsVat")
.HasColumnType("bit");
b.Property("Logo")
.HasColumnType("nvarchar(max)");
b.Property("Mobile")
.HasColumnType("nvarchar(max)");
b.Property("ModifiedBy")
.HasColumnType("nvarchar(max)");
b.Property("ModifiedDate")
.HasColumnType("datetime2");
b.Property("Name")
.HasColumnType("nvarchar(max)");
b.Property("Office")
.HasColumnType("nvarchar(max)");
b.Property("Password")
.HasColumnType("nvarchar(max)");
b.Property("Phone")
.HasColumnType("nvarchar(max)");
b.Property("PostCode")
.HasColumnType("nvarchar(max)");
b.Property("QuoteNoPrefix")
.HasColumnType("nvarchar(max)");
b.Property("ShopNo")
.HasColumnType("nvarchar(max)");
b.Property("StreetName")
.HasColumnType("nvarchar(max)");
b.Property("TermsAndCondition")
.HasColumnType("nvarchar(max)");
b.Property("TermsAndConditionItemSale")
.HasColumnType("nvarchar(max)");
b.Property("VatNumber")
.HasColumnType("nvarchar(max)");
b.Property("Website")
.HasColumnType("nvarchar(max)");
b.Property("WhitelistIP")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("CompanyInfo");
});
modelBuilder.Entity("BusinessERP.Models.Currency", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1);
b.Property("Cancelled")
.HasColumnType("bit");
b.Property("Code")
.HasColumnType("nvarchar(max)");
b.Property("Country")
.HasColumnType("nvarchar(max)");
b.Property("CreatedBy")
.HasColumnType("nvarchar(max)");
b.Property("CreatedDate")
.HasColumnType("datetime2");
b.Property("Description")
.HasColumnType("nvarchar(max)");
b.Property("IsDefault")
.HasColumnType("bit");
b.Property("ModifiedBy")
.HasColumnType("nvarchar(max)");
b.Property("ModifiedDate")
.HasColumnType("datetime2");
b.Property("Name")
.HasColumnType("nvarchar(max)");
b.Property("Symbol")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("Currency");
});
modelBuilder.Entity("BusinessERP.Models.CustomerInfo", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1);
b.Property("AccountNo")
.HasColumnType("nvarchar(max)");
b.Property("Address")
.HasColumnType("nvarchar(max)");
b.Property("AddressPostcode")
.HasColumnType("nvarchar(max)");
b.Property("BillingAddress")
.HasColumnType("nvarchar(max)");
b.Property("BillingAddressPostcode")
.HasColumnType("nvarchar(max)");
b.Property("Cancelled")
.HasColumnType("bit");
b.Property("CompanyName")
.HasColumnType("nvarchar(max)");
b.Property("CreatedBy")
.HasColumnType("nvarchar(max)");
b.Property("CreatedDate")
.HasColumnType("datetime2");
b.Property("Email")
.HasColumnType("nvarchar(max)");
b.Property("ModifiedBy")
.HasColumnType("nvarchar(max)");
b.Property("ModifiedDate")
.HasColumnType("datetime2");
b.Property("Name")
.HasColumnType("nvarchar(max)");
b.Property("Notes")
.HasColumnType("nvarchar(max)");
b.Property("Phone")
.HasColumnType("nvarchar(max)");
b.Property("Type")
.HasColumnType("bigint");
b.HasKey("Id");
b.ToTable("CustomerInfo");
});
modelBuilder.Entity("BusinessERP.Models.CustomerType", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1);
b.Property("Cancelled")
.HasColumnType("bit");
b.Property("CreatedBy")
.HasColumnType("nvarchar(max)");
b.Property("CreatedDate")
.HasColumnType("datetime2");
b.Property("Description")
.HasColumnType("nvarchar(max)");
b.Property("ModifiedBy")
.HasColumnType("nvarchar(max)");
b.Property("ModifiedDate")
.HasColumnType("datetime2");
b.Property("Name")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("CustomerType");
});
modelBuilder.Entity("BusinessERP.Models.DamageItemDeatils", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1);
b.Property("Cancelled")
.HasColumnType("bit");
b.Property("CreatedBy")
.HasColumnType("nvarchar(max)");
b.Property("CreatedDate")
.HasColumnType("datetime2");
b.Property("ItemId")
.HasColumnType("bigint");
b.Property("ModifiedBy")
.HasColumnType("nvarchar(max)");
b.Property("ModifiedDate")
.HasColumnType("datetime2");
b.Property("ReasonOfDamage")
.HasColumnType("nvarchar(max)");
b.Property("TotalDamageItem")
.HasColumnType("int");
b.HasKey("Id");
b.ToTable("DamageItemDeatils");
});
modelBuilder.Entity("BusinessERP.Models.DefaultIdentityOptions", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1);
b.Property("AccessDeniedPath")
.HasColumnType("nvarchar(max)");
b.Property("Cancelled")
.HasColumnType("bit");
b.Property("CookieExpiration")
.HasColumnType("float");
b.Property("CookieExpireTimeSpan")
.HasColumnType("float");
b.Property("CookieHttpOnly")
.HasColumnType("bit");
b.Property("CreatedBy")
.HasColumnType("nvarchar(max)");
b.Property("CreatedDate")
.HasColumnType("datetime2");
b.Property("LockoutAllowedForNewUsers")
.HasColumnType("bit");
b.Property("LockoutDefaultLockoutTimeSpanInMinutes")
.HasColumnType("float");
b.Property("LockoutMaxFailedAccessAttempts")
.HasColumnType("int");
b.Property("LoginPath")
.HasColumnType("nvarchar(max)");
b.Property("LogoutPath")
.HasColumnType("nvarchar(max)");
b.Property("ModifiedBy")
.HasColumnType("nvarchar(max)");
b.Property("ModifiedDate")
.HasColumnType("datetime2");
b.Property("PasswordRequireDigit")
.HasColumnType("bit");
b.Property("PasswordRequireLowercase")
.HasColumnType("bit");
b.Property("PasswordRequireNonAlphanumeric")
.HasColumnType("bit");
b.Property("PasswordRequireUppercase")
.HasColumnType("bit");
b.Property("PasswordRequiredLength")
.HasColumnType("int");
b.Property("PasswordRequiredUniqueChars")
.HasColumnType("int");
b.Property("SignInRequireConfirmedEmail")
.HasColumnType("bit");
b.Property("SlidingExpiration")
.HasColumnType("bit");
b.Property("UserRequireUniqueEmail")
.HasColumnType("bit");
b.HasKey("Id");
b.ToTable("DefaultIdentityOptions");
});
modelBuilder.Entity("BusinessERP.Models.Department", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1);
b.Property("Cancelled")
.HasColumnType("bit");
b.Property("CreatedBy")
.HasColumnType("nvarchar(max)");
b.Property("CreatedDate")
.HasColumnType("datetime2");
b.Property("Description")
.HasColumnType("nvarchar(max)");
b.Property("ModifiedBy")
.HasColumnType("nvarchar(max)");
b.Property("ModifiedDate")
.HasColumnType("datetime2");
b.Property("Name")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("Department");
});
modelBuilder.Entity("BusinessERP.Models.Designation", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1);
b.Property("Cancelled")
.HasColumnType("bit");
b.Property("CreatedBy")
.HasColumnType("nvarchar(max)");
b.Property("CreatedDate")
.HasColumnType("datetime2");
b.Property("Description")
.HasColumnType("nvarchar(max)");
b.Property("ModifiedBy")
.HasColumnType("nvarchar(max)");
b.Property("ModifiedDate")
.HasColumnType("datetime2");
b.Property("Name")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("Designation");
});
modelBuilder.Entity("BusinessERP.Models.EmailConfig", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1);
b.Property("Cancelled")
.HasColumnType("bit");
b.Property("CreatedBy")
.HasColumnType("nvarchar(max)");
b.Property("CreatedDate")
.HasColumnType("datetime2");
b.Property("Email")
.HasColumnType("nvarchar(max)");
b.Property("Hostname")
.HasColumnType("nvarchar(max)");
b.Property("IsDefault")
.HasColumnType("bit");
b.Property("ModifiedBy")
.HasColumnType("nvarchar(max)");
b.Property("ModifiedDate")
.HasColumnType("datetime2");
b.Property("Password")
.HasColumnType("nvarchar(max)");
b.Property("Port")
.HasColumnType("int");
b.Property("SSLEnabled")
.HasColumnType("bit");
b.Property("SenderFullName")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("EmailConfig");
});
modelBuilder.Entity("BusinessERP.Models.Employee", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1);
b.Property("Address")
.HasColumnType("nvarchar(max)");
b.Property("Cancelled")
.HasColumnType("bit");
b.Property("CreatedBy")
.HasColumnType("nvarchar(max)");
b.Property("CreatedDate")
.HasColumnType("datetime2");
b.Property("DateOfBirth")
.HasColumnType("datetime2");
b.Property("Department")
.HasColumnType("int");
b.Property("Designation")
.HasColumnType("int");
b.Property("Email")
.HasColumnType("nvarchar(max)");
b.Property("EmployeeId")
.HasColumnType("nvarchar(max)");
b.Property("FirstName")
.HasColumnType("nvarchar(max)");
b.Property("JoiningDate")
.HasColumnType("datetime2");
b.Property("LastName")
.HasColumnType("nvarchar(max)");
b.Property("LeavingDate")
.HasColumnType("datetime2");
b.Property("ModifiedBy")
.HasColumnType("nvarchar(max)");
b.Property("ModifiedDate")
.HasColumnType("datetime2");
b.Property("Phone")
.HasColumnType("nvarchar(max)");
b.Property("SubDepartment")
.HasColumnType("int");
b.HasKey("Id");
b.ToTable("Employee");
});
modelBuilder.Entity("BusinessERP.Models.ExpenseDetails", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1);
b.Property("Cancelled")
.HasColumnType("bit");
b.Property("CreatedBy")
.HasColumnType("nvarchar(max)");
b.Property("CreatedDate")
.HasColumnType("datetime2");
b.Property("Description")
.HasColumnType("nvarchar(max)");
b.Property("ExpenseSummaryId")
.HasColumnType("bigint");
b.Property("ExpenseType")
.HasColumnType("nvarchar(max)");
b.Property("ExpenseTypeId")
.HasColumnType("bigint");
b.Property("ModifiedBy")
.HasColumnType("nvarchar(max)");
b.Property("ModifiedDate")
.HasColumnType("datetime2");
b.Property("Quantity")
.HasColumnType("int");
b.Property("TotalPrice")
.HasColumnType("float");
b.Property("UnitPrice")
.HasColumnType("float");
b.HasKey("Id");
b.ToTable("ExpenseDetails");
});
modelBuilder.Entity("BusinessERP.Models.ExpenseSummary", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1);
b.Property("Action")
.HasColumnType("int");
b.Property("BranchId")
.HasColumnType("bigint");
b.Property("Cancelled")
.HasColumnType("bit");
b.Property("ChangeAmount")
.HasColumnType("float");
b.Property("CreatedBy")
.HasColumnType("nvarchar(max)");
b.Property("CreatedDate")
.HasColumnType("datetime2");
b.Property("CurrencyCode")
.HasColumnType("bigint");
b.Property("DueAmount")
.HasColumnType("float");
b.Property("GrandTotal")
.HasColumnType("float");
b.Property("ModifiedBy")
.HasColumnType("nvarchar(max)");
b.Property("ModifiedDate")
.HasColumnType("datetime2");
b.Property("PaidAmount")
.HasColumnType("float");
b.Property("Title")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("ExpenseSummary");
});
modelBuilder.Entity("BusinessERP.Models.ExpenseType", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1);
b.Property("Cancelled")
.HasColumnType("bit");
b.Property("CreatedBy")
.HasColumnType("nvarchar(max)");
b.Property("CreatedDate")
.HasColumnType("datetime2");
b.Property("Description")
.HasColumnType("nvarchar(max)");
b.Property("ModifiedBy")
.HasColumnType("nvarchar(max)");
b.Property("ModifiedDate")
.HasColumnType("datetime2");
b.Property