//
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Models;
#nullable disable
namespace backend.Migrations
{
[DbContext(typeof(PortfolioPortalDbContext))]
[Migration("20230314000540_InitialCreate")]
partial class InitialCreate
{
///
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "7.0.3")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("Models.Auth", b =>
{
b.Property("AuthId")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("AuthId"));
b.Property("AuthLevelId")
.HasColumnType("int");
b.Property("UserId")
.HasColumnType("int");
b.HasKey("AuthId");
b.ToTable("Auths");
});
modelBuilder.Entity("Models.AuthLevel", b =>
{
b.Property("AuthLevelId")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("AuthLevelId"));
b.Property("AuthLevelAuthLevel")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("Description")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("AuthLevelId");
b.ToTable("AuthLevels");
});
modelBuilder.Entity("Models.Company", b =>
{
b.Property("CompanyId")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("CompanyId"));
b.Property("CompanyName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("Created")
.HasColumnType("datetimeoffset");
b.Property("LastLogin")
.HasColumnType("datetimeoffset");
b.Property("MainContact")
.HasColumnType("int");
b.Property("State")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("Updated")
.HasColumnType("datetimeoffset");
b.HasKey("CompanyId");
b.ToTable("Companies");
});
modelBuilder.Entity("Models.LeafHeader", b =>
{
b.Property("LeafHeaderId")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("LeafHeaderId"));
b.Property("Active")
.HasColumnType("bit");
b.Property("Created")
.HasColumnType("datetimeoffset");
b.Property("HeaderRegex")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("LeafHeaderLeafHeader")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("LeafHeaderRequired")
.HasColumnType("bit");
b.Property("Nullable")
.HasColumnType("bit");
b.Property("ValueRegex")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("Version")
.HasColumnType("int");
b.HasKey("LeafHeaderId");
b.ToTable("LeafHeaders");
});
modelBuilder.Entity("Models.Portfolio", b =>
{
b.Property("PortfolioID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("PortfolioID"));
b.Property("CompanyID")
.HasColumnType("smallint");
b.Property("NumContracts")
.HasColumnType("smallint");
b.Property("UploadUser")
.HasColumnType("smallint");
b.Property("Uploaded")
.HasColumnType("datetimeoffset");
b.Property("Value")
.HasColumnType("decimal(18,2)");
b.HasKey("PortfolioID");
b.ToTable("Portfolios");
});
modelBuilder.Entity("Models.PortfolioData", b =>
{
b.Property("PortfolioDataID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("PortfolioDataID"));
b.Property("AdditionalData")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("AssetDescription")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("AssetEquipmentAddress1")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("AssetEquipmentAddress2")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("AssetEquipmentCity")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("AssetEquipmentState")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("AssetEquipmentZip")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("AssetType")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("Assumption")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("Bankruptcy")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("BusinessType")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("CGAddress1")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("CGAddress2")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("CGCity")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("CGName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("CGState")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("CGZip")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("CSC")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("CommencementDate")
.HasColumnType("datetime2");
b.Property("ContractNumber")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("CustomerBillingCity")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("CustomerBillingState")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("CustomerBillingStreet")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("CustomerBillingZip")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("CustomerName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("CustomerNumber")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("CustomerPhoneNumber")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("CustomerPhysicalAddress1")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("CustomerPhysicalAddress2")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("CustomerPhysicalCity")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("CustomerPhysicalState")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("CustomerPhysicalZip")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("CustomerTaxID")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("DBAName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("DOB")
.HasColumnType("datetime2");
b.Property("DateBooked")
.HasColumnType("datetime2");
b.Property("Dateincomesuspended")
.HasColumnType("datetime2");
b.Property("DaysDelinquent")
.HasColumnType("smallint");
b.Property("DirectInDirectChannel")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("FinancedAmount")
.HasColumnType("decimal(18,2)");
b.Property("LastPaymentDate")
.HasColumnType("datetime2");
b.Property("MaturityDate")
.HasColumnType("datetime2");
b.Property("NPV")
.HasColumnType("decimal(18,2)");
b.Property("NextDue")
.HasColumnType("datetime2");
b.Property("NextDueDate")
.HasColumnType("datetime2");
b.Property("NumDays")
.HasColumnType("smallint");
b.Property("PG1FICO")
.HasColumnType("smallint");
b.Property("PG2Address1")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("PG2Address2")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("PG2City")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("PG2DOB")
.HasColumnType("datetime2");
b.Property("PG2FICO")
.HasColumnType("smallint");
b.Property("PG2Name")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("PG2SSN")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("PG2State")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("PG2Zip")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("PGAddress1")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("PGAddress2")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("PGCity")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("PGName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("PGSSN")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("PGState")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("PGZip")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("PaidThruDate")
.HasColumnType("datetime2");
b.Property("PaymentAmount")
.HasColumnType("decimal(18,2)");
b.Property("PaymentType")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("PerDiem")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("PortfolioID")
.HasColumnType("int");
b.Property("Receivablebalance")
.HasColumnType("decimal(18,2)");
b.Property("RemainingMonthsCash")
.HasColumnType("smallint");
b.Property("ResidualAmount")
.HasColumnType("real");
b.Property("ResidualTypeTo")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("Resturcture")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("SICCode")
.HasColumnType("smallint");
b.Property("ScheduleNumber")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("SecurityDeposit")
.HasColumnType("decimal(18,2)");
b.Property("SerialNumberVIN")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("Term")
.HasColumnType("tinyint");
b.Property("TerminationDate")
.HasColumnType("datetime2");
b.Property("Times30DaysDelinq")
.HasColumnType("smallint");
b.Property("Times60DaysDelinq")
.HasColumnType("smallint");
b.Property("Times90PlusDaysDelinq")
.HasColumnType("smallint");
b.Property("TotalNetFunding")
.HasColumnType("decimal(18,2)");
b.Property("Vendorname")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("YearsinBusiness")
.HasColumnType("smallint");
b.HasKey("PortfolioDataID");
b.ToTable("PortfolioData");
});
modelBuilder.Entity("Models.User", b =>
{
b.Property("UserId")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UserId"));
b.Property("CompanyId")
.HasColumnType("int");
b.Property("Created")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("Email")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("LastLogin")
.HasColumnType("datetimeoffset");
b.Property("PasswordHash")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("PasswordUpdated")
.HasColumnType("datetimeoffset");
b.Property("Updated")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("Username")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("UserId");
b.ToTable("Users");
});
#pragma warning restore 612, 618
}
}
}