// <auto-generated />
using System;
using System.Collections.Generic;
using Iceshrimp.Backend.Core.Database;
using Iceshrimp.Backend.Core.Database.Tables;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;

#nullable disable

namespace Iceshrimp.Backend.Core.Database.Migrations
{
    [DbContext(typeof(DatabaseContext))]
    partial class DatabaseContextModelSnapshot : ModelSnapshot
    {
        protected override void BuildModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder
                .HasAnnotation("ProductVersion", "9.0.2")
                .HasAnnotation("Relational:MaxIdentifierLength", 63);

            NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "antenna_src_enum", new[] { "home", "all", "users", "list", "group", "instances" });
            NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "filter_action_enum", new[] { "warn", "hide" });
            NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "filter_context_enum", new[] { "home", "lists", "threads", "notifications", "accounts", "public" });
            NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "job_status", new[] { "queued", "delayed", "running", "completed", "failed" });
            NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "marker_type_enum", new[] { "home", "notifications" });
            NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "note_visibility_enum", new[] { "public", "home", "followers", "specified" });
            NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "notification_type_enum", new[] { "follow", "mention", "reply", "renote", "quote", "like", "reaction", "pollVote", "pollEnded", "receiveFollowRequest", "followRequestAccepted", "groupInvited", "app", "edit", "bite" });
            NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "page_visibility_enum", new[] { "public", "followers", "specified" });
            NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "push_subscription_policy_enum", new[] { "all", "followed", "follower", "none" });
            NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "relay_status_enum", new[] { "requesting", "accepted", "rejected" });
            NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "user_profile_ffvisibility_enum", new[] { "public", "followers", "private" });
            NpgsqlModelBuilderExtensions.HasPostgresExtension(modelBuilder, "pg_trgm");
            NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.AllowedInstance", b =>
                {
                    b.Property<string>("Host")
                        .HasMaxLength(256)
                        .HasColumnType("character varying(256)")
                        .HasColumnName("host");

                    b.Property<bool>("IsImported")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("imported");

                    b.HasKey("Host");

                    b.ToTable("allowed_instance");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Announcement", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("createdAt")
                        .HasComment("The created date of the Announcement.");

                    b.Property<string>("ImageUrl")
                        .HasMaxLength(1024)
                        .HasColumnType("character varying(1024)")
                        .HasColumnName("imageUrl");

                    b.Property<bool>("IsGoodNews")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("isGoodNews");

                    b.Property<bool>("ShowPopup")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("showPopup");

                    b.Property<string>("Text")
                        .IsRequired()
                        .HasMaxLength(8192)
                        .HasColumnType("character varying(8192)")
                        .HasColumnName("text");

                    b.Property<string>("Title")
                        .IsRequired()
                        .HasMaxLength(256)
                        .HasColumnType("character varying(256)")
                        .HasColumnName("title");

                    b.Property<DateTime?>("UpdatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("updatedAt")
                        .HasComment("The updated date of the Announcement.");

                    b.HasKey("Id");

                    b.HasIndex("CreatedAt");

                    b.ToTable("announcement");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.AnnouncementRead", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<string>("AnnouncementId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("announcementId");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("createdAt")
                        .HasComment("The created date of the AnnouncementRead.");

                    b.Property<string>("UserId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("userId");

                    b.HasKey("Id");

                    b.HasIndex("AnnouncementId");

                    b.HasIndex("UserId");

                    b.HasIndex("UserId", "AnnouncementId")
                        .IsUnique();

                    b.ToTable("announcement_read");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Antenna", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<bool>("CaseSensitive")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("caseSensitive");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("createdAt")
                        .HasComment("The created date of the Antenna.");

                    b.Property<List<List<string>>>("ExcludeKeywords")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnType("jsonb")
                        .HasColumnName("excludeKeywords")
                        .HasDefaultValueSql("'[]'::jsonb");

                    b.Property<string>("Expression")
                        .HasMaxLength(2048)
                        .HasColumnType("character varying(2048)")
                        .HasColumnName("expression");

                    b.Property<List<string>>("Instances")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnType("jsonb")
                        .HasColumnName("instances")
                        .HasDefaultValueSql("'[]'::jsonb");

                    b.Property<List<List<string>>>("Keywords")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnType("jsonb")
                        .HasColumnName("keywords")
                        .HasDefaultValueSql("'[]'::jsonb");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("name")
                        .HasComment("The name of the Antenna.");

                    b.Property<bool>("Notify")
                        .HasColumnType("boolean")
                        .HasColumnName("notify");

                    b.Property<Antenna.AntennaSource>("Source")
                        .HasColumnType("antenna_src_enum")
                        .HasColumnName("src");

                    b.Property<string>("UserGroupMemberId")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("userGroupMemberId");

                    b.Property<string>("UserId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("userId")
                        .HasComment("The owner ID.");

                    b.Property<string>("UserListId")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("userListId");

                    b.PrimitiveCollection<List<string>>("Users")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnType("character varying(1024)[]")
                        .HasColumnName("users")
                        .HasDefaultValueSql("'{}'::character varying[]");

                    b.Property<bool>("WithFile")
                        .HasColumnType("boolean")
                        .HasColumnName("withFile");

                    b.Property<bool>("WithReplies")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("withReplies");

                    b.HasKey("Id");

                    b.HasIndex("UserGroupMemberId");

                    b.HasIndex("UserId");

                    b.HasIndex("UserListId");

                    b.ToTable("antenna");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.AttestationChallenge", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<string>("UserId")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("userId");

                    b.Property<string>("Challenge")
                        .IsRequired()
                        .HasMaxLength(64)
                        .HasColumnType("character varying(64)")
                        .HasColumnName("challenge")
                        .HasComment("Hex-encoded sha256 hash of the challenge.");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("createdAt")
                        .HasComment("The date challenge was created for expiry purposes.");

                    b.Property<bool>("RegistrationChallenge")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("registrationChallenge")
                        .HasComment("Indicates that the challenge is only for registration purposes if true to prevent the challenge for being used as authentication.");

                    b.HasKey("Id", "UserId");

                    b.HasIndex("Challenge");

                    b.HasIndex("UserId");

                    b.ToTable("attestation_challenge");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Bite", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("createdAt");

                    b.Property<string>("TargetBiteId")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("targetBiteId");

                    b.Property<string>("TargetNoteId")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("targetNoteId");

                    b.Property<string>("TargetUserId")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("targetUserId");

                    b.Property<string>("Uri")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("uri");

                    b.Property<string>("UserHost")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("userHost");

                    b.Property<string>("UserId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("userId");

                    b.HasKey("Id");

                    b.HasIndex("TargetBiteId");

                    b.HasIndex("TargetNoteId");

                    b.HasIndex("TargetUserId");

                    b.HasIndex("Uri");

                    b.HasIndex("UserHost");

                    b.HasIndex("UserId");

                    b.ToTable("bite");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.BlockedInstance", b =>
                {
                    b.Property<string>("Host")
                        .HasMaxLength(256)
                        .HasColumnType("character varying(256)")
                        .HasColumnName("host");

                    b.Property<bool>("IsImported")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("imported");

                    b.Property<string>("Reason")
                        .HasMaxLength(1024)
                        .HasColumnType("character varying(1024)")
                        .HasColumnName("reason");

                    b.HasKey("Host");

                    b.ToTable("blocked_instance");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Blocking", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<string>("BlockeeId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("blockeeId")
                        .HasComment("The blockee user ID.");

                    b.Property<string>("BlockerId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("blockerId")
                        .HasComment("The blocker user ID.");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("createdAt")
                        .HasComment("The created date of the Blocking.");

                    b.HasKey("Id");

                    b.HasIndex("BlockeeId");

                    b.HasIndex("BlockerId");

                    b.HasIndex("CreatedAt");

                    b.HasIndex("BlockerId", "BlockeeId")
                        .IsUnique();

                    b.ToTable("blocking");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.BubbleInstance", b =>
                {
                    b.Property<string>("Host")
                        .HasMaxLength(256)
                        .HasColumnType("character varying(256)")
                        .HasColumnName("host");

                    b.HasKey("Host");

                    b.ToTable("bubble_instance");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.CacheEntry", b =>
                {
                    b.Property<string>("Key")
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("key");

                    b.Property<DateTime?>("Expiry")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("expiry");

                    b.Property<TimeSpan?>("Ttl")
                        .HasColumnType("interval")
                        .HasColumnName("ttl");

                    b.Property<string>("Value")
                        .HasColumnType("text")
                        .HasColumnName("value");

                    b.HasKey("Key");

                    b.HasIndex("Expiry");

                    b.ToTable("cache_store");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Channel", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<string>("BannerId")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("bannerId")
                        .HasComment("The ID of banner Channel.");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("createdAt")
                        .HasComment("The created date of the Channel.");

                    b.Property<string>("Description")
                        .HasMaxLength(2048)
                        .HasColumnType("character varying(2048)")
                        .HasColumnName("description")
                        .HasComment("The description of the Channel.");

                    b.Property<DateTime?>("LastNotedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("lastNotedAt");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("name")
                        .HasComment("The name of the Channel.");

                    b.Property<int>("NotesCount")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer")
                        .HasDefaultValue(0)
                        .HasColumnName("notesCount")
                        .HasComment("The count of notes.");

                    b.Property<string>("UserId")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("userId")
                        .HasComment("The owner ID.");

                    b.Property<int>("UsersCount")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer")
                        .HasDefaultValue(0)
                        .HasColumnName("usersCount")
                        .HasComment("The count of users.");

                    b.HasKey("Id");

                    b.HasIndex("BannerId");

                    b.HasIndex("CreatedAt");

                    b.HasIndex("LastNotedAt");

                    b.HasIndex("NotesCount");

                    b.HasIndex("UserId");

                    b.HasIndex("UsersCount");

                    b.ToTable("channel");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.ChannelFollowing", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("createdAt")
                        .HasComment("The created date of the ChannelFollowing.");

                    b.Property<string>("FolloweeId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("followeeId")
                        .HasComment("The followee channel ID.");

                    b.Property<string>("FollowerId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("followerId")
                        .HasComment("The follower user ID.");

                    b.HasKey("Id");

                    b.HasIndex("CreatedAt");

                    b.HasIndex("FolloweeId");

                    b.HasIndex("FollowerId");

                    b.HasIndex("FollowerId", "FolloweeId")
                        .IsUnique();

                    b.ToTable("channel_following");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.ChannelNotePin", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<string>("ChannelId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("channelId");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("createdAt")
                        .HasComment("The created date of the ChannelNotePin.");

                    b.Property<string>("NoteId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("noteId");

                    b.HasKey("Id");

                    b.HasIndex("ChannelId");

                    b.HasIndex("NoteId");

                    b.HasIndex("ChannelId", "NoteId")
                        .IsUnique();

                    b.ToTable("channel_note_pin");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Clip", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("createdAt")
                        .HasComment("The created date of the Clip.");

                    b.Property<string>("Description")
                        .HasMaxLength(2048)
                        .HasColumnType("character varying(2048)")
                        .HasColumnName("description")
                        .HasComment("The description of the Clip.");

                    b.Property<bool>("IsPublic")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("isPublic");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("name")
                        .HasComment("The name of the Clip.");

                    b.Property<string>("UserId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("userId")
                        .HasComment("The owner ID.");

                    b.HasKey("Id");

                    b.HasIndex("UserId");

                    b.ToTable("clip");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.ClipNote", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<string>("ClipId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("clipId")
                        .HasComment("The clip ID.");

                    b.Property<string>("NoteId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("noteId")
                        .HasComment("The note ID.");

                    b.HasKey("Id");

                    b.HasIndex("ClipId");

                    b.HasIndex("NoteId");

                    b.HasIndex("NoteId", "ClipId")
                        .IsUnique();

                    b.ToTable("clip_note");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.DriveFile", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<string>("AccessKey")
                        .IsRequired()
                        .HasMaxLength(256)
                        .HasColumnType("character varying(256)")
                        .HasColumnName("accessKey");

                    b.Property<string>("Blurhash")
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("blurhash")
                        .HasComment("The BlurHash string.");

                    b.Property<string>("Comment")
                        .HasColumnType("text")
                        .HasColumnName("comment")
                        .HasComment("The comment of the DriveFile.");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("createdAt")
                        .HasComment("The created date of the DriveFile.");

                    b.Property<string>("FolderId")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("folderId")
                        .HasComment("The parent folder ID. If null, it means the DriveFile is located in root.");

                    b.Property<bool>("IsLink")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("isLink")
                        .HasComment("Whether the DriveFile is direct link to remote server.");

                    b.Property<bool>("IsSensitive")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("isSensitive")
                        .HasComment("Whether the DriveFile is NSFW.");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasMaxLength(256)
                        .HasColumnType("character varying(256)")
                        .HasColumnName("name")
                        .HasComment("The file name of the DriveFile.");

                    b.Property<DriveFile.FileProperties>("Properties")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnType("jsonb")
                        .HasColumnName("properties")
                        .HasDefaultValueSql("'{}'::jsonb")
                        .HasComment("The any properties of the DriveFile. For example, it includes image width/height.");

                    b.Property<string>("PublicAccessKey")
                        .HasMaxLength(256)
                        .HasColumnType("character varying(256)")
                        .HasColumnName("webpublicAccessKey");

                    b.Property<string>("PublicMimeType")
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("webpublicType");

                    b.Property<string>("PublicUrl")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("webpublicUrl")
                        .HasComment("The URL of the webpublic of the DriveFile.");

                    b.Property<Dictionary<string, string>>("RequestHeaders")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("jsonb")
                        .HasColumnName("requestHeaders")
                        .HasDefaultValueSql("'{}'::jsonb");

                    b.Property<string>("RequestIp")
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("requestIp");

                    b.Property<string>("Sha256")
                        .HasMaxLength(64)
                        .HasColumnType("character varying(64)")
                        .HasColumnName("sha256")
                        .HasComment("The SHA256 hash of the DriveFile.");

                    b.Property<int>("Size")
                        .HasColumnType("integer")
                        .HasColumnName("size")
                        .HasComment("The file size (bytes) of the DriveFile.");

                    b.Property<string>("Src")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("src");

                    b.Property<bool>("StoredInternal")
                        .HasColumnType("boolean")
                        .HasColumnName("storedInternal");

                    b.Property<string>("ThumbnailAccessKey")
                        .HasMaxLength(256)
                        .HasColumnType("character varying(256)")
                        .HasColumnName("thumbnailAccessKey");

                    b.Property<string>("ThumbnailMimeType")
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("thumbnailType");

                    b.Property<string>("ThumbnailUrl")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("thumbnailUrl")
                        .HasComment("The URL of the thumbnail of the DriveFile.");

                    b.Property<string>("Type")
                        .IsRequired()
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("type")
                        .HasComment("The content type (MIME) of the DriveFile.");

                    b.Property<string>("Uri")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("uri")
                        .HasComment("The URI of the DriveFile. it will be null when the DriveFile is local.");

                    b.Property<string>("Url")
                        .IsRequired()
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("url")
                        .HasComment("The URL of the DriveFile.");

                    b.Property<string>("UserHost")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("userHost")
                        .HasComment("The host of owner. It will be null if the user in local.");

                    b.Property<string>("UserId")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("userId")
                        .HasComment("The owner ID.");

                    b.HasKey("Id");

                    b.HasIndex("AccessKey");

                    b.HasIndex("CreatedAt");

                    b.HasIndex("FolderId");

                    b.HasIndex("IsLink");

                    b.HasIndex("IsSensitive");

                    b.HasIndex("PublicAccessKey");

                    b.HasIndex("Sha256");

                    b.HasIndex("ThumbnailAccessKey");

                    b.HasIndex("Type");

                    b.HasIndex("Uri");

                    b.HasIndex("UserHost");

                    b.HasIndex("UserId");

                    b.HasIndex("UserId", "FolderId", "Id");

                    b.ToTable("drive_file");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.DriveFolder", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("createdAt")
                        .HasComment("The created date of the DriveFolder.");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("name")
                        .HasComment("The name of the DriveFolder.");

                    b.Property<string>("ParentId")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("parentId")
                        .HasComment("The parent folder ID. If null, it means the DriveFolder is located in root.");

                    b.Property<string>("UserId")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("userId")
                        .HasComment("The owner ID.");

                    b.HasKey("Id");

                    b.HasIndex("CreatedAt");

                    b.HasIndex("ParentId");

                    b.HasIndex("UserId");

                    b.ToTable("drive_folder");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Emoji", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<string>("Category")
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("category");

                    b.Property<int?>("Height")
                        .HasColumnType("integer")
                        .HasColumnName("height")
                        .HasComment("Image height");

                    b.Property<string>("Host")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("host");

                    b.Property<string>("License")
                        .HasMaxLength(1024)
                        .HasColumnType("character varying(1024)")
                        .HasColumnName("license");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("name");

                    b.Property<string>("OriginalUrl")
                        .IsRequired()
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("originalUrl");

                    b.Property<string>("RawPublicUrl")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("publicUrl")
                        .HasDefaultValueSql("''::character varying");

                    b.Property<bool>("Sensitive")
                        .HasColumnType("boolean")
                        .HasColumnName("sensitive");

                    b.PrimitiveCollection<List<string>>("Tags")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnType("character varying(128)[]")
                        .HasColumnName("tags")
                        .HasDefaultValueSql("'{}'::character varying[]");

                    b.Property<string>("Type")
                        .HasMaxLength(64)
                        .HasColumnType("character varying(64)")
                        .HasColumnName("type");

                    b.Property<DateTime?>("UpdatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("updatedAt");

                    b.Property<string>("Uri")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("uri");

                    b.Property<int?>("Width")
                        .HasColumnType("integer")
                        .HasColumnName("width")
                        .HasComment("Image width");

                    b.HasKey("Id");

                    b.HasIndex("Host");

                    b.HasIndex("Name");

                    b.HasIndex("Name", "Host")
                        .IsUnique();

                    NpgsqlIndexBuilderExtensions.AreNullsDistinct(b.HasIndex("Name", "Host"), false);

                    b.HasIndex(new[] { "Host" }, "GIN_TRGM_emoji_host");

                    NpgsqlIndexBuilderExtensions.HasMethod(b.HasIndex(new[] { "Host" }, "GIN_TRGM_emoji_host"), "gin");
                    NpgsqlIndexBuilderExtensions.HasOperators(b.HasIndex(new[] { "Host" }, "GIN_TRGM_emoji_host"), new[] { "gin_trgm_ops" });

                    b.HasIndex(new[] { "Name" }, "GIN_TRGM_emoji_name");

                    NpgsqlIndexBuilderExtensions.HasMethod(b.HasIndex(new[] { "Name" }, "GIN_TRGM_emoji_name"), "gin");
                    NpgsqlIndexBuilderExtensions.HasOperators(b.HasIndex(new[] { "Name" }, "GIN_TRGM_emoji_name"), new[] { "gin_trgm_ops" });

                    b.ToTable("emoji");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Filter", b =>
                {
                    b.Property<long>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("bigint")
                        .HasColumnName("id");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));

                    b.Property<Filter.FilterAction>("Action")
                        .HasColumnType("filter_action_enum")
                        .HasColumnName("action");

                    b.PrimitiveCollection<List<Filter.FilterContext>>("Contexts")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnType("filter_context_enum[]")
                        .HasColumnName("contexts")
                        .HasDefaultValueSql("'{}'::public.filter_context_enum[]");

                    b.Property<DateTime?>("Expiry")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("expiry");

                    b.PrimitiveCollection<List<string>>("Keywords")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnType("text[]")
                        .HasColumnName("keywords")
                        .HasDefaultValueSql("'{}'::varchar[]");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasColumnType("text")
                        .HasColumnName("name");

                    b.Property<string>("user_id")
                        .HasColumnType("character varying(32)");

                    b.HasKey("Id");

                    b.HasIndex("user_id");

                    b.ToTable("filter");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.FollowRequest", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("createdAt")
                        .HasComment("The created date of the FollowRequest.");

                    b.Property<string>("FolloweeHost")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("followeeHost")
                        .HasComment("[Denormalized]");

                    b.Property<string>("FolloweeId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("followeeId")
                        .HasComment("The followee user ID.");

                    b.Property<string>("FolloweeInbox")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("followeeInbox")
                        .HasComment("[Denormalized]");

                    b.Property<string>("FolloweeSharedInbox")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("followeeSharedInbox")
                        .HasComment("[Denormalized]");

                    b.Property<string>("FollowerHost")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("followerHost")
                        .HasComment("[Denormalized]");

                    b.Property<string>("FollowerId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("followerId")
                        .HasComment("The follower user ID.");

                    b.Property<string>("FollowerInbox")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("followerInbox")
                        .HasComment("[Denormalized]");

                    b.Property<string>("FollowerSharedInbox")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("followerSharedInbox")
                        .HasComment("[Denormalized]");

                    b.Property<Guid?>("RelationshipId")
                        .HasColumnType("uuid")
                        .HasColumnName("relationshipId");

                    b.Property<string>("RequestId")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("requestId")
                        .HasComment("id of Follow Activity.");

                    b.HasKey("Id");

                    b.HasIndex("FolloweeId");

                    b.HasIndex("FollowerId");

                    b.HasIndex("FollowerId", "FolloweeId")
                        .IsUnique();

                    b.ToTable("follow_request");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Following", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("createdAt")
                        .HasComment("The created date of the Following.");

                    b.Property<string>("FolloweeHost")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("followeeHost")
                        .HasComment("[Denormalized]");

                    b.Property<string>("FolloweeId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("followeeId")
                        .HasComment("The followee user ID.");

                    b.Property<string>("FolloweeInbox")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("followeeInbox")
                        .HasComment("[Denormalized]");

                    b.Property<string>("FolloweeSharedInbox")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("followeeSharedInbox")
                        .HasComment("[Denormalized]");

                    b.Property<string>("FollowerHost")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("followerHost")
                        .HasComment("[Denormalized]");

                    b.Property<string>("FollowerId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("followerId")
                        .HasComment("The follower user ID.");

                    b.Property<string>("FollowerInbox")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("followerInbox")
                        .HasComment("[Denormalized]");

                    b.Property<string>("FollowerSharedInbox")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("followerSharedInbox")
                        .HasComment("[Denormalized]");

                    b.Property<Guid?>("RelationshipId")
                        .HasColumnType("uuid")
                        .HasColumnName("relationshipId");

                    b.HasKey("Id");

                    b.HasIndex("CreatedAt");

                    b.HasIndex("FolloweeHost");

                    b.HasIndex("FolloweeId");

                    b.HasIndex("FollowerHost");

                    b.HasIndex("FollowerId");

                    b.HasIndex("FollowerId", "FolloweeId")
                        .IsUnique();

                    b.ToTable("following");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.GalleryLike", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("createdAt");

                    b.Property<string>("PostId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("postId");

                    b.Property<string>("UserId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("userId");

                    b.HasKey("Id");

                    b.HasIndex("PostId");

                    b.HasIndex("UserId");

                    b.HasIndex("UserId", "PostId")
                        .IsUnique();

                    b.ToTable("gallery_like");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.GalleryPost", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("createdAt")
                        .HasComment("The created date of the GalleryPost.");

                    b.Property<string>("Description")
                        .HasMaxLength(2048)
                        .HasColumnType("character varying(2048)")
                        .HasColumnName("description");

                    b.PrimitiveCollection<List<string>>("FileIds")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnType("character varying(32)[]")
                        .HasColumnName("fileIds")
                        .HasDefaultValueSql("'{}'::character varying[]");

                    b.Property<bool>("IsSensitive")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("isSensitive")
                        .HasComment("Whether the post is sensitive.");

                    b.Property<int>("LikedCount")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer")
                        .HasDefaultValue(0)
                        .HasColumnName("likedCount");

                    b.PrimitiveCollection<List<string>>("Tags")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnType("character varying(128)[]")
                        .HasColumnName("tags")
                        .HasDefaultValueSql("'{}'::character varying[]");

                    b.Property<string>("Title")
                        .IsRequired()
                        .HasMaxLength(256)
                        .HasColumnType("character varying(256)")
                        .HasColumnName("title");

                    b.Property<DateTime>("UpdatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("updatedAt")
                        .HasComment("The updated date of the GalleryPost.");

                    b.Property<string>("UserId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("userId")
                        .HasComment("The ID of author.");

                    b.HasKey("Id");

                    b.HasIndex("CreatedAt");

                    b.HasIndex("FileIds");

                    b.HasIndex("IsSensitive");

                    b.HasIndex("LikedCount");

                    b.HasIndex("Tags");

                    b.HasIndex("UpdatedAt");

                    b.HasIndex("UserId");

                    b.ToTable("gallery_post");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Hashtag", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("name");

                    b.HasKey("Id");

                    b.HasIndex("Name")
                        .IsUnique();

                    b.ToTable("hashtag");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Instance", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<DateTime>("CaughtAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("caughtAt")
                        .HasComment("The caught date of the Instance.");

                    b.Property<string>("Description")
                        .HasMaxLength(4096)
                        .HasColumnType("character varying(4096)")
                        .HasColumnName("description");

                    b.Property<string>("FaviconUrl")
                        .HasMaxLength(4096)
                        .HasColumnType("character varying(4096)")
                        .HasColumnName("faviconUrl");

                    b.Property<string>("Host")
                        .IsRequired()
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("host")
                        .HasComment("The host of the Instance.");

                    b.Property<string>("IconUrl")
                        .HasMaxLength(4096)
                        .HasColumnType("character varying(4096)")
                        .HasColumnName("iconUrl");

                    b.Property<int>("IncomingFollows")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer")
                        .HasDefaultValue(0)
                        .HasColumnName("incomingFollows");

                    b.Property<DateTime?>("InfoUpdatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("infoUpdatedAt");

                    b.Property<bool>("IsNotResponding")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("isNotResponding");

                    b.Property<bool>("IsSuspended")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("isSuspended");

                    b.Property<DateTime>("LastCommunicatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("lastCommunicatedAt");

                    b.Property<DateTime?>("LatestRequestReceivedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("latestRequestReceivedAt");

                    b.Property<DateTime?>("LatestRequestSentAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("latestRequestSentAt");

                    b.Property<int?>("LatestStatus")
                        .HasColumnType("integer")
                        .HasColumnName("latestStatus");

                    b.Property<string>("MaintainerEmail")
                        .HasMaxLength(256)
                        .HasColumnType("character varying(256)")
                        .HasColumnName("maintainerEmail");

                    b.Property<string>("MaintainerName")
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("maintainerName");

                    b.Property<string>("Name")
                        .HasMaxLength(256)
                        .HasColumnType("character varying(256)")
                        .HasColumnName("name");

                    b.Property<int>("NotesCount")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer")
                        .HasDefaultValue(0)
                        .HasColumnName("notesCount")
                        .HasComment("The count of the notes of the Instance.");

                    b.Property<bool?>("OpenRegistrations")
                        .HasColumnType("boolean")
                        .HasColumnName("openRegistrations");

                    b.Property<int>("OutgoingFollows")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer")
                        .HasDefaultValue(0)
                        .HasColumnName("outgoingFollows");

                    b.Property<string>("SoftwareName")
                        .HasMaxLength(256)
                        .HasColumnType("character varying(256)")
                        .HasColumnName("softwareName")
                        .HasComment("The software of the Instance.");

                    b.Property<string>("SoftwareVersion")
                        .HasMaxLength(256)
                        .HasColumnType("character varying(256)")
                        .HasColumnName("softwareVersion");

                    b.Property<string>("ThemeColor")
                        .HasMaxLength(64)
                        .HasColumnType("character varying(64)")
                        .HasColumnName("themeColor");

                    b.Property<int>("UsersCount")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer")
                        .HasDefaultValue(0)
                        .HasColumnName("usersCount")
                        .HasComment("The count of the users of the Instance.");

                    b.HasKey("Id");

                    b.HasIndex("CaughtAt");

                    b.HasIndex("Host")
                        .IsUnique();

                    b.HasIndex("IncomingFollows");

                    b.HasIndex("IsSuspended");

                    b.HasIndex("OutgoingFollows");

                    b.ToTable("instance");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Job", b =>
                {
                    b.Property<Guid>("Id")
                        .HasColumnType("uuid")
                        .HasColumnName("id");

                    b.Property<string>("Data")
                        .IsRequired()
                        .HasColumnType("text")
                        .HasColumnName("data");

                    b.Property<DateTime?>("DelayedUntil")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("delayed_until");

                    b.Property<string>("Exception")
                        .HasColumnType("text")
                        .HasColumnName("exception");

                    b.Property<string>("ExceptionMessage")
                        .HasColumnType("text")
                        .HasColumnName("exception_message");

                    b.Property<string>("ExceptionSource")
                        .HasColumnType("text")
                        .HasColumnName("exception_source");

                    b.Property<DateTime?>("FinishedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("finished_at");

                    b.Property<string>("Mutex")
                        .HasColumnType("text")
                        .HasColumnName("mutex");

                    b.Property<string>("Queue")
                        .IsRequired()
                        .HasColumnType("text")
                        .HasColumnName("queue");

                    b.Property<DateTime>("QueuedAt")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("queued_at")
                        .HasDefaultValueSql("now()");

                    b.Property<int>("RetryCount")
                        .HasColumnType("integer")
                        .HasColumnName("retry_count");

                    b.Property<string>("StackTrace")
                        .HasColumnType("text")
                        .HasColumnName("stack_trace");

                    b.Property<DateTime?>("StartedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("started_at");

                    b.Property<Job.JobStatus>("Status")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("job_status")
                        .HasDefaultValue(Job.JobStatus.Queued)
                        .HasColumnName("status");

                    b.HasKey("Id");

                    b.HasIndex("DelayedUntil");

                    b.HasIndex("FinishedAt");

                    b.HasIndex("Mutex")
                        .IsUnique();

                    b.HasIndex("Queue");

                    b.HasIndex("Status");

                    b.ToTable("jobs");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Marker", b =>
                {
                    b.Property<string>("UserId")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("userId");

                    b.Property<Marker.MarkerType>("Type")
                        .HasMaxLength(32)
                        .HasColumnType("marker_type_enum")
                        .HasColumnName("type");

                    b.Property<DateTime>("LastUpdatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("lastUpdated");

                    b.Property<string>("Position")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("position");

                    b.Property<int>("Version")
                        .IsConcurrencyToken()
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer")
                        .HasDefaultValue(0)
                        .HasColumnName("version");

                    b.HasKey("UserId", "Type");

                    b.HasIndex("UserId");

                    b.ToTable("marker");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.MessagingMessage", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("createdAt")
                        .HasComment("The created date of the MessagingMessage.");

                    b.Property<string>("FileId")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("fileId");

                    b.Property<string>("GroupId")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("groupId")
                        .HasComment("The recipient group ID.");

                    b.Property<bool>("IsRead")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("isRead");

                    b.PrimitiveCollection<List<string>>("Reads")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnType("character varying(32)[]")
                        .HasColumnName("reads")
                        .HasDefaultValueSql("'{}'::character varying[]");

                    b.Property<string>("RecipientId")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("recipientId")
                        .HasComment("The recipient user ID.");

                    b.Property<string>("Text")
                        .HasMaxLength(4096)
                        .HasColumnType("character varying(4096)")
                        .HasColumnName("text");

                    b.Property<string>("Uri")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("uri");

                    b.Property<string>("UserId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("userId")
                        .HasComment("The sender user ID.");

                    b.HasKey("Id");

                    b.HasIndex("CreatedAt");

                    b.HasIndex("FileId");

                    b.HasIndex("GroupId");

                    b.HasIndex("RecipientId");

                    b.HasIndex("UserId");

                    b.ToTable("messaging_message");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Meta", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.PrimitiveCollection<List<string>>("AllowedHosts")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnType("character varying(256)[]")
                        .HasColumnName("allowedHosts")
                        .HasDefaultValueSql("'{}'::character varying[]");

                    b.Property<string>("AutofollowedAccount")
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("autofollowedAccount");

                    b.Property<string>("BackgroundImageUrl")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("backgroundImageUrl");

                    b.Property<string>("BannerUrl")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("bannerUrl");

                    b.PrimitiveCollection<List<string>>("BlockedHosts")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnType("character varying(256)[]")
                        .HasColumnName("blockedHosts")
                        .HasDefaultValueSql("'{}'::character varying[]");

                    b.Property<bool>("CacheRemoteFiles")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("cacheRemoteFiles");

                    b.PrimitiveCollection<List<string>>("CustomMotd")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnType("character varying(256)[]")
                        .HasColumnName("customMOTD")
                        .HasDefaultValueSql("'{}'::character varying[]");

                    b.PrimitiveCollection<List<string>>("CustomSplashIcons")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnType("character varying(256)[]")
                        .HasColumnName("customSplashIcons")
                        .HasDefaultValueSql("'{}'::character varying[]");

                    b.Property<string>("DeeplAuthKey")
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("deeplAuthKey");

                    b.Property<bool>("DeeplIsPro")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("deeplIsPro");

                    b.Property<string>("DefaultDarkTheme")
                        .HasMaxLength(8192)
                        .HasColumnType("character varying(8192)")
                        .HasColumnName("defaultDarkTheme");

                    b.Property<string>("DefaultLightTheme")
                        .HasMaxLength(8192)
                        .HasColumnType("character varying(8192)")
                        .HasColumnName("defaultLightTheme");

                    b.Property<string>("DefaultReaction")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasMaxLength(256)
                        .HasColumnType("character varying(256)")
                        .HasColumnName("defaultReaction")
                        .HasDefaultValueSql("'⭐'::character varying");

                    b.Property<string>("Description")
                        .HasMaxLength(1024)
                        .HasColumnType("character varying(1024)")
                        .HasColumnName("description");

                    b.Property<bool>("DisableGlobalTimeline")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("disableGlobalTimeline");

                    b.Property<bool>("DisableLocalTimeline")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("disableLocalTimeline");

                    b.Property<bool>("DisableRecommendedTimeline")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(true)
                        .HasColumnName("disableRecommendedTimeline");

                    b.Property<bool>("DisableRegistration")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("disableRegistration");

                    b.Property<string>("DiscordClientId")
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("discordClientId");

                    b.Property<string>("DiscordClientSecret")
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("discordClientSecret");

                    b.Property<string>("DonationLink")
                        .HasMaxLength(256)
                        .HasColumnType("character varying(256)")
                        .HasColumnName("donationLink");

                    b.Property<string>("Email")
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("email");

                    b.Property<bool>("EmailRequiredForSignup")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("emailRequiredForSignup");

                    b.Property<bool>("EnableActiveEmailValidation")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(true)
                        .HasColumnName("enableActiveEmailValidation");

                    b.Property<bool>("EnableDiscordIntegration")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("enableDiscordIntegration");

                    b.Property<bool>("EnableEmail")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("enableEmail");

                    b.Property<bool>("EnableGithubIntegration")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("enableGithubIntegration");

                    b.Property<bool>("EnableHcaptcha")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("enableHcaptcha");

                    b.Property<bool>("EnableIdenticonGeneration")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(true)
                        .HasColumnName("enableIdenticonGeneration");

                    b.Property<bool>("EnableIpLogging")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("enableIpLogging");

                    b.Property<bool>("EnableRecaptcha")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("enableRecaptcha");

                    b.Property<bool>("EnableServerMachineStats")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("enableServerMachineStats");

                    b.Property<string>("ErrorImageUrl")
                        .ValueGeneratedOnAdd()
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("errorImageUrl")
                        .HasDefaultValueSql("'/static-assets/badges/error.png'::character varying");

                    b.Property<Dictionary<string, bool>>("ExperimentalFeatures")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnType("jsonb")
                        .HasColumnName("experimentalFeatures")
                        .HasDefaultValueSql("'{}'::jsonb");

                    b.Property<string>("FeedbackUrl")
                        .ValueGeneratedOnAdd()
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("feedbackUrl")
                        .HasDefaultValueSql("'https://iceshrimp.dev/iceshrimp/iceshrimp/issues/new'::character varying");

                    b.Property<string>("GithubClientId")
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("githubClientId");

                    b.Property<string>("GithubClientSecret")
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("githubClientSecret");

                    b.Property<string>("HcaptchaSecretKey")
                        .HasMaxLength(64)
                        .HasColumnType("character varying(64)")
                        .HasColumnName("hcaptchaSecretKey");

                    b.Property<string>("HcaptchaSiteKey")
                        .HasMaxLength(64)
                        .HasColumnType("character varying(64)")
                        .HasColumnName("hcaptchaSiteKey");

                    b.PrimitiveCollection<List<string>>("HiddenTags")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnType("character varying(256)[]")
                        .HasColumnName("hiddenTags")
                        .HasDefaultValueSql("'{}'::character varying[]");

                    b.Property<string>("IconUrl")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("iconUrl");

                    b.PrimitiveCollection<List<string>>("Langs")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnType("character varying(64)[]")
                        .HasColumnName("langs")
                        .HasDefaultValueSql("'{}'::character varying[]");

                    b.Property<string>("LibreTranslateApiKey")
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("libreTranslateApiKey");

                    b.Property<string>("LibreTranslateApiUrl")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("libreTranslateApiUrl");

                    b.Property<int>("LocalDriveCapacityMb")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer")
                        .HasDefaultValue(1024)
                        .HasColumnName("localDriveCapacityMb")
                        .HasComment("Drive capacity of a local user (MB)");

                    b.Property<string>("LogoImageUrl")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("logoImageUrl");

                    b.Property<string>("MaintainerEmail")
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("maintainerEmail");

                    b.Property<string>("MaintainerName")
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("maintainerName");

                    b.Property<string>("MascotImageUrl")
                        .ValueGeneratedOnAdd()
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("mascotImageUrl")
                        .HasDefaultValueSql("'/static-assets/badges/info.png'::character varying");

                    b.Property<string>("Name")
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("name");

                    b.Property<string>("ObjectStorageAccessKey")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("objectStorageAccessKey");

                    b.Property<string>("ObjectStorageBaseUrl")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("objectStorageBaseUrl");

                    b.Property<string>("ObjectStorageBucket")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("objectStorageBucket");

                    b.Property<string>("ObjectStorageEndpoint")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("objectStorageEndpoint");

                    b.Property<int?>("ObjectStoragePort")
                        .HasColumnType("integer")
                        .HasColumnName("objectStoragePort");

                    b.Property<string>("ObjectStoragePrefix")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("objectStoragePrefix");

                    b.Property<string>("ObjectStorageRegion")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("objectStorageRegion");

                    b.Property<bool>("ObjectStorageS3ForcePathStyle")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(true)
                        .HasColumnName("objectStorageS3ForcePathStyle");

                    b.Property<string>("ObjectStorageSecretKey")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("objectStorageSecretKey");

                    b.Property<bool>("ObjectStorageSetPublicRead")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("objectStorageSetPublicRead");

                    b.Property<bool>("ObjectStorageUseProxy")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(true)
                        .HasColumnName("objectStorageUseProxy");

                    b.Property<bool>("ObjectStorageUseSsl")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(true)
                        .HasColumnName("objectStorageUseSSL");

                    b.Property<string>("PinnedClipId")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("pinnedClipId");

                    b.PrimitiveCollection<List<string>>("PinnedPages")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnType("character varying(512)[]")
                        .HasColumnName("pinnedPages")
                        .HasDefaultValueSql("'{/featured,/channels,/explore,/pages,/about-iceshrimp}'::character varying[]");

                    b.PrimitiveCollection<List<string>>("PinnedUsers")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnType("character varying(256)[]")
                        .HasColumnName("pinnedUsers")
                        .HasDefaultValueSql("'{}'::character varying[]");

                    b.Property<bool>("PrivateMode")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("privateMode");

                    b.Property<string>("RecaptchaSecretKey")
                        .HasMaxLength(64)
                        .HasColumnType("character varying(64)")
                        .HasColumnName("recaptchaSecretKey");

                    b.Property<string>("RecaptchaSiteKey")
                        .HasMaxLength(64)
                        .HasColumnType("character varying(64)")
                        .HasColumnName("recaptchaSiteKey");

                    b.PrimitiveCollection<List<string>>("RecommendedInstances")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnType("character varying(256)[]")
                        .HasColumnName("recommendedInstances")
                        .HasDefaultValueSql("'{}'::character varying[]");

                    b.Property<int>("RemoteDriveCapacityMb")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer")
                        .HasDefaultValue(32)
                        .HasColumnName("remoteDriveCapacityMb")
                        .HasComment("Drive capacity of a remote user (MB)");

                    b.Property<string>("RepositoryUrl")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("repositoryUrl")
                        .HasDefaultValueSql("'https://iceshrimp.dev/iceshrimp/iceshrimp'::character varying");

                    b.Property<bool>("SecureMode")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(true)
                        .HasColumnName("secureMode");

                    b.PrimitiveCollection<List<string>>("SilencedHosts")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnType("character varying(256)[]")
                        .HasColumnName("silencedHosts")
                        .HasDefaultValueSql("'{}'::character varying[]");

                    b.Property<string>("SmtpHost")
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("smtpHost");

                    b.Property<string>("SmtpPass")
                        .HasMaxLength(1024)
                        .HasColumnType("character varying(1024)")
                        .HasColumnName("smtpPass");

                    b.Property<int?>("SmtpPort")
                        .HasColumnType("integer")
                        .HasColumnName("smtpPort");

                    b.Property<bool>("SmtpSecure")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("smtpSecure");

                    b.Property<string>("SmtpUser")
                        .HasMaxLength(1024)
                        .HasColumnType("character varying(1024)")
                        .HasColumnName("smtpUser");

                    b.Property<string>("SummalyProxy")
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("summalyProxy");

                    b.Property<string>("SwPrivateKey")
                        .IsRequired()
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("swPrivateKey");

                    b.Property<string>("SwPublicKey")
                        .IsRequired()
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("swPublicKey");

                    b.Property<string>("ThemeColor")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("themeColor");

                    b.Property<string>("ToSurl")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("ToSUrl");

                    b.Property<bool>("UseObjectStorage")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("useObjectStorage");

                    b.HasKey("Id");

                    b.ToTable("meta");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.MetaStoreEntry", b =>
                {
                    b.Property<string>("Key")
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("key");

                    b.Property<string>("Value")
                        .HasColumnType("text")
                        .HasColumnName("value");

                    b.HasKey("Key");

                    b.HasIndex("Key", "Value");

                    b.ToTable("meta_store");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.ModerationLog", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("createdAt")
                        .HasComment("The created date of the ModerationLog.");

                    b.Property<string>("Info")
                        .IsRequired()
                        .HasColumnType("jsonb")
                        .HasColumnName("info");

                    b.Property<string>("Type")
                        .IsRequired()
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("type");

                    b.Property<string>("UserId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("userId");

                    b.HasKey("Id");

                    b.HasIndex("UserId");

                    b.ToTable("moderation_log");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Muting", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("createdAt")
                        .HasComment("The created date of the Muting.");

                    b.Property<DateTime?>("ExpiresAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("expiresAt");

                    b.Property<string>("MuteeId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("muteeId")
                        .HasComment("The mutee user ID.");

                    b.Property<string>("MuterId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("muterId")
                        .HasComment("The muter user ID.");

                    b.HasKey("Id");

                    b.HasIndex("CreatedAt");

                    b.HasIndex("ExpiresAt");

                    b.HasIndex("MuteeId");

                    b.HasIndex("MuterId");

                    b.HasIndex("MuterId", "MuteeId")
                        .IsUnique();

                    b.ToTable("muting");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Note", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.PrimitiveCollection<List<string>>("AttachedFileTypes")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnType("character varying(256)[]")
                        .HasColumnName("attachedFileTypes")
                        .HasDefaultValueSql("'{}'::character varying[]");

                    b.Property<string>("ChannelId")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("channelId")
                        .HasComment("The ID of source channel.");

                    b.Property<string>("CombinedAltText")
                        .HasColumnType("text")
                        .HasColumnName("combinedAltText");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("createdAt")
                        .HasComment("The created date of the Note.");

                    b.Property<string>("Cw")
                        .HasColumnType("text")
                        .HasColumnName("cw");

                    b.PrimitiveCollection<List<string>>("Emojis")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnType("character varying(128)[]")
                        .HasColumnName("emojis")
                        .HasDefaultValueSql("'{}'::character varying[]");

                    b.PrimitiveCollection<List<string>>("FileIds")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnType("character varying(32)[]")
                        .HasColumnName("fileIds")
                        .HasDefaultValueSql("'{}'::character varying[]");

                    b.Property<bool>("HasPoll")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("hasPoll");

                    b.Property<int>("LikeCount")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer")
                        .HasDefaultValue(0)
                        .HasColumnName("likeCount");

                    b.Property<bool>("LocalOnly")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("localOnly");

                    b.Property<string>("MastoReplyUserId")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("mastoReplyUserId");

                    b.Property<List<Note.MentionedUser>>("MentionedRemoteUsers")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnType("jsonb")
                        .HasColumnName("mentionedRemoteUsers")
                        .HasDefaultValueSql("'[]'::jsonb");

                    b.PrimitiveCollection<List<string>>("Mentions")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnType("character varying(32)[]")
                        .HasColumnName("mentions")
                        .HasDefaultValueSql("'{}'::character varying[]");

                    b.Property<string>("Name")
                        .HasMaxLength(256)
                        .HasColumnType("character varying(256)")
                        .HasColumnName("name");

                    b.Property<Dictionary<string, long>>("Reactions")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnType("jsonb")
                        .HasColumnName("reactions")
                        .HasDefaultValueSql("'{}'::jsonb");

                    b.Property<short>("RenoteCount")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("smallint")
                        .HasDefaultValue((short)0)
                        .HasColumnName("renoteCount");

                    b.Property<string>("RenoteId")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("renoteId")
                        .HasComment("The ID of renote target.");

                    b.Property<string>("RenoteUri")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("renoteUri")
                        .HasComment("The URI of the renote target, if it couldn't be resolved at time of ingestion.");

                    b.Property<string>("RenoteUserHost")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("renoteUserHost")
                        .HasComment("[Denormalized]");

                    b.Property<string>("RenoteUserId")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("renoteUserId")
                        .HasComment("[Denormalized]");

                    b.Property<string>("RepliesCollection")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("repliesCollection");

                    b.Property<short>("RepliesCount")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("smallint")
                        .HasDefaultValue((short)0)
                        .HasColumnName("repliesCount");

                    b.Property<DateTime?>("RepliesFetchedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("repliesFetchedAt");

                    b.Property<string>("ReplyId")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("replyId")
                        .HasComment("The ID of reply target.");

                    b.Property<string>("ReplyUri")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("replyUri")
                        .HasComment("The URI of the reply target, if it couldn't be resolved at time of ingestion.");

                    b.Property<string>("ReplyUserHost")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("replyUserHost")
                        .HasComment("[Denormalized]");

                    b.Property<string>("ReplyUserId")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("replyUserId")
                        .HasComment("[Denormalized]");

                    b.Property<int>("Score")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer")
                        .HasDefaultValue(0)
                        .HasColumnName("score");

                    b.PrimitiveCollection<List<string>>("Tags")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnType("character varying(128)[]")
                        .HasColumnName("tags")
                        .HasDefaultValueSql("'{}'::character varying[]");

                    b.Property<string>("Text")
                        .HasColumnType("text")
                        .HasColumnName("text");

                    b.Property<string>("ThreadId")
                        .IsRequired()
                        .HasMaxLength(256)
                        .HasColumnType("character varying(256)")
                        .HasColumnName("threadId");

                    b.Property<DateTime?>("UpdatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("updatedAt")
                        .HasComment("The updated date of the Note.");

                    b.Property<string>("Uri")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("uri")
                        .HasComment("The URI of a note. it will be null when the note is local.");

                    b.Property<string>("Url")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("url")
                        .HasComment("The human readable url of a note. it will be null when the note is local.");

                    b.Property<string>("UserHost")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("userHost")
                        .HasComment("[Denormalized]");

                    b.Property<string>("UserId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("userId")
                        .HasComment("The ID of author.");

                    b.Property<Note.NoteVisibility>("Visibility")
                        .HasColumnType("note_visibility_enum")
                        .HasColumnName("visibility");

                    b.PrimitiveCollection<List<string>>("VisibleUserIds")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnType("character varying(32)[]")
                        .HasColumnName("visibleUserIds")
                        .HasDefaultValueSql("'{}'::character varying[]");

                    b.HasKey("Id");

                    b.HasIndex("AttachedFileTypes");

                    b.HasIndex("ChannelId");

                    b.HasIndex("CreatedAt");

                    b.HasIndex("FileIds");

                    b.HasIndex("Mentions");

                    b.HasIndex("RenoteId");

                    b.HasIndex("RenoteUri");

                    b.HasIndex("ReplyId");

                    b.HasIndex("ReplyUri");

                    b.HasIndex("Tags");

                    b.HasIndex("ThreadId");

                    b.HasIndex("Uri")
                        .IsUnique();

                    b.HasIndex("Url");

                    b.HasIndex("UserHost");

                    b.HasIndex("UserId");

                    b.HasIndex("Visibility");

                    b.HasIndex("VisibleUserIds");

                    b.HasIndex("CreatedAt", "UserId");

                    b.HasIndex("Id", "UserHost");

                    b.HasIndex("UserId", "Id");

                    b.HasIndex(new[] { "CombinedAltText" }, "GIN_TRGM_note_combined_alt_text");

                    NpgsqlIndexBuilderExtensions.HasMethod(b.HasIndex(new[] { "CombinedAltText" }, "GIN_TRGM_note_combined_alt_text"), "gin");
                    NpgsqlIndexBuilderExtensions.HasOperators(b.HasIndex(new[] { "CombinedAltText" }, "GIN_TRGM_note_combined_alt_text"), new[] { "gin_trgm_ops" });

                    b.HasIndex(new[] { "Cw" }, "GIN_TRGM_note_cw");

                    NpgsqlIndexBuilderExtensions.HasMethod(b.HasIndex(new[] { "Cw" }, "GIN_TRGM_note_cw"), "gin");
                    NpgsqlIndexBuilderExtensions.HasOperators(b.HasIndex(new[] { "Cw" }, "GIN_TRGM_note_cw"), new[] { "gin_trgm_ops" });

                    b.HasIndex(new[] { "Text" }, "GIN_TRGM_note_text");

                    NpgsqlIndexBuilderExtensions.HasMethod(b.HasIndex(new[] { "Text" }, "GIN_TRGM_note_text"), "gin");
                    NpgsqlIndexBuilderExtensions.HasOperators(b.HasIndex(new[] { "Text" }, "GIN_TRGM_note_text"), new[] { "gin_trgm_ops" });

                    b.HasIndex(new[] { "Mentions" }, "GIN_note_mentions");

                    NpgsqlIndexBuilderExtensions.HasMethod(b.HasIndex(new[] { "Mentions" }, "GIN_note_mentions"), "gin");

                    b.HasIndex(new[] { "Tags" }, "GIN_note_tags");

                    NpgsqlIndexBuilderExtensions.HasMethod(b.HasIndex(new[] { "Tags" }, "GIN_note_tags"), "gin");

                    b.HasIndex(new[] { "VisibleUserIds" }, "GIN_note_visibleUserIds");

                    NpgsqlIndexBuilderExtensions.HasMethod(b.HasIndex(new[] { "VisibleUserIds" }, "GIN_note_visibleUserIds"), "gin");

                    b.ToTable("note");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.NoteBookmark", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("createdAt")
                        .HasComment("The created date of the NoteBookmark.");

                    b.Property<string>("NoteId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("noteId");

                    b.Property<string>("UserId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("userId");

                    b.HasKey("Id");

                    b.HasIndex("NoteId");

                    b.HasIndex("UserId");

                    b.HasIndex("UserId", "NoteId")
                        .IsUnique();

                    b.ToTable("note_bookmark");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.NoteEdit", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<string>("Cw")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("cw");

                    b.PrimitiveCollection<List<string>>("FileIds")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnType("character varying(32)[]")
                        .HasColumnName("fileIds")
                        .HasDefaultValueSql("'{}'::character varying[]");

                    b.Property<string>("NoteId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("noteId")
                        .HasComment("The ID of note.");

                    b.Property<string>("Text")
                        .HasColumnType("text")
                        .HasColumnName("text");

                    b.Property<DateTime>("UpdatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("updatedAt")
                        .HasComment("The updated date of the Note.");

                    b.HasKey("Id");

                    b.HasIndex("NoteId");

                    b.ToTable("note_edit");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.NoteLike", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("createdAt");

                    b.Property<string>("NoteId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("noteId");

                    b.Property<string>("UserId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("userId");

                    b.HasKey("Id");

                    b.HasIndex("NoteId");

                    b.HasIndex("UserId");

                    b.HasIndex("UserId", "NoteId")
                        .IsUnique();

                    b.ToTable("note_like");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.NoteReaction", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("createdAt")
                        .HasComment("The created date of the NoteReaction.");

                    b.Property<string>("NoteId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("noteId");

                    b.Property<string>("Reaction")
                        .IsRequired()
                        .HasMaxLength(260)
                        .HasColumnType("character varying(260)")
                        .HasColumnName("reaction");

                    b.Property<string>("UserId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("userId");

                    b.HasKey("Id");

                    b.HasIndex("CreatedAt");

                    b.HasIndex("NoteId");

                    b.HasIndex("UserId");

                    b.HasIndex("UserId", "NoteId", "Reaction")
                        .IsUnique();

                    b.ToTable("note_reaction");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.NoteThread", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(256)
                        .HasColumnType("character varying(256)")
                        .HasColumnName("id");

                    b.Property<DateTime?>("BackfilledAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("backfilledAt");

                    b.Property<bool?>("IsResolvable")
                        .HasColumnType("boolean")
                        .HasColumnName("isResolvable");

                    b.Property<string>("Uri")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("uri");

                    b.Property<string>("UserId")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("userId");

                    b.HasKey("Id");

                    b.HasIndex("Uri")
                        .IsUnique();

                    b.HasIndex("UserId");

                    b.ToTable("note_thread");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.NoteThreadMuting", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("createdAt");

                    b.Property<string>("ThreadId")
                        .IsRequired()
                        .HasMaxLength(256)
                        .HasColumnType("character varying(256)")
                        .HasColumnName("threadId");

                    b.Property<string>("UserId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("userId");

                    b.HasKey("Id");

                    b.HasIndex("ThreadId");

                    b.HasIndex("UserId");

                    b.HasIndex("UserId", "ThreadId")
                        .IsUnique();

                    b.ToTable("note_thread_muting");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.NoteUnread", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<bool>("IsMentioned")
                        .HasColumnType("boolean")
                        .HasColumnName("isMentioned");

                    b.Property<bool>("IsSpecified")
                        .HasColumnType("boolean")
                        .HasColumnName("isSpecified");

                    b.Property<string>("NoteChannelId")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("noteChannelId")
                        .HasComment("[Denormalized]");

                    b.Property<string>("NoteId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("noteId");

                    b.Property<string>("NoteUserId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("noteUserId")
                        .HasComment("[Denormalized]");

                    b.Property<string>("UserId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("userId");

                    b.HasKey("Id");

                    b.HasIndex("IsMentioned");

                    b.HasIndex("IsSpecified");

                    b.HasIndex("NoteChannelId");

                    b.HasIndex("NoteId");

                    b.HasIndex("NoteUserId");

                    b.HasIndex("UserId");

                    b.HasIndex("UserId", "NoteId")
                        .IsUnique();

                    b.ToTable("note_unread");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.NoteWatching", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("createdAt")
                        .HasComment("The created date of the NoteWatching.");

                    b.Property<string>("NoteId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("noteId")
                        .HasComment("The target Note ID.");

                    b.Property<string>("NoteUserId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("noteUserId")
                        .HasComment("[Denormalized]");

                    b.Property<string>("UserId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("userId")
                        .HasComment("The watcher ID.");

                    b.HasKey("Id");

                    b.HasIndex("CreatedAt");

                    b.HasIndex("NoteId");

                    b.HasIndex("NoteUserId");

                    b.HasIndex("UserId");

                    b.HasIndex("UserId", "NoteId")
                        .IsUnique();

                    b.ToTable("note_watching");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Notification", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<string>("AppAccessTokenId")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("appAccessTokenId");

                    b.Property<string>("BiteId")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("biteId");

                    b.Property<int?>("Choice")
                        .HasColumnType("integer")
                        .HasColumnName("choice");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("createdAt")
                        .HasComment("The created date of the Notification.");

                    b.Property<string>("CustomBody")
                        .HasMaxLength(2048)
                        .HasColumnType("character varying(2048)")
                        .HasColumnName("customBody");

                    b.Property<string>("CustomHeader")
                        .HasMaxLength(256)
                        .HasColumnType("character varying(256)")
                        .HasColumnName("customHeader");

                    b.Property<string>("CustomIcon")
                        .HasMaxLength(1024)
                        .HasColumnType("character varying(1024)")
                        .HasColumnName("customIcon");

                    b.Property<string>("FollowRequestId")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("followRequestId");

                    b.Property<bool>("IsRead")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("isRead")
                        .HasComment("Whether the notification was read.");

                    b.Property<long>("MastoId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("bigint")
                        .HasColumnName("masto_id");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("MastoId"));

                    b.Property<string>("NoteId")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("noteId");

                    b.Property<string>("NotifieeId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("notifieeId")
                        .HasComment("The ID of recipient user of the Notification.");

                    b.Property<string>("NotifierId")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("notifierId")
                        .HasComment("The ID of sender user of the Notification.");

                    b.Property<string>("Reaction")
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("reaction");

                    b.Property<Notification.NotificationType>("Type")
                        .HasColumnType("notification_type_enum")
                        .HasColumnName("type")
                        .HasComment("The type of the Notification.");

                    b.Property<string>("UserGroupInvitationId")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("userGroupInvitationId");

                    b.HasKey("Id");

                    b.HasIndex("AppAccessTokenId");

                    b.HasIndex("BiteId");

                    b.HasIndex("CreatedAt");

                    b.HasIndex("FollowRequestId");

                    b.HasIndex("IsRead");

                    b.HasIndex("MastoId");

                    b.HasIndex("NoteId");

                    b.HasIndex("NotifieeId");

                    b.HasIndex("NotifierId");

                    b.HasIndex("Type");

                    b.HasIndex("UserGroupInvitationId");

                    b.ToTable("notification");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.OauthApp", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<string>("ClientId")
                        .IsRequired()
                        .HasMaxLength(64)
                        .HasColumnType("character varying(64)")
                        .HasColumnName("clientId")
                        .HasComment("The client id of the OAuth application");

                    b.Property<string>("ClientSecret")
                        .IsRequired()
                        .HasMaxLength(64)
                        .HasColumnType("character varying(64)")
                        .HasColumnName("clientSecret")
                        .HasComment("The client secret of the OAuth application");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("createdAt")
                        .HasComment("The created date of the OAuth application");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("name")
                        .HasComment("The name of the OAuth application");

                    b.PrimitiveCollection<List<string>>("RedirectUris")
                        .IsRequired()
                        .HasColumnType("character varying(512)[]")
                        .HasColumnName("redirectUris")
                        .HasComment("The redirect URIs of the OAuth application");

                    b.PrimitiveCollection<List<string>>("Scopes")
                        .IsRequired()
                        .HasColumnType("character varying(64)[]")
                        .HasColumnName("scopes")
                        .HasComment("The scopes requested by the OAuth application");

                    b.Property<string>("Website")
                        .HasMaxLength(256)
                        .HasColumnType("character varying(256)")
                        .HasColumnName("website")
                        .HasComment("The website of the OAuth application");

                    b.HasKey("Id");

                    b.HasIndex("ClientId")
                        .IsUnique();

                    b.ToTable("oauth_app");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.OauthToken", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<bool>("Active")
                        .HasColumnType("boolean")
                        .HasColumnName("active")
                        .HasComment("Whether or not the token has been activated");

                    b.Property<string>("AppId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("appId");

                    b.Property<bool>("AutoDetectQuotes")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(true)
                        .HasColumnName("autoDetectQuotes")
                        .HasComment("Whether the backend should automatically detect quote posts coming from this client");

                    b.Property<string>("Code")
                        .IsRequired()
                        .HasMaxLength(64)
                        .HasColumnType("character varying(64)")
                        .HasColumnName("code")
                        .HasComment("The auth code for the OAuth token");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("createdAt")
                        .HasComment("The created date of the OAuth token");

                    b.Property<bool>("IsPleroma")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("isPleroma")
                        .HasComment("Whether Pleroma or Akkoma specific behavior should be enabled for this client");

                    b.Property<DateTime?>("LastActiveDate")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("lastActiveDate");

                    b.Property<string>("RedirectUri")
                        .IsRequired()
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("redirectUri")
                        .HasComment("The redirect URI of the OAuth token");

                    b.PrimitiveCollection<List<string>>("Scopes")
                        .IsRequired()
                        .HasColumnType("character varying(64)[]")
                        .HasColumnName("scopes")
                        .HasComment("The scopes requested by the OAuth token");

                    b.Property<bool>("SupportsHtmlFormatting")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(true)
                        .HasColumnName("supportsHtmlFormatting")
                        .HasComment("Whether the client supports HTML inline formatting (bold, italic, strikethrough, ...)");

                    b.Property<bool>("SupportsInlineMedia")
                        .HasColumnType("boolean")
                        .HasColumnName("supportsInlineMedia");

                    b.Property<string>("Token")
                        .IsRequired()
                        .HasMaxLength(64)
                        .HasColumnType("character varying(64)")
                        .HasColumnName("token")
                        .HasComment("The OAuth token");

                    b.Property<string>("UserId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("userId");

                    b.HasKey("Id");

                    b.HasIndex("AppId");

                    b.HasIndex("Code");

                    b.HasIndex("Token");

                    b.HasIndex("UserId");

                    b.ToTable("oauth_token");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Page", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<bool>("AlignCenter")
                        .HasColumnType("boolean")
                        .HasColumnName("alignCenter");

                    b.Property<string>("Content")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnType("jsonb")
                        .HasColumnName("content")
                        .HasDefaultValueSql("'[]'::jsonb");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("createdAt")
                        .HasComment("The created date of the Page.");

                    b.Property<string>("EyeCatchingImageId")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("eyeCatchingImageId");

                    b.Property<string>("Font")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("font");

                    b.Property<bool>("HideTitleWhenPinned")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("hideTitleWhenPinned");

                    b.Property<bool>("IsPublic")
                        .HasColumnType("boolean")
                        .HasColumnName("isPublic");

                    b.Property<int>("LikedCount")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer")
                        .HasDefaultValue(0)
                        .HasColumnName("likedCount");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasMaxLength(256)
                        .HasColumnType("character varying(256)")
                        .HasColumnName("name");

                    b.Property<string>("Script")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasMaxLength(16384)
                        .HasColumnType("character varying(16384)")
                        .HasColumnName("script")
                        .HasDefaultValueSql("''::character varying");

                    b.Property<string>("Summary")
                        .HasMaxLength(256)
                        .HasColumnType("character varying(256)")
                        .HasColumnName("summary");

                    b.Property<string>("Title")
                        .IsRequired()
                        .HasMaxLength(256)
                        .HasColumnType("character varying(256)")
                        .HasColumnName("title");

                    b.Property<DateTime>("UpdatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("updatedAt")
                        .HasComment("The updated date of the Page.");

                    b.Property<string>("UserId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("userId")
                        .HasComment("The ID of author.");

                    b.Property<string>("Variables")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnType("jsonb")
                        .HasColumnName("variables")
                        .HasDefaultValueSql("'[]'::jsonb");

                    b.Property<Page.PageVisibility>("Visibility")
                        .HasColumnType("page_visibility_enum")
                        .HasColumnName("visibility");

                    b.PrimitiveCollection<List<string>>("VisibleUserIds")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnType("character varying(32)[]")
                        .HasColumnName("visibleUserIds")
                        .HasDefaultValueSql("'{}'::character varying[]");

                    b.HasKey("Id");

                    b.HasIndex("CreatedAt");

                    b.HasIndex("EyeCatchingImageId");

                    b.HasIndex("Name");

                    b.HasIndex("UpdatedAt");

                    b.HasIndex("UserId");

                    b.HasIndex("VisibleUserIds");

                    b.HasIndex("UserId", "Name")
                        .IsUnique();

                    b.ToTable("page");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.PageLike", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("createdAt");

                    b.Property<string>("PageId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("pageId");

                    b.Property<string>("UserId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("userId");

                    b.HasKey("Id");

                    b.HasIndex("PageId");

                    b.HasIndex("UserId");

                    b.HasIndex("UserId", "PageId")
                        .IsUnique();

                    b.ToTable("page_like");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.PasswordResetRequest", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("createdAt");

                    b.Property<string>("Token")
                        .IsRequired()
                        .HasMaxLength(256)
                        .HasColumnType("character varying(256)")
                        .HasColumnName("token");

                    b.Property<string>("UserId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("userId");

                    b.HasKey("Id");

                    b.HasIndex("Token")
                        .IsUnique();

                    b.HasIndex("UserId");

                    b.ToTable("password_reset_request");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.PluginStoreEntry", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid")
                        .HasColumnName("id");

                    b.Property<string>("Data")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnType("jsonb")
                        .HasColumnName("data")
                        .HasDefaultValueSql("'{}'::jsonb")
                        .HasComment("The plugin-specific data object");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasColumnType("text")
                        .HasColumnName("name");

                    b.HasKey("Id");

                    b.HasIndex("Id");

                    b.ToTable("plugin_store");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.PolicyConfiguration", b =>
                {
                    b.Property<string>("Name")
                        .HasColumnType("text")
                        .HasColumnName("name");

                    b.Property<string>("Data")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnType("jsonb")
                        .HasColumnName("data")
                        .HasDefaultValueSql("'{}'::jsonb")
                        .HasComment("The plugin-specific data object");

                    b.HasKey("Name");

                    b.ToTable("policy_configuration");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Poll", b =>
                {
                    b.Property<string>("NoteId")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("noteId");

                    b.PrimitiveCollection<List<string>>("Choices")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnType("character varying(256)[]")
                        .HasColumnName("choices")
                        .HasDefaultValueSql("'{}'::character varying[]");

                    b.Property<DateTime?>("ExpiresAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("expiresAt");

                    b.Property<bool>("Multiple")
                        .HasColumnType("boolean")
                        .HasColumnName("multiple");

                    b.Property<Note.NoteVisibility>("NoteVisibility")
                        .HasColumnType("note_visibility_enum")
                        .HasColumnName("noteVisibility")
                        .HasComment("[Denormalized]");

                    b.Property<string>("UserHost")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("userHost")
                        .HasComment("[Denormalized]");

                    b.Property<string>("UserId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("userId")
                        .HasComment("[Denormalized]");

                    b.Property<int?>("VotersCount")
                        .HasColumnType("integer")
                        .HasColumnName("votersCount");

                    b.PrimitiveCollection<List<int>>("Votes")
                        .IsRequired()
                        .HasColumnType("integer[]")
                        .HasColumnName("votes");

                    b.HasKey("NoteId");

                    b.HasIndex("UserHost");

                    b.HasIndex("UserId");

                    b.ToTable("poll");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.PollVote", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<int>("Choice")
                        .HasColumnType("integer")
                        .HasColumnName("choice");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("createdAt")
                        .HasComment("The created date of the PollVote.");

                    b.Property<string>("NoteId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("noteId");

                    b.Property<string>("UserId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("userId");

                    b.HasKey("Id");

                    b.HasIndex("CreatedAt");

                    b.HasIndex("NoteId");

                    b.HasIndex("UserId");

                    b.HasIndex("UserId", "NoteId", "Choice")
                        .IsUnique();

                    b.ToTable("poll_vote");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.PromoNote", b =>
                {
                    b.Property<string>("NoteId")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("noteId");

                    b.Property<DateTime>("ExpiresAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("expiresAt");

                    b.Property<string>("UserId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("userId")
                        .HasComment("[Denormalized]");

                    b.HasKey("NoteId");

                    b.HasIndex("UserId");

                    b.ToTable("promo_note");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.PromoRead", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("createdAt")
                        .HasComment("The created date of the PromoRead.");

                    b.Property<string>("NoteId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("noteId");

                    b.Property<string>("UserId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("userId");

                    b.HasKey("Id");

                    b.HasIndex("NoteId");

                    b.HasIndex("UserId");

                    b.HasIndex("UserId", "NoteId")
                        .IsUnique();

                    b.ToTable("promo_read");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.PushSubscription", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<string>("AuthSecret")
                        .IsRequired()
                        .HasMaxLength(256)
                        .HasColumnType("character varying(256)")
                        .HasColumnName("auth");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("createdAt");

                    b.Property<string>("Endpoint")
                        .IsRequired()
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("endpoint");

                    b.Property<string>("OauthTokenId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("oauthTokenId");

                    b.Property<PushSubscription.PushPolicy>("Policy")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("push_subscription_policy_enum")
                        .HasDefaultValue(PushSubscription.PushPolicy.All)
                        .HasColumnName("policy");

                    b.Property<string>("PublicKey")
                        .IsRequired()
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("publickey");

                    b.PrimitiveCollection<List<string>>("Types")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnType("character varying(32)[]")
                        .HasColumnName("types")
                        .HasDefaultValueSql("'{}'::character varying[]");

                    b.Property<string>("UserId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("userId");

                    b.HasKey("Id");

                    b.HasIndex("OauthTokenId")
                        .IsUnique();

                    b.HasIndex("UserId");

                    b.ToTable("push_subscription");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.RegistrationInvite", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<string>("Code")
                        .IsRequired()
                        .HasMaxLength(64)
                        .HasColumnType("character varying(64)")
                        .HasColumnName("code");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("createdAt");

                    b.HasKey("Id");

                    b.HasIndex("Code")
                        .IsUnique();

                    b.ToTable("registration_invite");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.RegistryItem", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("createdAt")
                        .HasComment("The created date of the RegistryItem.");

                    b.Property<string>("Domain")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("domain");

                    b.Property<string>("Key")
                        .IsRequired()
                        .HasMaxLength(1024)
                        .HasColumnType("character varying(1024)")
                        .HasColumnName("key")
                        .HasComment("The key of the RegistryItem.");

                    b.PrimitiveCollection<List<string>>("Scope")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnType("character varying(1024)[]")
                        .HasColumnName("scope")
                        .HasDefaultValueSql("'{}'::character varying[]");

                    b.Property<DateTime>("UpdatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("updatedAt")
                        .HasComment("The updated date of the RegistryItem.");

                    b.Property<string>("UserId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("userId")
                        .HasComment("The owner ID.");

                    b.Property<string>("Value")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("jsonb")
                        .HasColumnName("value")
                        .HasDefaultValueSql("'{}'::jsonb")
                        .HasComment("The value of the RegistryItem.");

                    b.HasKey("Id");

                    b.HasIndex("Domain");

                    b.HasIndex("Scope");

                    b.HasIndex("UserId");

                    b.ToTable("registry_item");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Relay", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<string>("Inbox")
                        .IsRequired()
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("inbox");

                    b.Property<Relay.RelayStatus>("Status")
                        .HasColumnType("relay_status_enum")
                        .HasColumnName("status");

                    b.HasKey("Id");

                    b.HasIndex("Inbox")
                        .IsUnique();

                    b.ToTable("relay");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.RenoteMuting", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("createdAt")
                        .HasComment("The created date of the Muting.");

                    b.Property<string>("MuteeId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("muteeId")
                        .HasComment("The mutee user ID.");

                    b.Property<string>("MuterId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("muterId")
                        .HasComment("The muter user ID.");

                    b.HasKey("Id");

                    b.HasIndex("CreatedAt");

                    b.HasIndex("MuteeId");

                    b.HasIndex("MuterId");

                    b.HasIndex("MuterId", "MuteeId")
                        .IsUnique();

                    b.ToTable("renote_muting");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Report", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<string>("AssigneeId")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("assigneeId");

                    b.Property<string>("Comment")
                        .IsRequired()
                        .HasMaxLength(2048)
                        .HasColumnType("character varying(2048)")
                        .HasColumnName("comment");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("createdAt")
                        .HasComment("The created date of the Report.");

                    b.Property<bool>("Forwarded")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("forwarded");

                    b.Property<string>("ReporterHost")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("reporterHost")
                        .HasComment("[Denormalized]");

                    b.Property<string>("ReporterId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("reporterId");

                    b.Property<bool>("Resolved")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("resolved");

                    b.Property<string>("TargetUserHost")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("targetUserHost")
                        .HasComment("[Denormalized]");

                    b.Property<string>("TargetUserId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("targetUserId");

                    b.HasKey("Id");

                    b.HasIndex("AssigneeId");

                    b.HasIndex("CreatedAt");

                    b.HasIndex("ReporterHost");

                    b.HasIndex("ReporterId");

                    b.HasIndex("Resolved");

                    b.HasIndex("TargetUserHost");

                    b.HasIndex("TargetUserId");

                    b.ToTable("report");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Rule", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<string>("Description")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("description");

                    b.Property<int>("Order")
                        .HasColumnType("integer")
                        .HasColumnName("order");

                    b.Property<string>("Text")
                        .IsRequired()
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("text");

                    b.HasKey("Id");

                    b.ToTable("rule");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Session", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<bool>("Active")
                        .HasColumnType("boolean")
                        .HasColumnName("active")
                        .HasComment("Whether or not the token has been activated (i.e. 2fa has been confirmed)");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("createdAt")
                        .HasComment("The created date of the OAuth token");

                    b.Property<DateTime?>("LastActiveDate")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("lastActiveDate");

                    b.Property<string>("Token")
                        .IsRequired()
                        .HasMaxLength(64)
                        .HasColumnType("character varying(64)")
                        .HasColumnName("token")
                        .HasComment("The authorization token");

                    b.Property<string>("UserId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("userId");

                    b.HasKey("Id");

                    b.HasIndex("Token");

                    b.HasIndex("UserId");

                    b.ToTable("session");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.SwSubscription", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<string>("AuthSecret")
                        .IsRequired()
                        .HasMaxLength(256)
                        .HasColumnType("character varying(256)")
                        .HasColumnName("auth");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("createdAt");

                    b.Property<string>("Endpoint")
                        .IsRequired()
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("endpoint");

                    b.Property<string>("PublicKey")
                        .IsRequired()
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("publickey");

                    b.Property<bool>("SendReadMessage")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("sendReadMessage");

                    b.Property<string>("UserId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("userId");

                    b.HasKey("Id");

                    b.HasIndex("UserId");

                    b.ToTable("sw_subscription");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UsedUsername", b =>
                {
                    b.Property<string>("Username")
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("username");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("createdAt");

                    b.HasKey("Username");

                    b.ToTable("used_username");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.User", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.PrimitiveCollection<List<string>>("AlsoKnownAs")
                        .HasColumnType("text[]")
                        .HasColumnName("alsoKnownAs")
                        .HasComment("URIs the user is known as too");

                    b.Property<string>("AvatarBlurhash")
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("avatarBlurhash")
                        .HasComment("The blurhash of the avatar DriveFile");

                    b.Property<string>("AvatarId")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("avatarId")
                        .HasComment("The ID of avatar DriveFile.");

                    b.Property<string>("BannerBlurhash")
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("bannerBlurhash")
                        .HasComment("The blurhash of the banner DriveFile");

                    b.Property<string>("BannerId")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("bannerId")
                        .HasComment("The ID of banner DriveFile.");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("createdAt")
                        .HasComment("The created date of the User.");

                    b.Property<string>("DisplayName")
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("name")
                        .HasComment("The name of the User.");

                    b.Property<int?>("DriveCapacityOverrideMb")
                        .HasColumnType("integer")
                        .HasColumnName("driveCapacityOverrideMb")
                        .HasComment("Overrides user drive capacity limit");

                    b.PrimitiveCollection<List<string>>("Emojis")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnType("character varying(128)[]")
                        .HasColumnName("emojis")
                        .HasDefaultValueSql("'{}'::character varying[]");

                    b.Property<string>("Featured")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("featured")
                        .HasComment("The featured URL of the User. It will be null if the origin of the user is local.");

                    b.Property<int>("FollowersCount")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer")
                        .HasDefaultValue(0)
                        .HasColumnName("followersCount")
                        .HasComment("The count of followers.");

                    b.Property<string>("FollowersUri")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("followersUri")
                        .HasComment("The URI of the user Follower Collection. It will be null if the origin of the user is local.");

                    b.Property<int>("FollowingCount")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer")
                        .HasDefaultValue(0)
                        .HasColumnName("followingCount")
                        .HasComment("The count of following.");

                    b.Property<string>("Host")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("host")
                        .HasComment("The host of the User. It will be null if the origin of the user is local.");

                    b.Property<string>("Inbox")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("inbox")
                        .HasComment("The inbox URL of the User. It will be null if the origin of the user is local.");

                    b.Property<bool>("IsAdmin")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("isAdmin")
                        .HasComment("Whether the User is the admin.");

                    b.Property<bool>("IsBot")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("isBot")
                        .HasComment("Whether the User is a bot.");

                    b.Property<bool>("IsCat")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("isCat")
                        .HasComment("Whether the User is a cat.");

                    b.Property<bool>("IsDeleted")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("isDeleted")
                        .HasComment("Whether the User is deleted.");

                    b.Property<bool>("IsExplorable")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(true)
                        .HasColumnName("isExplorable")
                        .HasComment("Whether the User is explorable.");

                    b.Property<bool>("IsLocked")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("isLocked")
                        .HasComment("Whether the User is locked.");

                    b.Property<bool>("IsModerator")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("isModerator")
                        .HasComment("Whether the User is a moderator.");

                    b.Property<bool>("IsRelayActor")
                        .HasColumnType("boolean")
                        .HasColumnName("isRelayActor");

                    b.Property<bool>("IsSilenced")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("isSilenced")
                        .HasComment("Whether the User is silenced.");

                    b.Property<bool>("IsSuspended")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("isSuspended")
                        .HasComment("Whether the User is suspended.");

                    b.Property<bool>("IsSystemUser")
                        .HasColumnType("boolean")
                        .HasColumnName("isSystem");

                    b.Property<DateTime?>("LastActiveDate")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("lastActiveDate");

                    b.Property<DateTime?>("LastFetchedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("lastFetchedAt");

                    b.Property<DateTime?>("LastNoteAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("lastNoteAt");

                    b.Property<string>("MovedToUri")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("movedToUri")
                        .HasComment("The URI of the new account of the User");

                    b.Property<int>("NotesCount")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer")
                        .HasDefaultValue(0)
                        .HasColumnName("notesCount")
                        .HasComment("The count of notes.");

                    b.Property<string>("Outbox")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("outbox");

                    b.Property<DateTime?>("OutboxFetchedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("outboxFetchedAt");

                    b.Property<string>("SharedInbox")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("sharedInbox")
                        .HasComment("The sharedInbox URL of the User. It will be null if the origin of the user is local.");

                    b.Property<bool>("SpeakAsCat")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(true)
                        .HasColumnName("speakAsCat")
                        .HasComment("Whether to speak as a cat if isCat.");

                    b.Property<bool>("SplitDomainResolved")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("splitDomainResolved");

                    b.PrimitiveCollection<List<string>>("Tags")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnType("character varying(128)[]")
                        .HasColumnName("tags")
                        .HasDefaultValueSql("'{}'::character varying[]");

                    b.Property<DateTime?>("UpdatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("updatedAt")
                        .HasComment("The updated date of the User.");

                    b.Property<string>("Uri")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("uri")
                        .HasComment("The URI of the User. It will be null if the origin of the user is local.");

                    b.Property<string>("Username")
                        .IsRequired()
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("username")
                        .HasComment("The username of the User.");

                    b.Property<string>("UsernameLower")
                        .IsRequired()
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("usernameLower")
                        .HasComment("The username (lowercased) of the User.");

                    b.HasKey("Id");

                    b.HasIndex("AvatarId")
                        .IsUnique();

                    b.HasIndex("BannerId")
                        .IsUnique();

                    b.HasIndex("CreatedAt");

                    b.HasIndex("Host");

                    b.HasIndex("IsAdmin");

                    b.HasIndex("IsExplorable");

                    b.HasIndex("IsModerator");

                    b.HasIndex("IsSuspended");

                    b.HasIndex("LastActiveDate");

                    b.HasIndex("Tags");

                    b.HasIndex("UpdatedAt");

                    b.HasIndex("Uri");

                    b.HasIndex("UsernameLower");

                    b.HasIndex("UsernameLower", "Host")
                        .IsUnique();

                    b.ToTable("user");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserGroup", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("createdAt")
                        .HasComment("The created date of the UserGroup.");

                    b.Property<bool>("IsPrivate")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("isPrivate");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasMaxLength(256)
                        .HasColumnType("character varying(256)")
                        .HasColumnName("name");

                    b.Property<string>("UserId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("userId")
                        .HasComment("The ID of owner.");

                    b.HasKey("Id");

                    b.HasIndex("CreatedAt");

                    b.HasIndex("UserId");

                    b.ToTable("user_group");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserGroupInvitation", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("createdAt")
                        .HasComment("The created date of the UserGroupInvitation.");

                    b.Property<string>("UserGroupId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("userGroupId")
                        .HasComment("The group ID.");

                    b.Property<string>("UserId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("userId")
                        .HasComment("The user ID.");

                    b.HasKey("Id");

                    b.HasIndex("UserGroupId");

                    b.HasIndex("UserId");

                    b.HasIndex("UserId", "UserGroupId")
                        .IsUnique();

                    b.ToTable("user_group_invitation");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserGroupMember", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("createdAt")
                        .HasComment("The created date of the UserGroupMember.");

                    b.Property<string>("UserGroupId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("userGroupId")
                        .HasComment("The group ID.");

                    b.Property<string>("UserId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("userId")
                        .HasComment("The user ID.");

                    b.HasKey("Id");

                    b.HasIndex("UserGroupId");

                    b.HasIndex("UserId");

                    b.HasIndex("UserId", "UserGroupId")
                        .IsUnique();

                    b.ToTable("user_group_member");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserKeypair", b =>
                {
                    b.Property<string>("UserId")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("userId");

                    b.Property<string>("PrivateKey")
                        .IsRequired()
                        .HasMaxLength(4096)
                        .HasColumnType("character varying(4096)")
                        .HasColumnName("privateKey");

                    b.Property<string>("PublicKey")
                        .IsRequired()
                        .HasMaxLength(4096)
                        .HasColumnType("character varying(4096)")
                        .HasColumnName("publicKey");

                    b.HasKey("UserId");

                    b.ToTable("user_keypair");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserList", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("createdAt")
                        .HasComment("The created date of the UserList.");

                    b.Property<bool>("HideFromHomeTl")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("hideFromHomeTl")
                        .HasComment("Whether posts from list members should be hidden from the home timeline.");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("name")
                        .HasComment("The name of the UserList.");

                    b.Property<string>("UserId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("userId")
                        .HasComment("The owner ID.");

                    b.HasKey("Id");

                    b.HasIndex("UserId");

                    b.ToTable("user_list");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserListMember", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("createdAt")
                        .HasComment("The created date of the UserListMember.");

                    b.Property<string>("UserId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("userId")
                        .HasComment("The user ID.");

                    b.Property<string>("UserListId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("userListId")
                        .HasComment("The list ID.");

                    b.HasKey("Id");

                    b.HasIndex("UserId");

                    b.HasIndex("UserListId");

                    b.HasIndex("UserId", "UserListId")
                        .IsUnique();

                    b.ToTable("user_list_member");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserNotePin", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("createdAt")
                        .HasComment("The created date of the UserNotePins.");

                    b.Property<string>("NoteId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("noteId");

                    b.Property<string>("UserId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("userId");

                    b.HasKey("Id");

                    b.HasIndex("NoteId");

                    b.HasIndex("UserId");

                    b.HasIndex("UserId", "NoteId")
                        .IsUnique();

                    b.ToTable("user_note_pin");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserPending", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<string>("Code")
                        .IsRequired()
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("code");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("createdAt");

                    b.Property<string>("Email")
                        .IsRequired()
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("email");

                    b.Property<string>("Password")
                        .IsRequired()
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("password");

                    b.Property<string>("Username")
                        .IsRequired()
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("username");

                    b.HasKey("Id");

                    b.HasIndex("Code")
                        .IsUnique();

                    b.ToTable("user_pending");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserProfile", b =>
                {
                    b.Property<string>("UserId")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("userId");

                    b.Property<string>("Birthday")
                        .HasMaxLength(10)
                        .HasColumnType("character(10)")
                        .HasColumnName("birthday")
                        .IsFixedLength()
                        .HasComment("The birthday (YYYY-MM-DD) of the User.");

                    b.Property<string>("Description")
                        .HasMaxLength(2048)
                        .HasColumnType("character varying(2048)")
                        .HasColumnName("description")
                        .HasComment("The description (bio) of the User.");

                    b.Property<UserProfile.UserProfileFFVisibility>("FFVisibility")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("user_profile_ffvisibility_enum")
                        .HasDefaultValue(UserProfile.UserProfileFFVisibility.Public)
                        .HasColumnName("ffVisibility");

                    b.Property<UserProfile.Field[]>("Fields")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnType("jsonb")
                        .HasColumnName("fields")
                        .HasDefaultValueSql("'[]'::jsonb");

                    b.Property<string>("Lang")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("lang");

                    b.Property<string>("Location")
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("location")
                        .HasComment("The location of the User.");

                    b.Property<List<Note.MentionedUser>>("Mentions")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnType("jsonb")
                        .HasColumnName("mentions")
                        .HasDefaultValueSql("'[]'::jsonb");

                    b.Property<bool>("MentionsResolved")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("mentionsResolved");

                    b.Property<string>("ModerationNote")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasMaxLength(8192)
                        .HasColumnType("character varying(8192)")
                        .HasColumnName("moderationNote")
                        .HasDefaultValueSql("''::character varying");

                    b.Property<string>("PinnedPageId")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("pinnedPageId");

                    b.Property<Dictionary<string, string>>("Pronouns")
                        .HasColumnType("jsonb")
                        .HasColumnName("pronouns");

                    b.Property<string>("Url")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("url")
                        .HasComment("Remote URL of the user.");

                    b.Property<string>("UserHost")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("userHost")
                        .HasComment("[Denormalized]");

                    b.HasKey("UserId");

                    b.HasIndex("PinnedPageId")
                        .IsUnique();

                    b.HasIndex("UserHost");

                    b.ToTable("user_profile");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserPublickey", b =>
                {
                    b.Property<string>("UserId")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("userId");

                    b.Property<string>("KeyId")
                        .IsRequired()
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("keyId");

                    b.Property<string>("KeyPem")
                        .IsRequired()
                        .HasMaxLength(4096)
                        .HasColumnType("character varying(4096)")
                        .HasColumnName("keyPem");

                    b.HasKey("UserId");

                    b.HasIndex("KeyId")
                        .IsUnique();

                    b.ToTable("user_publickey");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserSecurityKey", b =>
                {
                    b.Property<string>("Id")
                        .HasColumnType("character varying")
                        .HasColumnName("id")
                        .HasComment("Variable-length id given to navigator.credentials.get()");

                    b.Property<DateTime>("LastUsed")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("lastUsed")
                        .HasComment("The date of the last time the UserSecurityKey was successfully validated.");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasMaxLength(30)
                        .HasColumnType("character varying(30)")
                        .HasColumnName("name")
                        .HasComment("User-defined name for this key");

                    b.Property<string>("PublicKey")
                        .IsRequired()
                        .HasColumnType("character varying")
                        .HasColumnName("publicKey")
                        .HasComment("Variable-length public key used to verify attestations (hex-encoded).");

                    b.Property<string>("UserId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("userId");

                    b.HasKey("Id");

                    b.HasIndex("PublicKey");

                    b.HasIndex("UserId");

                    b.ToTable("user_security_key");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserSettings", b =>
                {
                    b.Property<string>("UserId")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("userId");

                    b.Property<bool>("AlwaysMarkSensitive")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("alwaysMarkNsfw");

                    b.Property<bool>("AutoAcceptFollowed")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("autoAcceptFollowed");

                    b.Property<Note.NoteVisibility>("DefaultNoteVisibility")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("note_visibility_enum")
                        .HasDefaultValue(Note.NoteVisibility.Public)
                        .HasColumnName("defaultNoteVisibility");

                    b.Property<Note.NoteVisibility>("DefaultRenoteVisibility")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("note_visibility_enum")
                        .HasDefaultValue(Note.NoteVisibility.Public)
                        .HasColumnName("defaultRenoteVisibility");

                    b.Property<string>("Email")
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("email");

                    b.Property<bool>("EmailVerified")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("emailVerified");

                    b.Property<bool>("FilterInaccessible")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("filterInaccessible");

                    b.Property<string>("Password")
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("password");

                    b.Property<bool>("PrivateMode")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("privateMode");

                    b.Property<bool>("TwoFactorEnabled")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(false)
                        .HasColumnName("twoFactorEnabled");

                    b.Property<string>("TwoFactorSecret")
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("twoFactorSecret");

                    b.Property<string>("TwoFactorTempSecret")
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("twoFactorTempSecret");

                    b.HasKey("UserId");

                    b.ToTable("user_settings");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Webhook", b =>
                {
                    b.Property<string>("Id")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("id");

                    b.Property<bool>("Active")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(true)
                        .HasColumnName("active");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("createdAt")
                        .HasComment("The created date of the Antenna.");

                    b.Property<DateTime?>("LatestSentAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("latestSentAt");

                    b.Property<int?>("LatestStatus")
                        .HasColumnType("integer")
                        .HasColumnName("latestStatus");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("name")
                        .HasComment("The name of the Antenna.");

                    b.PrimitiveCollection<List<string>>("On")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnType("character varying(128)[]")
                        .HasColumnName("on")
                        .HasDefaultValueSql("'{}'::character varying[]");

                    b.Property<string>("Secret")
                        .IsRequired()
                        .HasMaxLength(1024)
                        .HasColumnType("character varying(1024)")
                        .HasColumnName("secret");

                    b.Property<string>("Url")
                        .IsRequired()
                        .HasMaxLength(1024)
                        .HasColumnType("character varying(1024)")
                        .HasColumnName("url");

                    b.Property<string>("UserId")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("userId")
                        .HasComment("The owner ID.");

                    b.HasKey("Id");

                    b.HasIndex("Active");

                    b.HasIndex("On");

                    b.HasIndex("UserId");

                    b.ToTable("webhook");
                });

            modelBuilder.Entity("Microsoft.AspNetCore.DataProtection.EntityFrameworkCore.DataProtectionKey", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));

                    b.Property<string>("FriendlyName")
                        .HasColumnType("text");

                    b.Property<string>("Xml")
                        .HasColumnType("text");

                    b.HasKey("Id");

                    b.ToTable("data_protection_keys", (string)null);
                });

            modelBuilder.Entity("reported_note", b =>
                {
                    b.Property<string>("note_id")
                        .HasColumnType("character varying(32)");

                    b.Property<string>("report_id")
                        .HasColumnType("character varying(32)");

                    b.HasKey("note_id", "report_id");

                    b.HasIndex("report_id");

                    b.ToTable("reported_note");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.AnnouncementRead", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Announcement", "Announcement")
                        .WithMany("AnnouncementReads")
                        .HasForeignKey("AnnouncementId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User")
                        .WithMany("AnnouncementReads")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Announcement");

                    b.Navigation("User");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Antenna", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.UserGroupMember", "UserGroupMember")
                        .WithMany("Antennas")
                        .HasForeignKey("UserGroupMemberId")
                        .OnDelete(DeleteBehavior.Cascade);

                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User")
                        .WithMany("Antennas")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.UserList", "UserList")
                        .WithMany("Antennas")
                        .HasForeignKey("UserListId")
                        .OnDelete(DeleteBehavior.Cascade);

                    b.Navigation("User");

                    b.Navigation("UserGroupMember");

                    b.Navigation("UserList");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.AttestationChallenge", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User")
                        .WithMany("AttestationChallenges")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("User");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Bite", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Bite", "TargetBite")
                        .WithMany()
                        .HasForeignKey("TargetBiteId")
                        .OnDelete(DeleteBehavior.Cascade);

                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "TargetNote")
                        .WithMany()
                        .HasForeignKey("TargetNoteId")
                        .OnDelete(DeleteBehavior.Cascade);

                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "TargetUser")
                        .WithMany()
                        .HasForeignKey("TargetUserId")
                        .OnDelete(DeleteBehavior.Cascade);

                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User")
                        .WithMany()
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("TargetBite");

                    b.Navigation("TargetNote");

                    b.Navigation("TargetUser");

                    b.Navigation("User");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Blocking", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "Blockee")
                        .WithMany("IncomingBlocks")
                        .HasForeignKey("BlockeeId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "Blocker")
                        .WithMany("OutgoingBlocks")
                        .HasForeignKey("BlockerId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Blockee");

                    b.Navigation("Blocker");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Channel", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.DriveFile", "Banner")
                        .WithMany("Channels")
                        .HasForeignKey("BannerId")
                        .OnDelete(DeleteBehavior.SetNull);

                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User")
                        .WithMany("Channels")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.SetNull);

                    b.Navigation("Banner");

                    b.Navigation("User");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.ChannelFollowing", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Channel", "Followee")
                        .WithMany("ChannelFollowings")
                        .HasForeignKey("FolloweeId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "Follower")
                        .WithMany("ChannelFollowings")
                        .HasForeignKey("FollowerId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Followee");

                    b.Navigation("Follower");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.ChannelNotePin", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Channel", "Channel")
                        .WithMany("ChannelNotePins")
                        .HasForeignKey("ChannelId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "Note")
                        .WithMany("ChannelNotePins")
                        .HasForeignKey("NoteId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Channel");

                    b.Navigation("Note");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Clip", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User")
                        .WithMany("Clips")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("User");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.ClipNote", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Clip", "Clip")
                        .WithMany("ClipNotes")
                        .HasForeignKey("ClipId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "Note")
                        .WithMany("ClipNotes")
                        .HasForeignKey("NoteId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Clip");

                    b.Navigation("Note");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.DriveFile", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.DriveFolder", "Folder")
                        .WithMany("DriveFiles")
                        .HasForeignKey("FolderId")
                        .OnDelete(DeleteBehavior.SetNull);

                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User")
                        .WithMany("DriveFiles")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.SetNull);

                    b.Navigation("Folder");

                    b.Navigation("User");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.DriveFolder", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.DriveFolder", "Parent")
                        .WithMany("InverseParent")
                        .HasForeignKey("ParentId")
                        .OnDelete(DeleteBehavior.SetNull);

                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User")
                        .WithMany("DriveFolders")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade);

                    b.Navigation("Parent");

                    b.Navigation("User");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Filter", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User")
                        .WithMany("Filters")
                        .HasForeignKey("user_id")
                        .OnDelete(DeleteBehavior.Cascade);

                    b.Navigation("User");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.FollowRequest", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "Followee")
                        .WithMany("IncomingFollowRequests")
                        .HasForeignKey("FolloweeId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "Follower")
                        .WithMany("OutgoingFollowRequests")
                        .HasForeignKey("FollowerId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Followee");

                    b.Navigation("Follower");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Following", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "Followee")
                        .WithMany("IncomingFollowRelationships")
                        .HasForeignKey("FolloweeId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "Follower")
                        .WithMany("OutgoingFollowRelationships")
                        .HasForeignKey("FollowerId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Followee");

                    b.Navigation("Follower");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.GalleryLike", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.GalleryPost", "Post")
                        .WithMany("GalleryLikes")
                        .HasForeignKey("PostId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User")
                        .WithMany("GalleryLikes")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Post");

                    b.Navigation("User");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.GalleryPost", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User")
                        .WithMany("GalleryPosts")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("User");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Marker", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User")
                        .WithMany("Markers")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("User");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.MessagingMessage", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.DriveFile", "File")
                        .WithMany("MessagingMessages")
                        .HasForeignKey("FileId")
                        .OnDelete(DeleteBehavior.Cascade);

                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.UserGroup", "Group")
                        .WithMany("MessagingMessages")
                        .HasForeignKey("GroupId")
                        .OnDelete(DeleteBehavior.Cascade);

                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "Recipient")
                        .WithMany("MessagingMessageRecipients")
                        .HasForeignKey("RecipientId")
                        .OnDelete(DeleteBehavior.Cascade);

                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User")
                        .WithMany("MessagingMessageUsers")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("File");

                    b.Navigation("Group");

                    b.Navigation("Recipient");

                    b.Navigation("User");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.ModerationLog", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User")
                        .WithMany("ModerationLogs")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("User");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Muting", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "Mutee")
                        .WithMany("IncomingMutes")
                        .HasForeignKey("MuteeId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "Muter")
                        .WithMany("OutgoingMutes")
                        .HasForeignKey("MuterId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Mutee");

                    b.Navigation("Muter");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Note", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Channel", "Channel")
                        .WithMany("Notes")
                        .HasForeignKey("ChannelId")
                        .OnDelete(DeleteBehavior.Cascade);

                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "Renote")
                        .WithMany("InverseRenote")
                        .HasForeignKey("RenoteId")
                        .OnDelete(DeleteBehavior.Cascade);

                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "Reply")
                        .WithMany("InverseReply")
                        .HasForeignKey("ReplyId")
                        .OnDelete(DeleteBehavior.Cascade);

                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.NoteThread", "Thread")
                        .WithMany("Notes")
                        .HasForeignKey("ThreadId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User")
                        .WithMany("Notes")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Channel");

                    b.Navigation("Renote");

                    b.Navigation("Reply");

                    b.Navigation("Thread");

                    b.Navigation("User");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.NoteBookmark", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "Note")
                        .WithMany("NoteBookmarks")
                        .HasForeignKey("NoteId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User")
                        .WithMany("NoteBookmarks")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Note");

                    b.Navigation("User");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.NoteEdit", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "Note")
                        .WithMany("NoteEdits")
                        .HasForeignKey("NoteId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Note");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.NoteLike", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "Note")
                        .WithMany("NoteLikes")
                        .HasForeignKey("NoteId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User")
                        .WithMany("NoteLikes")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Note");

                    b.Navigation("User");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.NoteReaction", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "Note")
                        .WithMany("NoteReactions")
                        .HasForeignKey("NoteId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User")
                        .WithMany("NoteReactions")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Note");

                    b.Navigation("User");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.NoteThread", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User")
                        .WithMany()
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.SetNull);

                    b.Navigation("User");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.NoteThreadMuting", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.NoteThread", "Thread")
                        .WithMany("NoteThreadMutings")
                        .HasForeignKey("ThreadId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User")
                        .WithMany("NoteThreadMutings")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Thread");

                    b.Navigation("User");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.NoteUnread", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "Note")
                        .WithMany("NoteUnreads")
                        .HasForeignKey("NoteId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User")
                        .WithMany("NoteUnreads")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Note");

                    b.Navigation("User");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.NoteWatching", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "Note")
                        .WithMany("NoteWatchings")
                        .HasForeignKey("NoteId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User")
                        .WithMany("NoteWatchings")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Note");

                    b.Navigation("User");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Notification", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Bite", "Bite")
                        .WithMany()
                        .HasForeignKey("BiteId");

                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.FollowRequest", "FollowRequest")
                        .WithMany("Notifications")
                        .HasForeignKey("FollowRequestId")
                        .OnDelete(DeleteBehavior.Cascade);

                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "Note")
                        .WithMany("Notifications")
                        .HasForeignKey("NoteId")
                        .OnDelete(DeleteBehavior.Cascade);

                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "Notifiee")
                        .WithMany("NotificationNotifiees")
                        .HasForeignKey("NotifieeId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "Notifier")
                        .WithMany("NotificationNotifiers")
                        .HasForeignKey("NotifierId")
                        .OnDelete(DeleteBehavior.Cascade);

                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.UserGroupInvitation", "UserGroupInvitation")
                        .WithMany("Notifications")
                        .HasForeignKey("UserGroupInvitationId")
                        .OnDelete(DeleteBehavior.Cascade);

                    b.Navigation("Bite");

                    b.Navigation("FollowRequest");

                    b.Navigation("Note");

                    b.Navigation("Notifiee");

                    b.Navigation("Notifier");

                    b.Navigation("UserGroupInvitation");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.OauthToken", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.OauthApp", "App")
                        .WithMany("OauthTokens")
                        .HasForeignKey("AppId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User")
                        .WithMany("OauthTokens")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("App");

                    b.Navigation("User");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Page", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.DriveFile", "EyeCatchingImage")
                        .WithMany("Pages")
                        .HasForeignKey("EyeCatchingImageId")
                        .OnDelete(DeleteBehavior.Cascade);

                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User")
                        .WithMany("Pages")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("EyeCatchingImage");

                    b.Navigation("User");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.PageLike", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Page", "Page")
                        .WithMany("PageLikes")
                        .HasForeignKey("PageId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User")
                        .WithMany("PageLikes")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Page");

                    b.Navigation("User");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.PasswordResetRequest", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User")
                        .WithMany("PasswordResetRequests")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("User");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Poll", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "Note")
                        .WithOne("Poll")
                        .HasForeignKey("Iceshrimp.Backend.Core.Database.Tables.Poll", "NoteId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Note");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.PollVote", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "Note")
                        .WithMany("PollVotes")
                        .HasForeignKey("NoteId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User")
                        .WithMany("PollVotes")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Note");

                    b.Navigation("User");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.PromoNote", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "Note")
                        .WithOne("PromoNote")
                        .HasForeignKey("Iceshrimp.Backend.Core.Database.Tables.PromoNote", "NoteId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Note");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.PromoRead", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "Note")
                        .WithMany("PromoReads")
                        .HasForeignKey("NoteId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User")
                        .WithMany("PromoReads")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Note");

                    b.Navigation("User");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.PushSubscription", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.OauthToken", "OauthToken")
                        .WithOne("PushSubscription")
                        .HasForeignKey("Iceshrimp.Backend.Core.Database.Tables.PushSubscription", "OauthTokenId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User")
                        .WithMany("PushSubscriptions")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("OauthToken");

                    b.Navigation("User");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.RegistryItem", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User")
                        .WithMany("RegistryItems")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("User");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.RenoteMuting", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "Mutee")
                        .WithMany("RenoteMutingMutees")
                        .HasForeignKey("MuteeId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "Muter")
                        .WithMany("RenoteMutingMuters")
                        .HasForeignKey("MuterId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Mutee");

                    b.Navigation("Muter");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Report", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "Assignee")
                        .WithMany("AbuseUserReportAssignees")
                        .HasForeignKey("AssigneeId")
                        .OnDelete(DeleteBehavior.SetNull);

                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "Reporter")
                        .WithMany("AbuseUserReportReporters")
                        .HasForeignKey("ReporterId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "TargetUser")
                        .WithMany("AbuseUserReportTargetUsers")
                        .HasForeignKey("TargetUserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Assignee");

                    b.Navigation("Reporter");

                    b.Navigation("TargetUser");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Session", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User")
                        .WithMany("Sessions")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("User");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.SwSubscription", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User")
                        .WithMany("SwSubscriptions")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("User");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.User", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.DriveFile", "Avatar")
                        .WithOne("UserAvatar")
                        .HasForeignKey("Iceshrimp.Backend.Core.Database.Tables.User", "AvatarId")
                        .OnDelete(DeleteBehavior.SetNull);

                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.DriveFile", "Banner")
                        .WithOne("UserBanner")
                        .HasForeignKey("Iceshrimp.Backend.Core.Database.Tables.User", "BannerId")
                        .OnDelete(DeleteBehavior.SetNull);

                    b.Navigation("Avatar");

                    b.Navigation("Banner");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserGroup", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User")
                        .WithMany("UserGroups")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("User");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserGroupInvitation", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.UserGroup", "UserGroup")
                        .WithMany("UserGroupInvitations")
                        .HasForeignKey("UserGroupId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User")
                        .WithMany("UserGroupInvitations")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("User");

                    b.Navigation("UserGroup");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserGroupMember", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.UserGroup", "UserGroup")
                        .WithMany("UserGroupMembers")
                        .HasForeignKey("UserGroupId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User")
                        .WithMany("UserGroupMemberships")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("User");

                    b.Navigation("UserGroup");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserKeypair", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User")
                        .WithOne("UserKeypair")
                        .HasForeignKey("Iceshrimp.Backend.Core.Database.Tables.UserKeypair", "UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("User");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserList", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User")
                        .WithMany("UserLists")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("User");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserListMember", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User")
                        .WithMany("UserListMembers")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.UserList", "UserList")
                        .WithMany("UserListMembers")
                        .HasForeignKey("UserListId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("User");

                    b.Navigation("UserList");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserNotePin", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "Note")
                        .WithMany("UserNotePins")
                        .HasForeignKey("NoteId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User")
                        .WithMany("UserNotePins")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Note");

                    b.Navigation("User");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserProfile", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Page", "PinnedPage")
                        .WithOne("UserProfile")
                        .HasForeignKey("Iceshrimp.Backend.Core.Database.Tables.UserProfile", "PinnedPageId")
                        .OnDelete(DeleteBehavior.SetNull);

                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User")
                        .WithOne("UserProfile")
                        .HasForeignKey("Iceshrimp.Backend.Core.Database.Tables.UserProfile", "UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("PinnedPage");

                    b.Navigation("User");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserPublickey", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User")
                        .WithOne("UserPublickey")
                        .HasForeignKey("Iceshrimp.Backend.Core.Database.Tables.UserPublickey", "UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("User");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserSecurityKey", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User")
                        .WithMany("UserSecurityKeys")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("User");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserSettings", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User")
                        .WithOne("UserSettings")
                        .HasForeignKey("Iceshrimp.Backend.Core.Database.Tables.UserSettings", "UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("User");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Webhook", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User")
                        .WithMany("Webhooks")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("User");
                });

            modelBuilder.Entity("reported_note", b =>
                {
                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", null)
                        .WithMany()
                        .HasForeignKey("note_id")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Report", null)
                        .WithMany()
                        .HasForeignKey("report_id")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Announcement", b =>
                {
                    b.Navigation("AnnouncementReads");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Channel", b =>
                {
                    b.Navigation("ChannelFollowings");

                    b.Navigation("ChannelNotePins");

                    b.Navigation("Notes");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Clip", b =>
                {
                    b.Navigation("ClipNotes");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.DriveFile", b =>
                {
                    b.Navigation("Channels");

                    b.Navigation("MessagingMessages");

                    b.Navigation("Pages");

                    b.Navigation("UserAvatar");

                    b.Navigation("UserBanner");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.DriveFolder", b =>
                {
                    b.Navigation("DriveFiles");

                    b.Navigation("InverseParent");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.FollowRequest", b =>
                {
                    b.Navigation("Notifications");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.GalleryPost", b =>
                {
                    b.Navigation("GalleryLikes");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Note", b =>
                {
                    b.Navigation("ChannelNotePins");

                    b.Navigation("ClipNotes");

                    b.Navigation("InverseRenote");

                    b.Navigation("InverseReply");

                    b.Navigation("NoteBookmarks");

                    b.Navigation("NoteEdits");

                    b.Navigation("NoteLikes");

                    b.Navigation("NoteReactions");

                    b.Navigation("NoteUnreads");

                    b.Navigation("NoteWatchings");

                    b.Navigation("Notifications");

                    b.Navigation("Poll");

                    b.Navigation("PollVotes");

                    b.Navigation("PromoNote");

                    b.Navigation("PromoReads");

                    b.Navigation("UserNotePins");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.NoteThread", b =>
                {
                    b.Navigation("NoteThreadMutings");

                    b.Navigation("Notes");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.OauthApp", b =>
                {
                    b.Navigation("OauthTokens");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.OauthToken", b =>
                {
                    b.Navigation("PushSubscription");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Page", b =>
                {
                    b.Navigation("PageLikes");

                    b.Navigation("UserProfile");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.User", b =>
                {
                    b.Navigation("AbuseUserReportAssignees");

                    b.Navigation("AbuseUserReportReporters");

                    b.Navigation("AbuseUserReportTargetUsers");

                    b.Navigation("AnnouncementReads");

                    b.Navigation("Antennas");

                    b.Navigation("AttestationChallenges");

                    b.Navigation("ChannelFollowings");

                    b.Navigation("Channels");

                    b.Navigation("Clips");

                    b.Navigation("DriveFiles");

                    b.Navigation("DriveFolders");

                    b.Navigation("Filters");

                    b.Navigation("GalleryLikes");

                    b.Navigation("GalleryPosts");

                    b.Navigation("IncomingBlocks");

                    b.Navigation("IncomingFollowRelationships");

                    b.Navigation("IncomingFollowRequests");

                    b.Navigation("IncomingMutes");

                    b.Navigation("Markers");

                    b.Navigation("MessagingMessageRecipients");

                    b.Navigation("MessagingMessageUsers");

                    b.Navigation("ModerationLogs");

                    b.Navigation("NoteBookmarks");

                    b.Navigation("NoteLikes");

                    b.Navigation("NoteReactions");

                    b.Navigation("NoteThreadMutings");

                    b.Navigation("NoteUnreads");

                    b.Navigation("NoteWatchings");

                    b.Navigation("Notes");

                    b.Navigation("NotificationNotifiees");

                    b.Navigation("NotificationNotifiers");

                    b.Navigation("OauthTokens");

                    b.Navigation("OutgoingBlocks");

                    b.Navigation("OutgoingFollowRelationships");

                    b.Navigation("OutgoingFollowRequests");

                    b.Navigation("OutgoingMutes");

                    b.Navigation("PageLikes");

                    b.Navigation("Pages");

                    b.Navigation("PasswordResetRequests");

                    b.Navigation("PollVotes");

                    b.Navigation("PromoReads");

                    b.Navigation("PushSubscriptions");

                    b.Navigation("RegistryItems");

                    b.Navigation("RenoteMutingMutees");

                    b.Navigation("RenoteMutingMuters");

                    b.Navigation("Sessions");

                    b.Navigation("SwSubscriptions");

                    b.Navigation("UserGroupInvitations");

                    b.Navigation("UserGroupMemberships");

                    b.Navigation("UserGroups");

                    b.Navigation("UserKeypair");

                    b.Navigation("UserListMembers");

                    b.Navigation("UserLists");

                    b.Navigation("UserNotePins");

                    b.Navigation("UserProfile");

                    b.Navigation("UserPublickey");

                    b.Navigation("UserSecurityKeys");

                    b.Navigation("UserSettings");

                    b.Navigation("Webhooks");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserGroup", b =>
                {
                    b.Navigation("MessagingMessages");

                    b.Navigation("UserGroupInvitations");

                    b.Navigation("UserGroupMembers");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserGroupInvitation", b =>
                {
                    b.Navigation("Notifications");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserGroupMember", b =>
                {
                    b.Navigation("Antennas");
                });

            modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserList", b =>
                {
                    b.Navigation("Antennas");

                    b.Navigation("UserListMembers");
                });
#pragma warning restore 612, 618
        }
    }
}
