// using System; using ConnectionsAPI.Database; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; #nullable disable namespace ConnectionsAPI.Database.Migrations { [DbContext(typeof(ConnectionsContext))] partial class ConnectionsContextModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder.HasAnnotation("ProductVersion", "8.0.4"); modelBuilder.Entity("ConnectionsAPI.Database.Entities.Puzzle", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("ContentMD5") .IsRequired() .HasColumnType("TEXT"); b.Property("CreatedDate") .HasColumnType("TEXT"); b.Property("EditorName") .IsRequired() .HasColumnType("TEXT"); b.Property("Index") .HasColumnType("INTEGER"); b.Property("PrintDate") .IsRequired() .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("PrintDate") .IsUnique(); b.ToTable("Puzzles"); }); modelBuilder.Entity("ConnectionsAPI.Database.Entities.PuzzleCard", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("Content") .IsRequired() .HasColumnType("TEXT"); b.Property("Position") .HasColumnType("INTEGER"); b.Property("PuzzleCategoryId") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("PuzzleCategoryId"); b.ToTable("PuzzleCard"); }); modelBuilder.Entity("ConnectionsAPI.Database.Entities.PuzzleCategory", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("Color") .HasColumnType("INTEGER"); b.Property("Name") .IsRequired() .HasColumnType("TEXT"); b.Property("PuzzleId") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("PuzzleId"); b.ToTable("PuzzleCategory"); }); modelBuilder.Entity("ConnectionsAPI.Database.Entities.PuzzleCard", b => { b.HasOne("ConnectionsAPI.Database.Entities.PuzzleCategory", "PuzzleCategory") .WithMany("PuzzleCards") .HasForeignKey("PuzzleCategoryId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("PuzzleCategory"); }); modelBuilder.Entity("ConnectionsAPI.Database.Entities.PuzzleCategory", b => { b.HasOne("ConnectionsAPI.Database.Entities.Puzzle", "Puzzle") .WithMany("Categories") .HasForeignKey("PuzzleId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Puzzle"); }); modelBuilder.Entity("ConnectionsAPI.Database.Entities.Puzzle", b => { b.Navigation("Categories"); }); modelBuilder.Entity("ConnectionsAPI.Database.Entities.PuzzleCategory", b => { b.Navigation("PuzzleCards"); }); #pragma warning restore 612, 618 } } }