// using System; using DatabaseImplement; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable namespace DatabaseImplement.Migrations { [DbContext(typeof(Database))] partial class DatabaseModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "8.0.6") .HasAnnotation("Relational:MaxIdentifierLength", 63); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); modelBuilder.Entity("DatabaseImplement.Models.MediaFile", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Location") .IsRequired() .HasColumnType("text"); b.Property("Name") .IsRequired() .HasColumnType("text"); b.Property("ProductId") .HasColumnType("uuid"); b.HasKey("Id"); b.ToTable("MediaFiles"); }); modelBuilder.Entity("DatabaseImplement.Models.Product", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Amount") .HasColumnType("integer"); b.Property("IsBeingSold") .HasColumnType("boolean"); b.Property("Name") .IsRequired() .HasColumnType("text"); b.Property("Price") .HasColumnType("double precision"); b.Property("Rate") .HasColumnType("double precision"); b.HasKey("Id"); b.ToTable("Products"); }); modelBuilder.Entity("DatabaseImplement.Models.Purchase", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("DatePurchase") .HasColumnType("timestamp with time zone"); b.Property("Status") .HasColumnType("integer"); b.HasKey("Id"); b.ToTable("Purchases"); }); modelBuilder.Entity("DatabaseImplement.Models.Role", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Name") .IsRequired() .HasColumnType("text"); b.HasKey("Id"); b.ToTable("Roles"); }); modelBuilder.Entity("DatabaseImplement.Models.Sell", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("DateSell") .HasColumnType("timestamp with time zone"); b.HasKey("Id"); b.ToTable("Sells"); }); modelBuilder.Entity("DatabaseImplement.Models.Supplier", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Deals") .HasColumnType("integer"); b.Property("Name") .IsRequired() .HasColumnType("text"); b.HasKey("Id"); b.ToTable("Suppliers"); }); modelBuilder.Entity("DatabaseImplement.Models.SupplierProduct", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Count") .HasColumnType("integer"); b.Property("ProductId") .HasColumnType("uuid"); b.Property("SupplierId") .HasColumnType("uuid"); b.HasKey("Id"); b.HasIndex("ProductId"); b.HasIndex("SupplierId"); b.ToTable("SupplierProducts"); }); modelBuilder.Entity("DatabaseImplement.Models.Supply", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Date") .HasColumnType("timestamp with time zone"); b.Property("Name") .IsRequired() .HasColumnType("text"); b.Property("Price") .HasColumnType("double precision"); b.Property("Status") .HasColumnType("integer"); b.Property("SupplierId") .HasColumnType("uuid"); b.HasKey("Id"); b.HasIndex("SupplierId"); b.ToTable("Supplies"); }); modelBuilder.Entity("DatabaseImplement.Models.SupplyProduct", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Count") .HasColumnType("integer"); b.Property("ProductId") .HasColumnType("uuid"); b.Property("SupplyId") .HasColumnType("uuid"); b.HasKey("Id"); b.HasIndex("ProductId"); b.HasIndex("SupplyId"); b.ToTable("SupplyProducts"); }); modelBuilder.Entity("DatabaseImplement.Models.User", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Birthday") .HasColumnType("timestamp with time zone"); b.Property("Email") .IsRequired() .HasColumnType("text"); b.Property("FirstName") .IsRequired() .HasColumnType("text"); b.Property("OnlyImportantMails") .HasColumnType("boolean"); b.Property("PasswordHash") .IsRequired() .HasColumnType("text"); b.Property("RoleId") .HasColumnType("uuid"); b.Property("SecondName") .IsRequired() .HasColumnType("text"); b.HasKey("Id"); b.HasIndex("RoleId"); b.ToTable("Users"); }); modelBuilder.Entity("DatabaseImplement.Models.SupplierProduct", b => { b.HasOne("DatabaseImplement.Models.Product", "Product") .WithMany() .HasForeignKey("ProductId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("DatabaseImplement.Models.Supplier", "Supplier") .WithMany("Products") .HasForeignKey("SupplierId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Product"); b.Navigation("Supplier"); }); modelBuilder.Entity("DatabaseImplement.Models.Supply", b => { b.HasOne("DatabaseImplement.Models.Supplier", "Supplier") .WithMany() .HasForeignKey("SupplierId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Supplier"); }); modelBuilder.Entity("DatabaseImplement.Models.SupplyProduct", b => { b.HasOne("DatabaseImplement.Models.Product", "Product") .WithMany() .HasForeignKey("ProductId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("DatabaseImplement.Models.Supply", "Supply") .WithMany("Products") .HasForeignKey("SupplyId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Product"); b.Navigation("Supply"); }); modelBuilder.Entity("DatabaseImplement.Models.User", b => { b.HasOne("DatabaseImplement.Models.Role", "Role") .WithMany() .HasForeignKey("RoleId"); b.Navigation("Role"); }); modelBuilder.Entity("DatabaseImplement.Models.Supplier", b => { b.Navigation("Products"); }); modelBuilder.Entity("DatabaseImplement.Models.Supply", b => { b.Navigation("Products"); }); #pragma warning restore 612, 618 } } }