// <auto-generated /> using System; using Casestudy.DAL; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; #nullable disable namespace Casestudy.Migrations { [DbContext(typeof(AppDbContext))] [Migration("20230818210957_AzureStoreDB")] partial class AzureStoreDB { /// <inheritdoc /> protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "7.0.8") .HasAnnotation("Relational:MaxIdentifierLength", 128); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); modelBuilder.Entity("Casestudy.DAL.DomainClasses.Branch", b => { b.Property<int>("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id")); b.Property<string>("City") .HasMaxLength(150) .HasColumnType("nvarchar(150)"); b.Property<double?>("Distance") .HasColumnType("float"); b.Property<double?>("Latitude") .HasColumnType("float"); b.Property<double?>("Longitude") .HasColumnType("float"); b.Property<string>("Region") .HasMaxLength(2) .HasColumnType("nvarchar(2)"); b.Property<string>("Street") .HasMaxLength(150) .HasColumnType("nvarchar(150)"); b.HasKey("Id"); b.ToTable("Branch"); }); modelBuilder.Entity("Casestudy.DAL.DomainClasses.Brand", b => { b.Property<int>("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id")); b.Property<string>("Name") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.ToTable("Brands"); }); modelBuilder.Entity("Casestudy.DAL.DomainClasses.Customer", b => { b.Property<int>("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id")); b.Property<string>("Email") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property<string>("Firstname") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property<string>("Hash") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property<string>("Lastname") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property<string>("Salt") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.ToTable("Customers"); }); modelBuilder.Entity("Casestudy.DAL.DomainClasses.Order", b => { b.Property<int>("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id")); b.Property<int>("CustomerId") .HasColumnType("int"); b.Property<decimal>("OrderAmount") .HasColumnType("money"); b.Property<DateTime>("OrderDate") .HasColumnType("datetime2"); b.HasKey("Id"); b.HasIndex("CustomerId"); b.ToTable("Order"); }); modelBuilder.Entity("Casestudy.DAL.DomainClasses.OrderLineItem", b => { b.Property<int>("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id")); b.Property<int>("OrderId") .HasColumnType("int"); b.Property<string>("ProductId") .IsRequired() .HasColumnType("nvarchar(450)"); b.Property<int>("QtyBackOrdered") .HasColumnType("int"); b.Property<int>("QtyOrdered") .HasColumnType("int"); b.Property<int>("QtySold") .HasColumnType("int"); b.Property<decimal>("SellingPrice") .HasColumnType("money"); b.HasKey("Id"); b.HasIndex("OrderId"); b.HasIndex("ProductId"); b.ToTable("OrderLineItem"); }); modelBuilder.Entity("Casestudy.DAL.DomainClasses.Product", b => { b.Property<string>("Id") .HasColumnType("nvarchar(450)"); b.Property<int>("BrandId") .HasColumnType("int"); b.Property<decimal>("CostPrice") .HasColumnType("money"); b.Property<string>("Description") .HasMaxLength(2000) .HasColumnType("nvarchar(2000)"); b.Property<string>("GraphicName") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property<decimal>("MSRP") .HasColumnType("money"); b.Property<string>("ProductName") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property<int>("QtyOnBackOrder") .HasColumnType("int"); b.Property<int>("QtyOnHand") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("BrandId"); b.ToTable("Products"); }); modelBuilder.Entity("Casestudy.DAL.DomainClasses.Order", b => { b.HasOne("Casestudy.DAL.DomainClasses.Customer", "Customer") .WithMany() .HasForeignKey("CustomerId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Customer"); }); modelBuilder.Entity("Casestudy.DAL.DomainClasses.OrderLineItem", b => { b.HasOne("Casestudy.DAL.DomainClasses.Order", "Order") .WithMany() .HasForeignKey("OrderId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("Casestudy.DAL.DomainClasses.Product", "Product") .WithMany() .HasForeignKey("ProductId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Order"); b.Navigation("Product"); }); modelBuilder.Entity("Casestudy.DAL.DomainClasses.Product", b => { b.HasOne("Casestudy.DAL.DomainClasses.Brand", "Brand") .WithMany() .HasForeignKey("BrandId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Brand"); }); #pragma warning restore 612, 618 } } }