//
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using PartSource.Data.Contexts;
using System;
namespace PartSource.Data.Migrations
{
[DbContext(typeof(PartSourceContext))]
[Migration("20190811020941_ImportDateDcfMapping")]
partial class ImportDateDcfMapping
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "2.2.2-servicing-10034")
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("PartSource.Data.Models.ApiClient", b =>
{
b.Property("Key")
.ValueGeneratedOnAdd();
b.Property("Active");
b.Property("AppName");
b.Property("Secret");
b.HasKey("Key");
b.ToTable("ApiClient");
});
modelBuilder.Entity("PartSource.Data.Models.BaseVehicle", b =>
{
b.Property("Id");
b.Property("VehicleMakeId");
b.Property("VehicleModelId");
b.Property("Year");
b.HasKey("Id");
b.ToTable("BaseVehicle","Vehicle");
});
modelBuilder.Entity("PartSource.Data.Models.DcfMapping", b =>
{
b.Property("LineCode");
b.Property("WhiCode");
b.HasKey("LineCode", "WhiCode");
b.ToTable("DcfMapping");
});
modelBuilder.Entity("PartSource.Data.Models.Fitment", b =>
{
b.Property("FitmentId")
.ValueGeneratedOnAdd()
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property("BaseVehicleId");
b.Property("EngineConfigId");
b.Property("ManufacturerCode");
b.Property("NoteText");
b.Property("PartLabel");
b.Property("PartNumber");
b.Property("Position");
b.HasKey("FitmentId");
b.ToTable("Fitment");
});
modelBuilder.Entity("PartSource.Data.Models.ImportData", b =>
{
b.Property("VariantSku")
.ValueGeneratedOnAdd();
b.Property("BodyHtml");
b.Property("CompareAt");
b.Property("ImageAltText");
b.Property("ImageSrc");
b.Property("IsFitment");
b.Property("IsVariant");
b.Property("LineCode");
b.Property("PartNumber");
b.Property("Price");
b.Property("ShopifyId");
b.Property("Title");
b.Property("VariantTitle");
b.Property("Vendor");
b.HasKey("VariantSku");
b.ToTable("ImportData");
});
modelBuilder.Entity("PartSource.Data.Models.ImportMetric", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property("ChangedItems");
b.Property("ImportDate");
b.Property("TotalItems");
b.HasKey("Id");
b.ToTable("ImportMetric");
});
modelBuilder.Entity("PartSource.Data.Models.Manufacturer", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property("LineCode");
b.Property("Name");
b.HasKey("Id");
b.ToTable("Manufacturer");
});
modelBuilder.Entity("PartSource.Data.Models.Part", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property("Description");
b.Property("ManufacturerId");
b.Property("Name");
b.Property("PartNumber");
b.Property("ShopifyId");
b.Property("Sku");
b.HasKey("Id");
b.HasIndex("ManufacturerId");
b.ToTable("Part");
});
modelBuilder.Entity("PartSource.Data.Models.PartData", b =>
{
b.Property("SKU")
.ValueGeneratedOnAdd()
.HasMaxLength(255);
b.Property("BRAND_NM")
.HasMaxLength(255);
b.Property("CATEGORY_NM")
.HasMaxLength(255);
b.Property("CORPORATE_STATUS_NM")
.HasMaxLength(255);
b.Property("Compare_Price")
.HasColumnName("Compare Price")
.HasColumnType("money");
b.Property("FAMILY_FEATURES_BENEFITS1")
.HasMaxLength(255);
b.Property("FAMILY_FEATURES_BENEFITS10")
.HasMaxLength(255);
b.Property("FAMILY_FEATURES_BENEFITS11")
.HasMaxLength(255);
b.Property("FAMILY_FEATURES_BENEFITS12")
.HasMaxLength(255);
b.Property("FAMILY_FEATURES_BENEFITS13")
.HasMaxLength(255);
b.Property("FAMILY_FEATURES_BENEFITS14")
.HasMaxLength(255);
b.Property("FAMILY_FEATURES_BENEFITS2")
.HasMaxLength(255);
b.Property("FAMILY_FEATURES_BENEFITS3")
.HasMaxLength(255);
b.Property("FAMILY_FEATURES_BENEFITS4")
.HasMaxLength(255);
b.Property("FAMILY_FEATURES_BENEFITS5")
.HasMaxLength(255);
b.Property("FAMILY_FEATURES_BENEFITS6")
.HasMaxLength(255);
b.Property("FAMILY_FEATURES_BENEFITS7")
.HasMaxLength(255);
b.Property("FAMILY_FEATURES_BENEFITS8")
.HasMaxLength(255);
b.Property("FAMILY_FEATURES_BENEFITS9")
.HasMaxLength(255);
b.Property("FINELINE_NM")
.HasMaxLength(255);
b.Property("IsFitment");
b.Property("LOB_NM")
.HasMaxLength(255);
b.Property("Line_Code")
.HasColumnName("Line Code")
.HasMaxLength(255);
b.Property("PRODUCT_ENGLISH_LONG_DESC")
.HasMaxLength(255);
b.Property("Part_Number")
.HasColumnName("Part Number")
.HasMaxLength(255);
b.Property("Published");
b.Property("SUBCATEGORY_NM")
.HasMaxLength(255);
b.Property("Tested")
.HasMaxLength(255);
b.Property("Title");
b.Property("VariantTitle");
b.Property("Your_Price")
.HasColumnName("Your Price")
.HasColumnType("money");
b.HasKey("SKU");
b.ToTable("PartData");
});
modelBuilder.Entity("PartSource.Data.Models.PartImage", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property("Sku");
b.Property("Url");
b.HasKey("Id");
b.ToTable("PartImage");
});
modelBuilder.Entity("PartSource.Data.Models.PartPrice", b =>
{
b.Property("SKU")
.ValueGeneratedOnAdd();
b.Property("Active");
b.Property("Compare_Price");
b.Property("Your_Price");
b.HasKey("SKU");
b.ToTable("PartPrice");
});
modelBuilder.Entity("PartSource.Data.Models.PartsAvailability", b =>
{
b.Property("Store");
b.Property("SKU");
b.Property("Line_Code")
.HasColumnName("Line Code")
.HasMaxLength(50);
b.Property("Part_Number")
.HasColumnName("Part Number")
.HasMaxLength(50);
b.Property("QTY");
b.HasKey("Store", "SKU");
b.ToTable("PartsAvailability");
});
modelBuilder.Entity("PartSource.Data.Models.Submodel", b =>
{
b.Property("VehicleToEngineConfigId");
b.Property("BaseVehicleId");
b.Property("EngineId");
b.Property("SubmodelId");
b.HasKey("VehicleToEngineConfigId");
b.ToTable("Submodel","Vehicle");
});
modelBuilder.Entity("PartSource.Data.Models.VehicleEngine", b =>
{
b.Property("Id");
b.Property("Description");
b.HasKey("Id");
b.ToTable("VehicleEngine","Vehicle");
});
modelBuilder.Entity("PartSource.Data.Models.VehicleMake", b =>
{
b.Property("Id");
b.Property("Name");
b.HasKey("Id");
b.ToTable("VehicleMake","Vehicle");
});
modelBuilder.Entity("PartSource.Data.Models.VehicleModel", b =>
{
b.Property("Id");
b.Property("Name");
b.Property("VehicleMakeId");
b.HasKey("Id");
b.ToTable("VehicleModel","Vehicle");
});
modelBuilder.Entity("PartSource.Data.Models.DcfMapping", b =>
{
b.HasOne("PartSource.Data.Models.ImportData")
.WithMany("DcfMapping")
.HasForeignKey("LineCode")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("PartSource.Data.Models.Part", b =>
{
b.HasOne("PartSource.Data.Models.Manufacturer", "Manufacturer")
.WithMany()
.HasForeignKey("ManufacturerId")
.OnDelete(DeleteBehavior.Cascade);
});
#pragma warning restore 612, 618
}
}
}