//
using System;
using DorkNet.Server.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace DorkNet.Server.Migrations
{
[DbContext(typeof(DorkNetDbContext))]
[Migration("20260508170534_Phase14Subscriptions")]
partial class Phase14Subscriptions
{
///
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "9.0.4");
modelBuilder.Entity("DorkNet.Server.Data.Entities.AdminActionEntity", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("Action")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property("AdminPlayerId")
.HasColumnType("INTEGER");
b.Property("Reason")
.IsRequired()
.HasMaxLength(512)
.HasColumnType("TEXT");
b.Property("TargetId")
.HasColumnType("INTEGER");
b.Property("TargetType")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("TEXT");
b.Property("Timestamp")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("AdminPlayerId");
b.HasIndex("Timestamp");
b.HasIndex("TargetType", "TargetId");
b.ToTable("AdminActions");
});
modelBuilder.Entity("DorkNet.Server.Data.Entities.AvatarEntity", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("EquippedItemsJson")
.IsRequired()
.HasColumnType("TEXT");
b.Property("FaceFeatures")
.IsRequired()
.HasMaxLength(8192)
.HasColumnType("TEXT");
b.Property("HairColor")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property("InventoryJson")
.IsRequired()
.HasColumnType("TEXT");
b.Property("OutfitSelections")
.IsRequired()
.HasMaxLength(2048)
.HasColumnType("TEXT");
b.Property("PlayerId")
.HasColumnType("INTEGER");
b.Property("SavedOutfitsJson")
.IsRequired()
.HasColumnType("TEXT");
b.Property("SkinColor")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property("UpdatedAt")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("PlayerId")
.IsUnique();
b.ToTable("Avatars");
});
modelBuilder.Entity("DorkNet.Server.Data.Entities.ChatMessageEntity", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("Body")
.IsRequired()
.HasMaxLength(2000)
.HasColumnType("TEXT");
b.Property("SenderPlayerId")
.HasColumnType("INTEGER");
b.Property("SentAt")
.HasColumnType("TEXT");
b.Property("ThreadKey")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("ThreadKey", "SentAt");
b.ToTable("ChatMessages");
});
modelBuilder.Entity("DorkNet.Server.Data.Entities.CheerEntity", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("CheeredAt")
.HasColumnType("TEXT");
b.Property("FromPlayerId")
.HasColumnType("INTEGER");
b.Property("TargetPlayerId")
.HasColumnType("INTEGER");
b.Property("TargetRoomId")
.HasColumnType("INTEGER");
b.Property("Type")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("TargetPlayerId");
b.HasIndex("TargetRoomId");
b.HasIndex("FromPlayerId", "TargetPlayerId", "TargetRoomId", "Type")
.IsUnique();
b.ToTable("Cheers");
});
modelBuilder.Entity("DorkNet.Server.Data.Entities.CurrencyBalanceEntity", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("Balance")
.HasColumnType("INTEGER");
b.Property("CurrencyType")
.HasColumnType("INTEGER");
b.Property("PlayerId")
.HasColumnType("INTEGER");
b.Property("UpdatedAt")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("PlayerId", "CurrencyType")
.IsUnique();
b.ToTable("CurrencyBalances");
});
modelBuilder.Entity("DorkNet.Server.Data.Entities.DormStateEntity", b =>
{
b.Property("PlayerId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("CreatedAt")
.HasColumnType("TEXT");
b.Property("CurrentDataBlobName")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("UpdatedAt")
.HasColumnType("TEXT");
b.HasKey("PlayerId");
b.ToTable("DormStates");
});
modelBuilder.Entity("DorkNet.Server.Data.Entities.InventionEntity", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("CheerCount")
.HasColumnType("INTEGER");
b.Property("CreatedAt")
.HasColumnType("TEXT");
b.Property("CreatorPlayerId")
.HasColumnType("INTEGER");
b.Property("CurrentBlobName")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("Description")
.IsRequired()
.HasMaxLength(2000)
.HasColumnType("TEXT");
b.Property("ImageName")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("TEXT");
b.Property("Name")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("Permission")
.HasColumnType("INTEGER");
b.Property("SpawnCount")
.HasColumnType("INTEGER");
b.Property("TagsCsv")
.IsRequired()
.HasMaxLength(1024)
.HasColumnType("TEXT");
b.Property("UpdatedAt")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("CheerCount");
b.HasIndex("CreatorPlayerId");
b.ToTable("Inventions");
});
modelBuilder.Entity("DorkNet.Server.Data.Entities.IpBanEntity", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("BannedAt")
.HasColumnType("TEXT");
b.Property("BannedByAdminId")
.HasColumnType("INTEGER");
b.Property("Cidr")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property("Reason")
.IsRequired()
.HasMaxLength(512)
.HasColumnType("TEXT");
b.Property("Until")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("Cidr");
b.ToTable("IpBans");
});
modelBuilder.Entity("DorkNet.Server.Data.Entities.MessageEntity", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("Body")
.IsRequired()
.HasMaxLength(2000)
.HasColumnType("TEXT");
b.Property("ReadAt")
.HasColumnType("TEXT");
b.Property("RecipientPlayerId")
.HasColumnType("INTEGER");
b.Property("SenderPlayerId")
.HasColumnType("INTEGER");
b.Property("SentAt")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("RecipientPlayerId", "SentAt");
b.HasIndex("SenderPlayerId", "SentAt");
b.ToTable("Messages");
});
modelBuilder.Entity("DorkNet.Server.Data.Entities.ObjectiveProgressEntity", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("ClearedAt")
.HasColumnType("TEXT");
b.Property("IsCompleted")
.HasColumnType("INTEGER");
b.Property("Key")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("PlayerId")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("PlayerId", "Key")
.IsUnique();
b.ToTable("ObjectiveProgress");
});
modelBuilder.Entity("DorkNet.Server.Data.Entities.PlayerEntity", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("BannedUntil")
.HasColumnType("TEXT");
b.Property("Bio")
.IsRequired()
.HasMaxLength(512)
.HasColumnType("TEXT");
b.Property("Birthday")
.HasColumnType("TEXT");
b.Property("CanReceiveInvites")
.HasColumnType("INTEGER");
b.Property("CreatedAt")
.HasColumnType("TEXT");
b.Property("CreatedFromDeviceId")
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("DeviceId")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("DisplayName")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property("Email")
.HasMaxLength(256)
.HasColumnType("TEXT");
b.Property("IsAdmin")
.HasColumnType("INTEGER");
b.Property("IsDeveloper")
.HasColumnType("INTEGER");
b.Property("IsJunior")
.HasColumnType("INTEGER");
b.Property("IsVerified")
.HasColumnType("INTEGER");
b.Property("LastIp")
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property("LastPlatform")
.HasColumnType("INTEGER");
b.Property("LastPlatformId")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("LastSeenAt")
.HasColumnType("TEXT");
b.Property("Level")
.HasColumnType("INTEGER");
b.Property("Locale")
.HasMaxLength(16)
.HasColumnType("TEXT");
b.Property("PasswordHash")
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("Phone")
.HasMaxLength(32)
.HasColumnType("TEXT");
b.Property("ProfileImageName")
.HasMaxLength(256)
.HasColumnType("TEXT");
b.Property("Reputation")
.HasColumnType("INTEGER");
b.Property("Username")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property("XP")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("Username")
.IsUnique();
b.ToTable("Players");
});
modelBuilder.Entity("DorkNet.Server.Data.Entities.PlayerEventEntity", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("Capacity")
.HasColumnType("INTEGER");
b.Property("CreatedAt")
.HasColumnType("TEXT");
b.Property("CreatorPlayerId")
.HasColumnType("INTEGER");
b.Property("Description")
.IsRequired()
.HasMaxLength(2000)
.HasColumnType("TEXT");
b.Property("EndsAt")
.HasColumnType("TEXT");
b.Property("RoomId")
.HasColumnType("INTEGER");
b.Property("StartsAt")
.HasColumnType("TEXT");
b.Property("Title")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("UpdatedAt")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("CreatorPlayerId");
b.HasIndex("StartsAt");
b.ToTable("PlayerEvents");
});
modelBuilder.Entity("DorkNet.Server.Data.Entities.PlayerEventResponseEntity", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("CreatedAt")
.HasColumnType("TEXT");
b.Property("EventId")
.HasColumnType("INTEGER");
b.Property("PlayerId")
.HasColumnType("INTEGER");
b.Property("Response")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("PlayerId");
b.HasIndex("EventId", "PlayerId")
.IsUnique();
b.ToTable("PlayerEventResponses");
});
modelBuilder.Entity("DorkNet.Server.Data.Entities.PlayerSettingEntity", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("Key")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("PlayerId")
.HasColumnType("INTEGER");
b.Property("Value")
.IsRequired()
.HasMaxLength(1024)
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("PlayerId", "Key")
.IsUnique();
b.ToTable("PlayerSettings");
});
modelBuilder.Entity("DorkNet.Server.Data.Entities.RelationshipEntity", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("CreatedAt")
.HasColumnType("TEXT");
b.Property("RequesterId")
.HasColumnType("INTEGER");
b.Property("Status")
.HasColumnType("INTEGER");
b.Property("TargetId")
.HasColumnType("INTEGER");
b.Property("UpdatedAt")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("RequesterId", "TargetId")
.IsUnique();
b.ToTable("Relationships");
});
modelBuilder.Entity("DorkNet.Server.Data.Entities.ReportEntity", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("Category")
.HasColumnType("INTEGER");
b.Property("CreatedAt")
.HasColumnType("TEXT");
b.Property("GameSessionId")
.HasColumnType("INTEGER");
b.Property("Message")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("TEXT");
b.Property("ReporterPlayerId")
.HasColumnType("INTEGER");
b.Property("ResolutionNote")
.IsRequired()
.HasMaxLength(512)
.HasColumnType("TEXT");
b.Property("ResolvedAt")
.HasColumnType("TEXT");
b.Property("ResolverAdminId")
.HasColumnType("INTEGER");
b.Property("RoomId")
.HasColumnType("INTEGER");
b.Property("TargetPlayerId")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("ReporterPlayerId");
b.HasIndex("ResolvedAt");
b.HasIndex("TargetPlayerId");
b.ToTable("Reports");
});
modelBuilder.Entity("DorkNet.Server.Data.Entities.RoomBookmarkEntity", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("CreatedAt")
.HasColumnType("TEXT");
b.Property("PlayerId")
.HasColumnType("INTEGER");
b.Property("RoomId")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("PlayerId");
b.HasIndex("PlayerId", "RoomId")
.IsUnique();
b.ToTable("RoomBookmarks");
});
modelBuilder.Entity("DorkNet.Server.Data.Entities.RoomDataBlobEntity", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("BlobName")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("Bytes")
.IsRequired()
.HasColumnType("BLOB");
b.Property("ReferencedFilenamesCsv")
.IsRequired()
.HasMaxLength(2048)
.HasColumnType("TEXT");
b.Property("RoomId")
.HasColumnType("INTEGER");
b.Property("UploadedAt")
.HasColumnType("TEXT");
b.Property("UploadedByPlayerId")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("BlobName")
.IsUnique();
b.HasIndex("RoomId");
b.ToTable("RoomDataBlobs");
});
modelBuilder.Entity("DorkNet.Server.Data.Entities.RoomEntity", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("Accessibility")
.HasColumnType("INTEGER");
b.Property("AllowsJuniors")
.HasColumnType("INTEGER");
b.Property("CheerCount")
.HasColumnType("INTEGER");
b.Property("CloningAllowed")
.HasColumnType("INTEGER");
b.Property("CreatedAt")
.HasColumnType("TEXT");
b.Property("CreatorPlayerId")
.HasColumnType("INTEGER");
b.Property("CurrentDataBlobName")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("CustomRoomWarning")
.IsRequired()
.HasMaxLength(512)
.HasColumnType("TEXT");
b.Property("Description")
.IsRequired()
.HasMaxLength(2000)
.HasColumnType("TEXT");
b.Property("DisableMicAutoMute")
.HasColumnType("INTEGER");
b.Property("FavoriteCount")
.HasColumnType("INTEGER");
b.Property("HotScore")
.HasColumnType("REAL");
b.Property("ImageName")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("TEXT");
b.Property("IsAGRoom")
.HasColumnType("INTEGER");
b.Property("IsDormRoom")
.HasColumnType("INTEGER");
b.Property("LocationReplicationId")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property("Name")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property("RoomWarningMask")
.HasColumnType("INTEGER");
b.Property("State")
.HasColumnType("INTEGER");
b.Property("SupportsLevelVoting")
.HasColumnType("INTEGER");
b.Property("SupportsMobile")
.HasColumnType("INTEGER");
b.Property("SupportsScreens")
.HasColumnType("INTEGER");
b.Property("SupportsTeleportVR")
.HasColumnType("INTEGER");
b.Property("SupportsVRLow")
.HasColumnType("INTEGER");
b.Property("SupportsWalkVR")
.HasColumnType("INTEGER");
b.Property("TagsCsv")
.IsRequired()
.HasMaxLength(1024)
.HasColumnType("TEXT");
b.Property("UpdatedAt")
.HasColumnType("TEXT");
b.Property("VisitCount")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("CreatorPlayerId");
b.HasIndex("HotScore");
b.HasIndex("Name")
.IsUnique();
b.ToTable("Rooms");
});
modelBuilder.Entity("DorkNet.Server.Data.Entities.SubscriptionEntity", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("CreatedAt")
.HasColumnType("TEXT");
b.Property("SubscriberPlayerId")
.HasColumnType("INTEGER");
b.Property("TargetPlayerId")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("SubscriberPlayerId");
b.HasIndex("TargetPlayerId");
b.HasIndex("SubscriberPlayerId", "TargetPlayerId")
.IsUnique();
b.ToTable("Subscriptions");
});
modelBuilder.Entity("DorkNet.Server.Data.Entities.AvatarEntity", b =>
{
b.HasOne("DorkNet.Server.Data.Entities.PlayerEntity", "Player")
.WithOne("Avatar")
.HasForeignKey("DorkNet.Server.Data.Entities.AvatarEntity", "PlayerId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Player");
});
modelBuilder.Entity("DorkNet.Server.Data.Entities.PlayerSettingEntity", b =>
{
b.HasOne("DorkNet.Server.Data.Entities.PlayerEntity", "Player")
.WithMany("Settings")
.HasForeignKey("PlayerId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Player");
});
modelBuilder.Entity("DorkNet.Server.Data.Entities.RelationshipEntity", b =>
{
b.HasOne("DorkNet.Server.Data.Entities.PlayerEntity", "Requester")
.WithMany("Relationships")
.HasForeignKey("RequesterId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Requester");
});
modelBuilder.Entity("DorkNet.Server.Data.Entities.PlayerEntity", b =>
{
b.Navigation("Avatar");
b.Navigation("Relationships");
b.Navigation("Settings");
});
#pragma warning restore 612, 618
}
}
}