// using Backet.Api.Infrastructure; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; namespace Backet.Api.Migrations { [DbContext(typeof(BacketDbContext))] [Migration("20200218022312_Init")] partial class Init { protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn) .HasAnnotation("ProductVersion", "3.1.1") .HasAnnotation("Relational:MaxIdentifierLength", 63); modelBuilder.Entity("Backet.Api.Domain.AggregatesModel.BacketAggregate.Backet", b => { b.Property("Id") .HasColumnType("character varying(32)") .HasMaxLength(32); b.Property("TotalPrice") .HasColumnType("bigint"); b.Property("UserId") .IsRequired() .HasColumnType("character varying(32)") .HasMaxLength(32); b.HasKey("Id"); b.HasIndex("UserId"); b.ToTable("Backet"); }); modelBuilder.Entity("Backet.Api.Domain.AggregatesModel.BacketAggregate.BacketItem", b => { b.Property("Id") .HasColumnType("character varying(32)") .HasMaxLength(32); b.Property("BacketId") .IsRequired() .HasColumnType("character varying(32)") .HasMaxLength(32); b.Property("Price") .HasColumnType("bigint"); b.Property("ProductId") .HasColumnType("character varying(32)") .HasMaxLength(32); b.Property("ProductName") .IsRequired() .HasColumnType("character varying(256)") .HasMaxLength(256); b.HasKey("Id"); b.HasIndex("BacketId"); b.HasIndex("ProductId"); b.ToTable("BacketItem"); }); modelBuilder.Entity("Backet.Api.Domain.AggregatesModel.BacketAggregate.BacketItem", b => { b.HasOne("Backet.Api.Domain.AggregatesModel.BacketAggregate.Backet", null) .WithMany("BacketItems") .HasForeignKey("BacketId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); #pragma warning restore 612, 618 } } }