using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.eShopOnContainers.Services.Ordering.SqlData.UnitOfWork; namespace Ordering.API.Migrations { [DbContext(typeof(OrderingDbContext))] partial class OrderingContextModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { modelBuilder .HasAnnotation("ProductVersion", "1.0.0-rtm-21431") .HasAnnotation("Relational:Sequence:shared.OrderSequences", "'OrderSequences', 'shared', '1001', '1', '', '', 'Int32', 'False'") .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Address", b => { b.Property("Id") .ValueGeneratedOnAdd(); b.Property("City"); b.Property("Country"); b.Property("CountryCode"); b.Property("Latitude"); b.Property("Longitude"); b.Property("State"); b.Property("StateCode"); b.Property("Street"); b.Property("ZipCode"); b.HasKey("Id"); b.ToTable("Address"); }); modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Order", b => { b.Property("Id") .ValueGeneratedOnAdd(); b.Property("BillingAddressId"); b.Property("BuyerId"); b.Property("OrderDate"); b.Property("SequenceNumber") .ValueGeneratedOnAdd() .HasDefaultValueSql("NEXT VALUE FOR shared.OrderSequences"); b.Property("ShippingAddressId"); b.Property("Status"); b.HasKey("Id"); b.HasIndex("BillingAddressId"); b.HasIndex("ShippingAddressId"); b.ToTable("Orders"); }); modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); b.Property("Discount"); b.Property("FulfillmentRemaining"); b.Property("OrderId"); b.Property("ProductId"); b.Property("Quantity"); b.Property("UnitPrice"); b.HasKey("Id"); b.HasIndex("OrderId"); b.ToTable("OrderItem"); }); modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Order", b => { b.HasOne("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Address", "BillingAddress") .WithMany() .HasForeignKey("BillingAddressId"); b.HasOne("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Address", "ShippingAddress") .WithMany() .HasForeignKey("ShippingAddressId"); }); modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderItem", b => { b.HasOne("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Order") .WithMany("OrderItems") .HasForeignKey("OrderId") .OnDelete(DeleteBehavior.Cascade); }); } } }