Advertisement
Guest User

snapshot

a guest
Nov 5th, 2019
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 13.29 KB | None | 0 0
  1. // <auto-generated />
  2. using System;
  3. using Microsoft.EntityFrameworkCore;
  4. using Microsoft.EntityFrameworkCore.Infrastructure;
  5. using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
  6. using Persistence;
  7.  
  8. namespace Persistence.Migrations
  9. {
  10.     [DbContext(typeof(ApplicationDbContext))]
  11.     partial class ApplicationDbContextModelSnapshot : ModelSnapshot
  12.     {
  13.         protected override void BuildModel(ModelBuilder modelBuilder)
  14.         {
  15. #pragma warning disable 612, 618
  16.             modelBuilder
  17.                 .HasAnnotation("ProductVersion", "3.0.0");
  18.  
  19.             modelBuilder.Entity("Domain.Entities.Category", b =>
  20.                 {
  21.                     b.Property<Guid>("Id")
  22.                         .ValueGeneratedOnAdd()
  23.                         .HasColumnType("TEXT");
  24.  
  25.                     b.Property<string>("Name")
  26.                         .IsRequired()
  27.                         .HasColumnType("TEXT")
  28.                         .HasMaxLength(20);
  29.  
  30.                     b.HasKey("Id");
  31.  
  32.                     b.ToTable("Category");
  33.                 });
  34.  
  35.             modelBuilder.Entity("Domain.Entities.Items", b =>
  36.                 {
  37.                     b.Property<Guid>("OrderId")
  38.                         .HasColumnType("TEXT");
  39.  
  40.                     b.Property<Guid>("ProductId")
  41.                         .HasColumnType("TEXT");
  42.  
  43.                     b.HasKey("OrderId", "ProductId");
  44.  
  45.                     b.HasIndex("ProductId");
  46.  
  47.                     b.ToTable("Items");
  48.                 });
  49.  
  50.             modelBuilder.Entity("Domain.Entities.Order", b =>
  51.                 {
  52.                     b.Property<Guid>("Id")
  53.                         .ValueGeneratedOnAdd()
  54.                         .HasColumnType("TEXT");
  55.  
  56.                     b.Property<DateTime>("PlacedOn")
  57.                         .HasColumnType("TEXT");
  58.  
  59.                     b.Property<Guid>("UserId")
  60.                         .HasColumnType("TEXT");
  61.  
  62.                     b.HasKey("Id");
  63.  
  64.                     b.HasIndex("UserId");
  65.  
  66.                     b.ToTable("Order");
  67.                 });
  68.  
  69.             modelBuilder.Entity("Domain.Entities.Product", b =>
  70.                 {
  71.                     b.Property<Guid>("Id")
  72.                         .ValueGeneratedOnAdd()
  73.                         .HasColumnType("TEXT");
  74.  
  75.                     b.Property<Guid>("CategoryId")
  76.                         .HasColumnType("TEXT");
  77.  
  78.                     b.Property<string>("Description")
  79.                         .IsRequired()
  80.                         .HasColumnType("TEXT")
  81.                         .HasMaxLength(32);
  82.  
  83.                     b.Property<string>("Name")
  84.                         .IsRequired()
  85.                         .HasColumnType("TEXT")
  86.                         .HasMaxLength(32);
  87.  
  88.                     b.HasKey("Id");
  89.  
  90.                     b.HasIndex("CategoryId");
  91.  
  92.                     b.ToTable("Product");
  93.                 });
  94.  
  95.             modelBuilder.Entity("Domain.Entities.User", b =>
  96.                 {
  97.                     b.Property<Guid>("Id")
  98.                         .ValueGeneratedOnAdd()
  99.                         .HasColumnType("TEXT");
  100.  
  101.                     b.Property<int>("AccessFailedCount")
  102.                         .HasColumnType("INTEGER");
  103.  
  104.                     b.Property<string>("ConcurrencyStamp")
  105.                         .IsConcurrencyToken()
  106.                         .HasColumnType("TEXT");
  107.  
  108.                     b.Property<string>("Email")
  109.                         .HasColumnType("TEXT")
  110.                         .HasMaxLength(256);
  111.  
  112.                     b.Property<bool>("EmailConfirmed")
  113.                         .HasColumnType("INTEGER");
  114.  
  115.                     b.Property<string>("FirstName")
  116.                         .IsRequired()
  117.                         .HasColumnType("TEXT");
  118.  
  119.                     b.Property<string>("LastName")
  120.                         .IsRequired()
  121.                         .HasColumnType("TEXT");
  122.  
  123.                     b.Property<bool>("LockoutEnabled")
  124.                         .HasColumnType("INTEGER");
  125.  
  126.                     b.Property<DateTimeOffset?>("LockoutEnd")
  127.                         .HasColumnType("TEXT");
  128.  
  129.                     b.Property<string>("NormalizedEmail")
  130.                         .HasColumnType("TEXT")
  131.                         .HasMaxLength(256);
  132.  
  133.                     b.Property<string>("NormalizedUserName")
  134.                         .HasColumnType("TEXT")
  135.                         .HasMaxLength(256);
  136.  
  137.                     b.Property<string>("PasswordHash")
  138.                         .HasColumnType("TEXT");
  139.  
  140.                     b.Property<string>("PhoneNumber")
  141.                         .HasColumnType("TEXT");
  142.  
  143.                     b.Property<bool>("PhoneNumberConfirmed")
  144.                         .HasColumnType("INTEGER");
  145.  
  146.                     b.Property<string>("SecurityStamp")
  147.                         .HasColumnType("TEXT");
  148.  
  149.                     b.Property<bool>("TwoFactorEnabled")
  150.                         .HasColumnType("INTEGER");
  151.  
  152.                     b.Property<string>("UserName")
  153.                         .HasColumnType("TEXT")
  154.                         .HasMaxLength(256);
  155.  
  156.                     b.HasKey("Id");
  157.  
  158.                     b.HasIndex("NormalizedEmail")
  159.                         .HasName("EmailIndex");
  160.  
  161.                     b.HasIndex("NormalizedUserName")
  162.                         .IsUnique()
  163.                         .HasName("UserNameIndex");
  164.  
  165.                     b.ToTable("AspNetUsers");
  166.                 });
  167.  
  168.             modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole<System.Guid>", b =>
  169.                 {
  170.                     b.Property<Guid>("Id")
  171.                         .ValueGeneratedOnAdd()
  172.                         .HasColumnType("TEXT");
  173.  
  174.                     b.Property<string>("ConcurrencyStamp")
  175.                         .IsConcurrencyToken()
  176.                         .HasColumnType("TEXT");
  177.  
  178.                     b.Property<string>("Name")
  179.                         .HasColumnType("TEXT")
  180.                         .HasMaxLength(256);
  181.  
  182.                     b.Property<string>("NormalizedName")
  183.                         .HasColumnType("TEXT")
  184.                         .HasMaxLength(256);
  185.  
  186.                     b.HasKey("Id");
  187.  
  188.                     b.HasIndex("NormalizedName")
  189.                         .IsUnique()
  190.                         .HasName("RoleNameIndex");
  191.  
  192.                     b.ToTable("AspNetRoles");
  193.                 });
  194.  
  195.             modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<System.Guid>", b =>
  196.                 {
  197.                     b.Property<int>("Id")
  198.                         .ValueGeneratedOnAdd()
  199.                         .HasColumnType("INTEGER");
  200.  
  201.                     b.Property<string>("ClaimType")
  202.                         .HasColumnType("TEXT");
  203.  
  204.                     b.Property<string>("ClaimValue")
  205.                         .HasColumnType("TEXT");
  206.  
  207.                     b.Property<Guid>("RoleId")
  208.                         .HasColumnType("TEXT");
  209.  
  210.                     b.HasKey("Id");
  211.  
  212.                     b.HasIndex("RoleId");
  213.  
  214.                     b.ToTable("AspNetRoleClaims");
  215.                 });
  216.  
  217.             modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<System.Guid>", b =>
  218.                 {
  219.                     b.Property<int>("Id")
  220.                         .ValueGeneratedOnAdd()
  221.                         .HasColumnType("INTEGER");
  222.  
  223.                     b.Property<string>("ClaimType")
  224.                         .HasColumnType("TEXT");
  225.  
  226.                     b.Property<string>("ClaimValue")
  227.                         .HasColumnType("TEXT");
  228.  
  229.                     b.Property<Guid>("UserId")
  230.                         .HasColumnType("TEXT");
  231.  
  232.                     b.HasKey("Id");
  233.  
  234.                     b.HasIndex("UserId");
  235.  
  236.                     b.ToTable("AspNetUserClaims");
  237.                 });
  238.  
  239.             modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<System.Guid>", b =>
  240.                 {
  241.                     b.Property<string>("LoginProvider")
  242.                         .HasColumnType("TEXT");
  243.  
  244.                     b.Property<string>("ProviderKey")
  245.                         .HasColumnType("TEXT");
  246.  
  247.                     b.Property<string>("ProviderDisplayName")
  248.                         .HasColumnType("TEXT");
  249.  
  250.                     b.Property<Guid>("UserId")
  251.                         .HasColumnType("TEXT");
  252.  
  253.                     b.HasKey("LoginProvider", "ProviderKey");
  254.  
  255.                     b.HasIndex("UserId");
  256.  
  257.                     b.ToTable("AspNetUserLogins");
  258.                 });
  259.  
  260.             modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<System.Guid>", b =>
  261.                 {
  262.                     b.Property<Guid>("UserId")
  263.                         .HasColumnType("TEXT");
  264.  
  265.                     b.Property<Guid>("RoleId")
  266.                         .HasColumnType("TEXT");
  267.  
  268.                     b.HasKey("UserId", "RoleId");
  269.  
  270.                     b.HasIndex("RoleId");
  271.  
  272.                     b.ToTable("AspNetUserRoles");
  273.                 });
  274.  
  275.             modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<System.Guid>", b =>
  276.                 {
  277.                     b.Property<Guid>("UserId")
  278.                         .HasColumnType("TEXT");
  279.  
  280.                     b.Property<string>("LoginProvider")
  281.                         .HasColumnType("TEXT");
  282.  
  283.                     b.Property<string>("Name")
  284.                         .HasColumnType("TEXT");
  285.  
  286.                     b.Property<string>("Value")
  287.                         .HasColumnType("TEXT");
  288.  
  289.                     b.HasKey("UserId", "LoginProvider", "Name");
  290.  
  291.                     b.ToTable("AspNetUserTokens");
  292.                 });
  293.  
  294.             modelBuilder.Entity("Domain.Entities.Items", b =>
  295.                 {
  296.                     b.HasOne("Domain.Entities.Order", "Order")
  297.                         .WithMany("Items")
  298.                         .HasForeignKey("OrderId")
  299.                         .OnDelete(DeleteBehavior.Cascade)
  300.                         .IsRequired();
  301.  
  302.                     b.HasOne("Domain.Entities.Product", "Product")
  303.                         .WithMany("Items")
  304.                         .HasForeignKey("ProductId")
  305.                         .OnDelete(DeleteBehavior.Cascade)
  306.                         .IsRequired();
  307.                 });
  308.  
  309.             modelBuilder.Entity("Domain.Entities.Order", b =>
  310.                 {
  311.                     b.HasOne("Domain.Entities.User", "User")
  312.                         .WithMany("Orders")
  313.                         .HasForeignKey("UserId")
  314.                         .OnDelete(DeleteBehavior.Cascade)
  315.                         .IsRequired();
  316.                 });
  317.  
  318.             modelBuilder.Entity("Domain.Entities.Product", b =>
  319.                 {
  320.                     b.HasOne("Domain.Entities.Category", "Category")
  321.                         .WithMany("Products")
  322.                         .HasForeignKey("CategoryId")
  323.                         .OnDelete(DeleteBehavior.Cascade)
  324.                         .IsRequired();
  325.                 });
  326.  
  327.             modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<System.Guid>", b =>
  328.                 {
  329.                     b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole<System.Guid>", null)
  330.                         .WithMany()
  331.                         .HasForeignKey("RoleId")
  332.                         .OnDelete(DeleteBehavior.Cascade)
  333.                         .IsRequired();
  334.                 });
  335.  
  336.             modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<System.Guid>", b =>
  337.                 {
  338.                     b.HasOne("Domain.Entities.User", null)
  339.                         .WithMany()
  340.                         .HasForeignKey("UserId")
  341.                         .OnDelete(DeleteBehavior.Cascade)
  342.                         .IsRequired();
  343.                 });
  344.  
  345.             modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<System.Guid>", b =>
  346.                 {
  347.                     b.HasOne("Domain.Entities.User", null)
  348.                         .WithMany()
  349.                         .HasForeignKey("UserId")
  350.                         .OnDelete(DeleteBehavior.Cascade)
  351.                         .IsRequired();
  352.                 });
  353.  
  354.             modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<System.Guid>", b =>
  355.                 {
  356.                     b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole<System.Guid>", null)
  357.                         .WithMany()
  358.                         .HasForeignKey("RoleId")
  359.                         .OnDelete(DeleteBehavior.Cascade)
  360.                         .IsRequired();
  361.  
  362.                     b.HasOne("Domain.Entities.User", null)
  363.                         .WithMany()
  364.                         .HasForeignKey("UserId")
  365.                         .OnDelete(DeleteBehavior.Cascade)
  366.                         .IsRequired();
  367.                 });
  368.  
  369.             modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<System.Guid>", b =>
  370.                 {
  371.                     b.HasOne("Domain.Entities.User", null)
  372.                         .WithMany()
  373.                         .HasForeignKey("UserId")
  374.                         .OnDelete(DeleteBehavior.Cascade)
  375.                         .IsRequired();
  376.                 });
  377. #pragma warning restore 612, 618
  378.         }
  379.     }
  380. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement