// using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Nuuru.Server.Data; #nullable disable namespace Nuuru.Server.Migrations { [DbContext(typeof(ApplicationDbContext))] [Migration("20260221233454_AddPendingPostsCompositeIndex")] partial class AddPendingPostsCompositeIndex { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder.HasAnnotation("ProductVersion", "10.0.0-rc.2.25502.107"); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("ClaimType") .HasColumnType("TEXT"); b.Property("ClaimValue") .HasColumnType("TEXT"); b.Property("RoleId") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("RoleId"); b.ToTable("AspNetRoleClaims", (string)null); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("ClaimType") .HasColumnType("TEXT"); b.Property("ClaimValue") .HasColumnType("TEXT"); b.Property("UserId") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("UserId"); b.ToTable("AspNetUserClaims", (string)null); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => { b.Property("LoginProvider") .HasColumnType("TEXT"); b.Property("ProviderKey") .HasColumnType("TEXT"); b.Property("ProviderDisplayName") .HasColumnType("TEXT"); b.Property("UserId") .HasColumnType("TEXT"); b.HasKey("LoginProvider", "ProviderKey"); b.HasIndex("UserId"); b.ToTable("AspNetUserLogins", (string)null); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => { b.Property("UserId") .HasColumnType("TEXT"); b.Property("RoleId") .HasColumnType("TEXT"); b.HasKey("UserId", "RoleId"); b.HasIndex("RoleId"); b.ToTable("AspNetUserRoles", (string)null); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => { b.Property("UserId") .HasColumnType("TEXT"); b.Property("LoginProvider") .HasColumnType("TEXT"); b.Property("Name") .HasColumnType("TEXT"); b.Property("Value") .HasColumnType("TEXT"); b.HasKey("UserId", "LoginProvider", "Name"); b.ToTable("AspNetUserTokens", (string)null); }); modelBuilder.Entity("Nuuru.Server.Models.ApplicationRole", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("TEXT"); b.Property("Color") .HasColumnType("TEXT"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasColumnType("TEXT"); b.Property("Name") .HasMaxLength(256) .HasColumnType("TEXT"); b.Property("NormalizedName") .HasMaxLength(256) .HasColumnType("TEXT"); b.Property("Priority") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("NormalizedName") .IsUnique() .HasDatabaseName("RoleNameIndex"); b.ToTable("AspNetRoles", (string)null); }); modelBuilder.Entity("Nuuru.Server.Models.ApplicationUser", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("TEXT"); b.Property("AccessFailedCount") .HasColumnType("INTEGER"); b.Property("AvatarStorageIdentifier") .HasColumnType("TEXT"); b.Property("Biography") .IsRequired() .HasColumnType("TEXT"); b.Property("BiographyHtml") .HasColumnType("TEXT"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasColumnType("TEXT"); b.Property("DateCreated") .HasColumnType("TEXT"); b.Property("Email") .HasMaxLength(256) .HasColumnType("TEXT"); b.Property("EmailConfirmed") .HasColumnType("INTEGER"); b.Property("IsSystemAccount") .HasColumnType("INTEGER"); b.Property("LockoutEnabled") .HasColumnType("INTEGER"); b.Property("LockoutEnd") .HasColumnType("TEXT"); b.Property("NormalizedEmail") .HasMaxLength(256) .HasColumnType("TEXT"); b.Property("NormalizedUserName") .HasMaxLength(256) .HasColumnType("TEXT"); b.Property("PasswordHash") .HasColumnType("TEXT"); b.Property("PhoneNumber") .HasColumnType("TEXT"); b.Property("PhoneNumberConfirmed") .HasColumnType("INTEGER"); b.Property("SecurityStamp") .HasColumnType("TEXT"); b.Property("SignupVerificationAvailableAt") .HasColumnType("TEXT"); b.Property("SignupVerificationCity") .HasColumnType("TEXT"); b.Property("SignupVerificationCompletedAt") .HasColumnType("TEXT"); b.Property("SignupVerificationCountryCode") .HasColumnType("TEXT"); b.Property("SignupVerificationIpAddress") .HasColumnType("TEXT"); b.Property("SignupVerificationIspAsn") .HasColumnType("TEXT"); b.Property("SignupVerificationIspName") .HasColumnType("TEXT"); b.Property("SignupVerificationRegionCode") .HasColumnType("TEXT"); b.Property("Status") .IsRequired() .HasColumnType("TEXT"); b.Property("TwoFactorEnabled") .HasColumnType("INTEGER"); b.Property("UserName") .HasMaxLength(256) .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("NormalizedEmail") .HasDatabaseName("EmailIndex"); b.HasIndex("NormalizedUserName") .IsUnique() .HasDatabaseName("UserNameIndex"); b.ToTable("AspNetUsers", (string)null); }); modelBuilder.Entity("Nuuru.Server.Models.AuditLog", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("TEXT"); b.Property("Action") .IsRequired() .HasColumnType("TEXT"); b.Property("Category") .IsRequired() .HasColumnType("TEXT"); b.Property("HttpMethod") .IsRequired() .HasColumnType("TEXT"); b.Property("IpAddress") .HasColumnType("TEXT"); b.Property("RequestPath") .IsRequired() .HasColumnType("TEXT"); b.Property("ResponseStatusCode") .HasColumnType("INTEGER"); b.Property("TargetId") .HasColumnType("TEXT"); b.Property("TargetType") .HasColumnType("TEXT"); b.Property("Timestamp") .HasColumnType("TEXT"); b.Property("UserId") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("Action"); b.HasIndex("Category"); b.HasIndex("IpAddress"); b.HasIndex("TargetType"); b.HasIndex("Timestamp") .IsDescending(); b.HasIndex("UserId"); b.ToTable("AuditLogs"); }); modelBuilder.Entity("Nuuru.Server.Models.Ban", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("TEXT"); b.Property("Active") .HasColumnType("INTEGER"); b.Property("AppealsDenied") .HasColumnType("INTEGER"); b.Property("EndTime") .HasColumnType("TEXT"); b.Property("Reason") .IsRequired() .HasColumnType("TEXT"); b.Property("StartTime") .HasColumnType("TEXT"); b.Property("UserId") .HasColumnType("TEXT"); b.Property("Zone") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("UserId"); b.ToTable("Bans"); }); modelBuilder.Entity("Nuuru.Server.Models.BanAppeal", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("TEXT"); b.Property("BanId") .HasColumnType("TEXT"); b.Property("CreatedAt") .HasColumnType("TEXT"); b.Property("ModeratorId") .HasColumnType("TEXT"); b.Property("ModeratorNote") .HasMaxLength(2000) .HasColumnType("TEXT"); b.Property("Reason") .IsRequired() .HasMaxLength(4000) .HasColumnType("TEXT"); b.Property("ResolvedAt") .HasColumnType("TEXT"); b.Property("Status") .HasColumnType("INTEGER"); b.Property("UserId") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("BanId"); b.HasIndex("ModeratorId"); b.HasIndex("UserId"); b.ToTable("BanAppeals"); }); modelBuilder.Entity("Nuuru.Server.Models.Booru.Comment", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("ContentHtml") .IsRequired() .HasColumnType("text"); b.Property("ContentRaw") .IsRequired() .HasMaxLength(10000) .HasColumnType("text"); b.Property("CreatedAt") .HasColumnType("TEXT"); b.Property("EditedAt") .HasColumnType("TEXT"); b.Property("IpAddress") .HasColumnType("TEXT"); b.Property("PostId") .HasColumnType("INTEGER"); b.Property("UserId") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("CreatedAt"); b.HasIndex("PostId"); b.HasIndex("UserId"); b.HasIndex("PostId", "CreatedAt"); b.HasIndex("UserId", "CreatedAt"); b.ToTable("BooruComments"); }); modelBuilder.Entity("Nuuru.Server.Models.Booru.CommentMention", b => { b.Property("CommentId") .HasColumnType("INTEGER"); b.Property("MentionedUserId") .HasColumnType("TEXT"); b.HasKey("CommentId", "MentionedUserId"); b.HasIndex("MentionedUserId"); b.ToTable("CommentMentions"); }); modelBuilder.Entity("Nuuru.Server.Models.Booru.Post", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("CommentsLocked") .HasColumnType("INTEGER"); b.Property("DurationSeconds") .HasColumnType("INTEGER"); b.Property("FeaturedAt") .HasColumnType("TEXT"); b.Property("FileSize") .HasColumnType("INTEGER"); b.Property("Height") .HasColumnType("INTEGER"); b.Property("ImageHash") .IsRequired() .HasColumnType("TEXT"); b.Property("IpAddress") .HasColumnType("TEXT"); b.Property("IsApproved") .HasColumnType("INTEGER"); b.Property("IsFeatured") .HasColumnType("INTEGER"); b.Property("IsTrashed") .HasColumnType("INTEGER"); b.Property("MimeType") .IsRequired() .HasColumnType("TEXT"); b.Property("OriginalFileName") .HasColumnType("TEXT"); b.Property("Rating") .HasColumnType("INTEGER"); b.Property("Score") .HasColumnType("INTEGER"); b.Property("Source") .HasMaxLength(2000) .HasColumnType("TEXT"); b.Property("StorageIdentifier") .IsRequired() .HasColumnType("TEXT"); b.Property("TagCount") .HasColumnType("INTEGER"); b.Property("ThumbnailPath") .HasColumnType("TEXT"); b.Property("TrashReason") .HasColumnType("TEXT"); b.Property("TrashedAt") .HasColumnType("TEXT"); b.Property("TrashedById") .HasColumnType("TEXT"); b.Property("UploadedAt") .HasColumnType("TEXT"); b.Property("UploaderId") .HasColumnType("TEXT"); b.Property("Width") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("ImageHash") .IsUnique(); b.HasIndex("IsApproved"); b.HasIndex("IsTrashed"); b.HasIndex("MimeType"); b.HasIndex("Rating"); b.HasIndex("TrashedById"); b.HasIndex("UploadedAt"); b.HasIndex("UploaderId"); b.HasIndex("IsApproved", "UploadedAt"); b.HasIndex("IsTrashed", "TrashedAt"); b.HasIndex("Rating", "UploadedAt"); b.HasIndex("UploaderId", "UploadedAt"); b.HasIndex("IsApproved", "IsTrashed", "UploadedAt"); b.ToTable("BooruPosts"); }); modelBuilder.Entity("Nuuru.Server.Models.Booru.PostFavorite", b => { b.Property("PostId") .HasColumnType("INTEGER"); b.Property("UserId") .HasColumnType("TEXT"); b.Property("CreatedAt") .HasColumnType("TEXT"); b.HasKey("PostId", "UserId"); b.HasIndex("CreatedAt"); b.HasIndex("UserId"); b.HasIndex("PostId", "CreatedAt"); b.ToTable("BooruPostFavorites"); }); modelBuilder.Entity("Nuuru.Server.Models.Booru.PostTag", b => { b.Property("PostId") .HasColumnType("INTEGER"); b.Property("TagId") .HasColumnType("TEXT"); b.Property("AddedAt") .HasColumnType("TEXT"); b.Property("IsLocked") .HasColumnType("INTEGER"); b.HasKey("PostId", "TagId"); b.HasIndex("AddedAt"); b.HasIndex("IsLocked"); b.HasIndex("TagId"); b.ToTable("PostTag"); }); modelBuilder.Entity("Nuuru.Server.Models.Booru.PostVote", b => { b.Property("PostId") .HasColumnType("INTEGER"); b.Property("UserId") .HasColumnType("TEXT"); b.Property("CreatedAt") .HasColumnType("TEXT"); b.Property("Value") .HasColumnType("INTEGER"); b.HasKey("PostId", "UserId"); b.HasIndex("CreatedAt"); b.HasIndex("UserId"); b.HasIndex("PostId", "CreatedAt"); b.ToTable("BooruPostVotes"); }); modelBuilder.Entity("Nuuru.Server.Models.Booru.SourceHistory", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("DateSet") .HasColumnType("TEXT"); b.Property("PostId") .HasColumnType("INTEGER"); b.Property("Source") .HasMaxLength(2000) .HasColumnType("TEXT"); b.Property("SuppressedAt") .HasColumnType("TEXT"); b.Property("SuppressedById") .HasColumnType("TEXT"); b.Property("SuppressionReason") .HasColumnType("TEXT"); b.Property("UserId") .HasColumnType("TEXT"); b.Property("UserIp") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("PostId"); b.HasIndex("SuppressedById"); b.HasIndex("UserId"); b.HasIndex("PostId", "DateSet"); b.ToTable("SourceHistories"); }); modelBuilder.Entity("Nuuru.Server.Models.Booru.Tag", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("TEXT"); b.Property("CategoryId") .HasColumnType("TEXT"); b.Property("CreatedAt") .HasColumnType("TEXT"); b.Property("Name") .IsRequired() .HasMaxLength(100) .HasColumnType("TEXT"); b.Property("PostCount") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("CategoryId"); b.HasIndex("Name"); b.HasIndex("PostCount"); b.HasIndex("Name", "CategoryId") .IsUnique(); b.ToTable("BooruTags"); }); modelBuilder.Entity("Nuuru.Server.Models.Booru.TagAlias", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("TEXT"); b.Property("AliasTagId") .HasColumnType("TEXT"); b.Property("CreatedAt") .HasColumnType("TEXT"); b.Property("CreatedByUserId") .HasColumnType("TEXT"); b.Property("IsActive") .HasColumnType("INTEGER"); b.Property("TargetTagId") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("AliasTagId") .IsUnique(); b.HasIndex("CreatedAt"); b.HasIndex("CreatedByUserId"); b.HasIndex("IsActive"); b.HasIndex("TargetTagId"); b.ToTable("BooruTagAliases"); }); modelBuilder.Entity("Nuuru.Server.Models.Booru.TagCategory", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("TEXT"); b.Property("ColorHex") .HasMaxLength(20) .HasColumnType("TEXT"); b.Property("IsActive") .HasColumnType("INTEGER"); b.Property("MaxPerPost") .HasColumnType("INTEGER"); b.Property("Name") .IsRequired() .HasMaxLength(100) .HasColumnType("TEXT"); b.Property("ParentCategoryId") .HasColumnType("TEXT"); b.Property("Slug") .IsRequired() .HasMaxLength(50) .HasColumnType("TEXT"); b.Property("SortOrder") .HasColumnType("INTEGER"); b.Property("Version") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("ParentCategoryId"); b.HasIndex("Slug") .IsUnique(); b.ToTable("BooruTagCategories"); b.HasData( new { Id = new Guid("20000000-0000-0000-0000-000000000001"), ColorHex = "#ff00ae", IsActive = true, Name = "Artist", Slug = "artist", SortOrder = 1, Version = 0u }, new { Id = new Guid("20000000-0000-0000-0000-000000000002"), ColorHex = "#FF0000", IsActive = true, Name = "Character", Slug = "character", SortOrder = 2, Version = 0u }, new { Id = new Guid("20000000-0000-0000-0000-000000000003"), ColorHex = "#004000", IsActive = true, Name = "Flag", Slug = "flag", SortOrder = 3, Version = 0u }, new { Id = new Guid("20000000-0000-0000-0000-000000000004"), ColorHex = "#964B00", IsActive = true, Name = "Meta", Slug = "meta", SortOrder = 4, Version = 0u }, new { Id = new Guid("20000000-0000-0000-0000-000000000005"), ColorHex = "#26a269", IsActive = true, Name = "NAS", Slug = "nas", SortOrder = 5, Version = 0u }, new { Id = new Guid("20000000-0000-0000-0000-000000000006"), ColorHex = "#AA00AA", IsActive = true, Name = "Series", Slug = "series", SortOrder = 6, Version = 0u }, new { Id = new Guid("20000000-0000-0000-0000-000000000007"), ColorHex = "#186341", IsActive = true, Name = "SubNAS", Slug = "subnas", SortOrder = 7, Version = 0u }, new { Id = new Guid("20000000-0000-0000-0000-000000000008"), ColorHex = "#e57a00", IsActive = true, Name = "Subvariant", Slug = "subvariant", SortOrder = 8, Version = 0u }, new { Id = new Guid("20000000-0000-0000-0000-000000000009"), ColorHex = "#00ff00", IsActive = true, Name = "Trend", Slug = "trend", SortOrder = 9, Version = 0u }, new { Id = new Guid("20000000-0000-0000-0000-00000000000a"), ColorHex = "#FF0000", IsActive = true, Name = "Variant", Slug = "variant", SortOrder = 10, Version = 0u }); }); modelBuilder.Entity("Nuuru.Server.Models.Booru.TagHistory", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("DateSet") .HasColumnType("TEXT"); b.Property("PostId") .HasColumnType("INTEGER"); b.Property("SuppressedAt") .HasColumnType("TEXT"); b.Property("SuppressedById") .HasColumnType("TEXT"); b.Property("SuppressionReason") .HasColumnType("TEXT"); b.Property("Tags") .IsRequired() .HasColumnType("TEXT"); b.Property("UserId") .HasColumnType("TEXT"); b.Property("UserIp") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("PostId"); b.HasIndex("SuppressedById"); b.HasIndex("UserId"); b.HasIndex("PostId", "DateSet"); b.ToTable("TagHistories"); }); modelBuilder.Entity("Nuuru.Server.Models.Booru.TagImplication", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("TEXT"); b.Property("AntecedentTagId") .HasColumnType("TEXT"); b.Property("ConsequentTagId") .HasColumnType("TEXT"); b.Property("CreatedAt") .HasColumnType("TEXT"); b.Property("CreatedByUserId") .HasColumnType("TEXT"); b.Property("IsActive") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("ConsequentTagId"); b.HasIndex("CreatedAt"); b.HasIndex("CreatedByUserId"); b.HasIndex("IsActive"); b.HasIndex("AntecedentTagId", "ConsequentTagId") .IsUnique(); b.ToTable("BooruTagImplications"); }); modelBuilder.Entity("Nuuru.Server.Models.Forum.ForumCategory", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("TEXT"); b.Property("Color") .IsRequired() .HasMaxLength(50) .HasColumnType("TEXT"); b.Property("Description") .IsRequired() .HasMaxLength(500) .HasColumnType("TEXT"); b.Property("DisplayOrder") .HasColumnType("INTEGER"); b.Property("Name") .IsRequired() .HasMaxLength(100) .HasColumnType("TEXT"); b.Property("Slug") .IsRequired() .HasMaxLength(50) .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("Slug") .IsUnique(); b.ToTable("ForumCategories"); b.HasData( new { Id = new Guid("10000000-0000-0000-0000-000000000001"), Color = "#22c55e", Description = "Random discussions and off-topic conversations", DisplayOrder = 1, Name = "General & Off-Topic", Slug = "gen" }, new { Id = new Guid("10000000-0000-0000-0000-000000000002"), Color = "#8b5cf6", Description = "Personal blogs and long-form content", DisplayOrder = 2, Name = "Blogposting", Slug = "blog" }, new { Id = new Guid("10000000-0000-0000-0000-000000000003"), Color = "#ef4444", Description = "Current events and political discussion", DisplayOrder = 3, Name = "News & Politics", Slug = "news" }, new { Id = new Guid("10000000-0000-0000-0000-000000000004"), Color = "#3b82f6", Description = "Site feedback, suggestions, and meta discussion", DisplayOrder = 4, Name = "Metadiscussion", Slug = "meta" }, new { Id = new Guid("10000000-0000-0000-0000-000000000005"), Color = "#ec4899", Description = "Share and discuss music, videos, art, and other media", DisplayOrder = 5, Name = "Multimedia", Slug = "media" }, new { Id = new Guid("10000000-0000-0000-0000-000000000006"), Color = "#f59e0b", Description = "Showcase your projects and collaborate with others", DisplayOrder = 6, Name = "Projects", Slug = "projects" }); }); modelBuilder.Entity("Nuuru.Server.Models.Forum.ForumPost", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("AuthorId") .HasColumnType("TEXT"); b.Property("ContentHtml") .IsRequired() .HasColumnType("text"); b.Property("ContentRaw") .IsRequired() .HasMaxLength(50000) .HasColumnType("text"); b.Property("CreatedAt") .HasColumnType("TEXT"); b.Property("EditedAt") .HasColumnType("TEXT"); b.Property("ThreadId") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("CreatedAt"); b.HasIndex("AuthorId", "CreatedAt"); b.HasIndex("ThreadId", "CreatedAt"); b.ToTable("ForumPosts"); }); modelBuilder.Entity("Nuuru.Server.Models.Forum.ForumPostAttachment", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("TEXT"); b.Property("ContentType") .IsRequired() .HasMaxLength(100) .HasColumnType("TEXT"); b.Property("CreatedAt") .HasColumnType("TEXT"); b.Property("FileIdentifier") .IsRequired() .HasMaxLength(255) .HasColumnType("TEXT"); b.Property("FileSize") .HasColumnType("INTEGER"); b.Property("ForumPostId") .HasColumnType("INTEGER"); b.Property("Height") .HasColumnType("INTEGER"); b.Property("OriginalFileName") .IsRequired() .HasMaxLength(255) .HasColumnType("TEXT"); b.Property("ThumbnailIdentifier") .HasMaxLength(255) .HasColumnType("TEXT"); b.Property("UploaderId") .HasColumnType("TEXT"); b.Property("Width") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("UploaderId"); b.HasIndex("ForumPostId", "CreatedAt"); b.ToTable("ForumPostAttachments"); }); modelBuilder.Entity("Nuuru.Server.Models.Forum.ForumPostMention", b => { b.Property("ForumPostId") .HasColumnType("INTEGER"); b.Property("MentionedUserId") .HasColumnType("TEXT"); b.HasKey("ForumPostId", "MentionedUserId"); b.HasIndex("MentionedUserId"); b.ToTable("ForumPostMentions"); }); modelBuilder.Entity("Nuuru.Server.Models.Forum.ForumThread", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("AuthorId") .HasColumnType("TEXT"); b.Property("CategoryId") .HasColumnType("TEXT"); b.Property("CreatedAt") .HasColumnType("TEXT"); b.Property("FirstPostId") .HasColumnType("INTEGER"); b.Property("IsLocked") .HasColumnType("INTEGER"); b.Property("IsPinned") .HasColumnType("INTEGER"); b.Property("LastPostAt") .HasColumnType("TEXT"); b.Property("LastPostId") .HasColumnType("INTEGER"); b.Property("ReplyCount") .HasColumnType("INTEGER"); b.Property("Title") .IsRequired() .HasMaxLength(200) .HasColumnType("TEXT"); b.Property("ViewCount") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("CreatedAt"); b.HasIndex("FirstPostId") .IsUnique(); b.HasIndex("LastPostId"); b.HasIndex("AuthorId", "CreatedAt"); b.HasIndex("CategoryId", "IsPinned", "LastPostAt"); b.ToTable("ForumThreads"); }); modelBuilder.Entity("Nuuru.Server.Models.Messaging.Conversation", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("TEXT"); b.Property("CreatedAt") .HasColumnType("TEXT"); b.Property("CreatorId") .HasColumnType("TEXT"); b.Property("LastMessageAt") .HasColumnType("TEXT"); b.Property("MessageCount") .HasColumnType("INTEGER"); b.Property("Title") .HasMaxLength(200) .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("CreatorId"); b.HasIndex("LastMessageAt"); b.ToTable("Conversations"); }); modelBuilder.Entity("Nuuru.Server.Models.Messaging.ConversationParticipant", b => { b.Property("ConversationId") .HasColumnType("TEXT"); b.Property("UserId") .HasColumnType("TEXT"); b.Property("HasLeft") .HasColumnType("INTEGER"); b.Property("JoinedAt") .HasColumnType("TEXT"); b.Property("LastReadAt") .HasColumnType("TEXT"); b.Property("LeftAt") .HasColumnType("TEXT"); b.HasKey("ConversationId", "UserId"); b.HasIndex("UserId"); b.HasIndex("UserId", "HasLeft"); b.ToTable("ConversationParticipants"); }); modelBuilder.Entity("Nuuru.Server.Models.Messaging.Message", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("AuthorId") .HasColumnType("TEXT"); b.Property("ContentHtml") .IsRequired() .HasColumnType("TEXT"); b.Property("ContentRaw") .IsRequired() .HasMaxLength(10000) .HasColumnType("TEXT"); b.Property("ConversationId") .HasColumnType("TEXT"); b.Property("CreatedAt") .HasColumnType("TEXT"); b.Property("EditedAt") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("AuthorId"); b.HasIndex("ConversationId"); b.HasIndex("ConversationId", "CreatedAt"); b.ToTable("Messages"); }); modelBuilder.Entity("Nuuru.Server.Models.Messaging.MessageMention", b => { b.Property("MessageId") .HasColumnType("INTEGER"); b.Property("MentionedUserId") .HasColumnType("TEXT"); b.HasKey("MessageId", "MentionedUserId"); b.HasIndex("MentionedUserId"); b.ToTable("MessageMentions"); }); modelBuilder.Entity("Nuuru.Server.Models.ModerationAction", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("TEXT"); b.Property("Action") .IsRequired() .HasColumnType("TEXT"); b.Property("Details") .HasColumnType("TEXT"); b.Property("ModeratorId") .HasColumnType("TEXT"); b.Property("Reason") .HasColumnType("TEXT"); b.Property("TargetId") .IsRequired() .HasColumnType("TEXT"); b.Property("TargetType") .IsRequired() .HasColumnType("TEXT"); b.Property("Timestamp") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("ModeratorId"); b.ToTable("ModerationActions"); }); modelBuilder.Entity("Nuuru.Server.Models.Notification", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("TEXT"); b.Property("CreatedAt") .HasColumnType("TEXT"); b.Property("IsRead") .HasColumnType("INTEGER"); b.Property("Message") .IsRequired() .HasMaxLength(500) .HasColumnType("TEXT"); b.Property("RelatedCommentId") .HasColumnType("INTEGER"); b.Property("RelatedConversationId") .HasColumnType("TEXT"); b.Property("RelatedForumPostId") .HasColumnType("INTEGER"); b.Property("RelatedForumThreadId") .HasColumnType("INTEGER"); b.Property("RelatedMessageId") .HasColumnType("INTEGER"); b.Property("RelatedPostId") .HasColumnType("INTEGER"); b.Property("TriggeredByUserId") .HasColumnType("TEXT"); b.Property("Type") .HasColumnType("INTEGER"); b.Property("UserId") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("TriggeredByUserId"); b.HasIndex("UserId", "IsRead"); b.HasIndex("UserId", "IsRead", "CreatedAt"); b.ToTable("Notifications"); }); modelBuilder.Entity("Nuuru.Server.Models.Reaction", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("CreatedAt") .HasColumnType("TEXT"); b.Property("EmoteName") .IsRequired() .HasMaxLength(32) .HasColumnType("TEXT"); b.Property("EntityId") .HasColumnType("INTEGER"); b.Property("EntityType") .HasColumnType("INTEGER"); b.Property("UserId") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("UserId"); b.HasIndex("EntityType", "EntityId"); b.HasIndex("EntityType", "EntityId", "UserId", "EmoteName") .IsUnique(); b.ToTable("Reactions"); }); modelBuilder.Entity("Nuuru.Server.Models.RefreshToken", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("TEXT"); b.Property("CreatedAt") .HasColumnType("TEXT"); b.Property("ExpiresAt") .HasColumnType("TEXT"); b.Property("IsRevoked") .HasColumnType("INTEGER"); b.Property("ReplacedByToken") .HasColumnType("TEXT"); b.Property("RevokedAt") .HasColumnType("TEXT"); b.Property("Token") .IsRequired() .HasColumnType("TEXT"); b.Property("UserId") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("UserId"); b.ToTable("RefreshTokens"); }); modelBuilder.Entity("Nuuru.Server.Models.Report", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("TEXT"); b.Property("CreatedAt") .HasColumnType("TEXT"); b.Property("ModeratorId") .HasColumnType("TEXT"); b.Property("Reason") .IsRequired() .HasMaxLength(2000) .HasColumnType("TEXT"); b.Property("ReporterId") .HasColumnType("TEXT"); b.Property("ResolutionNote") .HasMaxLength(2000) .HasColumnType("TEXT"); b.Property("ResolvedAt") .HasColumnType("TEXT"); b.Property("Status") .HasColumnType("INTEGER"); b.Property("TargetId") .IsRequired() .HasMaxLength(100) .HasColumnType("TEXT"); b.Property("TargetType") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("CreatedAt"); b.HasIndex("ModeratorId"); b.HasIndex("ReporterId"); b.HasIndex("Status"); b.HasIndex("TargetType", "TargetId", "ReporterId") .IsUnique() .HasFilter("\"Status\" = 0"); b.ToTable("Reports"); }); modelBuilder.Entity("Nuuru.Server.Models.SiteSetting", b => { b.Property("Key") .HasMaxLength(255) .HasColumnType("TEXT"); b.Property("UpdatedAt") .HasColumnType("TEXT"); b.Property("Value") .IsRequired() .HasMaxLength(4000) .HasColumnType("TEXT"); b.HasKey("Key"); b.ToTable("SiteSettings"); }); modelBuilder.Entity("Nuuru.Server.Models.StoredFile", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("TEXT"); b.Property("ContentType") .IsRequired() .HasColumnType("TEXT"); b.Property("CreatedAtUtc") .HasColumnType("TEXT"); b.Property("FileIdentifier") .IsRequired() .HasColumnType("TEXT"); b.Property("FileSize") .HasColumnType("INTEGER"); b.Property("Hash") .IsRequired() .HasColumnType("TEXT"); b.Property("IsPublic") .HasColumnType("INTEGER"); b.Property("OriginalFileName") .IsRequired() .HasColumnType("TEXT"); b.Property("UploaderId") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("FileIdentifier") .IsUnique(); b.HasIndex("Hash"); b.HasIndex("UploaderId"); b.ToTable("StoredFiles"); }); modelBuilder.Entity("Nuuru.Server.Models.UserIp", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("TEXT"); b.Property("FirstSeen") .HasColumnType("TEXT"); b.Property("IpAddress") .IsRequired() .HasColumnType("TEXT"); b.Property("LastSeen") .HasColumnType("TEXT"); b.Property("UserId") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("UserId"); b.ToTable("UserIps"); }); modelBuilder.Entity("Nuuru.Server.Models.Watch", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("CreatedAt") .HasColumnType("TEXT"); b.Property("TargetId") .HasColumnType("INTEGER"); b.Property("TargetType") .HasColumnType("INTEGER"); b.Property("UserId") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("TargetType", "TargetId"); b.HasIndex("UserId", "TargetType", "TargetId") .IsUnique(); b.ToTable("Watches"); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => { b.HasOne("Nuuru.Server.Models.ApplicationRole", null) .WithMany() .HasForeignKey("RoleId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => { b.HasOne("Nuuru.Server.Models.ApplicationUser", null) .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => { b.HasOne("Nuuru.Server.Models.ApplicationUser", null) .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => { b.HasOne("Nuuru.Server.Models.ApplicationRole", null) .WithMany() .HasForeignKey("RoleId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("Nuuru.Server.Models.ApplicationUser", null) .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => { b.HasOne("Nuuru.Server.Models.ApplicationUser", null) .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("Nuuru.Server.Models.AuditLog", b => { b.HasOne("Nuuru.Server.Models.ApplicationUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.SetNull); b.Navigation("User"); }); modelBuilder.Entity("Nuuru.Server.Models.Ban", b => { b.HasOne("Nuuru.Server.Models.ApplicationUser", "User") .WithMany("Bans") .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("User"); }); modelBuilder.Entity("Nuuru.Server.Models.BanAppeal", b => { b.HasOne("Nuuru.Server.Models.Ban", "Ban") .WithMany("Appeals") .HasForeignKey("BanId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("Nuuru.Server.Models.ApplicationUser", "Moderator") .WithMany() .HasForeignKey("ModeratorId"); b.HasOne("Nuuru.Server.Models.ApplicationUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Ban"); b.Navigation("Moderator"); b.Navigation("User"); }); modelBuilder.Entity("Nuuru.Server.Models.Booru.Comment", b => { b.HasOne("Nuuru.Server.Models.Booru.Post", "Post") .WithMany("Comments") .HasForeignKey("PostId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("Nuuru.Server.Models.ApplicationUser", "User") .WithMany("BooruComments") .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Post"); b.Navigation("User"); }); modelBuilder.Entity("Nuuru.Server.Models.Booru.CommentMention", b => { b.HasOne("Nuuru.Server.Models.Booru.Comment", "Comment") .WithMany("Mentions") .HasForeignKey("CommentId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("Nuuru.Server.Models.ApplicationUser", "MentionedUser") .WithMany() .HasForeignKey("MentionedUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Comment"); b.Navigation("MentionedUser"); }); modelBuilder.Entity("Nuuru.Server.Models.Booru.Post", b => { b.HasOne("Nuuru.Server.Models.ApplicationUser", "TrashedBy") .WithMany() .HasForeignKey("TrashedById") .OnDelete(DeleteBehavior.SetNull); b.HasOne("Nuuru.Server.Models.ApplicationUser", "Uploader") .WithMany("BooruPosts") .HasForeignKey("UploaderId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("TrashedBy"); b.Navigation("Uploader"); }); modelBuilder.Entity("Nuuru.Server.Models.Booru.PostFavorite", b => { b.HasOne("Nuuru.Server.Models.Booru.Post", "Post") .WithMany("Favorites") .HasForeignKey("PostId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("Nuuru.Server.Models.ApplicationUser", "User") .WithMany("BooruPostFavorites") .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Post"); b.Navigation("User"); }); modelBuilder.Entity("Nuuru.Server.Models.Booru.PostTag", b => { b.HasOne("Nuuru.Server.Models.Booru.Post", "Post") .WithMany("PostTags") .HasForeignKey("PostId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("Nuuru.Server.Models.Booru.Tag", "Tag") .WithMany("PostTags") .HasForeignKey("TagId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Post"); b.Navigation("Tag"); }); modelBuilder.Entity("Nuuru.Server.Models.Booru.PostVote", b => { b.HasOne("Nuuru.Server.Models.Booru.Post", "Post") .WithMany("Votes") .HasForeignKey("PostId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("Nuuru.Server.Models.ApplicationUser", "User") .WithMany("BooruPostVotes") .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Post"); b.Navigation("User"); }); modelBuilder.Entity("Nuuru.Server.Models.Booru.SourceHistory", b => { b.HasOne("Nuuru.Server.Models.Booru.Post", "Post") .WithMany() .HasForeignKey("PostId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("Nuuru.Server.Models.ApplicationUser", "SuppressedBy") .WithMany() .HasForeignKey("SuppressedById") .OnDelete(DeleteBehavior.SetNull); b.HasOne("Nuuru.Server.Models.ApplicationUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Post"); b.Navigation("SuppressedBy"); b.Navigation("User"); }); modelBuilder.Entity("Nuuru.Server.Models.Booru.Tag", b => { b.HasOne("Nuuru.Server.Models.Booru.TagCategory", "Category") .WithMany("Tags") .HasForeignKey("CategoryId"); b.Navigation("Category"); }); modelBuilder.Entity("Nuuru.Server.Models.Booru.TagAlias", b => { b.HasOne("Nuuru.Server.Models.Booru.Tag", "AliasTag") .WithMany("AliasesAsSource") .HasForeignKey("AliasTagId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("Nuuru.Server.Models.ApplicationUser", "CreatedBy") .WithMany() .HasForeignKey("CreatedByUserId") .OnDelete(DeleteBehavior.SetNull); b.HasOne("Nuuru.Server.Models.Booru.Tag", "TargetTag") .WithMany("AliasesAsTarget") .HasForeignKey("TargetTagId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("AliasTag"); b.Navigation("CreatedBy"); b.Navigation("TargetTag"); }); modelBuilder.Entity("Nuuru.Server.Models.Booru.TagCategory", b => { b.HasOne("Nuuru.Server.Models.Booru.TagCategory", "ParentCategory") .WithMany("Children") .HasForeignKey("ParentCategoryId"); b.Navigation("ParentCategory"); }); modelBuilder.Entity("Nuuru.Server.Models.Booru.TagHistory", b => { b.HasOne("Nuuru.Server.Models.Booru.Post", "Post") .WithMany() .HasForeignKey("PostId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("Nuuru.Server.Models.ApplicationUser", "SuppressedBy") .WithMany() .HasForeignKey("SuppressedById") .OnDelete(DeleteBehavior.SetNull); b.HasOne("Nuuru.Server.Models.ApplicationUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Post"); b.Navigation("SuppressedBy"); b.Navigation("User"); }); modelBuilder.Entity("Nuuru.Server.Models.Booru.TagImplication", b => { b.HasOne("Nuuru.Server.Models.Booru.Tag", "AntecedentTag") .WithMany("ImplicationsAsAntecedent") .HasForeignKey("AntecedentTagId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("Nuuru.Server.Models.Booru.Tag", "ConsequentTag") .WithMany("ImplicationsAsConsequent") .HasForeignKey("ConsequentTagId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("Nuuru.Server.Models.ApplicationUser", "CreatedBy") .WithMany() .HasForeignKey("CreatedByUserId") .OnDelete(DeleteBehavior.SetNull); b.Navigation("AntecedentTag"); b.Navigation("ConsequentTag"); b.Navigation("CreatedBy"); }); modelBuilder.Entity("Nuuru.Server.Models.Forum.ForumPost", b => { b.HasOne("Nuuru.Server.Models.ApplicationUser", "Author") .WithMany("ForumPosts") .HasForeignKey("AuthorId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("Nuuru.Server.Models.Forum.ForumThread", "Thread") .WithMany("Posts") .HasForeignKey("ThreadId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Author"); b.Navigation("Thread"); }); modelBuilder.Entity("Nuuru.Server.Models.Forum.ForumPostAttachment", b => { b.HasOne("Nuuru.Server.Models.Forum.ForumPost", "ForumPost") .WithMany("Attachments") .HasForeignKey("ForumPostId") .OnDelete(DeleteBehavior.Cascade); b.HasOne("Nuuru.Server.Models.ApplicationUser", "Uploader") .WithMany() .HasForeignKey("UploaderId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("ForumPost"); b.Navigation("Uploader"); }); modelBuilder.Entity("Nuuru.Server.Models.Forum.ForumPostMention", b => { b.HasOne("Nuuru.Server.Models.Forum.ForumPost", "ForumPost") .WithMany("Mentions") .HasForeignKey("ForumPostId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("Nuuru.Server.Models.ApplicationUser", "MentionedUser") .WithMany() .HasForeignKey("MentionedUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("ForumPost"); b.Navigation("MentionedUser"); }); modelBuilder.Entity("Nuuru.Server.Models.Forum.ForumThread", b => { b.HasOne("Nuuru.Server.Models.ApplicationUser", "Author") .WithMany("ForumThreads") .HasForeignKey("AuthorId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("Nuuru.Server.Models.Forum.ForumCategory", "Category") .WithMany("Threads") .HasForeignKey("CategoryId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("Nuuru.Server.Models.Forum.ForumPost", "FirstPost") .WithOne() .HasForeignKey("Nuuru.Server.Models.Forum.ForumThread", "FirstPostId") .OnDelete(DeleteBehavior.SetNull); b.HasOne("Nuuru.Server.Models.Forum.ForumPost", "LastPost") .WithMany() .HasForeignKey("LastPostId") .OnDelete(DeleteBehavior.SetNull); b.Navigation("Author"); b.Navigation("Category"); b.Navigation("FirstPost"); b.Navigation("LastPost"); }); modelBuilder.Entity("Nuuru.Server.Models.Messaging.Conversation", b => { b.HasOne("Nuuru.Server.Models.ApplicationUser", "Creator") .WithMany() .HasForeignKey("CreatorId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.Navigation("Creator"); }); modelBuilder.Entity("Nuuru.Server.Models.Messaging.ConversationParticipant", b => { b.HasOne("Nuuru.Server.Models.Messaging.Conversation", "Conversation") .WithMany("Participants") .HasForeignKey("ConversationId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("Nuuru.Server.Models.ApplicationUser", "User") .WithMany("ConversationParticipations") .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Conversation"); b.Navigation("User"); }); modelBuilder.Entity("Nuuru.Server.Models.Messaging.Message", b => { b.HasOne("Nuuru.Server.Models.ApplicationUser", "Author") .WithMany("Messages") .HasForeignKey("AuthorId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("Nuuru.Server.Models.Messaging.Conversation", "Conversation") .WithMany("Messages") .HasForeignKey("ConversationId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Author"); b.Navigation("Conversation"); }); modelBuilder.Entity("Nuuru.Server.Models.Messaging.MessageMention", b => { b.HasOne("Nuuru.Server.Models.ApplicationUser", "MentionedUser") .WithMany() .HasForeignKey("MentionedUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("Nuuru.Server.Models.Messaging.Message", "Message") .WithMany("Mentions") .HasForeignKey("MessageId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("MentionedUser"); b.Navigation("Message"); }); modelBuilder.Entity("Nuuru.Server.Models.ModerationAction", b => { b.HasOne("Nuuru.Server.Models.ApplicationUser", "Moderator") .WithMany() .HasForeignKey("ModeratorId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Moderator"); }); modelBuilder.Entity("Nuuru.Server.Models.Notification", b => { b.HasOne("Nuuru.Server.Models.ApplicationUser", "TriggeredByUser") .WithMany() .HasForeignKey("TriggeredByUserId") .OnDelete(DeleteBehavior.SetNull); b.HasOne("Nuuru.Server.Models.ApplicationUser", "User") .WithMany("Notifications") .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("TriggeredByUser"); b.Navigation("User"); }); modelBuilder.Entity("Nuuru.Server.Models.Reaction", b => { b.HasOne("Nuuru.Server.Models.ApplicationUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("User"); }); modelBuilder.Entity("Nuuru.Server.Models.RefreshToken", b => { b.HasOne("Nuuru.Server.Models.ApplicationUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("User"); }); modelBuilder.Entity("Nuuru.Server.Models.Report", b => { b.HasOne("Nuuru.Server.Models.ApplicationUser", "Moderator") .WithMany() .HasForeignKey("ModeratorId") .OnDelete(DeleteBehavior.SetNull); b.HasOne("Nuuru.Server.Models.ApplicationUser", "Reporter") .WithMany() .HasForeignKey("ReporterId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Moderator"); b.Navigation("Reporter"); }); modelBuilder.Entity("Nuuru.Server.Models.StoredFile", b => { b.HasOne("Nuuru.Server.Models.ApplicationUser", "Uploader") .WithMany() .HasForeignKey("UploaderId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.Navigation("Uploader"); }); modelBuilder.Entity("Nuuru.Server.Models.UserIp", b => { b.HasOne("Nuuru.Server.Models.ApplicationUser", "User") .WithMany("UserIps") .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("User"); }); modelBuilder.Entity("Nuuru.Server.Models.Watch", b => { b.HasOne("Nuuru.Server.Models.ApplicationUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("User"); }); modelBuilder.Entity("Nuuru.Server.Models.ApplicationUser", b => { b.Navigation("Bans"); b.Navigation("BooruComments"); b.Navigation("BooruPostFavorites"); b.Navigation("BooruPostVotes"); b.Navigation("BooruPosts"); b.Navigation("ConversationParticipations"); b.Navigation("ForumPosts"); b.Navigation("ForumThreads"); b.Navigation("Messages"); b.Navigation("Notifications"); b.Navigation("UserIps"); }); modelBuilder.Entity("Nuuru.Server.Models.Ban", b => { b.Navigation("Appeals"); }); modelBuilder.Entity("Nuuru.Server.Models.Booru.Comment", b => { b.Navigation("Mentions"); }); modelBuilder.Entity("Nuuru.Server.Models.Booru.Post", b => { b.Navigation("Comments"); b.Navigation("Favorites"); b.Navigation("PostTags"); b.Navigation("Votes"); }); modelBuilder.Entity("Nuuru.Server.Models.Booru.Tag", b => { b.Navigation("AliasesAsSource"); b.Navigation("AliasesAsTarget"); b.Navigation("ImplicationsAsAntecedent"); b.Navigation("ImplicationsAsConsequent"); b.Navigation("PostTags"); }); modelBuilder.Entity("Nuuru.Server.Models.Booru.TagCategory", b => { b.Navigation("Children"); b.Navigation("Tags"); }); modelBuilder.Entity("Nuuru.Server.Models.Forum.ForumCategory", b => { b.Navigation("Threads"); }); modelBuilder.Entity("Nuuru.Server.Models.Forum.ForumPost", b => { b.Navigation("Attachments"); b.Navigation("Mentions"); }); modelBuilder.Entity("Nuuru.Server.Models.Forum.ForumThread", b => { b.Navigation("Posts"); }); modelBuilder.Entity("Nuuru.Server.Models.Messaging.Conversation", b => { b.Navigation("Messages"); b.Navigation("Participants"); }); modelBuilder.Entity("Nuuru.Server.Models.Messaging.Message", b => { b.Navigation("Mentions"); }); #pragma warning restore 612, 618 } } }