// <auto-generated /> using System; using InventoryManager.Data; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; namespace InventoryManager.Migrations { [DbContext(typeof(InventoryContext))] [Migration("20230223033357_identity")] partial class identity { protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("Relational:MaxIdentifierLength", 64) .HasAnnotation("ProductVersion", "5.0.17"); modelBuilder.Entity("InventoryManager.Models.Collections", b => { b.Property<int>("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); b.Property<string>("Description") .IsRequired() .HasMaxLength(75) .HasColumnType("varchar(75)"); b.Property<string>("Name") .IsRequired() .HasMaxLength(25) .HasColumnType("varchar(25)"); b.HasKey("Id"); b.ToTable("Collections"); }); modelBuilder.Entity("InventoryManager.Models.Colors", b => { b.Property<int>("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); b.Property<string>("Description") .IsRequired() .HasMaxLength(75) .HasColumnType("varchar(75)"); b.Property<string>("Name") .IsRequired() .HasMaxLength(25) .HasColumnType("varchar(25)"); b.HasKey("Id"); b.ToTable("Colors"); }); modelBuilder.Entity("InventoryManager.Models.Materials", b => { b.Property<int>("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); b.Property<string>("Description") .IsRequired() .HasMaxLength(75) .HasColumnType("varchar(75)"); b.Property<string>("Name") .IsRequired() .HasMaxLength(25) .HasColumnType("varchar(25)"); b.Property<int>("Supplier") .HasColumnType("int"); b.Property<int>("Unit") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("Supplier"); b.HasIndex("Unit"); b.ToTable("Materials"); }); modelBuilder.Entity("InventoryManager.Models.Products", b => { b.Property<int>("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); b.Property<int>("Collection") .HasColumnType("int"); b.Property<int?>("Color") .IsRequired() .HasColumnType("int"); b.Property<string>("Description") .IsRequired() .HasMaxLength(75) .HasColumnType("varchar(75)"); b.Property<int>("Material") .HasColumnType("int"); b.Property<string>("Name") .IsRequired() .HasMaxLength(25) .HasColumnType("varchar(25)"); b.Property<string>("Quantity") .IsRequired() .HasMaxLength(25) .HasColumnType("varchar(25)"); b.Property<int>("Unit") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("Collection"); b.HasIndex("Color"); b.HasIndex("Material"); b.HasIndex("Unit"); b.ToTable("Products"); }); modelBuilder.Entity("InventoryManager.Models.Suppliers", b => { b.Property<int>("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); b.Property<string>("Address") .IsRequired() .HasMaxLength(75) .HasColumnType("varchar(75)"); b.Property<string>("Contact") .IsRequired() .HasMaxLength(75) .HasColumnType("varchar(75)"); b.Property<string>("Inforamtion") .IsRequired() .HasMaxLength(75) .HasColumnType("varchar(75)"); b.Property<string>("Name") .IsRequired() .HasMaxLength(25) .HasColumnType("varchar(25)"); b.HasKey("Id"); b.ToTable("Suppliers"); }); modelBuilder.Entity("InventoryManager.Models.Unit", b => { b.Property<int>("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); b.Property<string>("Description") .IsRequired() .HasMaxLength(75) .HasColumnType("varchar(75)"); b.Property<string>("Name") .IsRequired() .HasMaxLength(25) .HasColumnType("varchar(25)"); b.HasKey("Id"); b.ToTable("Units"); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUser", b => { b.Property<string>("Id") .HasColumnType("varchar(767)"); b.Property<int>("AccessFailedCount") .HasColumnType("int"); b.Property<string>("ConcurrencyStamp") .HasColumnType("text"); b.Property<string>("Email") .HasColumnType("text"); b.Property<bool>("EmailConfirmed") .HasColumnType("tinyint(1)"); b.Property<bool>("LockoutEnabled") .HasColumnType("tinyint(1)"); b.Property<DateTimeOffset?>("LockoutEnd") .HasColumnType("timestamp"); b.Property<string>("NormalizedEmail") .HasColumnType("text"); b.Property<string>("NormalizedUserName") .HasColumnType("text"); b.Property<string>("PasswordHash") .HasColumnType("text"); b.Property<string>("PhoneNumber") .HasColumnType("text"); b.Property<bool>("PhoneNumberConfirmed") .HasColumnType("tinyint(1)"); b.Property<string>("SecurityStamp") .HasColumnType("text"); b.Property<bool>("TwoFactorEnabled") .HasColumnType("tinyint(1)"); b.Property<string>("UserName") .HasColumnType("text"); b.HasKey("Id"); b.ToTable("Users"); }); modelBuilder.Entity("InventoryManager.Models.Materials", b => { b.HasOne("InventoryManager.Models.Suppliers", "Suppliers") .WithMany() .HasForeignKey("Supplier") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("InventoryManager.Models.Unit", "Units") .WithMany() .HasForeignKey("Unit") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Suppliers"); b.Navigation("Units"); }); modelBuilder.Entity("InventoryManager.Models.Products", b => { b.HasOne("InventoryManager.Models.Collections", "Collections") .WithMany() .HasForeignKey("Collection") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("InventoryManager.Models.Colors", "Colors") .WithMany() .HasForeignKey("Color") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("InventoryManager.Models.Materials", "Materials") .WithMany() .HasForeignKey("Material") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("InventoryManager.Models.Unit", "Units") .WithMany() .HasForeignKey("Unit") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Collections"); b.Navigation("Colors"); b.Navigation("Materials"); b.Navigation("Units"); }); #pragma warning restore 612, 618 } } }