Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // <auto-generated />
- using System;
- using Microsoft.EntityFrameworkCore;
- using Microsoft.EntityFrameworkCore.Infrastructure;
- using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
- using Persistence;
- namespace Persistence.Migrations
- {
- [DbContext(typeof(ApplicationDbContext))]
- partial class ApplicationDbContextModelSnapshot : ModelSnapshot
- {
- protected override void BuildModel(ModelBuilder modelBuilder)
- {
- #pragma warning disable 612, 618
- modelBuilder
- .HasAnnotation("ProductVersion", "3.0.0");
- modelBuilder.Entity("Domain.Entities.Category", b =>
- {
- b.Property<Guid>("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("TEXT");
- b.Property<string>("Name")
- .IsRequired()
- .HasColumnType("TEXT")
- .HasMaxLength(20);
- b.HasKey("Id");
- b.ToTable("Category");
- });
- modelBuilder.Entity("Domain.Entities.Items", b =>
- {
- b.Property<Guid>("OrderId")
- .HasColumnType("TEXT");
- b.Property<Guid>("ProductId")
- .HasColumnType("TEXT");
- b.HasKey("OrderId", "ProductId");
- b.HasIndex("ProductId");
- b.ToTable("Items");
- });
- modelBuilder.Entity("Domain.Entities.Order", b =>
- {
- b.Property<Guid>("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("TEXT");
- b.Property<DateTime>("PlacedOn")
- .HasColumnType("TEXT");
- b.Property<Guid>("UserId")
- .HasColumnType("TEXT");
- b.HasKey("Id");
- b.HasIndex("UserId");
- b.ToTable("Order");
- });
- modelBuilder.Entity("Domain.Entities.Product", b =>
- {
- b.Property<Guid>("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("TEXT");
- b.Property<Guid>("CategoryId")
- .HasColumnType("TEXT");
- b.Property<string>("Description")
- .IsRequired()
- .HasColumnType("TEXT")
- .HasMaxLength(32);
- b.Property<string>("Name")
- .IsRequired()
- .HasColumnType("TEXT")
- .HasMaxLength(32);
- b.HasKey("Id");
- b.HasIndex("CategoryId");
- b.ToTable("Product");
- });
- modelBuilder.Entity("Domain.Entities.User", b =>
- {
- b.Property<Guid>("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("TEXT");
- b.Property<int>("AccessFailedCount")
- .HasColumnType("INTEGER");
- b.Property<string>("ConcurrencyStamp")
- .IsConcurrencyToken()
- .HasColumnType("TEXT");
- b.Property<string>("Email")
- .HasColumnType("TEXT")
- .HasMaxLength(256);
- b.Property<bool>("EmailConfirmed")
- .HasColumnType("INTEGER");
- b.Property<string>("FirstName")
- .IsRequired()
- .HasColumnType("TEXT");
- b.Property<string>("LastName")
- .IsRequired()
- .HasColumnType("TEXT");
- b.Property<bool>("LockoutEnabled")
- .HasColumnType("INTEGER");
- b.Property<DateTimeOffset?>("LockoutEnd")
- .HasColumnType("TEXT");
- b.Property<string>("NormalizedEmail")
- .HasColumnType("TEXT")
- .HasMaxLength(256);
- b.Property<string>("NormalizedUserName")
- .HasColumnType("TEXT")
- .HasMaxLength(256);
- b.Property<string>("PasswordHash")
- .HasColumnType("TEXT");
- b.Property<string>("PhoneNumber")
- .HasColumnType("TEXT");
- b.Property<bool>("PhoneNumberConfirmed")
- .HasColumnType("INTEGER");
- b.Property<string>("SecurityStamp")
- .HasColumnType("TEXT");
- b.Property<bool>("TwoFactorEnabled")
- .HasColumnType("INTEGER");
- b.Property<string>("UserName")
- .HasColumnType("TEXT")
- .HasMaxLength(256);
- b.HasKey("Id");
- b.HasIndex("NormalizedEmail")
- .HasName("EmailIndex");
- b.HasIndex("NormalizedUserName")
- .IsUnique()
- .HasName("UserNameIndex");
- b.ToTable("AspNetUsers");
- });
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole<System.Guid>", b =>
- {
- b.Property<Guid>("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("TEXT");
- b.Property<string>("ConcurrencyStamp")
- .IsConcurrencyToken()
- .HasColumnType("TEXT");
- b.Property<string>("Name")
- .HasColumnType("TEXT")
- .HasMaxLength(256);
- b.Property<string>("NormalizedName")
- .HasColumnType("TEXT")
- .HasMaxLength(256);
- b.HasKey("Id");
- b.HasIndex("NormalizedName")
- .IsUnique()
- .HasName("RoleNameIndex");
- b.ToTable("AspNetRoles");
- });
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<System.Guid>", b =>
- {
- b.Property<int>("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
- b.Property<string>("ClaimType")
- .HasColumnType("TEXT");
- b.Property<string>("ClaimValue")
- .HasColumnType("TEXT");
- b.Property<Guid>("RoleId")
- .HasColumnType("TEXT");
- b.HasKey("Id");
- b.HasIndex("RoleId");
- b.ToTable("AspNetRoleClaims");
- });
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<System.Guid>", b =>
- {
- b.Property<int>("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
- b.Property<string>("ClaimType")
- .HasColumnType("TEXT");
- b.Property<string>("ClaimValue")
- .HasColumnType("TEXT");
- b.Property<Guid>("UserId")
- .HasColumnType("TEXT");
- b.HasKey("Id");
- b.HasIndex("UserId");
- b.ToTable("AspNetUserClaims");
- });
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<System.Guid>", b =>
- {
- b.Property<string>("LoginProvider")
- .HasColumnType("TEXT");
- b.Property<string>("ProviderKey")
- .HasColumnType("TEXT");
- b.Property<string>("ProviderDisplayName")
- .HasColumnType("TEXT");
- b.Property<Guid>("UserId")
- .HasColumnType("TEXT");
- b.HasKey("LoginProvider", "ProviderKey");
- b.HasIndex("UserId");
- b.ToTable("AspNetUserLogins");
- });
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<System.Guid>", b =>
- {
- b.Property<Guid>("UserId")
- .HasColumnType("TEXT");
- b.Property<Guid>("RoleId")
- .HasColumnType("TEXT");
- b.HasKey("UserId", "RoleId");
- b.HasIndex("RoleId");
- b.ToTable("AspNetUserRoles");
- });
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<System.Guid>", b =>
- {
- b.Property<Guid>("UserId")
- .HasColumnType("TEXT");
- b.Property<string>("LoginProvider")
- .HasColumnType("TEXT");
- b.Property<string>("Name")
- .HasColumnType("TEXT");
- b.Property<string>("Value")
- .HasColumnType("TEXT");
- b.HasKey("UserId", "LoginProvider", "Name");
- b.ToTable("AspNetUserTokens");
- });
- modelBuilder.Entity("Domain.Entities.Items", b =>
- {
- b.HasOne("Domain.Entities.Order", "Order")
- .WithMany("Items")
- .HasForeignKey("OrderId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- b.HasOne("Domain.Entities.Product", "Product")
- .WithMany("Items")
- .HasForeignKey("ProductId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
- modelBuilder.Entity("Domain.Entities.Order", b =>
- {
- b.HasOne("Domain.Entities.User", "User")
- .WithMany("Orders")
- .HasForeignKey("UserId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
- modelBuilder.Entity("Domain.Entities.Product", b =>
- {
- b.HasOne("Domain.Entities.Category", "Category")
- .WithMany("Products")
- .HasForeignKey("CategoryId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<System.Guid>", b =>
- {
- b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole<System.Guid>", null)
- .WithMany()
- .HasForeignKey("RoleId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<System.Guid>", b =>
- {
- b.HasOne("Domain.Entities.User", null)
- .WithMany()
- .HasForeignKey("UserId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<System.Guid>", b =>
- {
- b.HasOne("Domain.Entities.User", null)
- .WithMany()
- .HasForeignKey("UserId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<System.Guid>", b =>
- {
- b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole<System.Guid>", null)
- .WithMany()
- .HasForeignKey("RoleId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- b.HasOne("Domain.Entities.User", null)
- .WithMany()
- .HasForeignKey("UserId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<System.Guid>", b =>
- {
- b.HasOne("Domain.Entities.User", null)
- .WithMany()
- .HasForeignKey("UserId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
- #pragma warning restore 612, 618
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement