// using System; using GameList.Data; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; #nullable disable namespace GameList.Data.Migrations { [DbContext(typeof(AppDbContext))] partial class AppDbContextModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder.HasAnnotation("ProductVersion", "10.0.2"); modelBuilder.Entity("GameList.Domain.AppState", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("ResultsOpen") .HasColumnType("INTEGER"); b.Property("UpdatedAt") .HasColumnType("TEXT"); b.HasKey("Id"); b.ToTable("AppState"); b.HasData( new { Id = 1, ResultsOpen = false, UpdatedAt = new DateTimeOffset(new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)) }); }); modelBuilder.Entity("GameList.Domain.Player", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("TEXT"); b.Property("CreatedAt") .HasColumnType("TEXT"); b.Property("CurrentPhase") .ValueGeneratedOnAdd() .HasColumnType("INTEGER") .HasDefaultValue(0); b.Property("DisplayName") .HasMaxLength(16) .HasColumnType("TEXT"); b.Property("HasJoker") .ValueGeneratedOnAdd() .HasColumnType("INTEGER") .HasDefaultValue(false); b.Property("IsAdmin") .ValueGeneratedOnAdd() .HasColumnType("INTEGER") .HasDefaultValue(false); b.Property("IsOwner") .ValueGeneratedOnAdd() .HasColumnType("INTEGER") .HasDefaultValue(false); b.Property("LastLoginAt") .HasColumnType("TEXT"); b.Property("NormalizedUsername") .IsRequired() .HasMaxLength(24) .HasColumnType("TEXT"); b.Property("PasswordHash") .IsRequired() .HasColumnType("BLOB"); b.Property("PasswordHashVersion") .ValueGeneratedOnAdd() .HasColumnType("INTEGER") .HasDefaultValue(1); b.Property("PasswordSalt") .IsRequired() .HasColumnType("BLOB"); b.Property("Username") .IsRequired() .HasMaxLength(24) .HasColumnType("TEXT"); b.Property("VotesFinal") .ValueGeneratedOnAdd() .HasColumnType("INTEGER") .HasDefaultValue(false); b.HasKey("Id"); b.HasIndex("IsOwner") .IsUnique() .HasFilter("IsOwner = 1"); b.HasIndex("NormalizedUsername") .IsUnique(); b.ToTable("Players"); }); modelBuilder.Entity("GameList.Domain.Suggestion", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("CreatedAt") .HasColumnType("TEXT"); b.Property("Description") .HasMaxLength(500) .HasColumnType("TEXT"); b.Property("GameUrl") .HasMaxLength(2048) .HasColumnType("TEXT"); b.Property("Genre") .HasMaxLength(50) .HasColumnType("TEXT"); b.Property("MaxPlayers") .HasColumnType("INTEGER"); b.Property("MinPlayers") .HasColumnType("INTEGER"); b.Property("Name") .IsRequired() .HasMaxLength(100) .HasColumnType("TEXT"); b.Property("ParentSuggestionId") .HasColumnType("INTEGER"); b.Property("PlayerId") .HasColumnType("TEXT"); b.Property("ScreenshotUrl") .HasMaxLength(2048) .HasColumnType("TEXT"); b.Property("YoutubeUrl") .HasMaxLength(2048) .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("ParentSuggestionId"); b.HasIndex("PlayerId"); b.ToTable("Suggestions"); }); modelBuilder.Entity("GameList.Domain.Vote", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("CreatedAt") .HasColumnType("TEXT"); b.Property("PlayerId") .HasColumnType("TEXT"); b.Property("Score") .HasColumnType("INTEGER"); b.Property("SuggestionId") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("SuggestionId"); b.HasIndex("PlayerId", "SuggestionId") .IsUnique(); b.ToTable("Votes"); }); modelBuilder.Entity("GameList.Domain.Suggestion", b => { b.HasOne("GameList.Domain.Suggestion", "ParentSuggestion") .WithMany("LinkedSuggestions") .HasForeignKey("ParentSuggestionId") .OnDelete(DeleteBehavior.SetNull); b.HasOne("GameList.Domain.Player", "Player") .WithMany("Suggestions") .HasForeignKey("PlayerId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("ParentSuggestion"); b.Navigation("Player"); }); modelBuilder.Entity("GameList.Domain.Vote", b => { b.HasOne("GameList.Domain.Player", "Player") .WithMany("Votes") .HasForeignKey("PlayerId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("GameList.Domain.Suggestion", "Suggestion") .WithMany("Votes") .HasForeignKey("SuggestionId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Player"); b.Navigation("Suggestion"); }); modelBuilder.Entity("GameList.Domain.Player", b => { b.Navigation("Suggestions"); b.Navigation("Votes"); }); modelBuilder.Entity("GameList.Domain.Suggestion", b => { b.Navigation("LinkedSuggestions"); b.Navigation("Votes"); }); #pragma warning restore 612, 618 } } }