//
using System;
using System.Collections.Generic;
using System.Text.Json;
using DysonNetwork.Shared.Models;
using DysonNetwork.Sphere;
using DysonNetwork.Sphere.WebReader;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using NodaTime;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace DysonNetwork.Sphere.Migrations
{
[DbContext(typeof(AppDatabase))]
[Migration("20251228100758_AddActivityPub")]
partial class AddActivityPub
{
///
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "10.0.1")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("DysonNetwork.Shared.Models.SnChatMember", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid")
.HasColumnName("id");
b.Property("AccountId")
.HasColumnType("uuid")
.HasColumnName("account_id");
b.Property("BreakUntil")
.HasColumnType("timestamp with time zone")
.HasColumnName("break_until");
b.Property("ChatRoomId")
.HasColumnType("uuid")
.HasColumnName("chat_room_id");
b.Property("CreatedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("created_at");
b.Property("DeletedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("deleted_at");
b.Property("InvitedById")
.HasColumnType("uuid")
.HasColumnName("invited_by_id");
b.Property("JoinedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("joined_at");
b.Property("LastReadAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("last_read_at");
b.Property("LeaveAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("leave_at");
b.Property("Nick")
.HasMaxLength(1024)
.HasColumnType("character varying(1024)")
.HasColumnName("nick");
b.Property("Notify")
.HasColumnType("integer")
.HasColumnName("notify");
b.Property("TimeoutCause")
.HasColumnType("jsonb")
.HasColumnName("timeout_cause");
b.Property("TimeoutUntil")
.HasColumnType("timestamp with time zone")
.HasColumnName("timeout_until");
b.Property("UpdatedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("updated_at");
b.HasKey("Id")
.HasName("pk_chat_members");
b.HasAlternateKey("ChatRoomId", "AccountId")
.HasName("ak_chat_members_chat_room_id_account_id");
b.HasIndex("InvitedById")
.HasDatabaseName("ix_chat_members_invited_by_id");
b.ToTable("chat_members", (string)null);
});
modelBuilder.Entity("DysonNetwork.Shared.Models.SnChatMessage", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid")
.HasColumnName("id");
b.Property>("Attachments")
.IsRequired()
.HasColumnType("jsonb")
.HasColumnName("attachments");
b.Property("ChatRoomId")
.HasColumnType("uuid")
.HasColumnName("chat_room_id");
b.Property("Content")
.HasMaxLength(4096)
.HasColumnType("character varying(4096)")
.HasColumnName("content");
b.Property("CreatedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("created_at");
b.Property("DeletedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("deleted_at");
b.Property("EditedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("edited_at");
b.Property("ForwardedMessageId")
.HasColumnType("uuid")
.HasColumnName("forwarded_message_id");
b.PrimitiveCollection("MembersMentioned")
.HasColumnType("jsonb")
.HasColumnName("members_mentioned");
b.Property>("Meta")
.HasColumnType("jsonb")
.HasColumnName("meta");
b.Property("Nonce")
.IsRequired()
.HasMaxLength(36)
.HasColumnType("character varying(36)")
.HasColumnName("nonce");
b.Property("RepliedMessageId")
.HasColumnType("uuid")
.HasColumnName("replied_message_id");
b.Property("SenderId")
.HasColumnType("uuid")
.HasColumnName("sender_id");
b.Property("Type")
.IsRequired()
.HasMaxLength(1024)
.HasColumnType("character varying(1024)")
.HasColumnName("type");
b.Property("UpdatedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("updated_at");
b.HasKey("Id")
.HasName("pk_chat_messages");
b.HasIndex("ChatRoomId")
.HasDatabaseName("ix_chat_messages_chat_room_id");
b.HasIndex("ForwardedMessageId")
.HasDatabaseName("ix_chat_messages_forwarded_message_id");
b.HasIndex("RepliedMessageId")
.HasDatabaseName("ix_chat_messages_replied_message_id");
b.HasIndex("SenderId")
.HasDatabaseName("ix_chat_messages_sender_id");
b.ToTable("chat_messages", (string)null);
});
modelBuilder.Entity("DysonNetwork.Shared.Models.SnChatMessageReaction", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid")
.HasColumnName("id");
b.Property("Attitude")
.HasColumnType("integer")
.HasColumnName("attitude");
b.Property("CreatedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("created_at");
b.Property("DeletedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("deleted_at");
b.Property("MessageId")
.HasColumnType("uuid")
.HasColumnName("message_id");
b.Property("SenderId")
.HasColumnType("uuid")
.HasColumnName("sender_id");
b.Property("Symbol")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("character varying(256)")
.HasColumnName("symbol");
b.Property("UpdatedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("updated_at");
b.HasKey("Id")
.HasName("pk_chat_reactions");
b.HasIndex("MessageId")
.HasDatabaseName("ix_chat_reactions_message_id");
b.HasIndex("SenderId")
.HasDatabaseName("ix_chat_reactions_sender_id");
b.ToTable("chat_reactions", (string)null);
});
modelBuilder.Entity("DysonNetwork.Shared.Models.SnChatRoom", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid")
.HasColumnName("id");
b.Property("AccountId")
.HasColumnType("uuid")
.HasColumnName("account_id");
b.Property("Background")
.HasColumnType("jsonb")
.HasColumnName("background");
b.Property("CreatedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("created_at");
b.Property("DeletedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("deleted_at");
b.Property("Description")
.HasMaxLength(4096)
.HasColumnType("character varying(4096)")
.HasColumnName("description");
b.Property("IsCommunity")
.HasColumnType("boolean")
.HasColumnName("is_community");
b.Property("IsPublic")
.HasColumnType("boolean")
.HasColumnName("is_public");
b.Property("Name")
.HasMaxLength(1024)
.HasColumnType("character varying(1024)")
.HasColumnName("name");
b.Property("Picture")
.HasColumnType("jsonb")
.HasColumnName("picture");
b.Property("RealmId")
.HasColumnType("uuid")
.HasColumnName("realm_id");
b.Property("Type")
.HasColumnType("integer")
.HasColumnName("type");
b.Property("UpdatedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("updated_at");
b.HasKey("Id")
.HasName("pk_chat_rooms");
b.ToTable("chat_rooms", (string)null);
});
modelBuilder.Entity("DysonNetwork.Shared.Models.SnFediverseActivity", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid")
.HasColumnName("id");
b.Property("ActorId")
.HasColumnType("uuid")
.HasColumnName("actor_id");
b.Property("ContentId")
.HasColumnType("uuid")
.HasColumnName("content_id");
b.Property("CreatedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("created_at");
b.Property("DeletedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("deleted_at");
b.Property("ErrorMessage")
.HasMaxLength(4096)
.HasColumnType("character varying(4096)")
.HasColumnName("error_message");
b.Property("IsLocal")
.HasColumnType("boolean")
.HasColumnName("is_local");
b.Property("LocalAccountId")
.HasColumnType("uuid")
.HasColumnName("local_account_id");
b.Property("LocalPostId")
.HasColumnType("uuid")
.HasColumnName("local_post_id");
b.Property("ObjectUri")
.HasMaxLength(2048)
.HasColumnType("character varying(2048)")
.HasColumnName("object_uri");
b.Property("PublishedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("published_at");
b.Property>("RawData")
.HasColumnType("jsonb")
.HasColumnName("raw_data");
b.Property("Status")
.HasColumnType("integer")
.HasColumnName("status");
b.Property("TargetActorId")
.HasColumnType("uuid")
.HasColumnName("target_actor_id");
b.Property("TargetUri")
.HasMaxLength(2048)
.HasColumnType("character varying(2048)")
.HasColumnName("target_uri");
b.Property("Type")
.HasColumnType("integer")
.HasColumnName("type");
b.Property("UpdatedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("updated_at");
b.Property("Uri")
.IsRequired()
.HasMaxLength(2048)
.HasColumnType("character varying(2048)")
.HasColumnName("uri");
b.HasKey("Id")
.HasName("pk_fediverse_activities");
b.HasIndex("ActorId")
.HasDatabaseName("ix_fediverse_activities_actor_id");
b.HasIndex("ContentId")
.HasDatabaseName("ix_fediverse_activities_content_id");
b.HasIndex("TargetActorId")
.HasDatabaseName("ix_fediverse_activities_target_actor_id");
b.ToTable("fediverse_activities", (string)null);
});
modelBuilder.Entity("DysonNetwork.Shared.Models.SnFediverseActor", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid")
.HasColumnName("id");
b.Property("AvatarUrl")
.HasMaxLength(2048)
.HasColumnType("character varying(2048)")
.HasColumnName("avatar_url");
b.Property("Bio")
.HasMaxLength(4096)
.HasColumnType("character varying(4096)")
.HasColumnName("bio");
b.Property("CreatedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("created_at");
b.Property("DeletedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("deleted_at");
b.Property("DisplayName")
.HasMaxLength(2048)
.HasColumnType("character varying(2048)")
.HasColumnName("display_name");
b.Property("FeaturedUri")
.HasMaxLength(2048)
.HasColumnType("character varying(2048)")
.HasColumnName("featured_uri");
b.Property("FollowersUri")
.HasMaxLength(2048)
.HasColumnType("character varying(2048)")
.HasColumnName("followers_uri");
b.Property("FollowingUri")
.HasMaxLength(2048)
.HasColumnType("character varying(2048)")
.HasColumnName("following_uri");
b.Property("HeaderUrl")
.HasMaxLength(2048)
.HasColumnType("character varying(2048)")
.HasColumnName("header_url");
b.Property("InboxUri")
.HasMaxLength(2048)
.HasColumnType("character varying(2048)")
.HasColumnName("inbox_uri");
b.Property("InstanceId")
.HasColumnType("uuid")
.HasColumnName("instance_id");
b.Property("IsBot")
.HasColumnType("boolean")
.HasColumnName("is_bot");
b.Property("IsDiscoverable")
.HasColumnType("boolean")
.HasColumnName("is_discoverable");
b.Property("IsLocked")
.HasColumnType("boolean")
.HasColumnName("is_locked");
b.Property("LastActivityAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("last_activity_at");
b.Property("LastFetchedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("last_fetched_at");
b.Property>("Metadata")
.HasColumnType("jsonb")
.HasColumnName("metadata");
b.Property("OutboxUri")
.HasMaxLength(2048)
.HasColumnType("character varying(2048)")
.HasColumnName("outbox_uri");
b.Property("PublicKey")
.HasMaxLength(8192)
.HasColumnType("character varying(8192)")
.HasColumnName("public_key");
b.Property("PublicKeyId")
.HasMaxLength(2048)
.HasColumnType("character varying(2048)")
.HasColumnName("public_key_id");
b.Property("UpdatedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("updated_at");
b.Property("Uri")
.IsRequired()
.HasMaxLength(2048)
.HasColumnType("character varying(2048)")
.HasColumnName("uri");
b.Property("Username")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("character varying(256)")
.HasColumnName("username");
b.HasKey("Id")
.HasName("pk_fediverse_actors");
b.HasIndex("InstanceId")
.HasDatabaseName("ix_fediverse_actors_instance_id");
b.HasIndex("Uri")
.IsUnique()
.HasDatabaseName("ix_fediverse_actors_uri");
b.ToTable("fediverse_actors", (string)null);
});
modelBuilder.Entity("DysonNetwork.Shared.Models.SnFediverseContent", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid")
.HasColumnName("id");
b.Property("ActorId")
.HasColumnType("uuid")
.HasColumnName("actor_id");
b.Property("AnnouncedContentUri")
.HasMaxLength(2048)
.HasColumnType("character varying(2048)")
.HasColumnName("announced_content_uri");
b.Property>("Attachments")
.HasColumnType("jsonb")
.HasColumnName("attachments");
b.Property("BoostCount")
.HasColumnType("integer")
.HasColumnName("boost_count");
b.Property("Content")
.HasColumnType("text")
.HasColumnName("content");
b.Property("ContentHtml")
.HasColumnType("text")
.HasColumnName("content_html");
b.Property("CreatedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("created_at");
b.Property("DeletedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("deleted_at");
b.Property("EditedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("edited_at");
b.Property>("Emojis")
.HasColumnType("jsonb")
.HasColumnName("emojis");
b.Property("InReplyTo")
.HasMaxLength(2048)
.HasColumnType("character varying(2048)")
.HasColumnName("in_reply_to");
b.Property("InstanceId")
.HasColumnType("uuid")
.HasColumnName("instance_id");
b.Property("IsSensitive")
.HasColumnType("boolean")
.HasColumnName("is_sensitive");
b.Property("Language")
.HasMaxLength(2048)
.HasColumnType("character varying(2048)")
.HasColumnName("language");
b.Property("LikeCount")
.HasColumnType("integer")
.HasColumnName("like_count");
b.Property("LocalPostId")
.HasColumnType("uuid")
.HasColumnName("local_post_id");
b.Property>("Mentions")
.HasColumnType("jsonb")
.HasColumnName("mentions");
b.Property>("Metadata")
.HasColumnType("jsonb")
.HasColumnName("metadata");
b.Property("PublishedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("published_at");
b.Property("ReplyCount")
.HasColumnType("integer")
.HasColumnName("reply_count");
b.Property("Summary")
.HasMaxLength(4096)
.HasColumnType("character varying(4096)")
.HasColumnName("summary");
b.Property>("Tags")
.HasColumnType("jsonb")
.HasColumnName("tags");
b.Property("Title")
.HasMaxLength(1024)
.HasColumnType("character varying(1024)")
.HasColumnName("title");
b.Property("Type")
.HasColumnType("integer")
.HasColumnName("type");
b.Property("UpdatedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("updated_at");
b.Property("Uri")
.IsRequired()
.HasMaxLength(2048)
.HasColumnType("character varying(2048)")
.HasColumnName("uri");
b.HasKey("Id")
.HasName("pk_fediverse_contents");
b.HasIndex("ActorId")
.HasDatabaseName("ix_fediverse_contents_actor_id");
b.HasIndex("InstanceId")
.HasDatabaseName("ix_fediverse_contents_instance_id");
b.HasIndex("Uri")
.IsUnique()
.HasDatabaseName("ix_fediverse_contents_uri");
b.ToTable("fediverse_contents", (string)null);
});
modelBuilder.Entity("DysonNetwork.Shared.Models.SnFediverseInstance", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid")
.HasColumnName("id");
b.Property("BlockReason")
.HasMaxLength(2048)
.HasColumnType("character varying(2048)")
.HasColumnName("block_reason");
b.Property("CreatedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("created_at");
b.Property("DeletedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("deleted_at");
b.Property("Description")
.HasMaxLength(4096)
.HasColumnType("character varying(4096)")
.HasColumnName("description");
b.Property("Domain")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("character varying(256)")
.HasColumnName("domain");
b.Property("IsBlocked")
.HasColumnType("boolean")
.HasColumnName("is_blocked");
b.Property("IsSilenced")
.HasColumnType("boolean")
.HasColumnName("is_silenced");
b.Property("LastActivityAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("last_activity_at");
b.Property("LastFetchedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("last_fetched_at");
b.Property>("Metadata")
.HasColumnType("jsonb")
.HasColumnName("metadata");
b.Property("Name")
.HasMaxLength(512)
.HasColumnType("character varying(512)")
.HasColumnName("name");
b.Property("Software")
.HasMaxLength(2048)
.HasColumnType("character varying(2048)")
.HasColumnName("software");
b.Property("UpdatedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("updated_at");
b.Property("Version")
.HasMaxLength(2048)
.HasColumnType("character varying(2048)")
.HasColumnName("version");
b.HasKey("Id")
.HasName("pk_fediverse_instances");
b.HasIndex("Domain")
.IsUnique()
.HasDatabaseName("ix_fediverse_instances_domain");
b.ToTable("fediverse_instances", (string)null);
});
modelBuilder.Entity("DysonNetwork.Shared.Models.SnFediverseReaction", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid")
.HasColumnName("id");
b.Property("ActorId")
.HasColumnType("uuid")
.HasColumnName("actor_id");
b.Property("ContentId")
.HasColumnType("uuid")
.HasColumnName("content_id");
b.Property("CreatedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("created_at");
b.Property("DeletedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("deleted_at");
b.Property("Emoji")
.HasMaxLength(64)
.HasColumnType("character varying(64)")
.HasColumnName("emoji");
b.Property("IsLocal")
.HasColumnType("boolean")
.HasColumnName("is_local");
b.Property("LocalAccountId")
.HasColumnType("uuid")
.HasColumnName("local_account_id");
b.Property("LocalReactionId")
.HasColumnType("uuid")
.HasColumnName("local_reaction_id");
b.Property("Type")
.HasColumnType("integer")
.HasColumnName("type");
b.Property("UpdatedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("updated_at");
b.Property("Uri")
.IsRequired()
.HasMaxLength(2048)
.HasColumnType("character varying(2048)")
.HasColumnName("uri");
b.HasKey("Id")
.HasName("pk_fediverse_reactions");
b.HasIndex("ActorId")
.HasDatabaseName("ix_fediverse_reactions_actor_id");
b.HasIndex("ContentId")
.HasDatabaseName("ix_fediverse_reactions_content_id");
b.ToTable("fediverse_reactions", (string)null);
});
modelBuilder.Entity("DysonNetwork.Shared.Models.SnFediverseRelationship", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid")
.HasColumnName("id");
b.Property("ActorId")
.HasColumnType("uuid")
.HasColumnName("actor_id");
b.Property("CreatedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("created_at");
b.Property("DeletedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("deleted_at");
b.Property("FollowedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("followed_at");
b.Property("FollowedBackAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("followed_back_at");
b.Property("IsBlocking")
.HasColumnType("boolean")
.HasColumnName("is_blocking");
b.Property("IsFollowedBy")
.HasColumnType("boolean")
.HasColumnName("is_followed_by");
b.Property("IsFollowing")
.HasColumnType("boolean")
.HasColumnName("is_following");
b.Property("IsLocalActor")
.HasColumnType("boolean")
.HasColumnName("is_local_actor");
b.Property("IsMuting")
.HasColumnType("boolean")
.HasColumnName("is_muting");
b.Property("LocalAccountId")
.HasColumnType("uuid")
.HasColumnName("local_account_id");
b.Property("LocalPublisherId")
.HasColumnType("uuid")
.HasColumnName("local_publisher_id");
b.Property("RejectReason")
.HasMaxLength(4096)
.HasColumnType("character varying(4096)")
.HasColumnName("reject_reason");
b.Property("State")
.HasColumnType("integer")
.HasColumnName("state");
b.Property("TargetActorId")
.HasColumnType("uuid")
.HasColumnName("target_actor_id");
b.Property("UpdatedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("updated_at");
b.HasKey("Id")
.HasName("pk_fediverse_relationships");
b.HasIndex("ActorId")
.HasDatabaseName("ix_fediverse_relationships_actor_id");
b.HasIndex("TargetActorId")
.HasDatabaseName("ix_fediverse_relationships_target_actor_id");
b.ToTable("fediverse_relationships", (string)null);
});
modelBuilder.Entity("DysonNetwork.Shared.Models.SnPoll", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid")
.HasColumnName("id");
b.Property("CreatedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("created_at");
b.Property("DeletedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("deleted_at");
b.Property("Description")
.HasMaxLength(4096)
.HasColumnType("character varying(4096)")
.HasColumnName("description");
b.Property("EndedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("ended_at");
b.Property("IsAnonymous")
.HasColumnType("boolean")
.HasColumnName("is_anonymous");
b.Property("PublisherId")
.HasColumnType("uuid")
.HasColumnName("publisher_id");
b.Property("Title")
.HasMaxLength(1024)
.HasColumnType("character varying(1024)")
.HasColumnName("title");
b.Property("UpdatedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("updated_at");
b.HasKey("Id")
.HasName("pk_polls");
b.HasIndex("PublisherId")
.HasDatabaseName("ix_polls_publisher_id");
b.ToTable("polls", (string)null);
});
modelBuilder.Entity("DysonNetwork.Shared.Models.SnPollAnswer", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid")
.HasColumnName("id");
b.Property("AccountId")
.HasColumnType("uuid")
.HasColumnName("account_id");
b.Property>("Answer")
.IsRequired()
.HasColumnType("jsonb")
.HasColumnName("answer");
b.Property("CreatedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("created_at");
b.Property("DeletedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("deleted_at");
b.Property("PollId")
.HasColumnType("uuid")
.HasColumnName("poll_id");
b.Property("UpdatedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("updated_at");
b.HasKey("Id")
.HasName("pk_poll_answers");
b.HasIndex("PollId")
.HasDatabaseName("ix_poll_answers_poll_id");
b.ToTable("poll_answers", (string)null);
});
modelBuilder.Entity("DysonNetwork.Shared.Models.SnPollQuestion", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid")
.HasColumnName("id");
b.Property("CreatedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("created_at");
b.Property("DeletedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("deleted_at");
b.Property("Description")
.HasMaxLength(4096)
.HasColumnType("character varying(4096)")
.HasColumnName("description");
b.Property("IsRequired")
.HasColumnType("boolean")
.HasColumnName("is_required");
b.Property>("Options")
.HasColumnType("jsonb")
.HasColumnName("options");
b.Property("Order")
.HasColumnType("integer")
.HasColumnName("order");
b.Property("PollId")
.HasColumnType("uuid")
.HasColumnName("poll_id");
b.Property("Title")
.IsRequired()
.HasMaxLength(1024)
.HasColumnType("character varying(1024)")
.HasColumnName("title");
b.Property("Type")
.HasColumnType("integer")
.HasColumnName("type");
b.Property("UpdatedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("updated_at");
b.HasKey("Id")
.HasName("pk_poll_questions");
b.HasIndex("PollId")
.HasDatabaseName("ix_poll_questions_poll_id");
b.ToTable("poll_questions", (string)null);
});
modelBuilder.Entity("DysonNetwork.Shared.Models.SnPost", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid")
.HasColumnName("id");
b.Property>("Attachments")
.IsRequired()
.HasColumnType("jsonb")
.HasColumnName("attachments");
b.Property("AwardedScore")
.HasColumnType("numeric")
.HasColumnName("awarded_score");
b.Property("Content")
.HasColumnType("text")
.HasColumnName("content");
b.Property("CreatedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("created_at");
b.Property("DeletedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("deleted_at");
b.Property("Description")
.HasMaxLength(4096)
.HasColumnType("character varying(4096)")
.HasColumnName("description");
b.Property("Downvotes")
.HasColumnType("integer")
.HasColumnName("downvotes");
b.Property("EditedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("edited_at");
b.Property("EmbedView")
.HasColumnType("jsonb")
.HasColumnName("embed_view");
b.Property("ForwardedGone")
.HasColumnType("boolean")
.HasColumnName("forwarded_gone");
b.Property("ForwardedPostId")
.HasColumnType("uuid")
.HasColumnName("forwarded_post_id");
b.Property>("Meta")
.HasColumnType("jsonb")
.HasColumnName("meta");
b.Property("PinMode")
.HasColumnType("integer")
.HasColumnName("pin_mode");
b.Property("PublishedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("published_at");
b.Property("PublisherId")
.HasColumnType("uuid")
.HasColumnName("publisher_id");
b.Property("RealmId")
.HasColumnType("uuid")
.HasColumnName("realm_id");
b.Property("RepliedGone")
.HasColumnType("boolean")
.HasColumnName("replied_gone");
b.Property("RepliedPostId")
.HasColumnType("uuid")
.HasColumnName("replied_post_id");
b.PrimitiveCollection("SensitiveMarks")
.HasColumnType("jsonb")
.HasColumnName("sensitive_marks");
b.Property("Slug")
.HasMaxLength(1024)
.HasColumnType("character varying(1024)")
.HasColumnName("slug");
b.Property("Title")
.HasMaxLength(1024)
.HasColumnType("character varying(1024)")
.HasColumnName("title");
b.Property("Type")
.HasColumnType("integer")
.HasColumnName("type");
b.Property("UpdatedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("updated_at");
b.Property("Upvotes")
.HasColumnType("integer")
.HasColumnName("upvotes");
b.Property("ViewsTotal")
.HasColumnType("integer")
.HasColumnName("views_total");
b.Property("ViewsUnique")
.HasColumnType("integer")
.HasColumnName("views_unique");
b.Property("Visibility")
.HasColumnType("integer")
.HasColumnName("visibility");
b.HasKey("Id")
.HasName("pk_posts");
b.HasIndex("ForwardedPostId")
.HasDatabaseName("ix_posts_forwarded_post_id");
b.HasIndex("PublisherId")
.HasDatabaseName("ix_posts_publisher_id");
b.HasIndex("RepliedPostId")
.HasDatabaseName("ix_posts_replied_post_id");
b.ToTable("posts", (string)null);
});
modelBuilder.Entity("DysonNetwork.Shared.Models.SnPostAward", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid")
.HasColumnName("id");
b.Property("AccountId")
.HasColumnType("uuid")
.HasColumnName("account_id");
b.Property("Amount")
.HasColumnType("numeric")
.HasColumnName("amount");
b.Property("Attitude")
.HasColumnType("integer")
.HasColumnName("attitude");
b.Property("CreatedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("created_at");
b.Property("DeletedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("deleted_at");
b.Property("Message")
.HasMaxLength(4096)
.HasColumnType("character varying(4096)")
.HasColumnName("message");
b.Property("PostId")
.HasColumnType("uuid")
.HasColumnName("post_id");
b.Property("UpdatedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("updated_at");
b.HasKey("Id")
.HasName("pk_post_awards");
b.HasIndex("PostId")
.HasDatabaseName("ix_post_awards_post_id");
b.ToTable("post_awards", (string)null);
});
modelBuilder.Entity("DysonNetwork.Shared.Models.SnPostCategory", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid")
.HasColumnName("id");
b.Property("CreatedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("created_at");
b.Property("DeletedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("deleted_at");
b.Property("Name")
.HasMaxLength(256)
.HasColumnType("character varying(256)")
.HasColumnName("name");
b.Property("Slug")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("character varying(128)")
.HasColumnName("slug");
b.Property("UpdatedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("updated_at");
b.HasKey("Id")
.HasName("pk_post_categories");
b.ToTable("post_categories", (string)null);
});
modelBuilder.Entity("DysonNetwork.Shared.Models.SnPostCategorySubscription", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid")
.HasColumnName("id");
b.Property("AccountId")
.HasColumnType("uuid")
.HasColumnName("account_id");
b.Property("CategoryId")
.HasColumnType("uuid")
.HasColumnName("category_id");
b.Property("CreatedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("created_at");
b.Property("DeletedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("deleted_at");
b.Property("TagId")
.HasColumnType("uuid")
.HasColumnName("tag_id");
b.Property("UpdatedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("updated_at");
b.HasKey("Id")
.HasName("pk_post_category_subscriptions");
b.HasIndex("CategoryId")
.HasDatabaseName("ix_post_category_subscriptions_category_id");
b.HasIndex("TagId")
.HasDatabaseName("ix_post_category_subscriptions_tag_id");
b.ToTable("post_category_subscriptions", (string)null);
});
modelBuilder.Entity("DysonNetwork.Shared.Models.SnPostCollection", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid")
.HasColumnName("id");
b.Property("CreatedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("created_at");
b.Property("DeletedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("deleted_at");
b.Property("Description")
.HasMaxLength(4096)
.HasColumnType("character varying(4096)")
.HasColumnName("description");
b.Property("Name")
.HasMaxLength(256)
.HasColumnType("character varying(256)")
.HasColumnName("name");
b.Property("PublisherId")
.HasColumnType("uuid")
.HasColumnName("publisher_id");
b.Property("Slug")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("character varying(128)")
.HasColumnName("slug");
b.Property("UpdatedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("updated_at");
b.HasKey("Id")
.HasName("pk_post_collections");
b.HasIndex("PublisherId")
.HasDatabaseName("ix_post_collections_publisher_id");
b.ToTable("post_collections", (string)null);
});
modelBuilder.Entity("DysonNetwork.Shared.Models.SnPostFeaturedRecord", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid")
.HasColumnName("id");
b.Property("CreatedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("created_at");
b.Property("DeletedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("deleted_at");
b.Property("FeaturedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("featured_at");
b.Property("PostId")
.HasColumnType("uuid")
.HasColumnName("post_id");
b.Property