2364 lines
94 KiB
C#
2364 lines
94 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text.Json;
|
|
using DysonNetwork.Sphere;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using NodaTime;
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
using NpgsqlTypes;
|
|
|
|
#nullable disable
|
|
|
|
namespace DysonNetwork.Sphere.Migrations
|
|
{
|
|
[DbContext(typeof(AppDatabase))]
|
|
[Migration("20250505050854_NoIdeaHowToNameThis")]
|
|
partial class NoIdeaHowToNameThis
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasAnnotation("ProductVersion", "9.0.3")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
|
|
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Account.Account", b =>
|
|
{
|
|
b.Property<long>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("id");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
|
|
|
b.Property<Instant?>("ActivatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("activated_at");
|
|
|
|
b.Property<Instant>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("created_at");
|
|
|
|
b.Property<Instant?>("DeletedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("deleted_at");
|
|
|
|
b.Property<bool>("IsSuperuser")
|
|
.HasColumnType("boolean")
|
|
.HasColumnName("is_superuser");
|
|
|
|
b.Property<string>("Language")
|
|
.IsRequired()
|
|
.HasMaxLength(32)
|
|
.HasColumnType("character varying(32)")
|
|
.HasColumnName("language");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(256)
|
|
.HasColumnType("character varying(256)")
|
|
.HasColumnName("name");
|
|
|
|
b.Property<string>("Nick")
|
|
.IsRequired()
|
|
.HasMaxLength(256)
|
|
.HasColumnType("character varying(256)")
|
|
.HasColumnName("nick");
|
|
|
|
b.Property<Instant>("UpdatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("updated_at");
|
|
|
|
b.HasKey("Id")
|
|
.HasName("pk_accounts");
|
|
|
|
b.HasIndex("Name")
|
|
.IsUnique()
|
|
.HasDatabaseName("ix_accounts_name");
|
|
|
|
b.ToTable("accounts", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Account.AccountAuthFactor", b =>
|
|
{
|
|
b.Property<long>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("id");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
|
|
|
b.Property<long>("AccountId")
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("account_id");
|
|
|
|
b.Property<Instant>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("created_at");
|
|
|
|
b.Property<Instant?>("DeletedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("deleted_at");
|
|
|
|
b.Property<string>("Secret")
|
|
.HasColumnType("text")
|
|
.HasColumnName("secret");
|
|
|
|
b.Property<int>("Type")
|
|
.HasColumnType("integer")
|
|
.HasColumnName("type");
|
|
|
|
b.Property<Instant>("UpdatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("updated_at");
|
|
|
|
b.HasKey("Id")
|
|
.HasName("pk_account_auth_factors");
|
|
|
|
b.HasIndex("AccountId")
|
|
.HasDatabaseName("ix_account_auth_factors_account_id");
|
|
|
|
b.ToTable("account_auth_factors", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Account.AccountContact", b =>
|
|
{
|
|
b.Property<long>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("id");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
|
|
|
b.Property<long>("AccountId")
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("account_id");
|
|
|
|
b.Property<string>("Content")
|
|
.IsRequired()
|
|
.HasMaxLength(1024)
|
|
.HasColumnType("character varying(1024)")
|
|
.HasColumnName("content");
|
|
|
|
b.Property<Instant>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("created_at");
|
|
|
|
b.Property<Instant?>("DeletedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("deleted_at");
|
|
|
|
b.Property<int>("Type")
|
|
.HasColumnType("integer")
|
|
.HasColumnName("type");
|
|
|
|
b.Property<Instant>("UpdatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("updated_at");
|
|
|
|
b.Property<Instant?>("VerifiedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("verified_at");
|
|
|
|
b.HasKey("Id")
|
|
.HasName("pk_account_contacts");
|
|
|
|
b.HasIndex("AccountId")
|
|
.HasDatabaseName("ix_account_contacts_account_id");
|
|
|
|
b.ToTable("account_contacts", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Account.MagicSpell", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid")
|
|
.HasColumnName("id");
|
|
|
|
b.Property<long?>("AccountId")
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("account_id");
|
|
|
|
b.Property<Instant?>("AffectedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("affected_at");
|
|
|
|
b.Property<Instant>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("created_at");
|
|
|
|
b.Property<Instant?>("DeletedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("deleted_at");
|
|
|
|
b.Property<Instant?>("ExpiresAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("expires_at");
|
|
|
|
b.Property<Dictionary<string, object>>("Meta")
|
|
.IsRequired()
|
|
.HasColumnType("jsonb")
|
|
.HasColumnName("meta");
|
|
|
|
b.Property<string>("Spell")
|
|
.IsRequired()
|
|
.HasMaxLength(1024)
|
|
.HasColumnType("character varying(1024)")
|
|
.HasColumnName("spell");
|
|
|
|
b.Property<int>("Type")
|
|
.HasColumnType("integer")
|
|
.HasColumnName("type");
|
|
|
|
b.Property<Instant>("UpdatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("updated_at");
|
|
|
|
b.HasKey("Id")
|
|
.HasName("pk_magic_spells");
|
|
|
|
b.HasIndex("AccountId")
|
|
.HasDatabaseName("ix_magic_spells_account_id");
|
|
|
|
b.HasIndex("Spell")
|
|
.IsUnique()
|
|
.HasDatabaseName("ix_magic_spells_spell");
|
|
|
|
b.ToTable("magic_spells", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Account.Notification", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid")
|
|
.HasColumnName("id");
|
|
|
|
b.Property<long>("AccountId")
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("account_id");
|
|
|
|
b.Property<string>("Content")
|
|
.HasMaxLength(4096)
|
|
.HasColumnType("character varying(4096)")
|
|
.HasColumnName("content");
|
|
|
|
b.Property<Instant>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("created_at");
|
|
|
|
b.Property<Instant?>("DeletedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("deleted_at");
|
|
|
|
b.Property<Dictionary<string, object>>("Meta")
|
|
.HasColumnType("jsonb")
|
|
.HasColumnName("meta");
|
|
|
|
b.Property<int>("Priority")
|
|
.HasColumnType("integer")
|
|
.HasColumnName("priority");
|
|
|
|
b.Property<string>("Subtitle")
|
|
.HasMaxLength(2048)
|
|
.HasColumnType("character varying(2048)")
|
|
.HasColumnName("subtitle");
|
|
|
|
b.Property<string>("Title")
|
|
.HasMaxLength(1024)
|
|
.HasColumnType("character varying(1024)")
|
|
.HasColumnName("title");
|
|
|
|
b.Property<string>("Topic")
|
|
.IsRequired()
|
|
.HasMaxLength(1024)
|
|
.HasColumnType("character varying(1024)")
|
|
.HasColumnName("topic");
|
|
|
|
b.Property<Instant>("UpdatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("updated_at");
|
|
|
|
b.Property<Instant?>("ViewedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("viewed_at");
|
|
|
|
b.HasKey("Id")
|
|
.HasName("pk_notifications");
|
|
|
|
b.HasIndex("AccountId")
|
|
.HasDatabaseName("ix_notifications_account_id");
|
|
|
|
b.ToTable("notifications", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Account.NotificationPushSubscription", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid")
|
|
.HasColumnName("id");
|
|
|
|
b.Property<long>("AccountId")
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("account_id");
|
|
|
|
b.Property<Instant>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("created_at");
|
|
|
|
b.Property<Instant?>("DeletedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("deleted_at");
|
|
|
|
b.Property<string>("DeviceId")
|
|
.IsRequired()
|
|
.HasMaxLength(4096)
|
|
.HasColumnType("character varying(4096)")
|
|
.HasColumnName("device_id");
|
|
|
|
b.Property<string>("DeviceToken")
|
|
.IsRequired()
|
|
.HasMaxLength(4096)
|
|
.HasColumnType("character varying(4096)")
|
|
.HasColumnName("device_token");
|
|
|
|
b.Property<Instant?>("LastUsedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("last_used_at");
|
|
|
|
b.Property<int>("Provider")
|
|
.HasColumnType("integer")
|
|
.HasColumnName("provider");
|
|
|
|
b.Property<Instant>("UpdatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("updated_at");
|
|
|
|
b.HasKey("Id")
|
|
.HasName("pk_notification_push_subscriptions");
|
|
|
|
b.HasIndex("AccountId")
|
|
.HasDatabaseName("ix_notification_push_subscriptions_account_id");
|
|
|
|
b.HasIndex("DeviceId")
|
|
.IsUnique()
|
|
.HasDatabaseName("ix_notification_push_subscriptions_device_id");
|
|
|
|
b.HasIndex("DeviceToken")
|
|
.IsUnique()
|
|
.HasDatabaseName("ix_notification_push_subscriptions_device_token");
|
|
|
|
b.ToTable("notification_push_subscriptions", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Account.Profile", b =>
|
|
{
|
|
b.Property<long>("Id")
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("id");
|
|
|
|
b.Property<string>("BackgroundId")
|
|
.HasColumnType("character varying(128)")
|
|
.HasColumnName("background_id");
|
|
|
|
b.Property<string>("Bio")
|
|
.HasMaxLength(4096)
|
|
.HasColumnType("character varying(4096)")
|
|
.HasColumnName("bio");
|
|
|
|
b.Property<Instant>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("created_at");
|
|
|
|
b.Property<Instant?>("DeletedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("deleted_at");
|
|
|
|
b.Property<string>("FirstName")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("character varying(256)")
|
|
.HasColumnName("first_name");
|
|
|
|
b.Property<string>("LastName")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("character varying(256)")
|
|
.HasColumnName("last_name");
|
|
|
|
b.Property<string>("MiddleName")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("character varying(256)")
|
|
.HasColumnName("middle_name");
|
|
|
|
b.Property<string>("PictureId")
|
|
.HasColumnType("character varying(128)")
|
|
.HasColumnName("picture_id");
|
|
|
|
b.Property<Instant>("UpdatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("updated_at");
|
|
|
|
b.HasKey("Id")
|
|
.HasName("pk_account_profiles");
|
|
|
|
b.HasIndex("BackgroundId")
|
|
.HasDatabaseName("ix_account_profiles_background_id");
|
|
|
|
b.HasIndex("PictureId")
|
|
.HasDatabaseName("ix_account_profiles_picture_id");
|
|
|
|
b.ToTable("account_profiles", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Account.Relationship", b =>
|
|
{
|
|
b.Property<long>("AccountId")
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("account_id");
|
|
|
|
b.Property<long>("RelatedId")
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("related_id");
|
|
|
|
b.Property<Instant>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("created_at");
|
|
|
|
b.Property<Instant?>("DeletedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("deleted_at");
|
|
|
|
b.Property<Instant?>("ExpiredAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("expired_at");
|
|
|
|
b.Property<int>("Status")
|
|
.HasColumnType("integer")
|
|
.HasColumnName("status");
|
|
|
|
b.Property<Instant>("UpdatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("updated_at");
|
|
|
|
b.HasKey("AccountId", "RelatedId")
|
|
.HasName("pk_account_relationships");
|
|
|
|
b.HasIndex("RelatedId")
|
|
.HasDatabaseName("ix_account_relationships_related_id");
|
|
|
|
b.ToTable("account_relationships", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Activity.Activity", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid")
|
|
.HasColumnName("id");
|
|
|
|
b.Property<long>("AccountId")
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("account_id");
|
|
|
|
b.Property<Instant>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("created_at");
|
|
|
|
b.Property<Instant?>("DeletedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("deleted_at");
|
|
|
|
b.Property<string>("ResourceIdentifier")
|
|
.IsRequired()
|
|
.HasMaxLength(4096)
|
|
.HasColumnType("character varying(4096)")
|
|
.HasColumnName("resource_identifier");
|
|
|
|
b.Property<string>("Type")
|
|
.IsRequired()
|
|
.HasMaxLength(1024)
|
|
.HasColumnType("character varying(1024)")
|
|
.HasColumnName("type");
|
|
|
|
b.Property<Instant>("UpdatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("updated_at");
|
|
|
|
b.Property<int>("Visibility")
|
|
.HasColumnType("integer")
|
|
.HasColumnName("visibility");
|
|
|
|
b.HasKey("Id")
|
|
.HasName("pk_activities");
|
|
|
|
b.HasIndex("AccountId")
|
|
.HasDatabaseName("ix_activities_account_id");
|
|
|
|
b.ToTable("activities", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Auth.Challenge", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid")
|
|
.HasColumnName("id");
|
|
|
|
b.Property<long>("AccountId")
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("account_id");
|
|
|
|
b.Property<List<string>>("Audiences")
|
|
.IsRequired()
|
|
.HasColumnType("jsonb")
|
|
.HasColumnName("audiences");
|
|
|
|
b.Property<List<long>>("BlacklistFactors")
|
|
.IsRequired()
|
|
.HasColumnType("jsonb")
|
|
.HasColumnName("blacklist_factors");
|
|
|
|
b.Property<Instant>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("created_at");
|
|
|
|
b.Property<Instant?>("DeletedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("deleted_at");
|
|
|
|
b.Property<string>("DeviceId")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("character varying(256)")
|
|
.HasColumnName("device_id");
|
|
|
|
b.Property<Instant?>("ExpiredAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("expired_at");
|
|
|
|
b.Property<int>("FailedAttempts")
|
|
.HasColumnType("integer")
|
|
.HasColumnName("failed_attempts");
|
|
|
|
b.Property<string>("IpAddress")
|
|
.HasMaxLength(128)
|
|
.HasColumnType("character varying(128)")
|
|
.HasColumnName("ip_address");
|
|
|
|
b.Property<string>("Nonce")
|
|
.HasMaxLength(1024)
|
|
.HasColumnType("character varying(1024)")
|
|
.HasColumnName("nonce");
|
|
|
|
b.Property<int>("Platform")
|
|
.HasColumnType("integer")
|
|
.HasColumnName("platform");
|
|
|
|
b.Property<List<string>>("Scopes")
|
|
.IsRequired()
|
|
.HasColumnType("jsonb")
|
|
.HasColumnName("scopes");
|
|
|
|
b.Property<int>("StepRemain")
|
|
.HasColumnType("integer")
|
|
.HasColumnName("step_remain");
|
|
|
|
b.Property<int>("StepTotal")
|
|
.HasColumnType("integer")
|
|
.HasColumnName("step_total");
|
|
|
|
b.Property<int>("Type")
|
|
.HasColumnType("integer")
|
|
.HasColumnName("type");
|
|
|
|
b.Property<Instant>("UpdatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("updated_at");
|
|
|
|
b.Property<string>("UserAgent")
|
|
.HasMaxLength(512)
|
|
.HasColumnType("character varying(512)")
|
|
.HasColumnName("user_agent");
|
|
|
|
b.HasKey("Id")
|
|
.HasName("pk_auth_challenges");
|
|
|
|
b.HasIndex("AccountId")
|
|
.HasDatabaseName("ix_auth_challenges_account_id");
|
|
|
|
b.ToTable("auth_challenges", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Auth.Session", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid")
|
|
.HasColumnName("id");
|
|
|
|
b.Property<long>("AccountId")
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("account_id");
|
|
|
|
b.Property<Guid>("ChallengeId")
|
|
.HasColumnType("uuid")
|
|
.HasColumnName("challenge_id");
|
|
|
|
b.Property<Instant>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("created_at");
|
|
|
|
b.Property<Instant?>("DeletedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("deleted_at");
|
|
|
|
b.Property<Instant?>("ExpiredAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("expired_at");
|
|
|
|
b.Property<string>("Label")
|
|
.HasMaxLength(1024)
|
|
.HasColumnType("character varying(1024)")
|
|
.HasColumnName("label");
|
|
|
|
b.Property<Instant?>("LastGrantedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("last_granted_at");
|
|
|
|
b.Property<Instant>("UpdatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("updated_at");
|
|
|
|
b.HasKey("Id")
|
|
.HasName("pk_auth_sessions");
|
|
|
|
b.HasIndex("AccountId")
|
|
.HasDatabaseName("ix_auth_sessions_account_id");
|
|
|
|
b.HasIndex("ChallengeId")
|
|
.HasDatabaseName("ix_auth_sessions_challenge_id");
|
|
|
|
b.ToTable("auth_sessions", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Chat.ChatMember", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid")
|
|
.HasColumnName("id");
|
|
|
|
b.Property<long>("AccountId")
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("account_id");
|
|
|
|
b.Property<long>("ChatRoomId")
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("chat_room_id");
|
|
|
|
b.Property<Instant>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("created_at");
|
|
|
|
b.Property<Instant?>("DeletedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("deleted_at");
|
|
|
|
b.Property<bool>("IsBot")
|
|
.HasColumnType("boolean")
|
|
.HasColumnName("is_bot");
|
|
|
|
b.Property<Instant?>("JoinedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("joined_at");
|
|
|
|
b.Property<string>("Nick")
|
|
.HasMaxLength(1024)
|
|
.HasColumnType("character varying(1024)")
|
|
.HasColumnName("nick");
|
|
|
|
b.Property<int>("Notify")
|
|
.HasColumnType("integer")
|
|
.HasColumnName("notify");
|
|
|
|
b.Property<int>("Role")
|
|
.HasColumnType("integer")
|
|
.HasColumnName("role");
|
|
|
|
b.Property<Instant>("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("AccountId")
|
|
.HasDatabaseName("ix_chat_members_account_id");
|
|
|
|
b.ToTable("chat_members", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Chat.ChatRoom", b =>
|
|
{
|
|
b.Property<long>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("id");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
|
|
|
b.Property<string>("BackgroundId")
|
|
.HasColumnType("character varying(128)")
|
|
.HasColumnName("background_id");
|
|
|
|
b.Property<Instant>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("created_at");
|
|
|
|
b.Property<Instant?>("DeletedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("deleted_at");
|
|
|
|
b.Property<string>("Description")
|
|
.IsRequired()
|
|
.HasMaxLength(4096)
|
|
.HasColumnType("character varying(4096)")
|
|
.HasColumnName("description");
|
|
|
|
b.Property<bool>("IsPublic")
|
|
.HasColumnType("boolean")
|
|
.HasColumnName("is_public");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(1024)
|
|
.HasColumnType("character varying(1024)")
|
|
.HasColumnName("name");
|
|
|
|
b.Property<string>("PictureId")
|
|
.HasColumnType("character varying(128)")
|
|
.HasColumnName("picture_id");
|
|
|
|
b.Property<long?>("RealmId")
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("realm_id");
|
|
|
|
b.Property<int>("Type")
|
|
.HasColumnType("integer")
|
|
.HasColumnName("type");
|
|
|
|
b.Property<Instant>("UpdatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("updated_at");
|
|
|
|
b.HasKey("Id")
|
|
.HasName("pk_chat_rooms");
|
|
|
|
b.HasIndex("BackgroundId")
|
|
.HasDatabaseName("ix_chat_rooms_background_id");
|
|
|
|
b.HasIndex("PictureId")
|
|
.HasDatabaseName("ix_chat_rooms_picture_id");
|
|
|
|
b.HasIndex("RealmId")
|
|
.HasDatabaseName("ix_chat_rooms_realm_id");
|
|
|
|
b.ToTable("chat_rooms", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Chat.Message", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid")
|
|
.HasColumnName("id");
|
|
|
|
b.Property<long>("ChatRoomId")
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("chat_room_id");
|
|
|
|
b.Property<string>("Content")
|
|
.IsRequired()
|
|
.HasMaxLength(4096)
|
|
.HasColumnType("character varying(4096)")
|
|
.HasColumnName("content");
|
|
|
|
b.Property<Instant>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("created_at");
|
|
|
|
b.Property<Instant?>("DeletedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("deleted_at");
|
|
|
|
b.Property<Instant?>("EditedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("edited_at");
|
|
|
|
b.Property<Guid?>("ForwardedMessageId")
|
|
.HasColumnType("uuid")
|
|
.HasColumnName("forwarded_message_id");
|
|
|
|
b.Property<List<Guid>>("MembersMentioned")
|
|
.HasColumnType("jsonb")
|
|
.HasColumnName("members_mentioned");
|
|
|
|
b.Property<Dictionary<string, object>>("Meta")
|
|
.HasColumnType("jsonb")
|
|
.HasColumnName("meta");
|
|
|
|
b.Property<string>("Nonce")
|
|
.IsRequired()
|
|
.HasMaxLength(36)
|
|
.HasColumnType("character varying(36)")
|
|
.HasColumnName("nonce");
|
|
|
|
b.Property<Guid?>("RepliedMessageId")
|
|
.HasColumnType("uuid")
|
|
.HasColumnName("replied_message_id");
|
|
|
|
b.Property<Guid>("SenderId")
|
|
.HasColumnType("uuid")
|
|
.HasColumnName("sender_id");
|
|
|
|
b.Property<Instant>("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.Sphere.Chat.MessageReaction", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid")
|
|
.HasColumnName("id");
|
|
|
|
b.Property<int>("Attitude")
|
|
.HasColumnType("integer")
|
|
.HasColumnName("attitude");
|
|
|
|
b.Property<Instant>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("created_at");
|
|
|
|
b.Property<Instant?>("DeletedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("deleted_at");
|
|
|
|
b.Property<Guid>("MessageId")
|
|
.HasColumnType("uuid")
|
|
.HasColumnName("message_id");
|
|
|
|
b.Property<Guid>("SenderId")
|
|
.HasColumnType("uuid")
|
|
.HasColumnName("sender_id");
|
|
|
|
b.Property<string>("Symbol")
|
|
.IsRequired()
|
|
.HasMaxLength(256)
|
|
.HasColumnType("character varying(256)")
|
|
.HasColumnName("symbol");
|
|
|
|
b.Property<Instant>("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.Sphere.Chat.MessageStatus", b =>
|
|
{
|
|
b.Property<Guid>("MessageId")
|
|
.HasColumnType("uuid")
|
|
.HasColumnName("message_id");
|
|
|
|
b.Property<Guid>("SenderId")
|
|
.HasColumnType("uuid")
|
|
.HasColumnName("sender_id");
|
|
|
|
b.Property<Instant>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("created_at");
|
|
|
|
b.Property<Instant?>("DeletedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("deleted_at");
|
|
|
|
b.Property<Instant>("ReadAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("read_at");
|
|
|
|
b.Property<Instant>("UpdatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("updated_at");
|
|
|
|
b.HasKey("MessageId", "SenderId")
|
|
.HasName("pk_chat_statuses");
|
|
|
|
b.HasIndex("SenderId")
|
|
.HasDatabaseName("ix_chat_statuses_sender_id");
|
|
|
|
b.ToTable("chat_statuses", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Permission.PermissionGroup", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid")
|
|
.HasColumnName("id");
|
|
|
|
b.Property<Instant>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("created_at");
|
|
|
|
b.Property<Instant?>("DeletedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("deleted_at");
|
|
|
|
b.Property<string>("Key")
|
|
.IsRequired()
|
|
.HasMaxLength(1024)
|
|
.HasColumnType("character varying(1024)")
|
|
.HasColumnName("key");
|
|
|
|
b.Property<Instant>("UpdatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("updated_at");
|
|
|
|
b.HasKey("Id")
|
|
.HasName("pk_permission_groups");
|
|
|
|
b.ToTable("permission_groups", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Permission.PermissionGroupMember", b =>
|
|
{
|
|
b.Property<Guid>("GroupId")
|
|
.HasColumnType("uuid")
|
|
.HasColumnName("group_id");
|
|
|
|
b.Property<string>("Actor")
|
|
.HasMaxLength(1024)
|
|
.HasColumnType("character varying(1024)")
|
|
.HasColumnName("actor");
|
|
|
|
b.Property<Instant?>("AffectedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("affected_at");
|
|
|
|
b.Property<Instant>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("created_at");
|
|
|
|
b.Property<Instant?>("DeletedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("deleted_at");
|
|
|
|
b.Property<Instant?>("ExpiredAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("expired_at");
|
|
|
|
b.Property<Instant>("UpdatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("updated_at");
|
|
|
|
b.HasKey("GroupId", "Actor")
|
|
.HasName("pk_permission_group_members");
|
|
|
|
b.ToTable("permission_group_members", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Permission.PermissionNode", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid")
|
|
.HasColumnName("id");
|
|
|
|
b.Property<string>("Actor")
|
|
.IsRequired()
|
|
.HasMaxLength(1024)
|
|
.HasColumnType("character varying(1024)")
|
|
.HasColumnName("actor");
|
|
|
|
b.Property<Instant?>("AffectedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("affected_at");
|
|
|
|
b.Property<string>("Area")
|
|
.IsRequired()
|
|
.HasMaxLength(1024)
|
|
.HasColumnType("character varying(1024)")
|
|
.HasColumnName("area");
|
|
|
|
b.Property<Instant>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("created_at");
|
|
|
|
b.Property<Instant?>("DeletedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("deleted_at");
|
|
|
|
b.Property<Instant?>("ExpiredAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("expired_at");
|
|
|
|
b.Property<Guid?>("GroupId")
|
|
.HasColumnType("uuid")
|
|
.HasColumnName("group_id");
|
|
|
|
b.Property<string>("Key")
|
|
.IsRequired()
|
|
.HasMaxLength(1024)
|
|
.HasColumnType("character varying(1024)")
|
|
.HasColumnName("key");
|
|
|
|
b.Property<Instant>("UpdatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("updated_at");
|
|
|
|
b.Property<JsonDocument>("Value")
|
|
.IsRequired()
|
|
.HasColumnType("jsonb")
|
|
.HasColumnName("value");
|
|
|
|
b.HasKey("Id")
|
|
.HasName("pk_permission_nodes");
|
|
|
|
b.HasIndex("GroupId")
|
|
.HasDatabaseName("ix_permission_nodes_group_id");
|
|
|
|
b.HasIndex("Key", "Area", "Actor")
|
|
.HasDatabaseName("ix_permission_nodes_key_area_actor");
|
|
|
|
b.ToTable("permission_nodes", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Post.Post", b =>
|
|
{
|
|
b.Property<long>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("id");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
|
|
|
b.Property<string>("Content")
|
|
.HasColumnType("text")
|
|
.HasColumnName("content");
|
|
|
|
b.Property<Instant>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("created_at");
|
|
|
|
b.Property<Instant?>("DeletedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("deleted_at");
|
|
|
|
b.Property<string>("Description")
|
|
.HasMaxLength(4096)
|
|
.HasColumnType("character varying(4096)")
|
|
.HasColumnName("description");
|
|
|
|
b.Property<int>("Downvotes")
|
|
.HasColumnType("integer")
|
|
.HasColumnName("downvotes");
|
|
|
|
b.Property<Instant?>("EditedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("edited_at");
|
|
|
|
b.Property<long?>("ForwardedPostId")
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("forwarded_post_id");
|
|
|
|
b.Property<string>("Language")
|
|
.HasMaxLength(128)
|
|
.HasColumnType("character varying(128)")
|
|
.HasColumnName("language");
|
|
|
|
b.Property<Dictionary<string, object>>("Meta")
|
|
.HasColumnType("jsonb")
|
|
.HasColumnName("meta");
|
|
|
|
b.Property<Instant?>("PublishedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("published_at");
|
|
|
|
b.Property<long>("PublisherId")
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("publisher_id");
|
|
|
|
b.Property<long?>("RepliedPostId")
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("replied_post_id");
|
|
|
|
b.Property<NpgsqlTsVector>("SearchVector")
|
|
.IsRequired()
|
|
.ValueGeneratedOnAddOrUpdate()
|
|
.HasColumnType("tsvector")
|
|
.HasColumnName("search_vector")
|
|
.HasAnnotation("Npgsql:TsVectorConfig", "simple")
|
|
.HasAnnotation("Npgsql:TsVectorProperties", new[] { "Title", "Description", "Content" });
|
|
|
|
b.Property<long?>("ThreadedPostId")
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("threaded_post_id");
|
|
|
|
b.Property<string>("Title")
|
|
.HasMaxLength(1024)
|
|
.HasColumnType("character varying(1024)")
|
|
.HasColumnName("title");
|
|
|
|
b.Property<int>("Type")
|
|
.HasColumnType("integer")
|
|
.HasColumnName("type");
|
|
|
|
b.Property<Instant>("UpdatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("updated_at");
|
|
|
|
b.Property<int>("Upvotes")
|
|
.HasColumnType("integer")
|
|
.HasColumnName("upvotes");
|
|
|
|
b.Property<int>("ViewsTotal")
|
|
.HasColumnType("integer")
|
|
.HasColumnName("views_total");
|
|
|
|
b.Property<int>("ViewsUnique")
|
|
.HasColumnType("integer")
|
|
.HasColumnName("views_unique");
|
|
|
|
b.Property<int>("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.HasIndex("SearchVector")
|
|
.HasDatabaseName("ix_posts_search_vector");
|
|
|
|
NpgsqlIndexBuilderExtensions.HasMethod(b.HasIndex("SearchVector"), "GIN");
|
|
|
|
b.HasIndex("ThreadedPostId")
|
|
.IsUnique()
|
|
.HasDatabaseName("ix_posts_threaded_post_id");
|
|
|
|
b.ToTable("posts", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Post.PostCategory", b =>
|
|
{
|
|
b.Property<long>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("id");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
|
|
|
b.Property<Instant>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("created_at");
|
|
|
|
b.Property<Instant?>("DeletedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("deleted_at");
|
|
|
|
b.Property<string>("Name")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("character varying(256)")
|
|
.HasColumnName("name");
|
|
|
|
b.Property<string>("Slug")
|
|
.IsRequired()
|
|
.HasMaxLength(128)
|
|
.HasColumnType("character varying(128)")
|
|
.HasColumnName("slug");
|
|
|
|
b.Property<Instant>("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.Sphere.Post.PostCollection", b =>
|
|
{
|
|
b.Property<long>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("id");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
|
|
|
b.Property<Instant>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("created_at");
|
|
|
|
b.Property<Instant?>("DeletedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("deleted_at");
|
|
|
|
b.Property<string>("Description")
|
|
.HasMaxLength(4096)
|
|
.HasColumnType("character varying(4096)")
|
|
.HasColumnName("description");
|
|
|
|
b.Property<string>("Name")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("character varying(256)")
|
|
.HasColumnName("name");
|
|
|
|
b.Property<long>("PublisherId")
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("publisher_id");
|
|
|
|
b.Property<string>("Slug")
|
|
.IsRequired()
|
|
.HasMaxLength(128)
|
|
.HasColumnType("character varying(128)")
|
|
.HasColumnName("slug");
|
|
|
|
b.Property<Instant>("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.Sphere.Post.PostReaction", b =>
|
|
{
|
|
b.Property<long>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("id");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
|
|
|
b.Property<long>("AccountId")
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("account_id");
|
|
|
|
b.Property<int>("Attitude")
|
|
.HasColumnType("integer")
|
|
.HasColumnName("attitude");
|
|
|
|
b.Property<Instant>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("created_at");
|
|
|
|
b.Property<Instant?>("DeletedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("deleted_at");
|
|
|
|
b.Property<long>("PostId")
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("post_id");
|
|
|
|
b.Property<string>("Symbol")
|
|
.IsRequired()
|
|
.HasMaxLength(256)
|
|
.HasColumnType("character varying(256)")
|
|
.HasColumnName("symbol");
|
|
|
|
b.Property<Instant>("UpdatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("updated_at");
|
|
|
|
b.HasKey("Id")
|
|
.HasName("pk_post_reactions");
|
|
|
|
b.HasIndex("AccountId")
|
|
.HasDatabaseName("ix_post_reactions_account_id");
|
|
|
|
b.HasIndex("PostId")
|
|
.HasDatabaseName("ix_post_reactions_post_id");
|
|
|
|
b.ToTable("post_reactions", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Post.PostTag", b =>
|
|
{
|
|
b.Property<long>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("id");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
|
|
|
b.Property<Instant>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("created_at");
|
|
|
|
b.Property<Instant?>("DeletedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("deleted_at");
|
|
|
|
b.Property<string>("Name")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("character varying(256)")
|
|
.HasColumnName("name");
|
|
|
|
b.Property<string>("Slug")
|
|
.IsRequired()
|
|
.HasMaxLength(128)
|
|
.HasColumnType("character varying(128)")
|
|
.HasColumnName("slug");
|
|
|
|
b.Property<Instant>("UpdatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("updated_at");
|
|
|
|
b.HasKey("Id")
|
|
.HasName("pk_post_tags");
|
|
|
|
b.ToTable("post_tags", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Post.Publisher", b =>
|
|
{
|
|
b.Property<long>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("id");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
|
|
|
b.Property<long?>("AccountId")
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("account_id");
|
|
|
|
b.Property<string>("BackgroundId")
|
|
.HasColumnType("character varying(128)")
|
|
.HasColumnName("background_id");
|
|
|
|
b.Property<string>("Bio")
|
|
.HasMaxLength(4096)
|
|
.HasColumnType("character varying(4096)")
|
|
.HasColumnName("bio");
|
|
|
|
b.Property<Instant>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("created_at");
|
|
|
|
b.Property<Instant?>("DeletedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("deleted_at");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(256)
|
|
.HasColumnType("character varying(256)")
|
|
.HasColumnName("name");
|
|
|
|
b.Property<string>("Nick")
|
|
.IsRequired()
|
|
.HasMaxLength(256)
|
|
.HasColumnType("character varying(256)")
|
|
.HasColumnName("nick");
|
|
|
|
b.Property<string>("PictureId")
|
|
.HasColumnType("character varying(128)")
|
|
.HasColumnName("picture_id");
|
|
|
|
b.Property<int>("PublisherType")
|
|
.HasColumnType("integer")
|
|
.HasColumnName("publisher_type");
|
|
|
|
b.Property<Instant>("UpdatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("updated_at");
|
|
|
|
b.HasKey("Id")
|
|
.HasName("pk_publishers");
|
|
|
|
b.HasIndex("AccountId")
|
|
.HasDatabaseName("ix_publishers_account_id");
|
|
|
|
b.HasIndex("BackgroundId")
|
|
.HasDatabaseName("ix_publishers_background_id");
|
|
|
|
b.HasIndex("Name")
|
|
.IsUnique()
|
|
.HasDatabaseName("ix_publishers_name");
|
|
|
|
b.HasIndex("PictureId")
|
|
.HasDatabaseName("ix_publishers_picture_id");
|
|
|
|
b.ToTable("publishers", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Post.PublisherMember", b =>
|
|
{
|
|
b.Property<long>("PublisherId")
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("publisher_id");
|
|
|
|
b.Property<long>("AccountId")
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("account_id");
|
|
|
|
b.Property<Instant>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("created_at");
|
|
|
|
b.Property<Instant?>("DeletedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("deleted_at");
|
|
|
|
b.Property<Instant?>("JoinedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("joined_at");
|
|
|
|
b.Property<int>("Role")
|
|
.HasColumnType("integer")
|
|
.HasColumnName("role");
|
|
|
|
b.Property<Instant>("UpdatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("updated_at");
|
|
|
|
b.HasKey("PublisherId", "AccountId")
|
|
.HasName("pk_publisher_members");
|
|
|
|
b.HasIndex("AccountId")
|
|
.HasDatabaseName("ix_publisher_members_account_id");
|
|
|
|
b.ToTable("publisher_members", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Realm.Realm", b =>
|
|
{
|
|
b.Property<long>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("id");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
|
|
|
b.Property<long>("AccountId")
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("account_id");
|
|
|
|
b.Property<string>("BackgroundId")
|
|
.HasColumnType("character varying(128)")
|
|
.HasColumnName("background_id");
|
|
|
|
b.Property<Instant>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("created_at");
|
|
|
|
b.Property<Instant?>("DeletedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("deleted_at");
|
|
|
|
b.Property<string>("Description")
|
|
.IsRequired()
|
|
.HasMaxLength(4096)
|
|
.HasColumnType("character varying(4096)")
|
|
.HasColumnName("description");
|
|
|
|
b.Property<bool>("IsCommunity")
|
|
.HasColumnType("boolean")
|
|
.HasColumnName("is_community");
|
|
|
|
b.Property<bool>("IsPublic")
|
|
.HasColumnType("boolean")
|
|
.HasColumnName("is_public");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(1024)
|
|
.HasColumnType("character varying(1024)")
|
|
.HasColumnName("name");
|
|
|
|
b.Property<string>("PictureId")
|
|
.HasColumnType("character varying(128)")
|
|
.HasColumnName("picture_id");
|
|
|
|
b.Property<string>("Slug")
|
|
.IsRequired()
|
|
.HasMaxLength(1024)
|
|
.HasColumnType("character varying(1024)")
|
|
.HasColumnName("slug");
|
|
|
|
b.Property<Instant>("UpdatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("updated_at");
|
|
|
|
b.Property<string>("VerifiedAs")
|
|
.HasMaxLength(4096)
|
|
.HasColumnType("character varying(4096)")
|
|
.HasColumnName("verified_as");
|
|
|
|
b.Property<Instant?>("VerifiedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("verified_at");
|
|
|
|
b.HasKey("Id")
|
|
.HasName("pk_realms");
|
|
|
|
b.HasIndex("AccountId")
|
|
.HasDatabaseName("ix_realms_account_id");
|
|
|
|
b.HasIndex("BackgroundId")
|
|
.HasDatabaseName("ix_realms_background_id");
|
|
|
|
b.HasIndex("PictureId")
|
|
.HasDatabaseName("ix_realms_picture_id");
|
|
|
|
b.HasIndex("Slug")
|
|
.IsUnique()
|
|
.HasDatabaseName("ix_realms_slug");
|
|
|
|
b.ToTable("realms", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Realm.RealmMember", b =>
|
|
{
|
|
b.Property<long>("RealmId")
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("realm_id");
|
|
|
|
b.Property<long>("AccountId")
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("account_id");
|
|
|
|
b.Property<Instant>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("created_at");
|
|
|
|
b.Property<Instant?>("DeletedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("deleted_at");
|
|
|
|
b.Property<Instant?>("JoinedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("joined_at");
|
|
|
|
b.Property<int>("Role")
|
|
.HasColumnType("integer")
|
|
.HasColumnName("role");
|
|
|
|
b.Property<Instant>("UpdatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("updated_at");
|
|
|
|
b.HasKey("RealmId", "AccountId")
|
|
.HasName("pk_realm_members");
|
|
|
|
b.HasIndex("AccountId")
|
|
.HasDatabaseName("ix_realm_members_account_id");
|
|
|
|
b.ToTable("realm_members", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Storage.CloudFile", b =>
|
|
{
|
|
b.Property<string>("Id")
|
|
.HasMaxLength(128)
|
|
.HasColumnType("character varying(128)")
|
|
.HasColumnName("id");
|
|
|
|
b.Property<long>("AccountId")
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("account_id");
|
|
|
|
b.Property<Instant>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("created_at");
|
|
|
|
b.Property<Instant?>("DeletedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("deleted_at");
|
|
|
|
b.Property<string>("Description")
|
|
.HasMaxLength(4096)
|
|
.HasColumnType("character varying(4096)")
|
|
.HasColumnName("description");
|
|
|
|
b.Property<Instant?>("ExpiredAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("expired_at");
|
|
|
|
b.Property<Dictionary<string, object>>("FileMeta")
|
|
.HasColumnType("jsonb")
|
|
.HasColumnName("file_meta");
|
|
|
|
b.Property<bool>("HasCompression")
|
|
.HasColumnType("boolean")
|
|
.HasColumnName("has_compression");
|
|
|
|
b.Property<string>("Hash")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("character varying(256)")
|
|
.HasColumnName("hash");
|
|
|
|
b.Property<Guid?>("MessageId")
|
|
.HasColumnType("uuid")
|
|
.HasColumnName("message_id");
|
|
|
|
b.Property<string>("MimeType")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("character varying(256)")
|
|
.HasColumnName("mime_type");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(1024)
|
|
.HasColumnType("character varying(1024)")
|
|
.HasColumnName("name");
|
|
|
|
b.Property<long?>("PostId")
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("post_id");
|
|
|
|
b.Property<long>("Size")
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("size");
|
|
|
|
b.Property<Instant>("UpdatedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("updated_at");
|
|
|
|
b.Property<Instant?>("UploadedAt")
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasColumnName("uploaded_at");
|
|
|
|
b.Property<string>("UploadedTo")
|
|
.HasMaxLength(128)
|
|
.HasColumnType("character varying(128)")
|
|
.HasColumnName("uploaded_to");
|
|
|
|
b.Property<int>("UsedCount")
|
|
.HasColumnType("integer")
|
|
.HasColumnName("used_count");
|
|
|
|
b.Property<Dictionary<string, object>>("UserMeta")
|
|
.HasColumnType("jsonb")
|
|
.HasColumnName("user_meta");
|
|
|
|
b.HasKey("Id")
|
|
.HasName("pk_files");
|
|
|
|
b.HasIndex("AccountId")
|
|
.HasDatabaseName("ix_files_account_id");
|
|
|
|
b.HasIndex("MessageId")
|
|
.HasDatabaseName("ix_files_message_id");
|
|
|
|
b.HasIndex("PostId")
|
|
.HasDatabaseName("ix_files_post_id");
|
|
|
|
b.ToTable("files", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("PostPostCategory", b =>
|
|
{
|
|
b.Property<long>("CategoriesId")
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("categories_id");
|
|
|
|
b.Property<long>("PostsId")
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("posts_id");
|
|
|
|
b.HasKey("CategoriesId", "PostsId")
|
|
.HasName("pk_post_category_links");
|
|
|
|
b.HasIndex("PostsId")
|
|
.HasDatabaseName("ix_post_category_links_posts_id");
|
|
|
|
b.ToTable("post_category_links", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("PostPostCollection", b =>
|
|
{
|
|
b.Property<long>("CollectionsId")
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("collections_id");
|
|
|
|
b.Property<long>("PostsId")
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("posts_id");
|
|
|
|
b.HasKey("CollectionsId", "PostsId")
|
|
.HasName("pk_post_collection_links");
|
|
|
|
b.HasIndex("PostsId")
|
|
.HasDatabaseName("ix_post_collection_links_posts_id");
|
|
|
|
b.ToTable("post_collection_links", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("PostPostTag", b =>
|
|
{
|
|
b.Property<long>("PostsId")
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("posts_id");
|
|
|
|
b.Property<long>("TagsId")
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("tags_id");
|
|
|
|
b.HasKey("PostsId", "TagsId")
|
|
.HasName("pk_post_tag_links");
|
|
|
|
b.HasIndex("TagsId")
|
|
.HasDatabaseName("ix_post_tag_links_tags_id");
|
|
|
|
b.ToTable("post_tag_links", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Account.AccountAuthFactor", b =>
|
|
{
|
|
b.HasOne("DysonNetwork.Sphere.Account.Account", "Account")
|
|
.WithMany("AuthFactors")
|
|
.HasForeignKey("AccountId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired()
|
|
.HasConstraintName("fk_account_auth_factors_accounts_account_id");
|
|
|
|
b.Navigation("Account");
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Account.AccountContact", b =>
|
|
{
|
|
b.HasOne("DysonNetwork.Sphere.Account.Account", "Account")
|
|
.WithMany("Contacts")
|
|
.HasForeignKey("AccountId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired()
|
|
.HasConstraintName("fk_account_contacts_accounts_account_id");
|
|
|
|
b.Navigation("Account");
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Account.MagicSpell", b =>
|
|
{
|
|
b.HasOne("DysonNetwork.Sphere.Account.Account", "Account")
|
|
.WithMany()
|
|
.HasForeignKey("AccountId")
|
|
.HasConstraintName("fk_magic_spells_accounts_account_id");
|
|
|
|
b.Navigation("Account");
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Account.Notification", b =>
|
|
{
|
|
b.HasOne("DysonNetwork.Sphere.Account.Account", "Account")
|
|
.WithMany()
|
|
.HasForeignKey("AccountId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired()
|
|
.HasConstraintName("fk_notifications_accounts_account_id");
|
|
|
|
b.Navigation("Account");
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Account.NotificationPushSubscription", b =>
|
|
{
|
|
b.HasOne("DysonNetwork.Sphere.Account.Account", "Account")
|
|
.WithMany()
|
|
.HasForeignKey("AccountId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired()
|
|
.HasConstraintName("fk_notification_push_subscriptions_accounts_account_id");
|
|
|
|
b.Navigation("Account");
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Account.Profile", b =>
|
|
{
|
|
b.HasOne("DysonNetwork.Sphere.Storage.CloudFile", "Background")
|
|
.WithMany()
|
|
.HasForeignKey("BackgroundId")
|
|
.HasConstraintName("fk_account_profiles_files_background_id");
|
|
|
|
b.HasOne("DysonNetwork.Sphere.Account.Account", "Account")
|
|
.WithOne("Profile")
|
|
.HasForeignKey("DysonNetwork.Sphere.Account.Profile", "Id")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired()
|
|
.HasConstraintName("fk_account_profiles_accounts_id");
|
|
|
|
b.HasOne("DysonNetwork.Sphere.Storage.CloudFile", "Picture")
|
|
.WithMany()
|
|
.HasForeignKey("PictureId")
|
|
.HasConstraintName("fk_account_profiles_files_picture_id");
|
|
|
|
b.Navigation("Account");
|
|
|
|
b.Navigation("Background");
|
|
|
|
b.Navigation("Picture");
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Account.Relationship", b =>
|
|
{
|
|
b.HasOne("DysonNetwork.Sphere.Account.Account", "Account")
|
|
.WithMany("OutgoingRelationships")
|
|
.HasForeignKey("AccountId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired()
|
|
.HasConstraintName("fk_account_relationships_accounts_account_id");
|
|
|
|
b.HasOne("DysonNetwork.Sphere.Account.Account", "Related")
|
|
.WithMany("IncomingRelationships")
|
|
.HasForeignKey("RelatedId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired()
|
|
.HasConstraintName("fk_account_relationships_accounts_related_id");
|
|
|
|
b.Navigation("Account");
|
|
|
|
b.Navigation("Related");
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Activity.Activity", b =>
|
|
{
|
|
b.HasOne("DysonNetwork.Sphere.Account.Account", "Account")
|
|
.WithMany()
|
|
.HasForeignKey("AccountId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired()
|
|
.HasConstraintName("fk_activities_accounts_account_id");
|
|
|
|
b.Navigation("Account");
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Auth.Challenge", b =>
|
|
{
|
|
b.HasOne("DysonNetwork.Sphere.Account.Account", "Account")
|
|
.WithMany("Challenges")
|
|
.HasForeignKey("AccountId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired()
|
|
.HasConstraintName("fk_auth_challenges_accounts_account_id");
|
|
|
|
b.Navigation("Account");
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Auth.Session", b =>
|
|
{
|
|
b.HasOne("DysonNetwork.Sphere.Account.Account", "Account")
|
|
.WithMany("Sessions")
|
|
.HasForeignKey("AccountId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired()
|
|
.HasConstraintName("fk_auth_sessions_accounts_account_id");
|
|
|
|
b.HasOne("DysonNetwork.Sphere.Auth.Challenge", "Challenge")
|
|
.WithMany()
|
|
.HasForeignKey("ChallengeId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired()
|
|
.HasConstraintName("fk_auth_sessions_auth_challenges_challenge_id");
|
|
|
|
b.Navigation("Account");
|
|
|
|
b.Navigation("Challenge");
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Chat.ChatMember", b =>
|
|
{
|
|
b.HasOne("DysonNetwork.Sphere.Account.Account", "Account")
|
|
.WithMany()
|
|
.HasForeignKey("AccountId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired()
|
|
.HasConstraintName("fk_chat_members_accounts_account_id");
|
|
|
|
b.HasOne("DysonNetwork.Sphere.Chat.ChatRoom", "ChatRoom")
|
|
.WithMany("Members")
|
|
.HasForeignKey("ChatRoomId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired()
|
|
.HasConstraintName("fk_chat_members_chat_rooms_chat_room_id");
|
|
|
|
b.Navigation("Account");
|
|
|
|
b.Navigation("ChatRoom");
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Chat.ChatRoom", b =>
|
|
{
|
|
b.HasOne("DysonNetwork.Sphere.Storage.CloudFile", "Background")
|
|
.WithMany()
|
|
.HasForeignKey("BackgroundId")
|
|
.HasConstraintName("fk_chat_rooms_files_background_id");
|
|
|
|
b.HasOne("DysonNetwork.Sphere.Storage.CloudFile", "Picture")
|
|
.WithMany()
|
|
.HasForeignKey("PictureId")
|
|
.HasConstraintName("fk_chat_rooms_files_picture_id");
|
|
|
|
b.HasOne("DysonNetwork.Sphere.Realm.Realm", "Realm")
|
|
.WithMany("ChatRooms")
|
|
.HasForeignKey("RealmId")
|
|
.HasConstraintName("fk_chat_rooms_realms_realm_id");
|
|
|
|
b.Navigation("Background");
|
|
|
|
b.Navigation("Picture");
|
|
|
|
b.Navigation("Realm");
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Chat.Message", b =>
|
|
{
|
|
b.HasOne("DysonNetwork.Sphere.Chat.ChatRoom", "ChatRoom")
|
|
.WithMany()
|
|
.HasForeignKey("ChatRoomId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired()
|
|
.HasConstraintName("fk_chat_messages_chat_rooms_chat_room_id");
|
|
|
|
b.HasOne("DysonNetwork.Sphere.Chat.Message", "ForwardedMessage")
|
|
.WithMany()
|
|
.HasForeignKey("ForwardedMessageId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.HasConstraintName("fk_chat_messages_chat_messages_forwarded_message_id");
|
|
|
|
b.HasOne("DysonNetwork.Sphere.Chat.Message", "RepliedMessage")
|
|
.WithMany()
|
|
.HasForeignKey("RepliedMessageId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.HasConstraintName("fk_chat_messages_chat_messages_replied_message_id");
|
|
|
|
b.HasOne("DysonNetwork.Sphere.Chat.ChatMember", "Sender")
|
|
.WithMany()
|
|
.HasForeignKey("SenderId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired()
|
|
.HasConstraintName("fk_chat_messages_chat_members_sender_id");
|
|
|
|
b.Navigation("ChatRoom");
|
|
|
|
b.Navigation("ForwardedMessage");
|
|
|
|
b.Navigation("RepliedMessage");
|
|
|
|
b.Navigation("Sender");
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Chat.MessageReaction", b =>
|
|
{
|
|
b.HasOne("DysonNetwork.Sphere.Chat.Message", "Message")
|
|
.WithMany("Reactions")
|
|
.HasForeignKey("MessageId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired()
|
|
.HasConstraintName("fk_chat_reactions_chat_messages_message_id");
|
|
|
|
b.HasOne("DysonNetwork.Sphere.Chat.ChatMember", "Sender")
|
|
.WithMany()
|
|
.HasForeignKey("SenderId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired()
|
|
.HasConstraintName("fk_chat_reactions_chat_members_sender_id");
|
|
|
|
b.Navigation("Message");
|
|
|
|
b.Navigation("Sender");
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Chat.MessageStatus", b =>
|
|
{
|
|
b.HasOne("DysonNetwork.Sphere.Chat.Message", "Message")
|
|
.WithMany("Statuses")
|
|
.HasForeignKey("MessageId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired()
|
|
.HasConstraintName("fk_chat_statuses_chat_messages_message_id");
|
|
|
|
b.HasOne("DysonNetwork.Sphere.Chat.ChatMember", "Sender")
|
|
.WithMany()
|
|
.HasForeignKey("SenderId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired()
|
|
.HasConstraintName("fk_chat_statuses_chat_members_sender_id");
|
|
|
|
b.Navigation("Message");
|
|
|
|
b.Navigation("Sender");
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Permission.PermissionGroupMember", b =>
|
|
{
|
|
b.HasOne("DysonNetwork.Sphere.Permission.PermissionGroup", "Group")
|
|
.WithMany("Members")
|
|
.HasForeignKey("GroupId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired()
|
|
.HasConstraintName("fk_permission_group_members_permission_groups_group_id");
|
|
|
|
b.Navigation("Group");
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Permission.PermissionNode", b =>
|
|
{
|
|
b.HasOne("DysonNetwork.Sphere.Permission.PermissionGroup", "Group")
|
|
.WithMany("Nodes")
|
|
.HasForeignKey("GroupId")
|
|
.HasConstraintName("fk_permission_nodes_permission_groups_group_id");
|
|
|
|
b.Navigation("Group");
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Post.Post", b =>
|
|
{
|
|
b.HasOne("DysonNetwork.Sphere.Post.Post", "ForwardedPost")
|
|
.WithMany()
|
|
.HasForeignKey("ForwardedPostId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.HasConstraintName("fk_posts_posts_forwarded_post_id");
|
|
|
|
b.HasOne("DysonNetwork.Sphere.Post.Publisher", "Publisher")
|
|
.WithMany("Posts")
|
|
.HasForeignKey("PublisherId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired()
|
|
.HasConstraintName("fk_posts_publishers_publisher_id");
|
|
|
|
b.HasOne("DysonNetwork.Sphere.Post.Post", "RepliedPost")
|
|
.WithMany()
|
|
.HasForeignKey("RepliedPostId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.HasConstraintName("fk_posts_posts_replied_post_id");
|
|
|
|
b.HasOne("DysonNetwork.Sphere.Post.Post", "ThreadedPost")
|
|
.WithOne()
|
|
.HasForeignKey("DysonNetwork.Sphere.Post.Post", "ThreadedPostId")
|
|
.HasConstraintName("fk_posts_posts_threaded_post_id");
|
|
|
|
b.Navigation("ForwardedPost");
|
|
|
|
b.Navigation("Publisher");
|
|
|
|
b.Navigation("RepliedPost");
|
|
|
|
b.Navigation("ThreadedPost");
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Post.PostCollection", b =>
|
|
{
|
|
b.HasOne("DysonNetwork.Sphere.Post.Publisher", "Publisher")
|
|
.WithMany("Collections")
|
|
.HasForeignKey("PublisherId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired()
|
|
.HasConstraintName("fk_post_collections_publishers_publisher_id");
|
|
|
|
b.Navigation("Publisher");
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Post.PostReaction", b =>
|
|
{
|
|
b.HasOne("DysonNetwork.Sphere.Account.Account", "Account")
|
|
.WithMany()
|
|
.HasForeignKey("AccountId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired()
|
|
.HasConstraintName("fk_post_reactions_accounts_account_id");
|
|
|
|
b.HasOne("DysonNetwork.Sphere.Post.Post", "Post")
|
|
.WithMany("Reactions")
|
|
.HasForeignKey("PostId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired()
|
|
.HasConstraintName("fk_post_reactions_posts_post_id");
|
|
|
|
b.Navigation("Account");
|
|
|
|
b.Navigation("Post");
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Post.Publisher", b =>
|
|
{
|
|
b.HasOne("DysonNetwork.Sphere.Account.Account", "Account")
|
|
.WithMany()
|
|
.HasForeignKey("AccountId")
|
|
.HasConstraintName("fk_publishers_accounts_account_id");
|
|
|
|
b.HasOne("DysonNetwork.Sphere.Storage.CloudFile", "Background")
|
|
.WithMany()
|
|
.HasForeignKey("BackgroundId")
|
|
.HasConstraintName("fk_publishers_files_background_id");
|
|
|
|
b.HasOne("DysonNetwork.Sphere.Storage.CloudFile", "Picture")
|
|
.WithMany()
|
|
.HasForeignKey("PictureId")
|
|
.HasConstraintName("fk_publishers_files_picture_id");
|
|
|
|
b.Navigation("Account");
|
|
|
|
b.Navigation("Background");
|
|
|
|
b.Navigation("Picture");
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Post.PublisherMember", b =>
|
|
{
|
|
b.HasOne("DysonNetwork.Sphere.Account.Account", "Account")
|
|
.WithMany()
|
|
.HasForeignKey("AccountId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired()
|
|
.HasConstraintName("fk_publisher_members_accounts_account_id");
|
|
|
|
b.HasOne("DysonNetwork.Sphere.Post.Publisher", "Publisher")
|
|
.WithMany("Members")
|
|
.HasForeignKey("PublisherId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired()
|
|
.HasConstraintName("fk_publisher_members_publishers_publisher_id");
|
|
|
|
b.Navigation("Account");
|
|
|
|
b.Navigation("Publisher");
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Realm.Realm", b =>
|
|
{
|
|
b.HasOne("DysonNetwork.Sphere.Account.Account", "Account")
|
|
.WithMany()
|
|
.HasForeignKey("AccountId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired()
|
|
.HasConstraintName("fk_realms_accounts_account_id");
|
|
|
|
b.HasOne("DysonNetwork.Sphere.Storage.CloudFile", "Background")
|
|
.WithMany()
|
|
.HasForeignKey("BackgroundId")
|
|
.HasConstraintName("fk_realms_files_background_id");
|
|
|
|
b.HasOne("DysonNetwork.Sphere.Storage.CloudFile", "Picture")
|
|
.WithMany()
|
|
.HasForeignKey("PictureId")
|
|
.HasConstraintName("fk_realms_files_picture_id");
|
|
|
|
b.Navigation("Account");
|
|
|
|
b.Navigation("Background");
|
|
|
|
b.Navigation("Picture");
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Realm.RealmMember", b =>
|
|
{
|
|
b.HasOne("DysonNetwork.Sphere.Account.Account", "Account")
|
|
.WithMany()
|
|
.HasForeignKey("AccountId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired()
|
|
.HasConstraintName("fk_realm_members_accounts_account_id");
|
|
|
|
b.HasOne("DysonNetwork.Sphere.Realm.Realm", "Realm")
|
|
.WithMany("Members")
|
|
.HasForeignKey("RealmId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired()
|
|
.HasConstraintName("fk_realm_members_realms_realm_id");
|
|
|
|
b.Navigation("Account");
|
|
|
|
b.Navigation("Realm");
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Storage.CloudFile", b =>
|
|
{
|
|
b.HasOne("DysonNetwork.Sphere.Account.Account", "Account")
|
|
.WithMany()
|
|
.HasForeignKey("AccountId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired()
|
|
.HasConstraintName("fk_files_accounts_account_id");
|
|
|
|
b.HasOne("DysonNetwork.Sphere.Chat.Message", null)
|
|
.WithMany("Attachments")
|
|
.HasForeignKey("MessageId")
|
|
.HasConstraintName("fk_files_chat_messages_message_id");
|
|
|
|
b.HasOne("DysonNetwork.Sphere.Post.Post", null)
|
|
.WithMany("Attachments")
|
|
.HasForeignKey("PostId")
|
|
.HasConstraintName("fk_files_posts_post_id");
|
|
|
|
b.Navigation("Account");
|
|
});
|
|
|
|
modelBuilder.Entity("PostPostCategory", b =>
|
|
{
|
|
b.HasOne("DysonNetwork.Sphere.Post.PostCategory", null)
|
|
.WithMany()
|
|
.HasForeignKey("CategoriesId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired()
|
|
.HasConstraintName("fk_post_category_links_post_categories_categories_id");
|
|
|
|
b.HasOne("DysonNetwork.Sphere.Post.Post", null)
|
|
.WithMany()
|
|
.HasForeignKey("PostsId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired()
|
|
.HasConstraintName("fk_post_category_links_posts_posts_id");
|
|
});
|
|
|
|
modelBuilder.Entity("PostPostCollection", b =>
|
|
{
|
|
b.HasOne("DysonNetwork.Sphere.Post.PostCollection", null)
|
|
.WithMany()
|
|
.HasForeignKey("CollectionsId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired()
|
|
.HasConstraintName("fk_post_collection_links_post_collections_collections_id");
|
|
|
|
b.HasOne("DysonNetwork.Sphere.Post.Post", null)
|
|
.WithMany()
|
|
.HasForeignKey("PostsId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired()
|
|
.HasConstraintName("fk_post_collection_links_posts_posts_id");
|
|
});
|
|
|
|
modelBuilder.Entity("PostPostTag", b =>
|
|
{
|
|
b.HasOne("DysonNetwork.Sphere.Post.Post", null)
|
|
.WithMany()
|
|
.HasForeignKey("PostsId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired()
|
|
.HasConstraintName("fk_post_tag_links_posts_posts_id");
|
|
|
|
b.HasOne("DysonNetwork.Sphere.Post.PostTag", null)
|
|
.WithMany()
|
|
.HasForeignKey("TagsId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired()
|
|
.HasConstraintName("fk_post_tag_links_post_tags_tags_id");
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Account.Account", b =>
|
|
{
|
|
b.Navigation("AuthFactors");
|
|
|
|
b.Navigation("Challenges");
|
|
|
|
b.Navigation("Contacts");
|
|
|
|
b.Navigation("IncomingRelationships");
|
|
|
|
b.Navigation("OutgoingRelationships");
|
|
|
|
b.Navigation("Profile")
|
|
.IsRequired();
|
|
|
|
b.Navigation("Sessions");
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Chat.ChatRoom", b =>
|
|
{
|
|
b.Navigation("Members");
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Chat.Message", b =>
|
|
{
|
|
b.Navigation("Attachments");
|
|
|
|
b.Navigation("Reactions");
|
|
|
|
b.Navigation("Statuses");
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Permission.PermissionGroup", b =>
|
|
{
|
|
b.Navigation("Members");
|
|
|
|
b.Navigation("Nodes");
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Post.Post", b =>
|
|
{
|
|
b.Navigation("Attachments");
|
|
|
|
b.Navigation("Reactions");
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Post.Publisher", b =>
|
|
{
|
|
b.Navigation("Collections");
|
|
|
|
b.Navigation("Members");
|
|
|
|
b.Navigation("Posts");
|
|
});
|
|
|
|
modelBuilder.Entity("DysonNetwork.Sphere.Realm.Realm", b =>
|
|
{
|
|
b.Navigation("ChatRooms");
|
|
|
|
b.Navigation("Members");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|