a fork of iceshrimp.net but a tweaked frontend to my personal liking. waow
fediverse social-media social iceshrimp fedi
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

[backend/federation] Actually generate interaction stamp migrations

Kopper 3238ff40 189dbc4e

+6519 -6347
+1
Iceshrimp.Backend/Core/Database/DatabaseContext.cs
··· 132 132 dataSourceBuilder.MapEnum<Job.JobStatus>(); 133 133 dataSourceBuilder.MapEnum<Filter.FilterContext>(); 134 134 dataSourceBuilder.MapEnum<Filter.FilterAction>(); 135 + dataSourceBuilder.MapEnum<InteractionStamp.InteractionStampType>(); 135 136 136 137 dataSourceBuilder.EnableDynamicJson(); 137 138
+6402 -6347
Iceshrimp.Backend/Core/Database/Migrations/DatabaseContextModelSnapshot.cs
··· 1 - // <auto-generated /> 2 - using System; 3 - using System.Collections.Generic; 4 - using Iceshrimp.Backend.Core.Database; 5 - using Iceshrimp.Backend.Core.Database.Tables; 6 - using Microsoft.EntityFrameworkCore; 7 - using Microsoft.EntityFrameworkCore.Infrastructure; 8 - using Microsoft.EntityFrameworkCore.Storage.ValueConversion; 9 - using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; 10 - 11 - #nullable disable 12 - 13 - namespace Iceshrimp.Backend.Core.Database.Migrations 14 - { 15 - [DbContext(typeof(DatabaseContext))] 16 - partial class DatabaseContextModelSnapshot : ModelSnapshot 17 - { 18 - protected override void BuildModel(ModelBuilder modelBuilder) 19 - { 20 - #pragma warning disable 612, 618 21 - modelBuilder 22 - .HasAnnotation("ProductVersion", "9.0.9") 23 - .HasAnnotation("Relational:MaxIdentifierLength", 63); 24 - 25 - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "antenna_src_enum", new[] { "home", "all", "users", "list", "group", "instances" }); 26 - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "filter_action_enum", new[] { "warn", "hide" }); 27 - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "filter_context_enum", new[] { "home", "lists", "threads", "notifications", "accounts", "public" }); 28 - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "job_status", new[] { "queued", "delayed", "running", "completed", "failed" }); 29 - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "marker_type_enum", new[] { "home", "notifications" }); 30 - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "note_visibility_enum", new[] { "public", "home", "followers", "specified" }); 31 - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "notification_type_enum", new[] { "follow", "mention", "reply", "renote", "quote", "like", "reaction", "pollVote", "pollEnded", "receiveFollowRequest", "followRequestAccepted", "groupInvited", "app", "edit", "bite", "report" }); 32 - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "page_visibility_enum", new[] { "public", "followers", "specified" }); 33 - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "push_subscription_policy_enum", new[] { "all", "followed", "follower", "none" }); 34 - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "relay_status_enum", new[] { "requesting", "accepted", "rejected" }); 35 - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "user_profile_ffvisibility_enum", new[] { "public", "followers", "private" }); 36 - NpgsqlModelBuilderExtensions.HasPostgresExtension(modelBuilder, "pg_trgm"); 37 - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); 38 - 39 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.AllowedInstance", b => 40 - { 41 - b.Property<string>("Host") 42 - .HasMaxLength(256) 43 - .HasColumnType("character varying(256)") 44 - .HasColumnName("host"); 45 - 46 - b.Property<bool>("IsImported") 47 - .ValueGeneratedOnAdd() 48 - .HasColumnType("boolean") 49 - .HasDefaultValue(false) 50 - .HasColumnName("imported"); 51 - 52 - b.HasKey("Host"); 53 - 54 - b.ToTable("allowed_instance"); 55 - }); 56 - 57 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Announcement", b => 58 - { 59 - b.Property<string>("Id") 60 - .HasMaxLength(32) 61 - .HasColumnType("character varying(32)") 62 - .HasColumnName("id"); 63 - 64 - b.Property<DateTime>("CreatedAt") 65 - .HasColumnType("timestamp with time zone") 66 - .HasColumnName("createdAt") 67 - .HasComment("The created date of the Announcement."); 68 - 69 - b.PrimitiveCollection<List<string>>("Emojis") 70 - .IsRequired() 71 - .ValueGeneratedOnAdd() 72 - .HasColumnType("character varying(128)[]") 73 - .HasColumnName("emojis") 74 - .HasDefaultValueSql("'{}'::character varying[]"); 75 - 76 - b.Property<string>("ImageUrl") 77 - .HasMaxLength(1024) 78 - .HasColumnType("character varying(1024)") 79 - .HasColumnName("imageUrl"); 80 - 81 - b.Property<bool>("IsGoodNews") 82 - .ValueGeneratedOnAdd() 83 - .HasColumnType("boolean") 84 - .HasDefaultValue(false) 85 - .HasColumnName("isGoodNews"); 86 - 87 - b.PrimitiveCollection<List<string>>("Mentions") 88 - .IsRequired() 89 - .ValueGeneratedOnAdd() 90 - .HasColumnType("character varying(32)[]") 91 - .HasColumnName("mentions") 92 - .HasDefaultValueSql("'{}'::character varying[]"); 93 - 94 - b.Property<bool>("ShowPopup") 95 - .ValueGeneratedOnAdd() 96 - .HasColumnType("boolean") 97 - .HasDefaultValue(false) 98 - .HasColumnName("showPopup"); 99 - 100 - b.PrimitiveCollection<List<string>>("Tags") 101 - .IsRequired() 102 - .ValueGeneratedOnAdd() 103 - .HasColumnType("character varying(128)[]") 104 - .HasColumnName("tags") 105 - .HasDefaultValueSql("'{}'::character varying[]"); 106 - 107 - b.Property<string>("Text") 108 - .IsRequired() 109 - .HasMaxLength(8192) 110 - .HasColumnType("character varying(8192)") 111 - .HasColumnName("text"); 112 - 113 - b.Property<string>("Title") 114 - .IsRequired() 115 - .HasMaxLength(256) 116 - .HasColumnType("character varying(256)") 117 - .HasColumnName("title"); 118 - 119 - b.Property<DateTime?>("UpdatedAt") 120 - .HasColumnType("timestamp with time zone") 121 - .HasColumnName("updatedAt") 122 - .HasComment("The updated date of the Announcement."); 123 - 124 - b.HasKey("Id"); 125 - 126 - b.HasIndex("CreatedAt"); 127 - 128 - b.ToTable("announcement"); 129 - }); 130 - 131 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.AnnouncementRead", b => 132 - { 133 - b.Property<string>("Id") 134 - .HasMaxLength(32) 135 - .HasColumnType("character varying(32)") 136 - .HasColumnName("id"); 137 - 138 - b.Property<string>("AnnouncementId") 139 - .IsRequired() 140 - .HasMaxLength(32) 141 - .HasColumnType("character varying(32)") 142 - .HasColumnName("announcementId"); 143 - 144 - b.Property<DateTime>("CreatedAt") 145 - .HasColumnType("timestamp with time zone") 146 - .HasColumnName("createdAt") 147 - .HasComment("The created date of the AnnouncementRead."); 148 - 149 - b.Property<string>("UserId") 150 - .IsRequired() 151 - .HasMaxLength(32) 152 - .HasColumnType("character varying(32)") 153 - .HasColumnName("userId"); 154 - 155 - b.HasKey("Id"); 156 - 157 - b.HasIndex("AnnouncementId"); 158 - 159 - b.HasIndex("UserId"); 160 - 161 - b.HasIndex("UserId", "AnnouncementId") 162 - .IsUnique(); 163 - 164 - b.ToTable("announcement_read"); 165 - }); 166 - 167 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Antenna", b => 168 - { 169 - b.Property<string>("Id") 170 - .HasMaxLength(32) 171 - .HasColumnType("character varying(32)") 172 - .HasColumnName("id"); 173 - 174 - b.Property<bool>("CaseSensitive") 175 - .ValueGeneratedOnAdd() 176 - .HasColumnType("boolean") 177 - .HasDefaultValue(false) 178 - .HasColumnName("caseSensitive"); 179 - 180 - b.Property<DateTime>("CreatedAt") 181 - .HasColumnType("timestamp with time zone") 182 - .HasColumnName("createdAt") 183 - .HasComment("The created date of the Antenna."); 184 - 185 - b.Property<List<List<string>>>("ExcludeKeywords") 186 - .IsRequired() 187 - .ValueGeneratedOnAdd() 188 - .HasColumnType("jsonb") 189 - .HasColumnName("excludeKeywords") 190 - .HasDefaultValueSql("'[]'::jsonb"); 191 - 192 - b.Property<string>("Expression") 193 - .HasMaxLength(2048) 194 - .HasColumnType("character varying(2048)") 195 - .HasColumnName("expression"); 196 - 197 - b.Property<List<string>>("Instances") 198 - .IsRequired() 199 - .ValueGeneratedOnAdd() 200 - .HasColumnType("jsonb") 201 - .HasColumnName("instances") 202 - .HasDefaultValueSql("'[]'::jsonb"); 203 - 204 - b.Property<List<List<string>>>("Keywords") 205 - .IsRequired() 206 - .ValueGeneratedOnAdd() 207 - .HasColumnType("jsonb") 208 - .HasColumnName("keywords") 209 - .HasDefaultValueSql("'[]'::jsonb"); 210 - 211 - b.Property<string>("Name") 212 - .IsRequired() 213 - .HasMaxLength(128) 214 - .HasColumnType("character varying(128)") 215 - .HasColumnName("name") 216 - .HasComment("The name of the Antenna."); 217 - 218 - b.Property<bool>("Notify") 219 - .HasColumnType("boolean") 220 - .HasColumnName("notify"); 221 - 222 - b.Property<Antenna.AntennaSource>("Source") 223 - .HasColumnType("antenna_src_enum") 224 - .HasColumnName("src"); 225 - 226 - b.Property<string>("UserGroupMemberId") 227 - .HasMaxLength(32) 228 - .HasColumnType("character varying(32)") 229 - .HasColumnName("userGroupMemberId"); 230 - 231 - b.Property<string>("UserId") 232 - .IsRequired() 233 - .HasMaxLength(32) 234 - .HasColumnType("character varying(32)") 235 - .HasColumnName("userId") 236 - .HasComment("The owner ID."); 237 - 238 - b.Property<string>("UserListId") 239 - .HasMaxLength(32) 240 - .HasColumnType("character varying(32)") 241 - .HasColumnName("userListId"); 242 - 243 - b.PrimitiveCollection<List<string>>("Users") 244 - .IsRequired() 245 - .ValueGeneratedOnAdd() 246 - .HasColumnType("character varying(1024)[]") 247 - .HasColumnName("users") 248 - .HasDefaultValueSql("'{}'::character varying[]"); 249 - 250 - b.Property<bool>("WithFile") 251 - .HasColumnType("boolean") 252 - .HasColumnName("withFile"); 253 - 254 - b.Property<bool>("WithReplies") 255 - .ValueGeneratedOnAdd() 256 - .HasColumnType("boolean") 257 - .HasDefaultValue(false) 258 - .HasColumnName("withReplies"); 259 - 260 - b.HasKey("Id"); 261 - 262 - b.HasIndex("UserGroupMemberId"); 263 - 264 - b.HasIndex("UserId"); 265 - 266 - b.HasIndex("UserListId"); 267 - 268 - b.ToTable("antenna"); 269 - }); 270 - 271 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.AttestationChallenge", b => 272 - { 273 - b.Property<string>("Id") 274 - .HasMaxLength(32) 275 - .HasColumnType("character varying(32)") 276 - .HasColumnName("id"); 277 - 278 - b.Property<string>("UserId") 279 - .HasMaxLength(32) 280 - .HasColumnType("character varying(32)") 281 - .HasColumnName("userId"); 282 - 283 - b.Property<string>("Challenge") 284 - .IsRequired() 285 - .HasMaxLength(64) 286 - .HasColumnType("character varying(64)") 287 - .HasColumnName("challenge") 288 - .HasComment("Hex-encoded sha256 hash of the challenge."); 289 - 290 - b.Property<DateTime>("CreatedAt") 291 - .HasColumnType("timestamp with time zone") 292 - .HasColumnName("createdAt") 293 - .HasComment("The date challenge was created for expiry purposes."); 294 - 295 - b.Property<bool>("RegistrationChallenge") 296 - .ValueGeneratedOnAdd() 297 - .HasColumnType("boolean") 298 - .HasDefaultValue(false) 299 - .HasColumnName("registrationChallenge") 300 - .HasComment("Indicates that the challenge is only for registration purposes if true to prevent the challenge for being used as authentication."); 301 - 302 - b.HasKey("Id", "UserId"); 303 - 304 - b.HasIndex("Challenge"); 305 - 306 - b.HasIndex("UserId"); 307 - 308 - b.ToTable("attestation_challenge"); 309 - }); 310 - 311 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Bite", b => 312 - { 313 - b.Property<string>("Id") 314 - .HasMaxLength(32) 315 - .HasColumnType("character varying(32)") 316 - .HasColumnName("id"); 317 - 318 - b.Property<DateTime>("CreatedAt") 319 - .HasColumnType("timestamp with time zone") 320 - .HasColumnName("createdAt"); 321 - 322 - b.Property<string>("TargetBiteId") 323 - .HasMaxLength(32) 324 - .HasColumnType("character varying(32)") 325 - .HasColumnName("targetBiteId"); 326 - 327 - b.Property<string>("TargetNoteId") 328 - .HasMaxLength(32) 329 - .HasColumnType("character varying(32)") 330 - .HasColumnName("targetNoteId"); 331 - 332 - b.Property<string>("TargetUserId") 333 - .HasMaxLength(32) 334 - .HasColumnType("character varying(32)") 335 - .HasColumnName("targetUserId"); 336 - 337 - b.Property<string>("Uri") 338 - .HasMaxLength(512) 339 - .HasColumnType("character varying(512)") 340 - .HasColumnName("uri"); 341 - 342 - b.Property<string>("UserHost") 343 - .HasMaxLength(512) 344 - .HasColumnType("character varying(512)") 345 - .HasColumnName("userHost"); 346 - 347 - b.Property<string>("UserId") 348 - .IsRequired() 349 - .HasMaxLength(32) 350 - .HasColumnType("character varying(32)") 351 - .HasColumnName("userId"); 352 - 353 - b.HasKey("Id"); 354 - 355 - b.HasIndex("TargetBiteId"); 356 - 357 - b.HasIndex("TargetNoteId"); 358 - 359 - b.HasIndex("TargetUserId"); 360 - 361 - b.HasIndex("Uri"); 362 - 363 - b.HasIndex("UserHost"); 364 - 365 - b.HasIndex("UserId"); 366 - 367 - b.ToTable("bite"); 368 - }); 369 - 370 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.BlockedInstance", b => 371 - { 372 - b.Property<string>("Host") 373 - .HasMaxLength(256) 374 - .HasColumnType("character varying(256)") 375 - .HasColumnName("host"); 376 - 377 - b.Property<bool>("IsImported") 378 - .ValueGeneratedOnAdd() 379 - .HasColumnType("boolean") 380 - .HasDefaultValue(false) 381 - .HasColumnName("imported"); 382 - 383 - b.Property<string>("Reason") 384 - .HasMaxLength(1024) 385 - .HasColumnType("character varying(1024)") 386 - .HasColumnName("reason"); 387 - 388 - b.HasKey("Host"); 389 - 390 - b.ToTable("blocked_instance"); 391 - }); 392 - 393 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Blocking", b => 394 - { 395 - b.Property<string>("Id") 396 - .HasMaxLength(32) 397 - .HasColumnType("character varying(32)") 398 - .HasColumnName("id"); 399 - 400 - b.Property<string>("BlockeeId") 401 - .IsRequired() 402 - .HasMaxLength(32) 403 - .HasColumnType("character varying(32)") 404 - .HasColumnName("blockeeId") 405 - .HasComment("The blockee user ID."); 406 - 407 - b.Property<string>("BlockerId") 408 - .IsRequired() 409 - .HasMaxLength(32) 410 - .HasColumnType("character varying(32)") 411 - .HasColumnName("blockerId") 412 - .HasComment("The blocker user ID."); 413 - 414 - b.Property<DateTime>("CreatedAt") 415 - .HasColumnType("timestamp with time zone") 416 - .HasColumnName("createdAt") 417 - .HasComment("The created date of the Blocking."); 418 - 419 - b.HasKey("Id"); 420 - 421 - b.HasIndex("BlockeeId"); 422 - 423 - b.HasIndex("BlockerId"); 424 - 425 - b.HasIndex("CreatedAt"); 426 - 427 - b.HasIndex("BlockerId", "BlockeeId") 428 - .IsUnique(); 429 - 430 - b.ToTable("blocking"); 431 - }); 432 - 433 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.BubbleInstance", b => 434 - { 435 - b.Property<string>("Host") 436 - .HasMaxLength(256) 437 - .HasColumnType("character varying(256)") 438 - .HasColumnName("host"); 439 - 440 - b.HasKey("Host"); 441 - 442 - b.ToTable("bubble_instance"); 443 - }); 444 - 445 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.CacheEntry", b => 446 - { 447 - b.Property<string>("Key") 448 - .HasMaxLength(128) 449 - .HasColumnType("character varying(128)") 450 - .HasColumnName("key"); 451 - 452 - b.Property<DateTime?>("Expiry") 453 - .HasColumnType("timestamp with time zone") 454 - .HasColumnName("expiry"); 455 - 456 - b.Property<TimeSpan?>("Ttl") 457 - .HasColumnType("interval") 458 - .HasColumnName("ttl"); 459 - 460 - b.Property<string>("Value") 461 - .HasColumnType("text") 462 - .HasColumnName("value"); 463 - 464 - b.HasKey("Key"); 465 - 466 - b.HasIndex("Expiry"); 467 - 468 - b.ToTable("cache_store"); 469 - }); 470 - 471 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Channel", b => 472 - { 473 - b.Property<string>("Id") 474 - .HasMaxLength(32) 475 - .HasColumnType("character varying(32)") 476 - .HasColumnName("id"); 477 - 478 - b.Property<string>("BannerId") 479 - .HasMaxLength(32) 480 - .HasColumnType("character varying(32)") 481 - .HasColumnName("bannerId") 482 - .HasComment("The ID of banner Channel."); 483 - 484 - b.Property<DateTime>("CreatedAt") 485 - .HasColumnType("timestamp with time zone") 486 - .HasColumnName("createdAt") 487 - .HasComment("The created date of the Channel."); 488 - 489 - b.Property<string>("Description") 490 - .HasMaxLength(2048) 491 - .HasColumnType("character varying(2048)") 492 - .HasColumnName("description") 493 - .HasComment("The description of the Channel."); 494 - 495 - b.Property<DateTime?>("LastNotedAt") 496 - .HasColumnType("timestamp with time zone") 497 - .HasColumnName("lastNotedAt"); 498 - 499 - b.Property<string>("Name") 500 - .IsRequired() 501 - .HasMaxLength(128) 502 - .HasColumnType("character varying(128)") 503 - .HasColumnName("name") 504 - .HasComment("The name of the Channel."); 505 - 506 - b.Property<int>("NotesCount") 507 - .ValueGeneratedOnAdd() 508 - .HasColumnType("integer") 509 - .HasDefaultValue(0) 510 - .HasColumnName("notesCount") 511 - .HasComment("The count of notes."); 512 - 513 - b.Property<string>("UserId") 514 - .HasMaxLength(32) 515 - .HasColumnType("character varying(32)") 516 - .HasColumnName("userId") 517 - .HasComment("The owner ID."); 518 - 519 - b.Property<int>("UsersCount") 520 - .ValueGeneratedOnAdd() 521 - .HasColumnType("integer") 522 - .HasDefaultValue(0) 523 - .HasColumnName("usersCount") 524 - .HasComment("The count of users."); 525 - 526 - b.HasKey("Id"); 527 - 528 - b.HasIndex("BannerId"); 529 - 530 - b.HasIndex("CreatedAt"); 531 - 532 - b.HasIndex("LastNotedAt"); 533 - 534 - b.HasIndex("NotesCount"); 535 - 536 - b.HasIndex("UserId"); 537 - 538 - b.HasIndex("UsersCount"); 539 - 540 - b.ToTable("channel"); 541 - }); 542 - 543 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.ChannelFollowing", b => 544 - { 545 - b.Property<string>("Id") 546 - .HasMaxLength(32) 547 - .HasColumnType("character varying(32)") 548 - .HasColumnName("id"); 549 - 550 - b.Property<DateTime>("CreatedAt") 551 - .HasColumnType("timestamp with time zone") 552 - .HasColumnName("createdAt") 553 - .HasComment("The created date of the ChannelFollowing."); 554 - 555 - b.Property<string>("FolloweeId") 556 - .IsRequired() 557 - .HasMaxLength(32) 558 - .HasColumnType("character varying(32)") 559 - .HasColumnName("followeeId") 560 - .HasComment("The followee channel ID."); 561 - 562 - b.Property<string>("FollowerId") 563 - .IsRequired() 564 - .HasMaxLength(32) 565 - .HasColumnType("character varying(32)") 566 - .HasColumnName("followerId") 567 - .HasComment("The follower user ID."); 568 - 569 - b.HasKey("Id"); 570 - 571 - b.HasIndex("CreatedAt"); 572 - 573 - b.HasIndex("FolloweeId"); 574 - 575 - b.HasIndex("FollowerId"); 576 - 577 - b.HasIndex("FollowerId", "FolloweeId") 578 - .IsUnique(); 579 - 580 - b.ToTable("channel_following"); 581 - }); 582 - 583 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.ChannelNotePin", b => 584 - { 585 - b.Property<string>("Id") 586 - .HasMaxLength(32) 587 - .HasColumnType("character varying(32)") 588 - .HasColumnName("id"); 589 - 590 - b.Property<string>("ChannelId") 591 - .IsRequired() 592 - .HasMaxLength(32) 593 - .HasColumnType("character varying(32)") 594 - .HasColumnName("channelId"); 595 - 596 - b.Property<DateTime>("CreatedAt") 597 - .HasColumnType("timestamp with time zone") 598 - .HasColumnName("createdAt") 599 - .HasComment("The created date of the ChannelNotePin."); 600 - 601 - b.Property<string>("NoteId") 602 - .IsRequired() 603 - .HasMaxLength(32) 604 - .HasColumnType("character varying(32)") 605 - .HasColumnName("noteId"); 606 - 607 - b.HasKey("Id"); 608 - 609 - b.HasIndex("ChannelId"); 610 - 611 - b.HasIndex("NoteId"); 612 - 613 - b.HasIndex("ChannelId", "NoteId") 614 - .IsUnique(); 615 - 616 - b.ToTable("channel_note_pin"); 617 - }); 618 - 619 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Clip", b => 620 - { 621 - b.Property<string>("Id") 622 - .HasMaxLength(32) 623 - .HasColumnType("character varying(32)") 624 - .HasColumnName("id"); 625 - 626 - b.Property<DateTime>("CreatedAt") 627 - .HasColumnType("timestamp with time zone") 628 - .HasColumnName("createdAt") 629 - .HasComment("The created date of the Clip."); 630 - 631 - b.Property<string>("Description") 632 - .HasMaxLength(2048) 633 - .HasColumnType("character varying(2048)") 634 - .HasColumnName("description") 635 - .HasComment("The description of the Clip."); 636 - 637 - b.Property<bool>("IsPublic") 638 - .ValueGeneratedOnAdd() 639 - .HasColumnType("boolean") 640 - .HasDefaultValue(false) 641 - .HasColumnName("isPublic"); 642 - 643 - b.Property<string>("Name") 644 - .IsRequired() 645 - .HasMaxLength(128) 646 - .HasColumnType("character varying(128)") 647 - .HasColumnName("name") 648 - .HasComment("The name of the Clip."); 649 - 650 - b.Property<string>("UserId") 651 - .IsRequired() 652 - .HasMaxLength(32) 653 - .HasColumnType("character varying(32)") 654 - .HasColumnName("userId") 655 - .HasComment("The owner ID."); 656 - 657 - b.HasKey("Id"); 658 - 659 - b.HasIndex("UserId"); 660 - 661 - b.ToTable("clip"); 662 - }); 663 - 664 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.ClipNote", b => 665 - { 666 - b.Property<string>("Id") 667 - .HasMaxLength(32) 668 - .HasColumnType("character varying(32)") 669 - .HasColumnName("id"); 670 - 671 - b.Property<string>("ClipId") 672 - .IsRequired() 673 - .HasMaxLength(32) 674 - .HasColumnType("character varying(32)") 675 - .HasColumnName("clipId") 676 - .HasComment("The clip ID."); 677 - 678 - b.Property<string>("NoteId") 679 - .IsRequired() 680 - .HasMaxLength(32) 681 - .HasColumnType("character varying(32)") 682 - .HasColumnName("noteId") 683 - .HasComment("The note ID."); 684 - 685 - b.HasKey("Id"); 686 - 687 - b.HasIndex("ClipId"); 688 - 689 - b.HasIndex("NoteId"); 690 - 691 - b.HasIndex("NoteId", "ClipId") 692 - .IsUnique(); 693 - 694 - b.ToTable("clip_note"); 695 - }); 696 - 697 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.DriveFile", b => 698 - { 699 - b.Property<string>("Id") 700 - .HasMaxLength(32) 701 - .HasColumnType("character varying(32)") 702 - .HasColumnName("id"); 703 - 704 - b.Property<string>("AccessKey") 705 - .IsRequired() 706 - .HasMaxLength(256) 707 - .HasColumnType("character varying(256)") 708 - .HasColumnName("accessKey"); 709 - 710 - b.Property<string>("Blurhash") 711 - .HasMaxLength(128) 712 - .HasColumnType("character varying(128)") 713 - .HasColumnName("blurhash") 714 - .HasComment("The BlurHash string."); 715 - 716 - b.Property<string>("Comment") 717 - .HasColumnType("text") 718 - .HasColumnName("comment") 719 - .HasComment("The comment of the DriveFile."); 720 - 721 - b.Property<DateTime>("CreatedAt") 722 - .HasColumnType("timestamp with time zone") 723 - .HasColumnName("createdAt") 724 - .HasComment("The created date of the DriveFile."); 725 - 726 - b.Property<string>("FolderId") 727 - .HasMaxLength(32) 728 - .HasColumnType("character varying(32)") 729 - .HasColumnName("folderId") 730 - .HasComment("The parent folder ID. If null, it means the DriveFile is located in root."); 731 - 732 - b.Property<bool>("IsLink") 733 - .ValueGeneratedOnAdd() 734 - .HasColumnType("boolean") 735 - .HasDefaultValue(false) 736 - .HasColumnName("isLink") 737 - .HasComment("Whether the DriveFile is direct link to remote server."); 738 - 739 - b.Property<bool>("IsSensitive") 740 - .ValueGeneratedOnAdd() 741 - .HasColumnType("boolean") 742 - .HasDefaultValue(false) 743 - .HasColumnName("isSensitive") 744 - .HasComment("Whether the DriveFile is NSFW."); 745 - 746 - b.Property<string>("Name") 747 - .IsRequired() 748 - .HasMaxLength(256) 749 - .HasColumnType("character varying(256)") 750 - .HasColumnName("name") 751 - .HasComment("The file name of the DriveFile."); 752 - 753 - b.Property<DriveFile.FileProperties>("Properties") 754 - .IsRequired() 755 - .ValueGeneratedOnAdd() 756 - .HasColumnType("jsonb") 757 - .HasColumnName("properties") 758 - .HasDefaultValueSql("'{}'::jsonb") 759 - .HasComment("The any properties of the DriveFile. For example, it includes image width/height."); 760 - 761 - b.Property<string>("PublicAccessKey") 762 - .HasMaxLength(256) 763 - .HasColumnType("character varying(256)") 764 - .HasColumnName("webpublicAccessKey"); 765 - 766 - b.Property<string>("PublicMimeType") 767 - .HasMaxLength(128) 768 - .HasColumnType("character varying(128)") 769 - .HasColumnName("webpublicType"); 770 - 771 - b.Property<string>("PublicUrl") 772 - .HasMaxLength(512) 773 - .HasColumnType("character varying(512)") 774 - .HasColumnName("webpublicUrl") 775 - .HasComment("The URL of the webpublic of the DriveFile."); 776 - 777 - b.Property<Dictionary<string, string>>("RequestHeaders") 778 - .ValueGeneratedOnAdd() 779 - .HasColumnType("jsonb") 780 - .HasColumnName("requestHeaders") 781 - .HasDefaultValueSql("'{}'::jsonb"); 782 - 783 - b.Property<string>("RequestIp") 784 - .HasMaxLength(128) 785 - .HasColumnType("character varying(128)") 786 - .HasColumnName("requestIp"); 787 - 788 - b.Property<string>("Sha256") 789 - .HasMaxLength(64) 790 - .HasColumnType("character varying(64)") 791 - .HasColumnName("sha256") 792 - .HasComment("The SHA256 hash of the DriveFile."); 793 - 794 - b.Property<int>("Size") 795 - .HasColumnType("integer") 796 - .HasColumnName("size") 797 - .HasComment("The file size (bytes) of the DriveFile."); 798 - 799 - b.Property<string>("Src") 800 - .HasMaxLength(512) 801 - .HasColumnType("character varying(512)") 802 - .HasColumnName("src"); 803 - 804 - b.Property<bool>("StoredInternal") 805 - .HasColumnType("boolean") 806 - .HasColumnName("storedInternal"); 807 - 808 - b.Property<string>("ThumbnailAccessKey") 809 - .HasMaxLength(256) 810 - .HasColumnType("character varying(256)") 811 - .HasColumnName("thumbnailAccessKey"); 812 - 813 - b.Property<string>("ThumbnailMimeType") 814 - .HasMaxLength(128) 815 - .HasColumnType("character varying(128)") 816 - .HasColumnName("thumbnailType"); 817 - 818 - b.Property<string>("ThumbnailUrl") 819 - .HasMaxLength(512) 820 - .HasColumnType("character varying(512)") 821 - .HasColumnName("thumbnailUrl") 822 - .HasComment("The URL of the thumbnail of the DriveFile."); 823 - 824 - b.Property<string>("Type") 825 - .IsRequired() 826 - .HasMaxLength(128) 827 - .HasColumnType("character varying(128)") 828 - .HasColumnName("type") 829 - .HasComment("The content type (MIME) of the DriveFile."); 830 - 831 - b.Property<string>("Uri") 832 - .HasMaxLength(512) 833 - .HasColumnType("character varying(512)") 834 - .HasColumnName("uri") 835 - .HasComment("The URI of the DriveFile. it will be null when the DriveFile is local."); 836 - 837 - b.Property<string>("Url") 838 - .IsRequired() 839 - .HasMaxLength(512) 840 - .HasColumnType("character varying(512)") 841 - .HasColumnName("url") 842 - .HasComment("The URL of the DriveFile."); 843 - 844 - b.Property<string>("UserHost") 845 - .HasMaxLength(512) 846 - .HasColumnType("character varying(512)") 847 - .HasColumnName("userHost") 848 - .HasComment("The host of owner. It will be null if the user in local."); 849 - 850 - b.Property<string>("UserId") 851 - .HasMaxLength(32) 852 - .HasColumnType("character varying(32)") 853 - .HasColumnName("userId") 854 - .HasComment("The owner ID."); 855 - 856 - b.HasKey("Id"); 857 - 858 - b.HasIndex("AccessKey"); 859 - 860 - b.HasIndex("CreatedAt"); 861 - 862 - b.HasIndex("FolderId"); 863 - 864 - b.HasIndex("IsLink"); 865 - 866 - b.HasIndex("IsSensitive"); 867 - 868 - b.HasIndex("PublicAccessKey"); 869 - 870 - b.HasIndex("Sha256"); 871 - 872 - b.HasIndex("ThumbnailAccessKey"); 873 - 874 - b.HasIndex("Type"); 875 - 876 - b.HasIndex("Uri"); 877 - 878 - b.HasIndex("UserHost"); 879 - 880 - b.HasIndex("UserId"); 881 - 882 - b.HasIndex("UserId", "FolderId", "Id"); 883 - 884 - b.ToTable("drive_file"); 885 - }); 886 - 887 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.DriveFolder", b => 888 - { 889 - b.Property<string>("Id") 890 - .HasMaxLength(32) 891 - .HasColumnType("character varying(32)") 892 - .HasColumnName("id"); 893 - 894 - b.Property<DateTime>("CreatedAt") 895 - .HasColumnType("timestamp with time zone") 896 - .HasColumnName("createdAt") 897 - .HasComment("The created date of the DriveFolder."); 898 - 899 - b.Property<string>("Name") 900 - .IsRequired() 901 - .HasMaxLength(128) 902 - .HasColumnType("character varying(128)") 903 - .HasColumnName("name") 904 - .HasComment("The name of the DriveFolder."); 905 - 906 - b.Property<string>("ParentId") 907 - .HasMaxLength(32) 908 - .HasColumnType("character varying(32)") 909 - .HasColumnName("parentId") 910 - .HasComment("The parent folder ID. If null, it means the DriveFolder is located in root."); 911 - 912 - b.Property<string>("UserId") 913 - .HasMaxLength(32) 914 - .HasColumnType("character varying(32)") 915 - .HasColumnName("userId") 916 - .HasComment("The owner ID."); 917 - 918 - b.HasKey("Id"); 919 - 920 - b.HasIndex("CreatedAt"); 921 - 922 - b.HasIndex("ParentId"); 923 - 924 - b.HasIndex("UserId"); 925 - 926 - b.ToTable("drive_folder"); 927 - }); 928 - 929 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Emoji", b => 930 - { 931 - b.Property<string>("Id") 932 - .HasMaxLength(32) 933 - .HasColumnType("character varying(32)") 934 - .HasColumnName("id"); 935 - 936 - b.Property<string>("Category") 937 - .HasMaxLength(128) 938 - .HasColumnType("character varying(128)") 939 - .HasColumnName("category"); 940 - 941 - b.Property<int?>("Height") 942 - .HasColumnType("integer") 943 - .HasColumnName("height") 944 - .HasComment("Image height"); 945 - 946 - b.Property<string>("Host") 947 - .HasMaxLength(512) 948 - .HasColumnType("character varying(512)") 949 - .HasColumnName("host"); 950 - 951 - b.Property<string>("License") 952 - .HasMaxLength(1024) 953 - .HasColumnType("character varying(1024)") 954 - .HasColumnName("license"); 955 - 956 - b.Property<string>("Name") 957 - .IsRequired() 958 - .HasMaxLength(128) 959 - .HasColumnType("character varying(128)") 960 - .HasColumnName("name"); 961 - 962 - b.Property<string>("OriginalUrl") 963 - .IsRequired() 964 - .HasMaxLength(512) 965 - .HasColumnType("character varying(512)") 966 - .HasColumnName("originalUrl"); 967 - 968 - b.Property<string>("RawPublicUrl") 969 - .IsRequired() 970 - .ValueGeneratedOnAdd() 971 - .HasMaxLength(512) 972 - .HasColumnType("character varying(512)") 973 - .HasColumnName("publicUrl") 974 - .HasDefaultValueSql("''::character varying"); 975 - 976 - b.Property<bool>("Sensitive") 977 - .HasColumnType("boolean") 978 - .HasColumnName("sensitive"); 979 - 980 - b.PrimitiveCollection<List<string>>("Tags") 981 - .IsRequired() 982 - .ValueGeneratedOnAdd() 983 - .HasColumnType("character varying(128)[]") 984 - .HasColumnName("tags") 985 - .HasDefaultValueSql("'{}'::character varying[]"); 986 - 987 - b.Property<string>("Type") 988 - .HasMaxLength(64) 989 - .HasColumnType("character varying(64)") 990 - .HasColumnName("type"); 991 - 992 - b.Property<DateTime?>("UpdatedAt") 993 - .HasColumnType("timestamp with time zone") 994 - .HasColumnName("updatedAt"); 995 - 996 - b.Property<string>("Uri") 997 - .HasMaxLength(512) 998 - .HasColumnType("character varying(512)") 999 - .HasColumnName("uri"); 1000 - 1001 - b.Property<int?>("Width") 1002 - .HasColumnType("integer") 1003 - .HasColumnName("width") 1004 - .HasComment("Image width"); 1005 - 1006 - b.HasKey("Id"); 1007 - 1008 - b.HasIndex("Host"); 1009 - 1010 - b.HasIndex("Name"); 1011 - 1012 - b.HasIndex("Name", "Host") 1013 - .IsUnique(); 1014 - 1015 - NpgsqlIndexBuilderExtensions.AreNullsDistinct(b.HasIndex("Name", "Host"), false); 1016 - 1017 - b.HasIndex(new[] { "Host" }, "GIN_TRGM_emoji_host"); 1018 - 1019 - NpgsqlIndexBuilderExtensions.HasMethod(b.HasIndex(new[] { "Host" }, "GIN_TRGM_emoji_host"), "gin"); 1020 - NpgsqlIndexBuilderExtensions.HasOperators(b.HasIndex(new[] { "Host" }, "GIN_TRGM_emoji_host"), new[] { "gin_trgm_ops" }); 1021 - 1022 - b.HasIndex(new[] { "Name" }, "GIN_TRGM_emoji_name"); 1023 - 1024 - NpgsqlIndexBuilderExtensions.HasMethod(b.HasIndex(new[] { "Name" }, "GIN_TRGM_emoji_name"), "gin"); 1025 - NpgsqlIndexBuilderExtensions.HasOperators(b.HasIndex(new[] { "Name" }, "GIN_TRGM_emoji_name"), new[] { "gin_trgm_ops" }); 1026 - 1027 - b.ToTable("emoji"); 1028 - }); 1029 - 1030 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Filter", b => 1031 - { 1032 - b.Property<long>("Id") 1033 - .ValueGeneratedOnAdd() 1034 - .HasColumnType("bigint") 1035 - .HasColumnName("id"); 1036 - 1037 - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id")); 1038 - 1039 - b.Property<Filter.FilterAction>("Action") 1040 - .HasColumnType("filter_action_enum") 1041 - .HasColumnName("action"); 1042 - 1043 - b.PrimitiveCollection<List<Filter.FilterContext>>("Contexts") 1044 - .IsRequired() 1045 - .ValueGeneratedOnAdd() 1046 - .HasColumnType("filter_context_enum[]") 1047 - .HasColumnName("contexts") 1048 - .HasDefaultValueSql("'{}'::public.filter_context_enum[]"); 1049 - 1050 - b.Property<DateTime?>("Expiry") 1051 - .HasColumnType("timestamp with time zone") 1052 - .HasColumnName("expiry"); 1053 - 1054 - b.PrimitiveCollection<List<string>>("Keywords") 1055 - .IsRequired() 1056 - .ValueGeneratedOnAdd() 1057 - .HasColumnType("text[]") 1058 - .HasColumnName("keywords") 1059 - .HasDefaultValueSql("'{}'::varchar[]"); 1060 - 1061 - b.Property<string>("Name") 1062 - .IsRequired() 1063 - .HasColumnType("text") 1064 - .HasColumnName("name"); 1065 - 1066 - b.Property<string>("user_id") 1067 - .HasColumnType("character varying(32)"); 1068 - 1069 - b.HasKey("Id"); 1070 - 1071 - b.HasIndex("user_id"); 1072 - 1073 - b.ToTable("filter"); 1074 - }); 1075 - 1076 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.FollowRequest", b => 1077 - { 1078 - b.Property<string>("Id") 1079 - .HasMaxLength(32) 1080 - .HasColumnType("character varying(32)") 1081 - .HasColumnName("id"); 1082 - 1083 - b.Property<DateTime>("CreatedAt") 1084 - .HasColumnType("timestamp with time zone") 1085 - .HasColumnName("createdAt") 1086 - .HasComment("The created date of the FollowRequest."); 1087 - 1088 - b.Property<string>("FolloweeHost") 1089 - .HasMaxLength(512) 1090 - .HasColumnType("character varying(512)") 1091 - .HasColumnName("followeeHost") 1092 - .HasComment("[Denormalized]"); 1093 - 1094 - b.Property<string>("FolloweeId") 1095 - .IsRequired() 1096 - .HasMaxLength(32) 1097 - .HasColumnType("character varying(32)") 1098 - .HasColumnName("followeeId") 1099 - .HasComment("The followee user ID."); 1100 - 1101 - b.Property<string>("FolloweeInbox") 1102 - .HasMaxLength(512) 1103 - .HasColumnType("character varying(512)") 1104 - .HasColumnName("followeeInbox") 1105 - .HasComment("[Denormalized]"); 1106 - 1107 - b.Property<string>("FolloweeSharedInbox") 1108 - .HasMaxLength(512) 1109 - .HasColumnType("character varying(512)") 1110 - .HasColumnName("followeeSharedInbox") 1111 - .HasComment("[Denormalized]"); 1112 - 1113 - b.Property<string>("FollowerHost") 1114 - .HasMaxLength(512) 1115 - .HasColumnType("character varying(512)") 1116 - .HasColumnName("followerHost") 1117 - .HasComment("[Denormalized]"); 1118 - 1119 - b.Property<string>("FollowerId") 1120 - .IsRequired() 1121 - .HasMaxLength(32) 1122 - .HasColumnType("character varying(32)") 1123 - .HasColumnName("followerId") 1124 - .HasComment("The follower user ID."); 1125 - 1126 - b.Property<string>("FollowerInbox") 1127 - .HasMaxLength(512) 1128 - .HasColumnType("character varying(512)") 1129 - .HasColumnName("followerInbox") 1130 - .HasComment("[Denormalized]"); 1131 - 1132 - b.Property<string>("FollowerSharedInbox") 1133 - .HasMaxLength(512) 1134 - .HasColumnType("character varying(512)") 1135 - .HasColumnName("followerSharedInbox") 1136 - .HasComment("[Denormalized]"); 1137 - 1138 - b.Property<Guid?>("RelationshipId") 1139 - .HasColumnType("uuid") 1140 - .HasColumnName("relationshipId"); 1141 - 1142 - b.Property<string>("RequestId") 1143 - .HasMaxLength(512) 1144 - .HasColumnType("character varying(512)") 1145 - .HasColumnName("requestId") 1146 - .HasComment("id of Follow Activity."); 1147 - 1148 - b.HasKey("Id"); 1149 - 1150 - b.HasIndex("FolloweeId"); 1151 - 1152 - b.HasIndex("FollowerId"); 1153 - 1154 - b.HasIndex("FollowerId", "FolloweeId") 1155 - .IsUnique(); 1156 - 1157 - b.ToTable("follow_request"); 1158 - }); 1159 - 1160 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Following", b => 1161 - { 1162 - b.Property<string>("Id") 1163 - .HasMaxLength(32) 1164 - .HasColumnType("character varying(32)") 1165 - .HasColumnName("id"); 1166 - 1167 - b.Property<DateTime>("CreatedAt") 1168 - .HasColumnType("timestamp with time zone") 1169 - .HasColumnName("createdAt") 1170 - .HasComment("The created date of the Following."); 1171 - 1172 - b.Property<string>("FolloweeHost") 1173 - .HasMaxLength(512) 1174 - .HasColumnType("character varying(512)") 1175 - .HasColumnName("followeeHost") 1176 - .HasComment("[Denormalized]"); 1177 - 1178 - b.Property<string>("FolloweeId") 1179 - .IsRequired() 1180 - .HasMaxLength(32) 1181 - .HasColumnType("character varying(32)") 1182 - .HasColumnName("followeeId") 1183 - .HasComment("The followee user ID."); 1184 - 1185 - b.Property<string>("FolloweeInbox") 1186 - .HasMaxLength(512) 1187 - .HasColumnType("character varying(512)") 1188 - .HasColumnName("followeeInbox") 1189 - .HasComment("[Denormalized]"); 1190 - 1191 - b.Property<string>("FolloweeSharedInbox") 1192 - .HasMaxLength(512) 1193 - .HasColumnType("character varying(512)") 1194 - .HasColumnName("followeeSharedInbox") 1195 - .HasComment("[Denormalized]"); 1196 - 1197 - b.Property<string>("FollowerHost") 1198 - .HasMaxLength(512) 1199 - .HasColumnType("character varying(512)") 1200 - .HasColumnName("followerHost") 1201 - .HasComment("[Denormalized]"); 1202 - 1203 - b.Property<string>("FollowerId") 1204 - .IsRequired() 1205 - .HasMaxLength(32) 1206 - .HasColumnType("character varying(32)") 1207 - .HasColumnName("followerId") 1208 - .HasComment("The follower user ID."); 1209 - 1210 - b.Property<string>("FollowerInbox") 1211 - .HasMaxLength(512) 1212 - .HasColumnType("character varying(512)") 1213 - .HasColumnName("followerInbox") 1214 - .HasComment("[Denormalized]"); 1215 - 1216 - b.Property<string>("FollowerSharedInbox") 1217 - .HasMaxLength(512) 1218 - .HasColumnType("character varying(512)") 1219 - .HasColumnName("followerSharedInbox") 1220 - .HasComment("[Denormalized]"); 1221 - 1222 - b.Property<Guid?>("RelationshipId") 1223 - .HasColumnType("uuid") 1224 - .HasColumnName("relationshipId"); 1225 - 1226 - b.HasKey("Id"); 1227 - 1228 - b.HasIndex("CreatedAt"); 1229 - 1230 - b.HasIndex("FolloweeHost"); 1231 - 1232 - b.HasIndex("FolloweeId"); 1233 - 1234 - b.HasIndex("FollowerHost"); 1235 - 1236 - b.HasIndex("FollowerId"); 1237 - 1238 - b.HasIndex("FollowerId", "FolloweeId") 1239 - .IsUnique(); 1240 - 1241 - b.ToTable("following"); 1242 - }); 1243 - 1244 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.GalleryLike", b => 1245 - { 1246 - b.Property<string>("Id") 1247 - .HasMaxLength(32) 1248 - .HasColumnType("character varying(32)") 1249 - .HasColumnName("id"); 1250 - 1251 - b.Property<DateTime>("CreatedAt") 1252 - .HasColumnType("timestamp with time zone") 1253 - .HasColumnName("createdAt"); 1254 - 1255 - b.Property<string>("PostId") 1256 - .IsRequired() 1257 - .HasMaxLength(32) 1258 - .HasColumnType("character varying(32)") 1259 - .HasColumnName("postId"); 1260 - 1261 - b.Property<string>("UserId") 1262 - .IsRequired() 1263 - .HasMaxLength(32) 1264 - .HasColumnType("character varying(32)") 1265 - .HasColumnName("userId"); 1266 - 1267 - b.HasKey("Id"); 1268 - 1269 - b.HasIndex("PostId"); 1270 - 1271 - b.HasIndex("UserId"); 1272 - 1273 - b.HasIndex("UserId", "PostId") 1274 - .IsUnique(); 1275 - 1276 - b.ToTable("gallery_like"); 1277 - }); 1278 - 1279 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.GalleryPost", b => 1280 - { 1281 - b.Property<string>("Id") 1282 - .HasMaxLength(32) 1283 - .HasColumnType("character varying(32)") 1284 - .HasColumnName("id"); 1285 - 1286 - b.Property<DateTime>("CreatedAt") 1287 - .HasColumnType("timestamp with time zone") 1288 - .HasColumnName("createdAt") 1289 - .HasComment("The created date of the GalleryPost."); 1290 - 1291 - b.Property<string>("Description") 1292 - .HasMaxLength(2048) 1293 - .HasColumnType("character varying(2048)") 1294 - .HasColumnName("description"); 1295 - 1296 - b.PrimitiveCollection<List<string>>("FileIds") 1297 - .IsRequired() 1298 - .ValueGeneratedOnAdd() 1299 - .HasColumnType("character varying(32)[]") 1300 - .HasColumnName("fileIds") 1301 - .HasDefaultValueSql("'{}'::character varying[]"); 1302 - 1303 - b.Property<bool>("IsSensitive") 1304 - .ValueGeneratedOnAdd() 1305 - .HasColumnType("boolean") 1306 - .HasDefaultValue(false) 1307 - .HasColumnName("isSensitive") 1308 - .HasComment("Whether the post is sensitive."); 1309 - 1310 - b.Property<int>("LikedCount") 1311 - .ValueGeneratedOnAdd() 1312 - .HasColumnType("integer") 1313 - .HasDefaultValue(0) 1314 - .HasColumnName("likedCount"); 1315 - 1316 - b.PrimitiveCollection<List<string>>("Tags") 1317 - .IsRequired() 1318 - .ValueGeneratedOnAdd() 1319 - .HasColumnType("character varying(128)[]") 1320 - .HasColumnName("tags") 1321 - .HasDefaultValueSql("'{}'::character varying[]"); 1322 - 1323 - b.Property<string>("Title") 1324 - .IsRequired() 1325 - .HasMaxLength(256) 1326 - .HasColumnType("character varying(256)") 1327 - .HasColumnName("title"); 1328 - 1329 - b.Property<DateTime>("UpdatedAt") 1330 - .HasColumnType("timestamp with time zone") 1331 - .HasColumnName("updatedAt") 1332 - .HasComment("The updated date of the GalleryPost."); 1333 - 1334 - b.Property<string>("UserId") 1335 - .IsRequired() 1336 - .HasMaxLength(32) 1337 - .HasColumnType("character varying(32)") 1338 - .HasColumnName("userId") 1339 - .HasComment("The ID of author."); 1340 - 1341 - b.HasKey("Id"); 1342 - 1343 - b.HasIndex("CreatedAt"); 1344 - 1345 - b.HasIndex("FileIds"); 1346 - 1347 - b.HasIndex("IsSensitive"); 1348 - 1349 - b.HasIndex("LikedCount"); 1350 - 1351 - b.HasIndex("Tags"); 1352 - 1353 - b.HasIndex("UpdatedAt"); 1354 - 1355 - b.HasIndex("UserId"); 1356 - 1357 - b.ToTable("gallery_post"); 1358 - }); 1359 - 1360 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Hashtag", b => 1361 - { 1362 - b.Property<string>("Id") 1363 - .HasMaxLength(32) 1364 - .HasColumnType("character varying(32)") 1365 - .HasColumnName("id"); 1366 - 1367 - b.Property<string>("Name") 1368 - .IsRequired() 1369 - .HasMaxLength(128) 1370 - .HasColumnType("character varying(128)") 1371 - .HasColumnName("name"); 1372 - 1373 - b.HasKey("Id"); 1374 - 1375 - b.HasIndex("Name") 1376 - .IsUnique(); 1377 - 1378 - b.ToTable("hashtag"); 1379 - }); 1380 - 1381 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Instance", b => 1382 - { 1383 - b.Property<string>("Id") 1384 - .HasMaxLength(32) 1385 - .HasColumnType("character varying(32)") 1386 - .HasColumnName("id"); 1387 - 1388 - b.Property<DateTime>("CaughtAt") 1389 - .HasColumnType("timestamp with time zone") 1390 - .HasColumnName("caughtAt") 1391 - .HasComment("The caught date of the Instance."); 1392 - 1393 - b.Property<string>("Description") 1394 - .HasMaxLength(4096) 1395 - .HasColumnType("character varying(4096)") 1396 - .HasColumnName("description"); 1397 - 1398 - b.Property<string>("FaviconUrl") 1399 - .HasMaxLength(4096) 1400 - .HasColumnType("character varying(4096)") 1401 - .HasColumnName("faviconUrl"); 1402 - 1403 - b.Property<string>("Host") 1404 - .IsRequired() 1405 - .HasMaxLength(512) 1406 - .HasColumnType("character varying(512)") 1407 - .HasColumnName("host") 1408 - .HasComment("The host of the Instance."); 1409 - 1410 - b.Property<string>("IconUrl") 1411 - .HasMaxLength(4096) 1412 - .HasColumnType("character varying(4096)") 1413 - .HasColumnName("iconUrl"); 1414 - 1415 - b.Property<int>("IncomingFollows") 1416 - .ValueGeneratedOnAdd() 1417 - .HasColumnType("integer") 1418 - .HasDefaultValue(0) 1419 - .HasColumnName("incomingFollows"); 1420 - 1421 - b.Property<DateTime?>("InfoUpdatedAt") 1422 - .HasColumnType("timestamp with time zone") 1423 - .HasColumnName("infoUpdatedAt"); 1424 - 1425 - b.Property<bool>("IsNotResponding") 1426 - .ValueGeneratedOnAdd() 1427 - .HasColumnType("boolean") 1428 - .HasDefaultValue(false) 1429 - .HasColumnName("isNotResponding"); 1430 - 1431 - b.Property<bool>("IsSuspended") 1432 - .ValueGeneratedOnAdd() 1433 - .HasColumnType("boolean") 1434 - .HasDefaultValue(false) 1435 - .HasColumnName("isSuspended"); 1436 - 1437 - b.Property<DateTime>("LastCommunicatedAt") 1438 - .HasColumnType("timestamp with time zone") 1439 - .HasColumnName("lastCommunicatedAt"); 1440 - 1441 - b.Property<DateTime?>("LatestRequestReceivedAt") 1442 - .HasColumnType("timestamp with time zone") 1443 - .HasColumnName("latestRequestReceivedAt"); 1444 - 1445 - b.Property<DateTime?>("LatestRequestSentAt") 1446 - .HasColumnType("timestamp with time zone") 1447 - .HasColumnName("latestRequestSentAt"); 1448 - 1449 - b.Property<int?>("LatestStatus") 1450 - .HasColumnType("integer") 1451 - .HasColumnName("latestStatus"); 1452 - 1453 - b.Property<string>("MaintainerEmail") 1454 - .HasMaxLength(256) 1455 - .HasColumnType("character varying(256)") 1456 - .HasColumnName("maintainerEmail"); 1457 - 1458 - b.Property<string>("MaintainerName") 1459 - .HasMaxLength(128) 1460 - .HasColumnType("character varying(128)") 1461 - .HasColumnName("maintainerName"); 1462 - 1463 - b.Property<string>("Name") 1464 - .HasMaxLength(256) 1465 - .HasColumnType("character varying(256)") 1466 - .HasColumnName("name"); 1467 - 1468 - b.Property<int>("NotesCount") 1469 - .ValueGeneratedOnAdd() 1470 - .HasColumnType("integer") 1471 - .HasDefaultValue(0) 1472 - .HasColumnName("notesCount") 1473 - .HasComment("The count of the notes of the Instance."); 1474 - 1475 - b.Property<bool?>("OpenRegistrations") 1476 - .HasColumnType("boolean") 1477 - .HasColumnName("openRegistrations"); 1478 - 1479 - b.Property<int>("OutgoingFollows") 1480 - .ValueGeneratedOnAdd() 1481 - .HasColumnType("integer") 1482 - .HasDefaultValue(0) 1483 - .HasColumnName("outgoingFollows"); 1484 - 1485 - b.Property<string>("SoftwareName") 1486 - .HasMaxLength(256) 1487 - .HasColumnType("character varying(256)") 1488 - .HasColumnName("softwareName") 1489 - .HasComment("The software of the Instance."); 1490 - 1491 - b.Property<string>("SoftwareVersion") 1492 - .HasMaxLength(256) 1493 - .HasColumnType("character varying(256)") 1494 - .HasColumnName("softwareVersion"); 1495 - 1496 - b.Property<string>("ThemeColor") 1497 - .HasMaxLength(64) 1498 - .HasColumnType("character varying(64)") 1499 - .HasColumnName("themeColor"); 1500 - 1501 - b.Property<int>("UsersCount") 1502 - .ValueGeneratedOnAdd() 1503 - .HasColumnType("integer") 1504 - .HasDefaultValue(0) 1505 - .HasColumnName("usersCount") 1506 - .HasComment("The count of the users of the Instance."); 1507 - 1508 - b.HasKey("Id"); 1509 - 1510 - b.HasIndex("CaughtAt"); 1511 - 1512 - b.HasIndex("Host") 1513 - .IsUnique(); 1514 - 1515 - b.HasIndex("IncomingFollows"); 1516 - 1517 - b.HasIndex("IsSuspended"); 1518 - 1519 - b.HasIndex("OutgoingFollows"); 1520 - 1521 - b.ToTable("instance"); 1522 - }); 1523 - 1524 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Job", b => 1525 - { 1526 - b.Property<Guid>("Id") 1527 - .HasColumnType("uuid") 1528 - .HasColumnName("id"); 1529 - 1530 - b.Property<string>("Data") 1531 - .IsRequired() 1532 - .HasColumnType("text") 1533 - .HasColumnName("data"); 1534 - 1535 - b.Property<DateTime?>("DelayedUntil") 1536 - .HasColumnType("timestamp with time zone") 1537 - .HasColumnName("delayed_until"); 1538 - 1539 - b.Property<string>("Exception") 1540 - .HasColumnType("text") 1541 - .HasColumnName("exception"); 1542 - 1543 - b.Property<string>("ExceptionMessage") 1544 - .HasColumnType("text") 1545 - .HasColumnName("exception_message"); 1546 - 1547 - b.Property<string>("ExceptionSource") 1548 - .HasColumnType("text") 1549 - .HasColumnName("exception_source"); 1550 - 1551 - b.Property<DateTime?>("FinishedAt") 1552 - .HasColumnType("timestamp with time zone") 1553 - .HasColumnName("finished_at"); 1554 - 1555 - b.Property<string>("Mutex") 1556 - .HasColumnType("text") 1557 - .HasColumnName("mutex"); 1558 - 1559 - b.Property<string>("Queue") 1560 - .IsRequired() 1561 - .HasColumnType("text") 1562 - .HasColumnName("queue"); 1563 - 1564 - b.Property<DateTime>("QueuedAt") 1565 - .ValueGeneratedOnAdd() 1566 - .HasColumnType("timestamp with time zone") 1567 - .HasColumnName("queued_at") 1568 - .HasDefaultValueSql("now()"); 1569 - 1570 - b.Property<int>("RetryCount") 1571 - .HasColumnType("integer") 1572 - .HasColumnName("retry_count"); 1573 - 1574 - b.Property<string>("StackTrace") 1575 - .HasColumnType("text") 1576 - .HasColumnName("stack_trace"); 1577 - 1578 - b.Property<DateTime?>("StartedAt") 1579 - .HasColumnType("timestamp with time zone") 1580 - .HasColumnName("started_at"); 1581 - 1582 - b.Property<Job.JobStatus>("Status") 1583 - .ValueGeneratedOnAdd() 1584 - .HasColumnType("job_status") 1585 - .HasDefaultValue(Job.JobStatus.Queued) 1586 - .HasColumnName("status"); 1587 - 1588 - b.HasKey("Id"); 1589 - 1590 - b.HasIndex("DelayedUntil"); 1591 - 1592 - b.HasIndex("FinishedAt"); 1593 - 1594 - b.HasIndex("Mutex") 1595 - .IsUnique(); 1596 - 1597 - b.HasIndex("Queue"); 1598 - 1599 - b.HasIndex("Status"); 1600 - 1601 - b.ToTable("jobs"); 1602 - }); 1603 - 1604 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Marker", b => 1605 - { 1606 - b.Property<string>("UserId") 1607 - .HasMaxLength(32) 1608 - .HasColumnType("character varying(32)") 1609 - .HasColumnName("userId"); 1610 - 1611 - b.Property<Marker.MarkerType>("Type") 1612 - .HasMaxLength(32) 1613 - .HasColumnType("marker_type_enum") 1614 - .HasColumnName("type"); 1615 - 1616 - b.Property<DateTime>("LastUpdatedAt") 1617 - .HasColumnType("timestamp with time zone") 1618 - .HasColumnName("lastUpdated"); 1619 - 1620 - b.Property<string>("Position") 1621 - .IsRequired() 1622 - .HasMaxLength(32) 1623 - .HasColumnType("character varying(32)") 1624 - .HasColumnName("position"); 1625 - 1626 - b.Property<int>("Version") 1627 - .IsConcurrencyToken() 1628 - .ValueGeneratedOnAdd() 1629 - .HasColumnType("integer") 1630 - .HasDefaultValue(0) 1631 - .HasColumnName("version"); 1632 - 1633 - b.HasKey("UserId", "Type"); 1634 - 1635 - b.HasIndex("UserId"); 1636 - 1637 - b.ToTable("marker"); 1638 - }); 1639 - 1640 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.MessagingMessage", b => 1641 - { 1642 - b.Property<string>("Id") 1643 - .HasMaxLength(32) 1644 - .HasColumnType("character varying(32)") 1645 - .HasColumnName("id"); 1646 - 1647 - b.Property<DateTime>("CreatedAt") 1648 - .HasColumnType("timestamp with time zone") 1649 - .HasColumnName("createdAt") 1650 - .HasComment("The created date of the MessagingMessage."); 1651 - 1652 - b.Property<string>("FileId") 1653 - .HasMaxLength(32) 1654 - .HasColumnType("character varying(32)") 1655 - .HasColumnName("fileId"); 1656 - 1657 - b.Property<string>("GroupId") 1658 - .HasMaxLength(32) 1659 - .HasColumnType("character varying(32)") 1660 - .HasColumnName("groupId") 1661 - .HasComment("The recipient group ID."); 1662 - 1663 - b.Property<bool>("IsRead") 1664 - .ValueGeneratedOnAdd() 1665 - .HasColumnType("boolean") 1666 - .HasDefaultValue(false) 1667 - .HasColumnName("isRead"); 1668 - 1669 - b.PrimitiveCollection<List<string>>("Reads") 1670 - .IsRequired() 1671 - .ValueGeneratedOnAdd() 1672 - .HasColumnType("character varying(32)[]") 1673 - .HasColumnName("reads") 1674 - .HasDefaultValueSql("'{}'::character varying[]"); 1675 - 1676 - b.Property<string>("RecipientId") 1677 - .HasMaxLength(32) 1678 - .HasColumnType("character varying(32)") 1679 - .HasColumnName("recipientId") 1680 - .HasComment("The recipient user ID."); 1681 - 1682 - b.Property<string>("Text") 1683 - .HasMaxLength(4096) 1684 - .HasColumnType("character varying(4096)") 1685 - .HasColumnName("text"); 1686 - 1687 - b.Property<string>("Uri") 1688 - .HasMaxLength(512) 1689 - .HasColumnType("character varying(512)") 1690 - .HasColumnName("uri"); 1691 - 1692 - b.Property<string>("UserId") 1693 - .IsRequired() 1694 - .HasMaxLength(32) 1695 - .HasColumnType("character varying(32)") 1696 - .HasColumnName("userId") 1697 - .HasComment("The sender user ID."); 1698 - 1699 - b.HasKey("Id"); 1700 - 1701 - b.HasIndex("CreatedAt"); 1702 - 1703 - b.HasIndex("FileId"); 1704 - 1705 - b.HasIndex("GroupId"); 1706 - 1707 - b.HasIndex("RecipientId"); 1708 - 1709 - b.HasIndex("UserId"); 1710 - 1711 - b.ToTable("messaging_message"); 1712 - }); 1713 - 1714 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Meta", b => 1715 - { 1716 - b.Property<string>("Id") 1717 - .HasMaxLength(32) 1718 - .HasColumnType("character varying(32)") 1719 - .HasColumnName("id"); 1720 - 1721 - b.PrimitiveCollection<List<string>>("AllowedHosts") 1722 - .IsRequired() 1723 - .ValueGeneratedOnAdd() 1724 - .HasColumnType("character varying(256)[]") 1725 - .HasColumnName("allowedHosts") 1726 - .HasDefaultValueSql("'{}'::character varying[]"); 1727 - 1728 - b.Property<string>("AutofollowedAccount") 1729 - .HasMaxLength(128) 1730 - .HasColumnType("character varying(128)") 1731 - .HasColumnName("autofollowedAccount"); 1732 - 1733 - b.Property<string>("BackgroundImageUrl") 1734 - .HasMaxLength(512) 1735 - .HasColumnType("character varying(512)") 1736 - .HasColumnName("backgroundImageUrl"); 1737 - 1738 - b.Property<string>("BannerUrl") 1739 - .HasMaxLength(512) 1740 - .HasColumnType("character varying(512)") 1741 - .HasColumnName("bannerUrl"); 1742 - 1743 - b.PrimitiveCollection<List<string>>("BlockedHosts") 1744 - .IsRequired() 1745 - .ValueGeneratedOnAdd() 1746 - .HasColumnType("character varying(256)[]") 1747 - .HasColumnName("blockedHosts") 1748 - .HasDefaultValueSql("'{}'::character varying[]"); 1749 - 1750 - b.Property<bool>("CacheRemoteFiles") 1751 - .ValueGeneratedOnAdd() 1752 - .HasColumnType("boolean") 1753 - .HasDefaultValue(false) 1754 - .HasColumnName("cacheRemoteFiles"); 1755 - 1756 - b.PrimitiveCollection<List<string>>("CustomMotd") 1757 - .IsRequired() 1758 - .ValueGeneratedOnAdd() 1759 - .HasColumnType("character varying(256)[]") 1760 - .HasColumnName("customMOTD") 1761 - .HasDefaultValueSql("'{}'::character varying[]"); 1762 - 1763 - b.PrimitiveCollection<List<string>>("CustomSplashIcons") 1764 - .IsRequired() 1765 - .ValueGeneratedOnAdd() 1766 - .HasColumnType("character varying(256)[]") 1767 - .HasColumnName("customSplashIcons") 1768 - .HasDefaultValueSql("'{}'::character varying[]"); 1769 - 1770 - b.Property<string>("DeeplAuthKey") 1771 - .HasMaxLength(128) 1772 - .HasColumnType("character varying(128)") 1773 - .HasColumnName("deeplAuthKey"); 1774 - 1775 - b.Property<bool>("DeeplIsPro") 1776 - .ValueGeneratedOnAdd() 1777 - .HasColumnType("boolean") 1778 - .HasDefaultValue(false) 1779 - .HasColumnName("deeplIsPro"); 1780 - 1781 - b.Property<string>("DefaultDarkTheme") 1782 - .HasMaxLength(8192) 1783 - .HasColumnType("character varying(8192)") 1784 - .HasColumnName("defaultDarkTheme"); 1785 - 1786 - b.Property<string>("DefaultLightTheme") 1787 - .HasMaxLength(8192) 1788 - .HasColumnType("character varying(8192)") 1789 - .HasColumnName("defaultLightTheme"); 1790 - 1791 - b.Property<string>("DefaultReaction") 1792 - .IsRequired() 1793 - .ValueGeneratedOnAdd() 1794 - .HasMaxLength(256) 1795 - .HasColumnType("character varying(256)") 1796 - .HasColumnName("defaultReaction") 1797 - .HasDefaultValueSql("'⭐'::character varying"); 1798 - 1799 - b.Property<string>("Description") 1800 - .HasMaxLength(1024) 1801 - .HasColumnType("character varying(1024)") 1802 - .HasColumnName("description"); 1803 - 1804 - b.Property<bool>("DisableGlobalTimeline") 1805 - .ValueGeneratedOnAdd() 1806 - .HasColumnType("boolean") 1807 - .HasDefaultValue(false) 1808 - .HasColumnName("disableGlobalTimeline"); 1809 - 1810 - b.Property<bool>("DisableLocalTimeline") 1811 - .ValueGeneratedOnAdd() 1812 - .HasColumnType("boolean") 1813 - .HasDefaultValue(false) 1814 - .HasColumnName("disableLocalTimeline"); 1815 - 1816 - b.Property<bool>("DisableRecommendedTimeline") 1817 - .ValueGeneratedOnAdd() 1818 - .HasColumnType("boolean") 1819 - .HasDefaultValue(true) 1820 - .HasColumnName("disableRecommendedTimeline"); 1821 - 1822 - b.Property<bool>("DisableRegistration") 1823 - .ValueGeneratedOnAdd() 1824 - .HasColumnType("boolean") 1825 - .HasDefaultValue(false) 1826 - .HasColumnName("disableRegistration"); 1827 - 1828 - b.Property<string>("DiscordClientId") 1829 - .HasMaxLength(128) 1830 - .HasColumnType("character varying(128)") 1831 - .HasColumnName("discordClientId"); 1832 - 1833 - b.Property<string>("DiscordClientSecret") 1834 - .HasMaxLength(128) 1835 - .HasColumnType("character varying(128)") 1836 - .HasColumnName("discordClientSecret"); 1837 - 1838 - b.Property<string>("DonationLink") 1839 - .HasMaxLength(256) 1840 - .HasColumnType("character varying(256)") 1841 - .HasColumnName("donationLink"); 1842 - 1843 - b.Property<string>("Email") 1844 - .HasMaxLength(128) 1845 - .HasColumnType("character varying(128)") 1846 - .HasColumnName("email"); 1847 - 1848 - b.Property<bool>("EmailRequiredForSignup") 1849 - .ValueGeneratedOnAdd() 1850 - .HasColumnType("boolean") 1851 - .HasDefaultValue(false) 1852 - .HasColumnName("emailRequiredForSignup"); 1853 - 1854 - b.Property<bool>("EnableActiveEmailValidation") 1855 - .ValueGeneratedOnAdd() 1856 - .HasColumnType("boolean") 1857 - .HasDefaultValue(true) 1858 - .HasColumnName("enableActiveEmailValidation"); 1859 - 1860 - b.Property<bool>("EnableDiscordIntegration") 1861 - .ValueGeneratedOnAdd() 1862 - .HasColumnType("boolean") 1863 - .HasDefaultValue(false) 1864 - .HasColumnName("enableDiscordIntegration"); 1865 - 1866 - b.Property<bool>("EnableEmail") 1867 - .ValueGeneratedOnAdd() 1868 - .HasColumnType("boolean") 1869 - .HasDefaultValue(false) 1870 - .HasColumnName("enableEmail"); 1871 - 1872 - b.Property<bool>("EnableGithubIntegration") 1873 - .ValueGeneratedOnAdd() 1874 - .HasColumnType("boolean") 1875 - .HasDefaultValue(false) 1876 - .HasColumnName("enableGithubIntegration"); 1877 - 1878 - b.Property<bool>("EnableHcaptcha") 1879 - .ValueGeneratedOnAdd() 1880 - .HasColumnType("boolean") 1881 - .HasDefaultValue(false) 1882 - .HasColumnName("enableHcaptcha"); 1883 - 1884 - b.Property<bool>("EnableIdenticonGeneration") 1885 - .ValueGeneratedOnAdd() 1886 - .HasColumnType("boolean") 1887 - .HasDefaultValue(true) 1888 - .HasColumnName("enableIdenticonGeneration"); 1889 - 1890 - b.Property<bool>("EnableIpLogging") 1891 - .ValueGeneratedOnAdd() 1892 - .HasColumnType("boolean") 1893 - .HasDefaultValue(false) 1894 - .HasColumnName("enableIpLogging"); 1895 - 1896 - b.Property<bool>("EnableRecaptcha") 1897 - .ValueGeneratedOnAdd() 1898 - .HasColumnType("boolean") 1899 - .HasDefaultValue(false) 1900 - .HasColumnName("enableRecaptcha"); 1901 - 1902 - b.Property<bool>("EnableServerMachineStats") 1903 - .ValueGeneratedOnAdd() 1904 - .HasColumnType("boolean") 1905 - .HasDefaultValue(false) 1906 - .HasColumnName("enableServerMachineStats"); 1907 - 1908 - b.Property<string>("ErrorImageUrl") 1909 - .ValueGeneratedOnAdd() 1910 - .HasMaxLength(512) 1911 - .HasColumnType("character varying(512)") 1912 - .HasColumnName("errorImageUrl") 1913 - .HasDefaultValueSql("'/static-assets/badges/error.png'::character varying"); 1914 - 1915 - b.Property<Dictionary<string, bool>>("ExperimentalFeatures") 1916 - .IsRequired() 1917 - .ValueGeneratedOnAdd() 1918 - .HasColumnType("jsonb") 1919 - .HasColumnName("experimentalFeatures") 1920 - .HasDefaultValueSql("'{}'::jsonb"); 1921 - 1922 - b.Property<string>("FeedbackUrl") 1923 - .ValueGeneratedOnAdd() 1924 - .HasMaxLength(512) 1925 - .HasColumnType("character varying(512)") 1926 - .HasColumnName("feedbackUrl") 1927 - .HasDefaultValueSql("'https://iceshrimp.dev/iceshrimp/iceshrimp/issues/new'::character varying"); 1928 - 1929 - b.Property<string>("GithubClientId") 1930 - .HasMaxLength(128) 1931 - .HasColumnType("character varying(128)") 1932 - .HasColumnName("githubClientId"); 1933 - 1934 - b.Property<string>("GithubClientSecret") 1935 - .HasMaxLength(128) 1936 - .HasColumnType("character varying(128)") 1937 - .HasColumnName("githubClientSecret"); 1938 - 1939 - b.Property<string>("HcaptchaSecretKey") 1940 - .HasMaxLength(64) 1941 - .HasColumnType("character varying(64)") 1942 - .HasColumnName("hcaptchaSecretKey"); 1943 - 1944 - b.Property<string>("HcaptchaSiteKey") 1945 - .HasMaxLength(64) 1946 - .HasColumnType("character varying(64)") 1947 - .HasColumnName("hcaptchaSiteKey"); 1948 - 1949 - b.PrimitiveCollection<List<string>>("HiddenTags") 1950 - .IsRequired() 1951 - .ValueGeneratedOnAdd() 1952 - .HasColumnType("character varying(256)[]") 1953 - .HasColumnName("hiddenTags") 1954 - .HasDefaultValueSql("'{}'::character varying[]"); 1955 - 1956 - b.Property<string>("IconUrl") 1957 - .HasMaxLength(512) 1958 - .HasColumnType("character varying(512)") 1959 - .HasColumnName("iconUrl"); 1960 - 1961 - b.PrimitiveCollection<List<string>>("Langs") 1962 - .IsRequired() 1963 - .ValueGeneratedOnAdd() 1964 - .HasColumnType("character varying(64)[]") 1965 - .HasColumnName("langs") 1966 - .HasDefaultValueSql("'{}'::character varying[]"); 1967 - 1968 - b.Property<string>("LibreTranslateApiKey") 1969 - .HasMaxLength(128) 1970 - .HasColumnType("character varying(128)") 1971 - .HasColumnName("libreTranslateApiKey"); 1972 - 1973 - b.Property<string>("LibreTranslateApiUrl") 1974 - .HasMaxLength(512) 1975 - .HasColumnType("character varying(512)") 1976 - .HasColumnName("libreTranslateApiUrl"); 1977 - 1978 - b.Property<int>("LocalDriveCapacityMb") 1979 - .ValueGeneratedOnAdd() 1980 - .HasColumnType("integer") 1981 - .HasDefaultValue(1024) 1982 - .HasColumnName("localDriveCapacityMb") 1983 - .HasComment("Drive capacity of a local user (MB)"); 1984 - 1985 - b.Property<string>("LogoImageUrl") 1986 - .HasMaxLength(512) 1987 - .HasColumnType("character varying(512)") 1988 - .HasColumnName("logoImageUrl"); 1989 - 1990 - b.Property<string>("MaintainerEmail") 1991 - .HasMaxLength(128) 1992 - .HasColumnType("character varying(128)") 1993 - .HasColumnName("maintainerEmail"); 1994 - 1995 - b.Property<string>("MaintainerName") 1996 - .HasMaxLength(128) 1997 - .HasColumnType("character varying(128)") 1998 - .HasColumnName("maintainerName"); 1999 - 2000 - b.Property<string>("MascotImageUrl") 2001 - .ValueGeneratedOnAdd() 2002 - .HasMaxLength(512) 2003 - .HasColumnType("character varying(512)") 2004 - .HasColumnName("mascotImageUrl") 2005 - .HasDefaultValueSql("'/static-assets/badges/info.png'::character varying"); 2006 - 2007 - b.Property<string>("Name") 2008 - .HasMaxLength(128) 2009 - .HasColumnType("character varying(128)") 2010 - .HasColumnName("name"); 2011 - 2012 - b.Property<string>("ObjectStorageAccessKey") 2013 - .HasMaxLength(512) 2014 - .HasColumnType("character varying(512)") 2015 - .HasColumnName("objectStorageAccessKey"); 2016 - 2017 - b.Property<string>("ObjectStorageBaseUrl") 2018 - .HasMaxLength(512) 2019 - .HasColumnType("character varying(512)") 2020 - .HasColumnName("objectStorageBaseUrl"); 2021 - 2022 - b.Property<string>("ObjectStorageBucket") 2023 - .HasMaxLength(512) 2024 - .HasColumnType("character varying(512)") 2025 - .HasColumnName("objectStorageBucket"); 2026 - 2027 - b.Property<string>("ObjectStorageEndpoint") 2028 - .HasMaxLength(512) 2029 - .HasColumnType("character varying(512)") 2030 - .HasColumnName("objectStorageEndpoint"); 2031 - 2032 - b.Property<int?>("ObjectStoragePort") 2033 - .HasColumnType("integer") 2034 - .HasColumnName("objectStoragePort"); 2035 - 2036 - b.Property<string>("ObjectStoragePrefix") 2037 - .HasMaxLength(512) 2038 - .HasColumnType("character varying(512)") 2039 - .HasColumnName("objectStoragePrefix"); 2040 - 2041 - b.Property<string>("ObjectStorageRegion") 2042 - .HasMaxLength(512) 2043 - .HasColumnType("character varying(512)") 2044 - .HasColumnName("objectStorageRegion"); 2045 - 2046 - b.Property<bool>("ObjectStorageS3ForcePathStyle") 2047 - .ValueGeneratedOnAdd() 2048 - .HasColumnType("boolean") 2049 - .HasDefaultValue(true) 2050 - .HasColumnName("objectStorageS3ForcePathStyle"); 2051 - 2052 - b.Property<string>("ObjectStorageSecretKey") 2053 - .HasMaxLength(512) 2054 - .HasColumnType("character varying(512)") 2055 - .HasColumnName("objectStorageSecretKey"); 2056 - 2057 - b.Property<bool>("ObjectStorageSetPublicRead") 2058 - .ValueGeneratedOnAdd() 2059 - .HasColumnType("boolean") 2060 - .HasDefaultValue(false) 2061 - .HasColumnName("objectStorageSetPublicRead"); 2062 - 2063 - b.Property<bool>("ObjectStorageUseProxy") 2064 - .ValueGeneratedOnAdd() 2065 - .HasColumnType("boolean") 2066 - .HasDefaultValue(true) 2067 - .HasColumnName("objectStorageUseProxy"); 2068 - 2069 - b.Property<bool>("ObjectStorageUseSsl") 2070 - .ValueGeneratedOnAdd() 2071 - .HasColumnType("boolean") 2072 - .HasDefaultValue(true) 2073 - .HasColumnName("objectStorageUseSSL"); 2074 - 2075 - b.Property<string>("PinnedClipId") 2076 - .HasMaxLength(32) 2077 - .HasColumnType("character varying(32)") 2078 - .HasColumnName("pinnedClipId"); 2079 - 2080 - b.PrimitiveCollection<List<string>>("PinnedPages") 2081 - .IsRequired() 2082 - .ValueGeneratedOnAdd() 2083 - .HasColumnType("character varying(512)[]") 2084 - .HasColumnName("pinnedPages") 2085 - .HasDefaultValueSql("'{/featured,/channels,/explore,/pages,/about-iceshrimp}'::character varying[]"); 2086 - 2087 - b.PrimitiveCollection<List<string>>("PinnedUsers") 2088 - .IsRequired() 2089 - .ValueGeneratedOnAdd() 2090 - .HasColumnType("character varying(256)[]") 2091 - .HasColumnName("pinnedUsers") 2092 - .HasDefaultValueSql("'{}'::character varying[]"); 2093 - 2094 - b.Property<bool>("PrivateMode") 2095 - .ValueGeneratedOnAdd() 2096 - .HasColumnType("boolean") 2097 - .HasDefaultValue(false) 2098 - .HasColumnName("privateMode"); 2099 - 2100 - b.Property<string>("RecaptchaSecretKey") 2101 - .HasMaxLength(64) 2102 - .HasColumnType("character varying(64)") 2103 - .HasColumnName("recaptchaSecretKey"); 2104 - 2105 - b.Property<string>("RecaptchaSiteKey") 2106 - .HasMaxLength(64) 2107 - .HasColumnType("character varying(64)") 2108 - .HasColumnName("recaptchaSiteKey"); 2109 - 2110 - b.PrimitiveCollection<List<string>>("RecommendedInstances") 2111 - .IsRequired() 2112 - .ValueGeneratedOnAdd() 2113 - .HasColumnType("character varying(256)[]") 2114 - .HasColumnName("recommendedInstances") 2115 - .HasDefaultValueSql("'{}'::character varying[]"); 2116 - 2117 - b.Property<int>("RemoteDriveCapacityMb") 2118 - .ValueGeneratedOnAdd() 2119 - .HasColumnType("integer") 2120 - .HasDefaultValue(32) 2121 - .HasColumnName("remoteDriveCapacityMb") 2122 - .HasComment("Drive capacity of a remote user (MB)"); 2123 - 2124 - b.Property<string>("RepositoryUrl") 2125 - .IsRequired() 2126 - .ValueGeneratedOnAdd() 2127 - .HasMaxLength(512) 2128 - .HasColumnType("character varying(512)") 2129 - .HasColumnName("repositoryUrl") 2130 - .HasDefaultValueSql("'https://iceshrimp.dev/iceshrimp/iceshrimp'::character varying"); 2131 - 2132 - b.Property<bool>("SecureMode") 2133 - .ValueGeneratedOnAdd() 2134 - .HasColumnType("boolean") 2135 - .HasDefaultValue(true) 2136 - .HasColumnName("secureMode"); 2137 - 2138 - b.PrimitiveCollection<List<string>>("SilencedHosts") 2139 - .IsRequired() 2140 - .ValueGeneratedOnAdd() 2141 - .HasColumnType("character varying(256)[]") 2142 - .HasColumnName("silencedHosts") 2143 - .HasDefaultValueSql("'{}'::character varying[]"); 2144 - 2145 - b.Property<string>("SmtpHost") 2146 - .HasMaxLength(128) 2147 - .HasColumnType("character varying(128)") 2148 - .HasColumnName("smtpHost"); 2149 - 2150 - b.Property<string>("SmtpPass") 2151 - .HasMaxLength(1024) 2152 - .HasColumnType("character varying(1024)") 2153 - .HasColumnName("smtpPass"); 2154 - 2155 - b.Property<int?>("SmtpPort") 2156 - .HasColumnType("integer") 2157 - .HasColumnName("smtpPort"); 2158 - 2159 - b.Property<bool>("SmtpSecure") 2160 - .ValueGeneratedOnAdd() 2161 - .HasColumnType("boolean") 2162 - .HasDefaultValue(false) 2163 - .HasColumnName("smtpSecure"); 2164 - 2165 - b.Property<string>("SmtpUser") 2166 - .HasMaxLength(1024) 2167 - .HasColumnType("character varying(1024)") 2168 - .HasColumnName("smtpUser"); 2169 - 2170 - b.Property<string>("SummalyProxy") 2171 - .HasMaxLength(128) 2172 - .HasColumnType("character varying(128)") 2173 - .HasColumnName("summalyProxy"); 2174 - 2175 - b.Property<string>("SwPrivateKey") 2176 - .IsRequired() 2177 - .HasMaxLength(128) 2178 - .HasColumnType("character varying(128)") 2179 - .HasColumnName("swPrivateKey"); 2180 - 2181 - b.Property<string>("SwPublicKey") 2182 - .IsRequired() 2183 - .HasMaxLength(128) 2184 - .HasColumnType("character varying(128)") 2185 - .HasColumnName("swPublicKey"); 2186 - 2187 - b.Property<string>("ThemeColor") 2188 - .HasMaxLength(512) 2189 - .HasColumnType("character varying(512)") 2190 - .HasColumnName("themeColor"); 2191 - 2192 - b.Property<string>("ToSurl") 2193 - .HasMaxLength(512) 2194 - .HasColumnType("character varying(512)") 2195 - .HasColumnName("ToSUrl"); 2196 - 2197 - b.Property<bool>("UseObjectStorage") 2198 - .ValueGeneratedOnAdd() 2199 - .HasColumnType("boolean") 2200 - .HasDefaultValue(false) 2201 - .HasColumnName("useObjectStorage"); 2202 - 2203 - b.HasKey("Id"); 2204 - 2205 - b.ToTable("meta"); 2206 - }); 2207 - 2208 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.MetaStoreEntry", b => 2209 - { 2210 - b.Property<string>("Key") 2211 - .HasMaxLength(128) 2212 - .HasColumnType("character varying(128)") 2213 - .HasColumnName("key"); 2214 - 2215 - b.Property<string>("Value") 2216 - .HasColumnType("text") 2217 - .HasColumnName("value"); 2218 - 2219 - b.HasKey("Key"); 2220 - 2221 - b.HasIndex("Key", "Value"); 2222 - 2223 - b.ToTable("meta_store"); 2224 - }); 2225 - 2226 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.ModerationLog", b => 2227 - { 2228 - b.Property<string>("Id") 2229 - .HasMaxLength(32) 2230 - .HasColumnType("character varying(32)") 2231 - .HasColumnName("id"); 2232 - 2233 - b.Property<DateTime>("CreatedAt") 2234 - .HasColumnType("timestamp with time zone") 2235 - .HasColumnName("createdAt") 2236 - .HasComment("The created date of the ModerationLog."); 2237 - 2238 - b.Property<string>("Info") 2239 - .IsRequired() 2240 - .HasColumnType("jsonb") 2241 - .HasColumnName("info"); 2242 - 2243 - b.Property<string>("Type") 2244 - .IsRequired() 2245 - .HasMaxLength(128) 2246 - .HasColumnType("character varying(128)") 2247 - .HasColumnName("type"); 2248 - 2249 - b.Property<string>("UserId") 2250 - .IsRequired() 2251 - .HasMaxLength(32) 2252 - .HasColumnType("character varying(32)") 2253 - .HasColumnName("userId"); 2254 - 2255 - b.HasKey("Id"); 2256 - 2257 - b.HasIndex("UserId"); 2258 - 2259 - b.ToTable("moderation_log"); 2260 - }); 2261 - 2262 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Muting", b => 2263 - { 2264 - b.Property<string>("Id") 2265 - .HasMaxLength(32) 2266 - .HasColumnType("character varying(32)") 2267 - .HasColumnName("id"); 2268 - 2269 - b.Property<DateTime>("CreatedAt") 2270 - .HasColumnType("timestamp with time zone") 2271 - .HasColumnName("createdAt") 2272 - .HasComment("The created date of the Muting."); 2273 - 2274 - b.Property<DateTime?>("ExpiresAt") 2275 - .HasColumnType("timestamp with time zone") 2276 - .HasColumnName("expiresAt"); 2277 - 2278 - b.Property<string>("MuteeId") 2279 - .IsRequired() 2280 - .HasMaxLength(32) 2281 - .HasColumnType("character varying(32)") 2282 - .HasColumnName("muteeId") 2283 - .HasComment("The mutee user ID."); 2284 - 2285 - b.Property<string>("MuterId") 2286 - .IsRequired() 2287 - .HasMaxLength(32) 2288 - .HasColumnType("character varying(32)") 2289 - .HasColumnName("muterId") 2290 - .HasComment("The muter user ID."); 2291 - 2292 - b.HasKey("Id"); 2293 - 2294 - b.HasIndex("CreatedAt"); 2295 - 2296 - b.HasIndex("ExpiresAt"); 2297 - 2298 - b.HasIndex("MuteeId"); 2299 - 2300 - b.HasIndex("MuterId"); 2301 - 2302 - b.HasIndex("MuterId", "MuteeId") 2303 - .IsUnique(); 2304 - 2305 - b.ToTable("muting"); 2306 - }); 2307 - 2308 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Note", b => 2309 - { 2310 - b.Property<string>("Id") 2311 - .HasMaxLength(32) 2312 - .HasColumnType("character varying(32)") 2313 - .HasColumnName("id"); 2314 - 2315 - b.PrimitiveCollection<List<string>>("AttachedFileTypes") 2316 - .IsRequired() 2317 - .ValueGeneratedOnAdd() 2318 - .HasColumnType("character varying(256)[]") 2319 - .HasColumnName("attachedFileTypes") 2320 - .HasDefaultValueSql("'{}'::character varying[]"); 2321 - 2322 - b.Property<string>("ChannelId") 2323 - .HasMaxLength(32) 2324 - .HasColumnType("character varying(32)") 2325 - .HasColumnName("channelId") 2326 - .HasComment("The ID of source channel."); 2327 - 2328 - b.Property<string>("CombinedAltText") 2329 - .HasColumnType("text") 2330 - .HasColumnName("combinedAltText"); 2331 - 2332 - b.Property<DateTime>("CreatedAt") 2333 - .HasColumnType("timestamp with time zone") 2334 - .HasColumnName("createdAt") 2335 - .HasComment("The created date of the Note."); 2336 - 2337 - b.Property<string>("Cw") 2338 - .HasColumnType("text") 2339 - .HasColumnName("cw"); 2340 - 2341 - b.PrimitiveCollection<List<string>>("Emojis") 2342 - .IsRequired() 2343 - .ValueGeneratedOnAdd() 2344 - .HasColumnType("character varying(128)[]") 2345 - .HasColumnName("emojis") 2346 - .HasDefaultValueSql("'{}'::character varying[]"); 2347 - 2348 - b.PrimitiveCollection<List<string>>("FileIds") 2349 - .IsRequired() 2350 - .ValueGeneratedOnAdd() 2351 - .HasColumnType("character varying(32)[]") 2352 - .HasColumnName("fileIds") 2353 - .HasDefaultValueSql("'{}'::character varying[]"); 2354 - 2355 - b.Property<bool>("HasPoll") 2356 - .ValueGeneratedOnAdd() 2357 - .HasColumnType("boolean") 2358 - .HasDefaultValue(false) 2359 - .HasColumnName("hasPoll"); 2360 - 2361 - b.Property<int>("LikeCount") 2362 - .ValueGeneratedOnAdd() 2363 - .HasColumnType("integer") 2364 - .HasDefaultValue(0) 2365 - .HasColumnName("likeCount"); 2366 - 2367 - b.Property<bool>("LocalOnly") 2368 - .ValueGeneratedOnAdd() 2369 - .HasColumnType("boolean") 2370 - .HasDefaultValue(false) 2371 - .HasColumnName("localOnly"); 2372 - 2373 - b.Property<string>("MastoReplyUserId") 2374 - .HasMaxLength(32) 2375 - .HasColumnType("character varying(32)") 2376 - .HasColumnName("mastoReplyUserId"); 2377 - 2378 - b.Property<List<Note.MentionedUser>>("MentionedRemoteUsers") 2379 - .IsRequired() 2380 - .ValueGeneratedOnAdd() 2381 - .HasColumnType("jsonb") 2382 - .HasColumnName("mentionedRemoteUsers") 2383 - .HasDefaultValueSql("'[]'::jsonb"); 2384 - 2385 - b.PrimitiveCollection<List<string>>("Mentions") 2386 - .IsRequired() 2387 - .ValueGeneratedOnAdd() 2388 - .HasColumnType("character varying(32)[]") 2389 - .HasColumnName("mentions") 2390 - .HasDefaultValueSql("'{}'::character varying[]"); 2391 - 2392 - b.Property<string>("Name") 2393 - .HasMaxLength(256) 2394 - .HasColumnType("character varying(256)") 2395 - .HasColumnName("name"); 2396 - 2397 - b.Property<short>("QuotesCount") 2398 - .HasColumnType("smallint") 2399 - .HasColumnName("quotesCount"); 2400 - 2401 - b.Property<Dictionary<string, long>>("Reactions") 2402 - .IsRequired() 2403 - .ValueGeneratedOnAdd() 2404 - .HasColumnType("jsonb") 2405 - .HasColumnName("reactions") 2406 - .HasDefaultValueSql("'{}'::jsonb"); 2407 - 2408 - b.Property<short>("RenoteCount") 2409 - .ValueGeneratedOnAdd() 2410 - .HasColumnType("smallint") 2411 - .HasDefaultValue((short)0) 2412 - .HasColumnName("renoteCount"); 2413 - 2414 - b.Property<string>("RenoteId") 2415 - .HasMaxLength(32) 2416 - .HasColumnType("character varying(32)") 2417 - .HasColumnName("renoteId") 2418 - .HasComment("The ID of renote target."); 2419 - 2420 - b.Property<string>("RenoteUri") 2421 - .HasMaxLength(512) 2422 - .HasColumnType("character varying(512)") 2423 - .HasColumnName("renoteUri") 2424 - .HasComment("The URI of the renote target, if it couldn't be resolved at time of ingestion."); 2425 - 2426 - b.Property<string>("RenoteUserHost") 2427 - .HasMaxLength(512) 2428 - .HasColumnType("character varying(512)") 2429 - .HasColumnName("renoteUserHost") 2430 - .HasComment("[Denormalized]"); 2431 - 2432 - b.Property<string>("RenoteUserId") 2433 - .HasMaxLength(32) 2434 - .HasColumnType("character varying(32)") 2435 - .HasColumnName("renoteUserId") 2436 - .HasComment("[Denormalized]"); 2437 - 2438 - b.Property<string>("RepliesCollection") 2439 - .HasMaxLength(512) 2440 - .HasColumnType("character varying(512)") 2441 - .HasColumnName("repliesCollection"); 2442 - 2443 - b.Property<short>("RepliesCount") 2444 - .ValueGeneratedOnAdd() 2445 - .HasColumnType("smallint") 2446 - .HasDefaultValue((short)0) 2447 - .HasColumnName("repliesCount"); 2448 - 2449 - b.Property<DateTime?>("RepliesFetchedAt") 2450 - .HasColumnType("timestamp with time zone") 2451 - .HasColumnName("repliesFetchedAt"); 2452 - 2453 - b.Property<string>("ReplyId") 2454 - .HasMaxLength(32) 2455 - .HasColumnType("character varying(32)") 2456 - .HasColumnName("replyId") 2457 - .HasComment("The ID of reply target."); 2458 - 2459 - b.Property<string>("ReplyUri") 2460 - .HasMaxLength(512) 2461 - .HasColumnType("character varying(512)") 2462 - .HasColumnName("replyUri") 2463 - .HasComment("The URI of the reply target, if it couldn't be resolved at time of ingestion."); 2464 - 2465 - b.Property<string>("ReplyUserHost") 2466 - .HasMaxLength(512) 2467 - .HasColumnType("character varying(512)") 2468 - .HasColumnName("replyUserHost") 2469 - .HasComment("[Denormalized]"); 2470 - 2471 - b.Property<string>("ReplyUserId") 2472 - .HasMaxLength(32) 2473 - .HasColumnType("character varying(32)") 2474 - .HasColumnName("replyUserId") 2475 - .HasComment("[Denormalized]"); 2476 - 2477 - b.Property<int>("Score") 2478 - .ValueGeneratedOnAdd() 2479 - .HasColumnType("integer") 2480 - .HasDefaultValue(0) 2481 - .HasColumnName("score"); 2482 - 2483 - b.PrimitiveCollection<List<string>>("Tags") 2484 - .IsRequired() 2485 - .ValueGeneratedOnAdd() 2486 - .HasColumnType("character varying(128)[]") 2487 - .HasColumnName("tags") 2488 - .HasDefaultValueSql("'{}'::character varying[]"); 2489 - 2490 - b.Property<string>("Text") 2491 - .HasColumnType("text") 2492 - .HasColumnName("text"); 2493 - 2494 - b.Property<string>("ThreadId") 2495 - .IsRequired() 2496 - .HasMaxLength(256) 2497 - .HasColumnType("character varying(256)") 2498 - .HasColumnName("threadId"); 2499 - 2500 - b.Property<DateTime?>("UpdatedAt") 2501 - .HasColumnType("timestamp with time zone") 2502 - .HasColumnName("updatedAt") 2503 - .HasComment("The updated date of the Note."); 2504 - 2505 - b.Property<string>("Uri") 2506 - .HasMaxLength(512) 2507 - .HasColumnType("character varying(512)") 2508 - .HasColumnName("uri") 2509 - .HasComment("The URI of a note. it will be null when the note is local."); 2510 - 2511 - b.Property<string>("Url") 2512 - .HasMaxLength(512) 2513 - .HasColumnType("character varying(512)") 2514 - .HasColumnName("url") 2515 - .HasComment("The human readable url of a note. it will be null when the note is local."); 2516 - 2517 - b.Property<string>("UserHost") 2518 - .HasMaxLength(512) 2519 - .HasColumnType("character varying(512)") 2520 - .HasColumnName("userHost") 2521 - .HasComment("[Denormalized]"); 2522 - 2523 - b.Property<string>("UserId") 2524 - .IsRequired() 2525 - .HasMaxLength(32) 2526 - .HasColumnType("character varying(32)") 2527 - .HasColumnName("userId") 2528 - .HasComment("The ID of author."); 2529 - 2530 - b.Property<Note.NoteVisibility>("Visibility") 2531 - .HasColumnType("note_visibility_enum") 2532 - .HasColumnName("visibility"); 2533 - 2534 - b.PrimitiveCollection<List<string>>("VisibleUserIds") 2535 - .IsRequired() 2536 - .ValueGeneratedOnAdd() 2537 - .HasColumnType("character varying(32)[]") 2538 - .HasColumnName("visibleUserIds") 2539 - .HasDefaultValueSql("'{}'::character varying[]"); 2540 - 2541 - b.HasKey("Id"); 2542 - 2543 - b.HasIndex("AttachedFileTypes"); 2544 - 2545 - b.HasIndex("ChannelId"); 2546 - 2547 - b.HasIndex("CreatedAt"); 2548 - 2549 - b.HasIndex("FileIds"); 2550 - 2551 - b.HasIndex("Mentions"); 2552 - 2553 - b.HasIndex("RenoteId"); 2554 - 2555 - b.HasIndex("RenoteUri"); 2556 - 2557 - b.HasIndex("ReplyId"); 2558 - 2559 - b.HasIndex("ReplyUri"); 2560 - 2561 - b.HasIndex("Tags"); 2562 - 2563 - b.HasIndex("ThreadId"); 2564 - 2565 - b.HasIndex("Uri") 2566 - .IsUnique(); 2567 - 2568 - b.HasIndex("Url"); 2569 - 2570 - b.HasIndex("UserHost"); 2571 - 2572 - b.HasIndex("UserId"); 2573 - 2574 - b.HasIndex("Visibility"); 2575 - 2576 - b.HasIndex("VisibleUserIds"); 2577 - 2578 - b.HasIndex("CreatedAt", "UserId"); 2579 - 2580 - b.HasIndex("Id", "UserHost"); 2581 - 2582 - b.HasIndex("UserId", "Id"); 2583 - 2584 - b.HasIndex(new[] { "CombinedAltText" }, "GIN_TRGM_note_combined_alt_text"); 2585 - 2586 - NpgsqlIndexBuilderExtensions.HasMethod(b.HasIndex(new[] { "CombinedAltText" }, "GIN_TRGM_note_combined_alt_text"), "gin"); 2587 - NpgsqlIndexBuilderExtensions.HasOperators(b.HasIndex(new[] { "CombinedAltText" }, "GIN_TRGM_note_combined_alt_text"), new[] { "gin_trgm_ops" }); 2588 - 2589 - b.HasIndex(new[] { "Cw" }, "GIN_TRGM_note_cw"); 2590 - 2591 - NpgsqlIndexBuilderExtensions.HasMethod(b.HasIndex(new[] { "Cw" }, "GIN_TRGM_note_cw"), "gin"); 2592 - NpgsqlIndexBuilderExtensions.HasOperators(b.HasIndex(new[] { "Cw" }, "GIN_TRGM_note_cw"), new[] { "gin_trgm_ops" }); 2593 - 2594 - b.HasIndex(new[] { "Text" }, "GIN_TRGM_note_text"); 2595 - 2596 - NpgsqlIndexBuilderExtensions.HasMethod(b.HasIndex(new[] { "Text" }, "GIN_TRGM_note_text"), "gin"); 2597 - NpgsqlIndexBuilderExtensions.HasOperators(b.HasIndex(new[] { "Text" }, "GIN_TRGM_note_text"), new[] { "gin_trgm_ops" }); 2598 - 2599 - b.HasIndex(new[] { "Emojis" }, "GIN_note_emojis"); 2600 - 2601 - NpgsqlIndexBuilderExtensions.HasMethod(b.HasIndex(new[] { "Emojis" }, "GIN_note_emojis"), "gin"); 2602 - 2603 - b.HasIndex(new[] { "Mentions" }, "GIN_note_mentions"); 2604 - 2605 - NpgsqlIndexBuilderExtensions.HasMethod(b.HasIndex(new[] { "Mentions" }, "GIN_note_mentions"), "gin"); 2606 - 2607 - b.HasIndex(new[] { "Tags" }, "GIN_note_tags"); 2608 - 2609 - NpgsqlIndexBuilderExtensions.HasMethod(b.HasIndex(new[] { "Tags" }, "GIN_note_tags"), "gin"); 2610 - 2611 - b.HasIndex(new[] { "VisibleUserIds" }, "GIN_note_visibleUserIds"); 2612 - 2613 - NpgsqlIndexBuilderExtensions.HasMethod(b.HasIndex(new[] { "VisibleUserIds" }, "GIN_note_visibleUserIds"), "gin"); 2614 - 2615 - b.ToTable("note"); 2616 - }); 2617 - 2618 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.NoteBookmark", b => 2619 - { 2620 - b.Property<string>("Id") 2621 - .HasMaxLength(32) 2622 - .HasColumnType("character varying(32)") 2623 - .HasColumnName("id"); 2624 - 2625 - b.Property<DateTime>("CreatedAt") 2626 - .HasColumnType("timestamp with time zone") 2627 - .HasColumnName("createdAt") 2628 - .HasComment("The created date of the NoteBookmark."); 2629 - 2630 - b.Property<string>("NoteId") 2631 - .IsRequired() 2632 - .HasMaxLength(32) 2633 - .HasColumnType("character varying(32)") 2634 - .HasColumnName("noteId"); 2635 - 2636 - b.Property<string>("UserId") 2637 - .IsRequired() 2638 - .HasMaxLength(32) 2639 - .HasColumnType("character varying(32)") 2640 - .HasColumnName("userId"); 2641 - 2642 - b.HasKey("Id"); 2643 - 2644 - b.HasIndex("NoteId"); 2645 - 2646 - b.HasIndex("UserId"); 2647 - 2648 - b.HasIndex("UserId", "NoteId") 2649 - .IsUnique(); 2650 - 2651 - b.ToTable("note_bookmark"); 2652 - }); 2653 - 2654 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.NoteEdit", b => 2655 - { 2656 - b.Property<string>("Id") 2657 - .HasMaxLength(32) 2658 - .HasColumnType("character varying(32)") 2659 - .HasColumnName("id"); 2660 - 2661 - b.Property<string>("Cw") 2662 - .HasMaxLength(512) 2663 - .HasColumnType("character varying(512)") 2664 - .HasColumnName("cw"); 2665 - 2666 - b.PrimitiveCollection<List<string>>("FileIds") 2667 - .IsRequired() 2668 - .ValueGeneratedOnAdd() 2669 - .HasColumnType("character varying(32)[]") 2670 - .HasColumnName("fileIds") 2671 - .HasDefaultValueSql("'{}'::character varying[]"); 2672 - 2673 - b.Property<string>("NoteId") 2674 - .IsRequired() 2675 - .HasMaxLength(32) 2676 - .HasColumnType("character varying(32)") 2677 - .HasColumnName("noteId") 2678 - .HasComment("The ID of note."); 2679 - 2680 - b.Property<string>("Text") 2681 - .HasColumnType("text") 2682 - .HasColumnName("text"); 2683 - 2684 - b.Property<DateTime>("UpdatedAt") 2685 - .HasColumnType("timestamp with time zone") 2686 - .HasColumnName("updatedAt") 2687 - .HasComment("The updated date of the Note."); 2688 - 2689 - b.HasKey("Id"); 2690 - 2691 - b.HasIndex("NoteId"); 2692 - 2693 - b.ToTable("note_edit"); 2694 - }); 2695 - 2696 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.NoteLike", b => 2697 - { 2698 - b.Property<string>("Id") 2699 - .HasMaxLength(32) 2700 - .HasColumnType("character varying(32)") 2701 - .HasColumnName("id"); 2702 - 2703 - b.Property<DateTime>("CreatedAt") 2704 - .HasColumnType("timestamp with time zone") 2705 - .HasColumnName("createdAt"); 2706 - 2707 - b.Property<string>("NoteId") 2708 - .IsRequired() 2709 - .HasMaxLength(32) 2710 - .HasColumnType("character varying(32)") 2711 - .HasColumnName("noteId"); 2712 - 2713 - b.Property<string>("UserId") 2714 - .IsRequired() 2715 - .HasMaxLength(32) 2716 - .HasColumnType("character varying(32)") 2717 - .HasColumnName("userId"); 2718 - 2719 - b.HasKey("Id"); 2720 - 2721 - b.HasIndex("NoteId"); 2722 - 2723 - b.HasIndex("UserId"); 2724 - 2725 - b.HasIndex("UserId", "NoteId") 2726 - .IsUnique(); 2727 - 2728 - b.ToTable("note_like"); 2729 - }); 2730 - 2731 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.NoteReaction", b => 2732 - { 2733 - b.Property<string>("Id") 2734 - .HasMaxLength(32) 2735 - .HasColumnType("character varying(32)") 2736 - .HasColumnName("id"); 2737 - 2738 - b.Property<DateTime>("CreatedAt") 2739 - .HasColumnType("timestamp with time zone") 2740 - .HasColumnName("createdAt") 2741 - .HasComment("The created date of the NoteReaction."); 2742 - 2743 - b.Property<string>("NoteId") 2744 - .IsRequired() 2745 - .HasMaxLength(32) 2746 - .HasColumnType("character varying(32)") 2747 - .HasColumnName("noteId"); 2748 - 2749 - b.Property<string>("Reaction") 2750 - .IsRequired() 2751 - .HasMaxLength(260) 2752 - .HasColumnType("character varying(260)") 2753 - .HasColumnName("reaction"); 2754 - 2755 - b.Property<string>("UserId") 2756 - .IsRequired() 2757 - .HasMaxLength(32) 2758 - .HasColumnType("character varying(32)") 2759 - .HasColumnName("userId"); 2760 - 2761 - b.HasKey("Id"); 2762 - 2763 - b.HasIndex("CreatedAt"); 2764 - 2765 - b.HasIndex("NoteId"); 2766 - 2767 - b.HasIndex("UserId"); 2768 - 2769 - b.HasIndex("UserId", "NoteId", "Reaction") 2770 - .IsUnique(); 2771 - 2772 - b.ToTable("note_reaction"); 2773 - }); 2774 - 2775 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.NoteThread", b => 2776 - { 2777 - b.Property<string>("Id") 2778 - .HasMaxLength(256) 2779 - .HasColumnType("character varying(256)") 2780 - .HasColumnName("id"); 2781 - 2782 - b.Property<DateTime?>("BackfilledAt") 2783 - .HasColumnType("timestamp with time zone") 2784 - .HasColumnName("backfilledAt"); 2785 - 2786 - b.Property<bool?>("IsResolvable") 2787 - .HasColumnType("boolean") 2788 - .HasColumnName("isResolvable"); 2789 - 2790 - b.Property<string>("Uri") 2791 - .HasMaxLength(512) 2792 - .HasColumnType("character varying(512)") 2793 - .HasColumnName("uri"); 2794 - 2795 - b.Property<string>("UserId") 2796 - .HasMaxLength(32) 2797 - .HasColumnType("character varying(32)") 2798 - .HasColumnName("userId"); 2799 - 2800 - b.HasKey("Id"); 2801 - 2802 - b.HasIndex("Uri") 2803 - .IsUnique(); 2804 - 2805 - b.HasIndex("UserId"); 2806 - 2807 - b.ToTable("note_thread"); 2808 - }); 2809 - 2810 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.NoteThreadMuting", b => 2811 - { 2812 - b.Property<string>("Id") 2813 - .HasMaxLength(32) 2814 - .HasColumnType("character varying(32)") 2815 - .HasColumnName("id"); 2816 - 2817 - b.Property<DateTime>("CreatedAt") 2818 - .HasColumnType("timestamp with time zone") 2819 - .HasColumnName("createdAt"); 2820 - 2821 - b.Property<string>("ThreadId") 2822 - .IsRequired() 2823 - .HasMaxLength(256) 2824 - .HasColumnType("character varying(256)") 2825 - .HasColumnName("threadId"); 2826 - 2827 - b.Property<string>("UserId") 2828 - .IsRequired() 2829 - .HasMaxLength(32) 2830 - .HasColumnType("character varying(32)") 2831 - .HasColumnName("userId"); 2832 - 2833 - b.HasKey("Id"); 2834 - 2835 - b.HasIndex("ThreadId"); 2836 - 2837 - b.HasIndex("UserId"); 2838 - 2839 - b.HasIndex("UserId", "ThreadId") 2840 - .IsUnique(); 2841 - 2842 - b.ToTable("note_thread_muting"); 2843 - }); 2844 - 2845 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.NoteUnread", b => 2846 - { 2847 - b.Property<string>("Id") 2848 - .HasMaxLength(32) 2849 - .HasColumnType("character varying(32)") 2850 - .HasColumnName("id"); 2851 - 2852 - b.Property<bool>("IsMentioned") 2853 - .HasColumnType("boolean") 2854 - .HasColumnName("isMentioned"); 2855 - 2856 - b.Property<bool>("IsSpecified") 2857 - .HasColumnType("boolean") 2858 - .HasColumnName("isSpecified"); 2859 - 2860 - b.Property<string>("NoteChannelId") 2861 - .HasMaxLength(32) 2862 - .HasColumnType("character varying(32)") 2863 - .HasColumnName("noteChannelId") 2864 - .HasComment("[Denormalized]"); 2865 - 2866 - b.Property<string>("NoteId") 2867 - .IsRequired() 2868 - .HasMaxLength(32) 2869 - .HasColumnType("character varying(32)") 2870 - .HasColumnName("noteId"); 2871 - 2872 - b.Property<string>("NoteUserId") 2873 - .IsRequired() 2874 - .HasMaxLength(32) 2875 - .HasColumnType("character varying(32)") 2876 - .HasColumnName("noteUserId") 2877 - .HasComment("[Denormalized]"); 2878 - 2879 - b.Property<string>("UserId") 2880 - .IsRequired() 2881 - .HasMaxLength(32) 2882 - .HasColumnType("character varying(32)") 2883 - .HasColumnName("userId"); 2884 - 2885 - b.HasKey("Id"); 2886 - 2887 - b.HasIndex("IsMentioned"); 2888 - 2889 - b.HasIndex("IsSpecified"); 2890 - 2891 - b.HasIndex("NoteChannelId"); 2892 - 2893 - b.HasIndex("NoteId"); 2894 - 2895 - b.HasIndex("NoteUserId"); 2896 - 2897 - b.HasIndex("UserId"); 2898 - 2899 - b.HasIndex("UserId", "NoteId") 2900 - .IsUnique(); 2901 - 2902 - b.ToTable("note_unread"); 2903 - }); 2904 - 2905 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.NoteWatching", b => 2906 - { 2907 - b.Property<string>("Id") 2908 - .HasMaxLength(32) 2909 - .HasColumnType("character varying(32)") 2910 - .HasColumnName("id"); 2911 - 2912 - b.Property<DateTime>("CreatedAt") 2913 - .HasColumnType("timestamp with time zone") 2914 - .HasColumnName("createdAt") 2915 - .HasComment("The created date of the NoteWatching."); 2916 - 2917 - b.Property<string>("NoteId") 2918 - .IsRequired() 2919 - .HasMaxLength(32) 2920 - .HasColumnType("character varying(32)") 2921 - .HasColumnName("noteId") 2922 - .HasComment("The target Note ID."); 2923 - 2924 - b.Property<string>("NoteUserId") 2925 - .IsRequired() 2926 - .HasMaxLength(32) 2927 - .HasColumnType("character varying(32)") 2928 - .HasColumnName("noteUserId") 2929 - .HasComment("[Denormalized]"); 2930 - 2931 - b.Property<string>("UserId") 2932 - .IsRequired() 2933 - .HasMaxLength(32) 2934 - .HasColumnType("character varying(32)") 2935 - .HasColumnName("userId") 2936 - .HasComment("The watcher ID."); 2937 - 2938 - b.HasKey("Id"); 2939 - 2940 - b.HasIndex("CreatedAt"); 2941 - 2942 - b.HasIndex("NoteId"); 2943 - 2944 - b.HasIndex("NoteUserId"); 2945 - 2946 - b.HasIndex("UserId"); 2947 - 2948 - b.HasIndex("UserId", "NoteId") 2949 - .IsUnique(); 2950 - 2951 - b.ToTable("note_watching"); 2952 - }); 2953 - 2954 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Notification", b => 2955 - { 2956 - b.Property<string>("Id") 2957 - .HasMaxLength(32) 2958 - .HasColumnType("character varying(32)") 2959 - .HasColumnName("id"); 2960 - 2961 - b.Property<string>("AppAccessTokenId") 2962 - .HasMaxLength(32) 2963 - .HasColumnType("character varying(32)") 2964 - .HasColumnName("appAccessTokenId"); 2965 - 2966 - b.Property<string>("BiteId") 2967 - .HasMaxLength(32) 2968 - .HasColumnType("character varying(32)") 2969 - .HasColumnName("biteId"); 2970 - 2971 - b.Property<int?>("Choice") 2972 - .HasColumnType("integer") 2973 - .HasColumnName("choice"); 2974 - 2975 - b.Property<DateTime>("CreatedAt") 2976 - .HasColumnType("timestamp with time zone") 2977 - .HasColumnName("createdAt") 2978 - .HasComment("The created date of the Notification."); 2979 - 2980 - b.Property<string>("CustomBody") 2981 - .HasMaxLength(2048) 2982 - .HasColumnType("character varying(2048)") 2983 - .HasColumnName("customBody"); 2984 - 2985 - b.Property<string>("CustomHeader") 2986 - .HasMaxLength(256) 2987 - .HasColumnType("character varying(256)") 2988 - .HasColumnName("customHeader"); 2989 - 2990 - b.Property<string>("CustomIcon") 2991 - .HasMaxLength(1024) 2992 - .HasColumnType("character varying(1024)") 2993 - .HasColumnName("customIcon"); 2994 - 2995 - b.Property<string>("FollowRequestId") 2996 - .HasMaxLength(32) 2997 - .HasColumnType("character varying(32)") 2998 - .HasColumnName("followRequestId"); 2999 - 3000 - b.Property<bool>("IsRead") 3001 - .ValueGeneratedOnAdd() 3002 - .HasColumnType("boolean") 3003 - .HasDefaultValue(false) 3004 - .HasColumnName("isRead") 3005 - .HasComment("Whether the notification was read."); 3006 - 3007 - b.Property<long>("MastoId") 3008 - .ValueGeneratedOnAdd() 3009 - .HasColumnType("bigint") 3010 - .HasColumnName("masto_id"); 3011 - 3012 - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("MastoId")); 3013 - 3014 - b.Property<string>("NoteId") 3015 - .HasMaxLength(32) 3016 - .HasColumnType("character varying(32)") 3017 - .HasColumnName("noteId"); 3018 - 3019 - b.Property<string>("NotifieeId") 3020 - .IsRequired() 3021 - .HasMaxLength(32) 3022 - .HasColumnType("character varying(32)") 3023 - .HasColumnName("notifieeId") 3024 - .HasComment("The ID of recipient user of the Notification."); 3025 - 3026 - b.Property<string>("NotifierId") 3027 - .HasMaxLength(32) 3028 - .HasColumnType("character varying(32)") 3029 - .HasColumnName("notifierId") 3030 - .HasComment("The ID of sender user of the Notification."); 3031 - 3032 - b.Property<string>("Reaction") 3033 - .HasMaxLength(128) 3034 - .HasColumnType("character varying(128)") 3035 - .HasColumnName("reaction"); 3036 - 3037 - b.Property<string>("ReportId") 3038 - .HasMaxLength(32) 3039 - .HasColumnType("character varying(32)") 3040 - .HasColumnName("reportId"); 3041 - 3042 - b.Property<Notification.NotificationType>("Type") 3043 - .HasColumnType("notification_type_enum") 3044 - .HasColumnName("type") 3045 - .HasComment("The type of the Notification."); 3046 - 3047 - b.Property<string>("UserGroupInvitationId") 3048 - .HasMaxLength(32) 3049 - .HasColumnType("character varying(32)") 3050 - .HasColumnName("userGroupInvitationId"); 3051 - 3052 - b.HasKey("Id"); 3053 - 3054 - b.HasIndex("AppAccessTokenId"); 3055 - 3056 - b.HasIndex("BiteId"); 3057 - 3058 - b.HasIndex("CreatedAt"); 3059 - 3060 - b.HasIndex("FollowRequestId"); 3061 - 3062 - b.HasIndex("IsRead"); 3063 - 3064 - b.HasIndex("MastoId"); 3065 - 3066 - b.HasIndex("NoteId"); 3067 - 3068 - b.HasIndex("NotifieeId"); 3069 - 3070 - b.HasIndex("NotifierId"); 3071 - 3072 - b.HasIndex("ReportId"); 3073 - 3074 - b.HasIndex("Type"); 3075 - 3076 - b.HasIndex("UserGroupInvitationId"); 3077 - 3078 - b.ToTable("notification"); 3079 - }); 3080 - 3081 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.OauthApp", b => 3082 - { 3083 - b.Property<string>("Id") 3084 - .HasMaxLength(32) 3085 - .HasColumnType("character varying(32)") 3086 - .HasColumnName("id"); 3087 - 3088 - b.Property<string>("ClientId") 3089 - .IsRequired() 3090 - .HasMaxLength(64) 3091 - .HasColumnType("character varying(64)") 3092 - .HasColumnName("clientId") 3093 - .HasComment("The client id of the OAuth application"); 3094 - 3095 - b.Property<string>("ClientSecret") 3096 - .IsRequired() 3097 - .HasMaxLength(64) 3098 - .HasColumnType("character varying(64)") 3099 - .HasColumnName("clientSecret") 3100 - .HasComment("The client secret of the OAuth application"); 3101 - 3102 - b.Property<DateTime>("CreatedAt") 3103 - .HasColumnType("timestamp with time zone") 3104 - .HasColumnName("createdAt") 3105 - .HasComment("The created date of the OAuth application"); 3106 - 3107 - b.Property<string>("Name") 3108 - .IsRequired() 3109 - .HasMaxLength(128) 3110 - .HasColumnType("character varying(128)") 3111 - .HasColumnName("name") 3112 - .HasComment("The name of the OAuth application"); 3113 - 3114 - b.PrimitiveCollection<List<string>>("RedirectUris") 3115 - .IsRequired() 3116 - .HasColumnType("character varying(512)[]") 3117 - .HasColumnName("redirectUris") 3118 - .HasComment("The redirect URIs of the OAuth application"); 3119 - 3120 - b.PrimitiveCollection<List<string>>("Scopes") 3121 - .IsRequired() 3122 - .HasColumnType("character varying(64)[]") 3123 - .HasColumnName("scopes") 3124 - .HasComment("The scopes requested by the OAuth application"); 3125 - 3126 - b.Property<string>("Website") 3127 - .HasMaxLength(256) 3128 - .HasColumnType("character varying(256)") 3129 - .HasColumnName("website") 3130 - .HasComment("The website of the OAuth application"); 3131 - 3132 - b.HasKey("Id"); 3133 - 3134 - b.HasIndex("ClientId") 3135 - .IsUnique(); 3136 - 3137 - b.ToTable("oauth_app"); 3138 - }); 3139 - 3140 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.OauthToken", b => 3141 - { 3142 - b.Property<string>("Id") 3143 - .HasMaxLength(32) 3144 - .HasColumnType("character varying(32)") 3145 - .HasColumnName("id"); 3146 - 3147 - b.Property<bool>("Active") 3148 - .HasColumnType("boolean") 3149 - .HasColumnName("active") 3150 - .HasComment("Whether or not the token has been activated"); 3151 - 3152 - b.Property<string>("AppId") 3153 - .IsRequired() 3154 - .HasMaxLength(32) 3155 - .HasColumnType("character varying(32)") 3156 - .HasColumnName("appId"); 3157 - 3158 - b.Property<bool>("AutoDetectQuotes") 3159 - .ValueGeneratedOnAdd() 3160 - .HasColumnType("boolean") 3161 - .HasDefaultValue(true) 3162 - .HasColumnName("autoDetectQuotes") 3163 - .HasComment("Whether the backend should automatically detect quote posts coming from this client"); 3164 - 3165 - b.Property<string>("Code") 3166 - .IsRequired() 3167 - .HasMaxLength(64) 3168 - .HasColumnType("character varying(64)") 3169 - .HasColumnName("code") 3170 - .HasComment("The auth code for the OAuth token"); 3171 - 3172 - b.Property<DateTime>("CreatedAt") 3173 - .HasColumnType("timestamp with time zone") 3174 - .HasColumnName("createdAt") 3175 - .HasComment("The created date of the OAuth token"); 3176 - 3177 - b.Property<bool>("IsPleroma") 3178 - .ValueGeneratedOnAdd() 3179 - .HasColumnType("boolean") 3180 - .HasDefaultValue(false) 3181 - .HasColumnName("isPleroma") 3182 - .HasComment("Whether Pleroma or Akkoma specific behavior should be enabled for this client"); 3183 - 3184 - b.Property<DateTime?>("LastActiveDate") 3185 - .HasColumnType("timestamp with time zone") 3186 - .HasColumnName("lastActiveDate"); 3187 - 3188 - b.Property<string>("RedirectUri") 3189 - .IsRequired() 3190 - .HasMaxLength(512) 3191 - .HasColumnType("character varying(512)") 3192 - .HasColumnName("redirectUri") 3193 - .HasComment("The redirect URI of the OAuth token"); 3194 - 3195 - b.PrimitiveCollection<List<string>>("Scopes") 3196 - .IsRequired() 3197 - .HasColumnType("character varying(64)[]") 3198 - .HasColumnName("scopes") 3199 - .HasComment("The scopes requested by the OAuth token"); 3200 - 3201 - b.Property<bool>("SupportsHtmlFormatting") 3202 - .ValueGeneratedOnAdd() 3203 - .HasColumnType("boolean") 3204 - .HasDefaultValue(true) 3205 - .HasColumnName("supportsHtmlFormatting") 3206 - .HasComment("Whether the client supports HTML inline formatting (bold, italic, strikethrough, ...)"); 3207 - 3208 - b.Property<bool>("SupportsInlineMedia") 3209 - .HasColumnType("boolean") 3210 - .HasColumnName("supportsInlineMedia"); 3211 - 3212 - b.Property<string>("Token") 3213 - .IsRequired() 3214 - .HasMaxLength(64) 3215 - .HasColumnType("character varying(64)") 3216 - .HasColumnName("token") 3217 - .HasComment("The OAuth token"); 3218 - 3219 - b.Property<string>("UserId") 3220 - .IsRequired() 3221 - .HasMaxLength(32) 3222 - .HasColumnType("character varying(32)") 3223 - .HasColumnName("userId"); 3224 - 3225 - b.HasKey("Id"); 3226 - 3227 - b.HasIndex("AppId"); 3228 - 3229 - b.HasIndex("Code"); 3230 - 3231 - b.HasIndex("Token"); 3232 - 3233 - b.HasIndex("UserId"); 3234 - 3235 - b.ToTable("oauth_token"); 3236 - }); 3237 - 3238 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Page", b => 3239 - { 3240 - b.Property<string>("Id") 3241 - .HasMaxLength(32) 3242 - .HasColumnType("character varying(32)") 3243 - .HasColumnName("id"); 3244 - 3245 - b.Property<bool>("AlignCenter") 3246 - .HasColumnType("boolean") 3247 - .HasColumnName("alignCenter"); 3248 - 3249 - b.Property<string>("Content") 3250 - .IsRequired() 3251 - .ValueGeneratedOnAdd() 3252 - .HasColumnType("jsonb") 3253 - .HasColumnName("content") 3254 - .HasDefaultValueSql("'[]'::jsonb"); 3255 - 3256 - b.Property<DateTime>("CreatedAt") 3257 - .HasColumnType("timestamp with time zone") 3258 - .HasColumnName("createdAt") 3259 - .HasComment("The created date of the Page."); 3260 - 3261 - b.Property<string>("EyeCatchingImageId") 3262 - .HasMaxLength(32) 3263 - .HasColumnType("character varying(32)") 3264 - .HasColumnName("eyeCatchingImageId"); 3265 - 3266 - b.Property<string>("Font") 3267 - .IsRequired() 3268 - .HasMaxLength(32) 3269 - .HasColumnType("character varying(32)") 3270 - .HasColumnName("font"); 3271 - 3272 - b.Property<bool>("HideTitleWhenPinned") 3273 - .ValueGeneratedOnAdd() 3274 - .HasColumnType("boolean") 3275 - .HasDefaultValue(false) 3276 - .HasColumnName("hideTitleWhenPinned"); 3277 - 3278 - b.Property<bool>("IsPublic") 3279 - .HasColumnType("boolean") 3280 - .HasColumnName("isPublic"); 3281 - 3282 - b.Property<int>("LikedCount") 3283 - .ValueGeneratedOnAdd() 3284 - .HasColumnType("integer") 3285 - .HasDefaultValue(0) 3286 - .HasColumnName("likedCount"); 3287 - 3288 - b.Property<string>("Name") 3289 - .IsRequired() 3290 - .HasMaxLength(256) 3291 - .HasColumnType("character varying(256)") 3292 - .HasColumnName("name"); 3293 - 3294 - b.Property<string>("Script") 3295 - .IsRequired() 3296 - .ValueGeneratedOnAdd() 3297 - .HasMaxLength(16384) 3298 - .HasColumnType("character varying(16384)") 3299 - .HasColumnName("script") 3300 - .HasDefaultValueSql("''::character varying"); 3301 - 3302 - b.Property<string>("Summary") 3303 - .HasMaxLength(256) 3304 - .HasColumnType("character varying(256)") 3305 - .HasColumnName("summary"); 3306 - 3307 - b.Property<string>("Title") 3308 - .IsRequired() 3309 - .HasMaxLength(256) 3310 - .HasColumnType("character varying(256)") 3311 - .HasColumnName("title"); 3312 - 3313 - b.Property<DateTime>("UpdatedAt") 3314 - .HasColumnType("timestamp with time zone") 3315 - .HasColumnName("updatedAt") 3316 - .HasComment("The updated date of the Page."); 3317 - 3318 - b.Property<string>("UserId") 3319 - .IsRequired() 3320 - .HasMaxLength(32) 3321 - .HasColumnType("character varying(32)") 3322 - .HasColumnName("userId") 3323 - .HasComment("The ID of author."); 3324 - 3325 - b.Property<string>("Variables") 3326 - .IsRequired() 3327 - .ValueGeneratedOnAdd() 3328 - .HasColumnType("jsonb") 3329 - .HasColumnName("variables") 3330 - .HasDefaultValueSql("'[]'::jsonb"); 3331 - 3332 - b.Property<Page.PageVisibility>("Visibility") 3333 - .HasColumnType("page_visibility_enum") 3334 - .HasColumnName("visibility"); 3335 - 3336 - b.PrimitiveCollection<List<string>>("VisibleUserIds") 3337 - .IsRequired() 3338 - .ValueGeneratedOnAdd() 3339 - .HasColumnType("character varying(32)[]") 3340 - .HasColumnName("visibleUserIds") 3341 - .HasDefaultValueSql("'{}'::character varying[]"); 3342 - 3343 - b.HasKey("Id"); 3344 - 3345 - b.HasIndex("CreatedAt"); 3346 - 3347 - b.HasIndex("EyeCatchingImageId"); 3348 - 3349 - b.HasIndex("Name"); 3350 - 3351 - b.HasIndex("UpdatedAt"); 3352 - 3353 - b.HasIndex("UserId"); 3354 - 3355 - b.HasIndex("VisibleUserIds"); 3356 - 3357 - b.HasIndex("UserId", "Name") 3358 - .IsUnique(); 3359 - 3360 - b.ToTable("page"); 3361 - }); 3362 - 3363 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.PageLike", b => 3364 - { 3365 - b.Property<string>("Id") 3366 - .HasMaxLength(32) 3367 - .HasColumnType("character varying(32)") 3368 - .HasColumnName("id"); 3369 - 3370 - b.Property<DateTime>("CreatedAt") 3371 - .HasColumnType("timestamp with time zone") 3372 - .HasColumnName("createdAt"); 3373 - 3374 - b.Property<string>("PageId") 3375 - .IsRequired() 3376 - .HasMaxLength(32) 3377 - .HasColumnType("character varying(32)") 3378 - .HasColumnName("pageId"); 3379 - 3380 - b.Property<string>("UserId") 3381 - .IsRequired() 3382 - .HasMaxLength(32) 3383 - .HasColumnType("character varying(32)") 3384 - .HasColumnName("userId"); 3385 - 3386 - b.HasKey("Id"); 3387 - 3388 - b.HasIndex("PageId"); 3389 - 3390 - b.HasIndex("UserId"); 3391 - 3392 - b.HasIndex("UserId", "PageId") 3393 - .IsUnique(); 3394 - 3395 - b.ToTable("page_like"); 3396 - }); 3397 - 3398 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.PasswordResetRequest", b => 3399 - { 3400 - b.Property<string>("Id") 3401 - .HasMaxLength(32) 3402 - .HasColumnType("character varying(32)") 3403 - .HasColumnName("id"); 3404 - 3405 - b.Property<DateTime>("CreatedAt") 3406 - .HasColumnType("timestamp with time zone") 3407 - .HasColumnName("createdAt"); 3408 - 3409 - b.Property<string>("Token") 3410 - .IsRequired() 3411 - .HasMaxLength(256) 3412 - .HasColumnType("character varying(256)") 3413 - .HasColumnName("token"); 3414 - 3415 - b.Property<string>("UserId") 3416 - .IsRequired() 3417 - .HasMaxLength(32) 3418 - .HasColumnType("character varying(32)") 3419 - .HasColumnName("userId"); 3420 - 3421 - b.HasKey("Id"); 3422 - 3423 - b.HasIndex("Token") 3424 - .IsUnique(); 3425 - 3426 - b.HasIndex("UserId"); 3427 - 3428 - b.ToTable("password_reset_request"); 3429 - }); 3430 - 3431 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.PluginStoreEntry", b => 3432 - { 3433 - b.Property<Guid>("Id") 3434 - .ValueGeneratedOnAdd() 3435 - .HasColumnType("uuid") 3436 - .HasColumnName("id"); 3437 - 3438 - b.Property<string>("Data") 3439 - .IsRequired() 3440 - .ValueGeneratedOnAdd() 3441 - .HasColumnType("jsonb") 3442 - .HasColumnName("data") 3443 - .HasDefaultValueSql("'{}'::jsonb") 3444 - .HasComment("The plugin-specific data object"); 3445 - 3446 - b.Property<string>("Name") 3447 - .IsRequired() 3448 - .HasColumnType("text") 3449 - .HasColumnName("name"); 3450 - 3451 - b.HasKey("Id"); 3452 - 3453 - b.HasIndex("Id"); 3454 - 3455 - b.ToTable("plugin_store"); 3456 - }); 3457 - 3458 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.PolicyConfiguration", b => 3459 - { 3460 - b.Property<string>("Name") 3461 - .HasColumnType("text") 3462 - .HasColumnName("name"); 3463 - 3464 - b.Property<string>("Data") 3465 - .IsRequired() 3466 - .ValueGeneratedOnAdd() 3467 - .HasColumnType("jsonb") 3468 - .HasColumnName("data") 3469 - .HasDefaultValueSql("'{}'::jsonb") 3470 - .HasComment("The plugin-specific data object"); 3471 - 3472 - b.HasKey("Name"); 3473 - 3474 - b.ToTable("policy_configuration"); 3475 - }); 3476 - 3477 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Poll", b => 3478 - { 3479 - b.Property<string>("NoteId") 3480 - .HasMaxLength(32) 3481 - .HasColumnType("character varying(32)") 3482 - .HasColumnName("noteId"); 3483 - 3484 - b.PrimitiveCollection<List<string>>("Choices") 3485 - .IsRequired() 3486 - .ValueGeneratedOnAdd() 3487 - .HasColumnType("character varying(256)[]") 3488 - .HasColumnName("choices") 3489 - .HasDefaultValueSql("'{}'::character varying[]"); 3490 - 3491 - b.Property<DateTime?>("ExpiresAt") 3492 - .HasColumnType("timestamp with time zone") 3493 - .HasColumnName("expiresAt"); 3494 - 3495 - b.Property<bool>("Multiple") 3496 - .HasColumnType("boolean") 3497 - .HasColumnName("multiple"); 3498 - 3499 - b.Property<Note.NoteVisibility>("NoteVisibility") 3500 - .HasColumnType("note_visibility_enum") 3501 - .HasColumnName("noteVisibility") 3502 - .HasComment("[Denormalized]"); 3503 - 3504 - b.Property<string>("UserHost") 3505 - .HasMaxLength(512) 3506 - .HasColumnType("character varying(512)") 3507 - .HasColumnName("userHost") 3508 - .HasComment("[Denormalized]"); 3509 - 3510 - b.Property<string>("UserId") 3511 - .IsRequired() 3512 - .HasMaxLength(32) 3513 - .HasColumnType("character varying(32)") 3514 - .HasColumnName("userId") 3515 - .HasComment("[Denormalized]"); 3516 - 3517 - b.Property<int?>("VotersCount") 3518 - .HasColumnType("integer") 3519 - .HasColumnName("votersCount"); 3520 - 3521 - b.PrimitiveCollection<List<int>>("Votes") 3522 - .IsRequired() 3523 - .HasColumnType("integer[]") 3524 - .HasColumnName("votes"); 3525 - 3526 - b.HasKey("NoteId"); 3527 - 3528 - b.HasIndex("UserHost"); 3529 - 3530 - b.HasIndex("UserId"); 3531 - 3532 - b.ToTable("poll"); 3533 - }); 3534 - 3535 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.PollVote", b => 3536 - { 3537 - b.Property<string>("Id") 3538 - .HasMaxLength(32) 3539 - .HasColumnType("character varying(32)") 3540 - .HasColumnName("id"); 3541 - 3542 - b.Property<int>("Choice") 3543 - .HasColumnType("integer") 3544 - .HasColumnName("choice"); 3545 - 3546 - b.Property<DateTime>("CreatedAt") 3547 - .HasColumnType("timestamp with time zone") 3548 - .HasColumnName("createdAt") 3549 - .HasComment("The created date of the PollVote."); 3550 - 3551 - b.Property<string>("NoteId") 3552 - .IsRequired() 3553 - .HasMaxLength(32) 3554 - .HasColumnType("character varying(32)") 3555 - .HasColumnName("noteId"); 3556 - 3557 - b.Property<string>("UserId") 3558 - .IsRequired() 3559 - .HasMaxLength(32) 3560 - .HasColumnType("character varying(32)") 3561 - .HasColumnName("userId"); 3562 - 3563 - b.HasKey("Id"); 3564 - 3565 - b.HasIndex("CreatedAt"); 3566 - 3567 - b.HasIndex("NoteId"); 3568 - 3569 - b.HasIndex("UserId"); 3570 - 3571 - b.HasIndex("UserId", "NoteId", "Choice") 3572 - .IsUnique(); 3573 - 3574 - b.ToTable("poll_vote"); 3575 - }); 3576 - 3577 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.PromoNote", b => 3578 - { 3579 - b.Property<string>("NoteId") 3580 - .HasMaxLength(32) 3581 - .HasColumnType("character varying(32)") 3582 - .HasColumnName("noteId"); 3583 - 3584 - b.Property<DateTime>("ExpiresAt") 3585 - .HasColumnType("timestamp with time zone") 3586 - .HasColumnName("expiresAt"); 3587 - 3588 - b.Property<string>("UserId") 3589 - .IsRequired() 3590 - .HasMaxLength(32) 3591 - .HasColumnType("character varying(32)") 3592 - .HasColumnName("userId") 3593 - .HasComment("[Denormalized]"); 3594 - 3595 - b.HasKey("NoteId"); 3596 - 3597 - b.HasIndex("UserId"); 3598 - 3599 - b.ToTable("promo_note"); 3600 - }); 3601 - 3602 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.PromoRead", b => 3603 - { 3604 - b.Property<string>("Id") 3605 - .HasMaxLength(32) 3606 - .HasColumnType("character varying(32)") 3607 - .HasColumnName("id"); 3608 - 3609 - b.Property<DateTime>("CreatedAt") 3610 - .HasColumnType("timestamp with time zone") 3611 - .HasColumnName("createdAt") 3612 - .HasComment("The created date of the PromoRead."); 3613 - 3614 - b.Property<string>("NoteId") 3615 - .IsRequired() 3616 - .HasMaxLength(32) 3617 - .HasColumnType("character varying(32)") 3618 - .HasColumnName("noteId"); 3619 - 3620 - b.Property<string>("UserId") 3621 - .IsRequired() 3622 - .HasMaxLength(32) 3623 - .HasColumnType("character varying(32)") 3624 - .HasColumnName("userId"); 3625 - 3626 - b.HasKey("Id"); 3627 - 3628 - b.HasIndex("NoteId"); 3629 - 3630 - b.HasIndex("UserId"); 3631 - 3632 - b.HasIndex("UserId", "NoteId") 3633 - .IsUnique(); 3634 - 3635 - b.ToTable("promo_read"); 3636 - }); 3637 - 3638 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.PushSubscription", b => 3639 - { 3640 - b.Property<string>("Id") 3641 - .HasMaxLength(32) 3642 - .HasColumnType("character varying(32)") 3643 - .HasColumnName("id"); 3644 - 3645 - b.Property<string>("AuthSecret") 3646 - .IsRequired() 3647 - .HasMaxLength(256) 3648 - .HasColumnType("character varying(256)") 3649 - .HasColumnName("auth"); 3650 - 3651 - b.Property<DateTime>("CreatedAt") 3652 - .HasColumnType("timestamp with time zone") 3653 - .HasColumnName("createdAt"); 3654 - 3655 - b.Property<string>("Endpoint") 3656 - .IsRequired() 3657 - .HasMaxLength(512) 3658 - .HasColumnType("character varying(512)") 3659 - .HasColumnName("endpoint"); 3660 - 3661 - b.Property<string>("OauthTokenId") 3662 - .IsRequired() 3663 - .HasMaxLength(32) 3664 - .HasColumnType("character varying(32)") 3665 - .HasColumnName("oauthTokenId"); 3666 - 3667 - b.Property<PushSubscription.PushPolicy>("Policy") 3668 - .ValueGeneratedOnAdd() 3669 - .HasColumnType("push_subscription_policy_enum") 3670 - .HasDefaultValue(PushSubscription.PushPolicy.All) 3671 - .HasColumnName("policy"); 3672 - 3673 - b.Property<string>("PublicKey") 3674 - .IsRequired() 3675 - .HasMaxLength(128) 3676 - .HasColumnType("character varying(128)") 3677 - .HasColumnName("publickey"); 3678 - 3679 - b.PrimitiveCollection<List<string>>("Types") 3680 - .IsRequired() 3681 - .ValueGeneratedOnAdd() 3682 - .HasColumnType("character varying(32)[]") 3683 - .HasColumnName("types") 3684 - .HasDefaultValueSql("'{}'::character varying[]"); 3685 - 3686 - b.Property<string>("UserId") 3687 - .IsRequired() 3688 - .HasMaxLength(32) 3689 - .HasColumnType("character varying(32)") 3690 - .HasColumnName("userId"); 3691 - 3692 - b.HasKey("Id"); 3693 - 3694 - b.HasIndex("OauthTokenId") 3695 - .IsUnique(); 3696 - 3697 - b.HasIndex("UserId"); 3698 - 3699 - b.ToTable("push_subscription"); 3700 - }); 3701 - 3702 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.RegistrationInvite", b => 3703 - { 3704 - b.Property<string>("Id") 3705 - .HasMaxLength(32) 3706 - .HasColumnType("character varying(32)") 3707 - .HasColumnName("id"); 3708 - 3709 - b.Property<string>("Code") 3710 - .IsRequired() 3711 - .HasMaxLength(64) 3712 - .HasColumnType("character varying(64)") 3713 - .HasColumnName("code"); 3714 - 3715 - b.Property<DateTime>("CreatedAt") 3716 - .HasColumnType("timestamp with time zone") 3717 - .HasColumnName("createdAt"); 3718 - 3719 - b.Property<string>("CreatedById") 3720 - .HasMaxLength(32) 3721 - .HasColumnType("character varying(32)") 3722 - .HasColumnName("createdById"); 3723 - 3724 - b.HasKey("Id"); 3725 - 3726 - b.HasIndex("Code") 3727 - .IsUnique(); 3728 - 3729 - b.HasIndex("CreatedById"); 3730 - 3731 - b.ToTable("registration_invite"); 3732 - }); 3733 - 3734 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.RegistryItem", b => 3735 - { 3736 - b.Property<string>("Id") 3737 - .HasMaxLength(32) 3738 - .HasColumnType("character varying(32)") 3739 - .HasColumnName("id"); 3740 - 3741 - b.Property<DateTime>("CreatedAt") 3742 - .HasColumnType("timestamp with time zone") 3743 - .HasColumnName("createdAt") 3744 - .HasComment("The created date of the RegistryItem."); 3745 - 3746 - b.Property<string>("Domain") 3747 - .HasMaxLength(512) 3748 - .HasColumnType("character varying(512)") 3749 - .HasColumnName("domain"); 3750 - 3751 - b.Property<string>("Key") 3752 - .IsRequired() 3753 - .HasMaxLength(1024) 3754 - .HasColumnType("character varying(1024)") 3755 - .HasColumnName("key") 3756 - .HasComment("The key of the RegistryItem."); 3757 - 3758 - b.PrimitiveCollection<List<string>>("Scope") 3759 - .IsRequired() 3760 - .ValueGeneratedOnAdd() 3761 - .HasColumnType("character varying(1024)[]") 3762 - .HasColumnName("scope") 3763 - .HasDefaultValueSql("'{}'::character varying[]"); 3764 - 3765 - b.Property<DateTime>("UpdatedAt") 3766 - .HasColumnType("timestamp with time zone") 3767 - .HasColumnName("updatedAt") 3768 - .HasComment("The updated date of the RegistryItem."); 3769 - 3770 - b.Property<string>("UserId") 3771 - .IsRequired() 3772 - .HasMaxLength(32) 3773 - .HasColumnType("character varying(32)") 3774 - .HasColumnName("userId") 3775 - .HasComment("The owner ID."); 3776 - 3777 - b.Property<string>("Value") 3778 - .ValueGeneratedOnAdd() 3779 - .HasColumnType("jsonb") 3780 - .HasColumnName("value") 3781 - .HasDefaultValueSql("'{}'::jsonb") 3782 - .HasComment("The value of the RegistryItem."); 3783 - 3784 - b.HasKey("Id"); 3785 - 3786 - b.HasIndex("Domain"); 3787 - 3788 - b.HasIndex("Scope"); 3789 - 3790 - b.HasIndex("UserId"); 3791 - 3792 - b.ToTable("registry_item"); 3793 - }); 3794 - 3795 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Relay", b => 3796 - { 3797 - b.Property<string>("Id") 3798 - .HasMaxLength(32) 3799 - .HasColumnType("character varying(32)") 3800 - .HasColumnName("id"); 3801 - 3802 - b.Property<string>("Inbox") 3803 - .IsRequired() 3804 - .HasMaxLength(512) 3805 - .HasColumnType("character varying(512)") 3806 - .HasColumnName("inbox"); 3807 - 3808 - b.Property<Relay.RelayStatus>("Status") 3809 - .HasColumnType("relay_status_enum") 3810 - .HasColumnName("status"); 3811 - 3812 - b.HasKey("Id"); 3813 - 3814 - b.HasIndex("Inbox") 3815 - .IsUnique(); 3816 - 3817 - b.ToTable("relay"); 3818 - }); 3819 - 3820 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.RenoteMuting", b => 3821 - { 3822 - b.Property<string>("Id") 3823 - .HasMaxLength(32) 3824 - .HasColumnType("character varying(32)") 3825 - .HasColumnName("id"); 3826 - 3827 - b.Property<DateTime>("CreatedAt") 3828 - .HasColumnType("timestamp with time zone") 3829 - .HasColumnName("createdAt") 3830 - .HasComment("The created date of the Muting."); 3831 - 3832 - b.Property<string>("MuteeId") 3833 - .IsRequired() 3834 - .HasMaxLength(32) 3835 - .HasColumnType("character varying(32)") 3836 - .HasColumnName("muteeId") 3837 - .HasComment("The mutee user ID."); 3838 - 3839 - b.Property<string>("MuterId") 3840 - .IsRequired() 3841 - .HasMaxLength(32) 3842 - .HasColumnType("character varying(32)") 3843 - .HasColumnName("muterId") 3844 - .HasComment("The muter user ID."); 3845 - 3846 - b.HasKey("Id"); 3847 - 3848 - b.HasIndex("CreatedAt"); 3849 - 3850 - b.HasIndex("MuteeId"); 3851 - 3852 - b.HasIndex("MuterId"); 3853 - 3854 - b.HasIndex("MuterId", "MuteeId") 3855 - .IsUnique(); 3856 - 3857 - b.ToTable("renote_muting"); 3858 - }); 3859 - 3860 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Report", b => 3861 - { 3862 - b.Property<string>("Id") 3863 - .HasMaxLength(32) 3864 - .HasColumnType("character varying(32)") 3865 - .HasColumnName("id"); 3866 - 3867 - b.Property<string>("AssigneeId") 3868 - .HasMaxLength(32) 3869 - .HasColumnType("character varying(32)") 3870 - .HasColumnName("assigneeId"); 3871 - 3872 - b.Property<string>("Comment") 3873 - .IsRequired() 3874 - .HasMaxLength(2048) 3875 - .HasColumnType("character varying(2048)") 3876 - .HasColumnName("comment"); 3877 - 3878 - b.Property<DateTime>("CreatedAt") 3879 - .HasColumnType("timestamp with time zone") 3880 - .HasColumnName("createdAt") 3881 - .HasComment("The created date of the Report."); 3882 - 3883 - b.Property<bool>("Forwarded") 3884 - .ValueGeneratedOnAdd() 3885 - .HasColumnType("boolean") 3886 - .HasDefaultValue(false) 3887 - .HasColumnName("forwarded"); 3888 - 3889 - b.Property<string>("ReporterHost") 3890 - .HasMaxLength(512) 3891 - .HasColumnType("character varying(512)") 3892 - .HasColumnName("reporterHost") 3893 - .HasComment("[Denormalized]"); 3894 - 3895 - b.Property<string>("ReporterId") 3896 - .IsRequired() 3897 - .HasMaxLength(32) 3898 - .HasColumnType("character varying(32)") 3899 - .HasColumnName("reporterId"); 3900 - 3901 - b.Property<bool>("Resolved") 3902 - .ValueGeneratedOnAdd() 3903 - .HasColumnType("boolean") 3904 - .HasDefaultValue(false) 3905 - .HasColumnName("resolved"); 3906 - 3907 - b.Property<string>("TargetUserHost") 3908 - .HasMaxLength(512) 3909 - .HasColumnType("character varying(512)") 3910 - .HasColumnName("targetUserHost") 3911 - .HasComment("[Denormalized]"); 3912 - 3913 - b.Property<string>("TargetUserId") 3914 - .IsRequired() 3915 - .HasMaxLength(32) 3916 - .HasColumnType("character varying(32)") 3917 - .HasColumnName("targetUserId"); 3918 - 3919 - b.HasKey("Id"); 3920 - 3921 - b.HasIndex("AssigneeId"); 3922 - 3923 - b.HasIndex("CreatedAt"); 3924 - 3925 - b.HasIndex("ReporterHost"); 3926 - 3927 - b.HasIndex("ReporterId"); 3928 - 3929 - b.HasIndex("Resolved"); 3930 - 3931 - b.HasIndex("TargetUserHost"); 3932 - 3933 - b.HasIndex("TargetUserId"); 3934 - 3935 - b.ToTable("report"); 3936 - }); 3937 - 3938 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Rule", b => 3939 - { 3940 - b.Property<string>("Id") 3941 - .HasMaxLength(32) 3942 - .HasColumnType("character varying(32)") 3943 - .HasColumnName("id"); 3944 - 3945 - b.Property<string>("Description") 3946 - .HasMaxLength(512) 3947 - .HasColumnType("character varying(512)") 3948 - .HasColumnName("description"); 3949 - 3950 - b.Property<int>("Order") 3951 - .HasColumnType("integer") 3952 - .HasColumnName("order"); 3953 - 3954 - b.Property<string>("Text") 3955 - .IsRequired() 3956 - .HasMaxLength(128) 3957 - .HasColumnType("character varying(128)") 3958 - .HasColumnName("text"); 3959 - 3960 - b.HasKey("Id"); 3961 - 3962 - b.ToTable("rule"); 3963 - }); 3964 - 3965 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Session", b => 3966 - { 3967 - b.Property<string>("Id") 3968 - .HasMaxLength(32) 3969 - .HasColumnType("character varying(32)") 3970 - .HasColumnName("id"); 3971 - 3972 - b.Property<bool>("Active") 3973 - .HasColumnType("boolean") 3974 - .HasColumnName("active") 3975 - .HasComment("Whether or not the token has been activated (i.e. 2fa has been confirmed)"); 3976 - 3977 - b.Property<DateTime>("CreatedAt") 3978 - .HasColumnType("timestamp with time zone") 3979 - .HasColumnName("createdAt") 3980 - .HasComment("The created date of the OAuth token"); 3981 - 3982 - b.Property<DateTime?>("LastActiveDate") 3983 - .HasColumnType("timestamp with time zone") 3984 - .HasColumnName("lastActiveDate"); 3985 - 3986 - b.Property<string>("MastodonTokenId") 3987 - .HasMaxLength(32) 3988 - .HasColumnType("character varying(32)") 3989 - .HasColumnName("mastodonTokenId"); 3990 - 3991 - b.Property<string>("Token") 3992 - .IsRequired() 3993 - .HasMaxLength(64) 3994 - .HasColumnType("character varying(64)") 3995 - .HasColumnName("token") 3996 - .HasComment("The authorization token"); 3997 - 3998 - b.Property<string>("UserId") 3999 - .IsRequired() 4000 - .HasMaxLength(32) 4001 - .HasColumnType("character varying(32)") 4002 - .HasColumnName("userId"); 4003 - 4004 - b.HasKey("Id"); 4005 - 4006 - b.HasIndex("MastodonTokenId") 4007 - .IsUnique(); 4008 - 4009 - b.HasIndex("Token"); 4010 - 4011 - b.HasIndex("UserId"); 4012 - 4013 - b.ToTable("session"); 4014 - }); 4015 - 4016 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.SwSubscription", b => 4017 - { 4018 - b.Property<string>("Id") 4019 - .HasMaxLength(32) 4020 - .HasColumnType("character varying(32)") 4021 - .HasColumnName("id"); 4022 - 4023 - b.Property<string>("AuthSecret") 4024 - .IsRequired() 4025 - .HasMaxLength(256) 4026 - .HasColumnType("character varying(256)") 4027 - .HasColumnName("auth"); 4028 - 4029 - b.Property<DateTime>("CreatedAt") 4030 - .HasColumnType("timestamp with time zone") 4031 - .HasColumnName("createdAt"); 4032 - 4033 - b.Property<string>("Endpoint") 4034 - .IsRequired() 4035 - .HasMaxLength(512) 4036 - .HasColumnType("character varying(512)") 4037 - .HasColumnName("endpoint"); 4038 - 4039 - b.Property<string>("PublicKey") 4040 - .IsRequired() 4041 - .HasMaxLength(128) 4042 - .HasColumnType("character varying(128)") 4043 - .HasColumnName("publickey"); 4044 - 4045 - b.Property<bool>("SendReadMessage") 4046 - .ValueGeneratedOnAdd() 4047 - .HasColumnType("boolean") 4048 - .HasDefaultValue(false) 4049 - .HasColumnName("sendReadMessage"); 4050 - 4051 - b.Property<string>("UserId") 4052 - .IsRequired() 4053 - .HasMaxLength(32) 4054 - .HasColumnType("character varying(32)") 4055 - .HasColumnName("userId"); 4056 - 4057 - b.HasKey("Id"); 4058 - 4059 - b.HasIndex("UserId"); 4060 - 4061 - b.ToTable("sw_subscription"); 4062 - }); 4063 - 4064 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UsedUsername", b => 4065 - { 4066 - b.Property<string>("Username") 4067 - .HasMaxLength(128) 4068 - .HasColumnType("character varying(128)") 4069 - .HasColumnName("username"); 4070 - 4071 - b.Property<DateTime>("CreatedAt") 4072 - .HasColumnType("timestamp with time zone") 4073 - .HasColumnName("createdAt"); 4074 - 4075 - b.HasKey("Username"); 4076 - 4077 - b.ToTable("used_username"); 4078 - }); 4079 - 4080 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.User", b => 4081 - { 4082 - b.Property<string>("Id") 4083 - .HasMaxLength(32) 4084 - .HasColumnType("character varying(32)") 4085 - .HasColumnName("id"); 4086 - 4087 - b.PrimitiveCollection<List<string>>("AlsoKnownAs") 4088 - .HasColumnType("text[]") 4089 - .HasColumnName("alsoKnownAs") 4090 - .HasComment("URIs the user is known as too"); 4091 - 4092 - b.Property<string>("AvatarBlurhash") 4093 - .HasMaxLength(128) 4094 - .HasColumnType("character varying(128)") 4095 - .HasColumnName("avatarBlurhash") 4096 - .HasComment("The blurhash of the avatar DriveFile"); 4097 - 4098 - b.Property<string>("AvatarId") 4099 - .HasMaxLength(32) 4100 - .HasColumnType("character varying(32)") 4101 - .HasColumnName("avatarId") 4102 - .HasComment("The ID of avatar DriveFile."); 4103 - 4104 - b.Property<string>("BannerBlurhash") 4105 - .HasMaxLength(128) 4106 - .HasColumnType("character varying(128)") 4107 - .HasColumnName("bannerBlurhash") 4108 - .HasComment("The blurhash of the banner DriveFile"); 4109 - 4110 - b.Property<string>("BannerId") 4111 - .HasMaxLength(32) 4112 - .HasColumnType("character varying(32)") 4113 - .HasColumnName("bannerId") 4114 - .HasComment("The ID of banner DriveFile."); 4115 - 4116 - b.Property<DateTime>("CreatedAt") 4117 - .HasColumnType("timestamp with time zone") 4118 - .HasColumnName("createdAt") 4119 - .HasComment("The created date of the User."); 4120 - 4121 - b.Property<string>("DisplayName") 4122 - .HasMaxLength(128) 4123 - .HasColumnType("character varying(128)") 4124 - .HasColumnName("name") 4125 - .HasComment("The name of the User."); 4126 - 4127 - b.Property<int?>("DriveCapacityOverrideMb") 4128 - .HasColumnType("integer") 4129 - .HasColumnName("driveCapacityOverrideMb") 4130 - .HasComment("Overrides user drive capacity limit"); 4131 - 4132 - b.PrimitiveCollection<List<string>>("Emojis") 4133 - .IsRequired() 4134 - .ValueGeneratedOnAdd() 4135 - .HasColumnType("character varying(128)[]") 4136 - .HasColumnName("emojis") 4137 - .HasDefaultValueSql("'{}'::character varying[]"); 4138 - 4139 - b.Property<string>("Featured") 4140 - .HasMaxLength(512) 4141 - .HasColumnType("character varying(512)") 4142 - .HasColumnName("featured") 4143 - .HasComment("The featured URL of the User. It will be null if the origin of the user is local."); 4144 - 4145 - b.Property<int>("FollowersCount") 4146 - .ValueGeneratedOnAdd() 4147 - .HasColumnType("integer") 4148 - .HasDefaultValue(0) 4149 - .HasColumnName("followersCount") 4150 - .HasComment("The count of followers."); 4151 - 4152 - b.Property<string>("FollowersUri") 4153 - .HasMaxLength(512) 4154 - .HasColumnType("character varying(512)") 4155 - .HasColumnName("followersUri") 4156 - .HasComment("The URI of the user Follower Collection. It will be null if the origin of the user is local."); 4157 - 4158 - b.Property<int>("FollowingCount") 4159 - .ValueGeneratedOnAdd() 4160 - .HasColumnType("integer") 4161 - .HasDefaultValue(0) 4162 - .HasColumnName("followingCount") 4163 - .HasComment("The count of following."); 4164 - 4165 - b.Property<string>("Host") 4166 - .HasMaxLength(512) 4167 - .HasColumnType("character varying(512)") 4168 - .HasColumnName("host") 4169 - .HasComment("The host of the User. It will be null if the origin of the user is local."); 4170 - 4171 - b.Property<string>("Inbox") 4172 - .HasMaxLength(512) 4173 - .HasColumnType("character varying(512)") 4174 - .HasColumnName("inbox") 4175 - .HasComment("The inbox URL of the User. It will be null if the origin of the user is local."); 4176 - 4177 - b.Property<bool>("IsAdmin") 4178 - .ValueGeneratedOnAdd() 4179 - .HasColumnType("boolean") 4180 - .HasDefaultValue(false) 4181 - .HasColumnName("isAdmin") 4182 - .HasComment("Whether the User is the admin."); 4183 - 4184 - b.Property<bool>("IsBot") 4185 - .ValueGeneratedOnAdd() 4186 - .HasColumnType("boolean") 4187 - .HasDefaultValue(false) 4188 - .HasColumnName("isBot") 4189 - .HasComment("Whether the User is a bot."); 4190 - 4191 - b.Property<bool>("IsCat") 4192 - .ValueGeneratedOnAdd() 4193 - .HasColumnType("boolean") 4194 - .HasDefaultValue(false) 4195 - .HasColumnName("isCat") 4196 - .HasComment("Whether the User is a cat."); 4197 - 4198 - b.Property<bool>("IsDeleted") 4199 - .ValueGeneratedOnAdd() 4200 - .HasColumnType("boolean") 4201 - .HasDefaultValue(false) 4202 - .HasColumnName("isDeleted") 4203 - .HasComment("Whether the User is deleted."); 4204 - 4205 - b.Property<bool>("IsExplorable") 4206 - .ValueGeneratedOnAdd() 4207 - .HasColumnType("boolean") 4208 - .HasDefaultValue(true) 4209 - .HasColumnName("isExplorable") 4210 - .HasComment("Whether the User is explorable."); 4211 - 4212 - b.Property<bool>("IsLocked") 4213 - .ValueGeneratedOnAdd() 4214 - .HasColumnType("boolean") 4215 - .HasDefaultValue(false) 4216 - .HasColumnName("isLocked") 4217 - .HasComment("Whether the User is locked."); 4218 - 4219 - b.Property<bool>("IsModerator") 4220 - .ValueGeneratedOnAdd() 4221 - .HasColumnType("boolean") 4222 - .HasDefaultValue(false) 4223 - .HasColumnName("isModerator") 4224 - .HasComment("Whether the User is a moderator."); 4225 - 4226 - b.Property<bool>("IsRelayActor") 4227 - .HasColumnType("boolean") 4228 - .HasColumnName("isRelayActor"); 4229 - 4230 - b.Property<bool>("IsSilenced") 4231 - .ValueGeneratedOnAdd() 4232 - .HasColumnType("boolean") 4233 - .HasDefaultValue(false) 4234 - .HasColumnName("isSilenced") 4235 - .HasComment("Whether the User is silenced."); 4236 - 4237 - b.Property<bool>("IsSuspended") 4238 - .ValueGeneratedOnAdd() 4239 - .HasColumnType("boolean") 4240 - .HasDefaultValue(false) 4241 - .HasColumnName("isSuspended") 4242 - .HasComment("Whether the User is suspended."); 4243 - 4244 - b.Property<bool>("IsSystemUser") 4245 - .HasColumnType("boolean") 4246 - .HasColumnName("isSystem"); 4247 - 4248 - b.Property<DateTime?>("LastActiveDate") 4249 - .HasColumnType("timestamp with time zone") 4250 - .HasColumnName("lastActiveDate"); 4251 - 4252 - b.Property<DateTime?>("LastFetchedAt") 4253 - .HasColumnType("timestamp with time zone") 4254 - .HasColumnName("lastFetchedAt"); 4255 - 4256 - b.Property<DateTime?>("LastNoteAt") 4257 - .HasColumnType("timestamp with time zone") 4258 - .HasColumnName("lastNoteAt"); 4259 - 4260 - b.Property<string>("MovedToUri") 4261 - .HasMaxLength(512) 4262 - .HasColumnType("character varying(512)") 4263 - .HasColumnName("movedToUri") 4264 - .HasComment("The URI of the new account of the User"); 4265 - 4266 - b.Property<int>("NotesCount") 4267 - .ValueGeneratedOnAdd() 4268 - .HasColumnType("integer") 4269 - .HasDefaultValue(0) 4270 - .HasColumnName("notesCount") 4271 - .HasComment("The count of notes."); 4272 - 4273 - b.Property<string>("Outbox") 4274 - .HasMaxLength(512) 4275 - .HasColumnType("character varying(512)") 4276 - .HasColumnName("outbox"); 4277 - 4278 - b.Property<DateTime?>("OutboxFetchedAt") 4279 - .HasColumnType("timestamp with time zone") 4280 - .HasColumnName("outboxFetchedAt"); 4281 - 4282 - b.Property<string>("SharedInbox") 4283 - .HasMaxLength(512) 4284 - .HasColumnType("character varying(512)") 4285 - .HasColumnName("sharedInbox") 4286 - .HasComment("The sharedInbox URL of the User. It will be null if the origin of the user is local."); 4287 - 4288 - b.Property<bool>("SpeakAsCat") 4289 - .ValueGeneratedOnAdd() 4290 - .HasColumnType("boolean") 4291 - .HasDefaultValue(true) 4292 - .HasColumnName("speakAsCat") 4293 - .HasComment("Whether to speak as a cat if isCat."); 4294 - 4295 - b.Property<bool>("SplitDomainResolved") 4296 - .ValueGeneratedOnAdd() 4297 - .HasColumnType("boolean") 4298 - .HasDefaultValue(false) 4299 - .HasColumnName("splitDomainResolved"); 4300 - 4301 - b.PrimitiveCollection<List<string>>("Tags") 4302 - .IsRequired() 4303 - .ValueGeneratedOnAdd() 4304 - .HasColumnType("character varying(128)[]") 4305 - .HasColumnName("tags") 4306 - .HasDefaultValueSql("'{}'::character varying[]"); 4307 - 4308 - b.Property<DateTime?>("UpdatedAt") 4309 - .HasColumnType("timestamp with time zone") 4310 - .HasColumnName("updatedAt") 4311 - .HasComment("The updated date of the User."); 4312 - 4313 - b.Property<string>("Uri") 4314 - .HasMaxLength(512) 4315 - .HasColumnType("character varying(512)") 4316 - .HasColumnName("uri") 4317 - .HasComment("The URI of the User. It will be null if the origin of the user is local."); 4318 - 4319 - b.Property<string>("Username") 4320 - .IsRequired() 4321 - .HasMaxLength(128) 4322 - .HasColumnType("character varying(128)") 4323 - .HasColumnName("username") 4324 - .HasComment("The username of the User."); 4325 - 4326 - b.Property<string>("UsernameLower") 4327 - .IsRequired() 4328 - .HasMaxLength(128) 4329 - .HasColumnType("character varying(128)") 4330 - .HasColumnName("usernameLower") 4331 - .HasComment("The username (lowercased) of the User."); 4332 - 4333 - b.HasKey("Id"); 4334 - 4335 - b.HasIndex("AvatarId") 4336 - .IsUnique(); 4337 - 4338 - b.HasIndex("BannerId") 4339 - .IsUnique(); 4340 - 4341 - b.HasIndex("CreatedAt"); 4342 - 4343 - b.HasIndex("Host"); 4344 - 4345 - b.HasIndex("IsAdmin"); 4346 - 4347 - b.HasIndex("IsExplorable"); 4348 - 4349 - b.HasIndex("IsModerator"); 4350 - 4351 - b.HasIndex("IsSuspended"); 4352 - 4353 - b.HasIndex("LastActiveDate"); 4354 - 4355 - b.HasIndex("Tags"); 4356 - 4357 - b.HasIndex("UpdatedAt"); 4358 - 4359 - b.HasIndex("Uri"); 4360 - 4361 - b.HasIndex("UsernameLower"); 4362 - 4363 - b.HasIndex("UsernameLower", "Host") 4364 - .IsUnique(); 4365 - 4366 - b.ToTable("user"); 4367 - }); 4368 - 4369 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserGroup", b => 4370 - { 4371 - b.Property<string>("Id") 4372 - .HasMaxLength(32) 4373 - .HasColumnType("character varying(32)") 4374 - .HasColumnName("id"); 4375 - 4376 - b.Property<DateTime>("CreatedAt") 4377 - .HasColumnType("timestamp with time zone") 4378 - .HasColumnName("createdAt") 4379 - .HasComment("The created date of the UserGroup."); 4380 - 4381 - b.Property<bool>("IsPrivate") 4382 - .ValueGeneratedOnAdd() 4383 - .HasColumnType("boolean") 4384 - .HasDefaultValue(false) 4385 - .HasColumnName("isPrivate"); 4386 - 4387 - b.Property<string>("Name") 4388 - .IsRequired() 4389 - .HasMaxLength(256) 4390 - .HasColumnType("character varying(256)") 4391 - .HasColumnName("name"); 4392 - 4393 - b.Property<string>("UserId") 4394 - .IsRequired() 4395 - .HasMaxLength(32) 4396 - .HasColumnType("character varying(32)") 4397 - .HasColumnName("userId") 4398 - .HasComment("The ID of owner."); 4399 - 4400 - b.HasKey("Id"); 4401 - 4402 - b.HasIndex("CreatedAt"); 4403 - 4404 - b.HasIndex("UserId"); 4405 - 4406 - b.ToTable("user_group"); 4407 - }); 4408 - 4409 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserGroupInvitation", b => 4410 - { 4411 - b.Property<string>("Id") 4412 - .HasMaxLength(32) 4413 - .HasColumnType("character varying(32)") 4414 - .HasColumnName("id"); 4415 - 4416 - b.Property<DateTime>("CreatedAt") 4417 - .HasColumnType("timestamp with time zone") 4418 - .HasColumnName("createdAt") 4419 - .HasComment("The created date of the UserGroupInvitation."); 4420 - 4421 - b.Property<string>("UserGroupId") 4422 - .IsRequired() 4423 - .HasMaxLength(32) 4424 - .HasColumnType("character varying(32)") 4425 - .HasColumnName("userGroupId") 4426 - .HasComment("The group ID."); 4427 - 4428 - b.Property<string>("UserId") 4429 - .IsRequired() 4430 - .HasMaxLength(32) 4431 - .HasColumnType("character varying(32)") 4432 - .HasColumnName("userId") 4433 - .HasComment("The user ID."); 4434 - 4435 - b.HasKey("Id"); 4436 - 4437 - b.HasIndex("UserGroupId"); 4438 - 4439 - b.HasIndex("UserId"); 4440 - 4441 - b.HasIndex("UserId", "UserGroupId") 4442 - .IsUnique(); 4443 - 4444 - b.ToTable("user_group_invitation"); 4445 - }); 4446 - 4447 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserGroupMember", b => 4448 - { 4449 - b.Property<string>("Id") 4450 - .HasMaxLength(32) 4451 - .HasColumnType("character varying(32)") 4452 - .HasColumnName("id"); 4453 - 4454 - b.Property<DateTime>("CreatedAt") 4455 - .HasColumnType("timestamp with time zone") 4456 - .HasColumnName("createdAt") 4457 - .HasComment("The created date of the UserGroupMember."); 4458 - 4459 - b.Property<string>("UserGroupId") 4460 - .IsRequired() 4461 - .HasMaxLength(32) 4462 - .HasColumnType("character varying(32)") 4463 - .HasColumnName("userGroupId") 4464 - .HasComment("The group ID."); 4465 - 4466 - b.Property<string>("UserId") 4467 - .IsRequired() 4468 - .HasMaxLength(32) 4469 - .HasColumnType("character varying(32)") 4470 - .HasColumnName("userId") 4471 - .HasComment("The user ID."); 4472 - 4473 - b.HasKey("Id"); 4474 - 4475 - b.HasIndex("UserGroupId"); 4476 - 4477 - b.HasIndex("UserId"); 4478 - 4479 - b.HasIndex("UserId", "UserGroupId") 4480 - .IsUnique(); 4481 - 4482 - b.ToTable("user_group_member"); 4483 - }); 4484 - 4485 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserKeypair", b => 4486 - { 4487 - b.Property<string>("UserId") 4488 - .HasMaxLength(32) 4489 - .HasColumnType("character varying(32)") 4490 - .HasColumnName("userId"); 4491 - 4492 - b.Property<string>("PrivateKey") 4493 - .IsRequired() 4494 - .HasMaxLength(4096) 4495 - .HasColumnType("character varying(4096)") 4496 - .HasColumnName("privateKey"); 4497 - 4498 - b.Property<string>("PublicKey") 4499 - .IsRequired() 4500 - .HasMaxLength(4096) 4501 - .HasColumnType("character varying(4096)") 4502 - .HasColumnName("publicKey"); 4503 - 4504 - b.HasKey("UserId"); 4505 - 4506 - b.ToTable("user_keypair"); 4507 - }); 4508 - 4509 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserList", b => 4510 - { 4511 - b.Property<string>("Id") 4512 - .HasMaxLength(32) 4513 - .HasColumnType("character varying(32)") 4514 - .HasColumnName("id"); 4515 - 4516 - b.Property<DateTime>("CreatedAt") 4517 - .HasColumnType("timestamp with time zone") 4518 - .HasColumnName("createdAt") 4519 - .HasComment("The created date of the UserList."); 4520 - 4521 - b.Property<bool>("HideFromHomeTl") 4522 - .ValueGeneratedOnAdd() 4523 - .HasColumnType("boolean") 4524 - .HasDefaultValue(false) 4525 - .HasColumnName("hideFromHomeTl") 4526 - .HasComment("Whether posts from list members should be hidden from the home timeline."); 4527 - 4528 - b.Property<string>("Name") 4529 - .IsRequired() 4530 - .HasMaxLength(128) 4531 - .HasColumnType("character varying(128)") 4532 - .HasColumnName("name") 4533 - .HasComment("The name of the UserList."); 4534 - 4535 - b.Property<string>("UserId") 4536 - .IsRequired() 4537 - .HasMaxLength(32) 4538 - .HasColumnType("character varying(32)") 4539 - .HasColumnName("userId") 4540 - .HasComment("The owner ID."); 4541 - 4542 - b.HasKey("Id"); 4543 - 4544 - b.HasIndex("UserId"); 4545 - 4546 - b.ToTable("user_list"); 4547 - }); 4548 - 4549 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserListMember", b => 4550 - { 4551 - b.Property<string>("Id") 4552 - .HasMaxLength(32) 4553 - .HasColumnType("character varying(32)") 4554 - .HasColumnName("id"); 4555 - 4556 - b.Property<DateTime>("CreatedAt") 4557 - .HasColumnType("timestamp with time zone") 4558 - .HasColumnName("createdAt") 4559 - .HasComment("The created date of the UserListMember."); 4560 - 4561 - b.Property<string>("UserId") 4562 - .IsRequired() 4563 - .HasMaxLength(32) 4564 - .HasColumnType("character varying(32)") 4565 - .HasColumnName("userId") 4566 - .HasComment("The user ID."); 4567 - 4568 - b.Property<string>("UserListId") 4569 - .IsRequired() 4570 - .HasMaxLength(32) 4571 - .HasColumnType("character varying(32)") 4572 - .HasColumnName("userListId") 4573 - .HasComment("The list ID."); 4574 - 4575 - b.HasKey("Id"); 4576 - 4577 - b.HasIndex("UserId"); 4578 - 4579 - b.HasIndex("UserListId"); 4580 - 4581 - b.HasIndex("UserId", "UserListId") 4582 - .IsUnique(); 4583 - 4584 - b.ToTable("user_list_member"); 4585 - }); 4586 - 4587 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserNotePin", b => 4588 - { 4589 - b.Property<string>("Id") 4590 - .HasMaxLength(32) 4591 - .HasColumnType("character varying(32)") 4592 - .HasColumnName("id"); 4593 - 4594 - b.Property<DateTime>("CreatedAt") 4595 - .HasColumnType("timestamp with time zone") 4596 - .HasColumnName("createdAt") 4597 - .HasComment("The created date of the UserNotePins."); 4598 - 4599 - b.Property<string>("NoteId") 4600 - .IsRequired() 4601 - .HasMaxLength(32) 4602 - .HasColumnType("character varying(32)") 4603 - .HasColumnName("noteId"); 4604 - 4605 - b.Property<string>("UserId") 4606 - .IsRequired() 4607 - .HasMaxLength(32) 4608 - .HasColumnType("character varying(32)") 4609 - .HasColumnName("userId"); 4610 - 4611 - b.HasKey("Id"); 4612 - 4613 - b.HasIndex("NoteId"); 4614 - 4615 - b.HasIndex("UserId"); 4616 - 4617 - b.HasIndex("UserId", "NoteId") 4618 - .IsUnique(); 4619 - 4620 - b.ToTable("user_note_pin"); 4621 - }); 4622 - 4623 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserPending", b => 4624 - { 4625 - b.Property<string>("Id") 4626 - .HasMaxLength(32) 4627 - .HasColumnType("character varying(32)") 4628 - .HasColumnName("id"); 4629 - 4630 - b.Property<string>("Code") 4631 - .IsRequired() 4632 - .HasMaxLength(128) 4633 - .HasColumnType("character varying(128)") 4634 - .HasColumnName("code"); 4635 - 4636 - b.Property<DateTime>("CreatedAt") 4637 - .HasColumnType("timestamp with time zone") 4638 - .HasColumnName("createdAt"); 4639 - 4640 - b.Property<string>("Email") 4641 - .IsRequired() 4642 - .HasMaxLength(128) 4643 - .HasColumnType("character varying(128)") 4644 - .HasColumnName("email"); 4645 - 4646 - b.Property<string>("Password") 4647 - .IsRequired() 4648 - .HasMaxLength(128) 4649 - .HasColumnType("character varying(128)") 4650 - .HasColumnName("password"); 4651 - 4652 - b.Property<string>("Username") 4653 - .IsRequired() 4654 - .HasMaxLength(128) 4655 - .HasColumnType("character varying(128)") 4656 - .HasColumnName("username"); 4657 - 4658 - b.HasKey("Id"); 4659 - 4660 - b.HasIndex("Code") 4661 - .IsUnique(); 4662 - 4663 - b.ToTable("user_pending"); 4664 - }); 4665 - 4666 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserProfile", b => 4667 - { 4668 - b.Property<string>("UserId") 4669 - .HasMaxLength(32) 4670 - .HasColumnType("character varying(32)") 4671 - .HasColumnName("userId"); 4672 - 4673 - b.Property<string>("Birthday") 4674 - .HasMaxLength(10) 4675 - .HasColumnType("character(10)") 4676 - .HasColumnName("birthday") 4677 - .IsFixedLength() 4678 - .HasComment("The birthday (YYYY-MM-DD) of the User."); 4679 - 4680 - b.Property<string>("Description") 4681 - .HasMaxLength(2048) 4682 - .HasColumnType("character varying(2048)") 4683 - .HasColumnName("description") 4684 - .HasComment("The description (bio) of the User."); 4685 - 4686 - b.Property<UserProfile.UserProfileFFVisibility>("FFVisibility") 4687 - .ValueGeneratedOnAdd() 4688 - .HasColumnType("user_profile_ffvisibility_enum") 4689 - .HasDefaultValue(UserProfile.UserProfileFFVisibility.Public) 4690 - .HasColumnName("ffVisibility"); 4691 - 4692 - b.Property<UserProfile.Field[]>("Fields") 4693 - .IsRequired() 4694 - .ValueGeneratedOnAdd() 4695 - .HasColumnType("jsonb") 4696 - .HasColumnName("fields") 4697 - .HasDefaultValueSql("'[]'::jsonb"); 4698 - 4699 - b.Property<string>("Lang") 4700 - .HasMaxLength(32) 4701 - .HasColumnType("character varying(32)") 4702 - .HasColumnName("lang"); 4703 - 4704 - b.Property<string>("Location") 4705 - .HasMaxLength(128) 4706 - .HasColumnType("character varying(128)") 4707 - .HasColumnName("location") 4708 - .HasComment("The location of the User."); 4709 - 4710 - b.Property<List<Note.MentionedUser>>("Mentions") 4711 - .IsRequired() 4712 - .ValueGeneratedOnAdd() 4713 - .HasColumnType("jsonb") 4714 - .HasColumnName("mentions") 4715 - .HasDefaultValueSql("'[]'::jsonb"); 4716 - 4717 - b.Property<bool>("MentionsResolved") 4718 - .ValueGeneratedOnAdd() 4719 - .HasColumnType("boolean") 4720 - .HasDefaultValue(false) 4721 - .HasColumnName("mentionsResolved"); 4722 - 4723 - b.Property<string>("ModerationNote") 4724 - .IsRequired() 4725 - .ValueGeneratedOnAdd() 4726 - .HasMaxLength(8192) 4727 - .HasColumnType("character varying(8192)") 4728 - .HasColumnName("moderationNote") 4729 - .HasDefaultValueSql("''::character varying"); 4730 - 4731 - b.Property<string>("PinnedPageId") 4732 - .HasMaxLength(32) 4733 - .HasColumnType("character varying(32)") 4734 - .HasColumnName("pinnedPageId"); 4735 - 4736 - b.Property<Dictionary<string, string>>("Pronouns") 4737 - .HasColumnType("jsonb") 4738 - .HasColumnName("pronouns"); 4739 - 4740 - b.Property<string>("Url") 4741 - .HasMaxLength(512) 4742 - .HasColumnType("character varying(512)") 4743 - .HasColumnName("url") 4744 - .HasComment("Remote URL of the user."); 4745 - 4746 - b.Property<string>("UserHost") 4747 - .HasMaxLength(512) 4748 - .HasColumnType("character varying(512)") 4749 - .HasColumnName("userHost") 4750 - .HasComment("[Denormalized]"); 4751 - 4752 - b.HasKey("UserId"); 4753 - 4754 - b.HasIndex("PinnedPageId") 4755 - .IsUnique(); 4756 - 4757 - b.HasIndex("UserHost"); 4758 - 4759 - b.ToTable("user_profile"); 4760 - }); 4761 - 4762 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserPublickey", b => 4763 - { 4764 - b.Property<string>("UserId") 4765 - .HasMaxLength(32) 4766 - .HasColumnType("character varying(32)") 4767 - .HasColumnName("userId"); 4768 - 4769 - b.Property<string>("KeyId") 4770 - .IsRequired() 4771 - .HasMaxLength(512) 4772 - .HasColumnType("character varying(512)") 4773 - .HasColumnName("keyId"); 4774 - 4775 - b.Property<string>("KeyPem") 4776 - .IsRequired() 4777 - .HasMaxLength(4096) 4778 - .HasColumnType("character varying(4096)") 4779 - .HasColumnName("keyPem"); 4780 - 4781 - b.HasKey("UserId"); 4782 - 4783 - b.HasIndex("KeyId") 4784 - .IsUnique(); 4785 - 4786 - b.ToTable("user_publickey"); 4787 - }); 4788 - 4789 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserSecurityKey", b => 4790 - { 4791 - b.Property<string>("Id") 4792 - .HasColumnType("character varying") 4793 - .HasColumnName("id") 4794 - .HasComment("Variable-length id given to navigator.credentials.get()"); 4795 - 4796 - b.Property<DateTime>("LastUsed") 4797 - .HasColumnType("timestamp with time zone") 4798 - .HasColumnName("lastUsed") 4799 - .HasComment("The date of the last time the UserSecurityKey was successfully validated."); 4800 - 4801 - b.Property<string>("Name") 4802 - .IsRequired() 4803 - .HasMaxLength(30) 4804 - .HasColumnType("character varying(30)") 4805 - .HasColumnName("name") 4806 - .HasComment("User-defined name for this key"); 4807 - 4808 - b.Property<string>("PublicKey") 4809 - .IsRequired() 4810 - .HasColumnType("character varying") 4811 - .HasColumnName("publicKey") 4812 - .HasComment("Variable-length public key used to verify attestations (hex-encoded)."); 4813 - 4814 - b.Property<string>("UserId") 4815 - .IsRequired() 4816 - .HasMaxLength(32) 4817 - .HasColumnType("character varying(32)") 4818 - .HasColumnName("userId"); 4819 - 4820 - b.HasKey("Id"); 4821 - 4822 - b.HasIndex("PublicKey"); 4823 - 4824 - b.HasIndex("UserId"); 4825 - 4826 - b.ToTable("user_security_key"); 4827 - }); 4828 - 4829 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserSettings", b => 4830 - { 4831 - b.Property<string>("UserId") 4832 - .HasMaxLength(32) 4833 - .HasColumnType("character varying(32)") 4834 - .HasColumnName("userId"); 4835 - 4836 - b.Property<bool>("AlwaysMarkSensitive") 4837 - .ValueGeneratedOnAdd() 4838 - .HasColumnType("boolean") 4839 - .HasDefaultValue(false) 4840 - .HasColumnName("alwaysMarkNsfw"); 4841 - 4842 - b.Property<bool>("AutoAcceptFollowed") 4843 - .ValueGeneratedOnAdd() 4844 - .HasColumnType("boolean") 4845 - .HasDefaultValue(false) 4846 - .HasColumnName("autoAcceptFollowed"); 4847 - 4848 - b.Property<Note.NoteVisibility>("DefaultNoteVisibility") 4849 - .ValueGeneratedOnAdd() 4850 - .HasColumnType("note_visibility_enum") 4851 - .HasDefaultValue(Note.NoteVisibility.Public) 4852 - .HasColumnName("defaultNoteVisibility"); 4853 - 4854 - b.Property<Note.NoteVisibility>("DefaultRenoteVisibility") 4855 - .ValueGeneratedOnAdd() 4856 - .HasColumnType("note_visibility_enum") 4857 - .HasDefaultValue(Note.NoteVisibility.Public) 4858 - .HasColumnName("defaultRenoteVisibility"); 4859 - 4860 - b.Property<string>("Email") 4861 - .HasMaxLength(128) 4862 - .HasColumnType("character varying(128)") 4863 - .HasColumnName("email"); 4864 - 4865 - b.Property<bool>("EmailVerified") 4866 - .ValueGeneratedOnAdd() 4867 - .HasColumnType("boolean") 4868 - .HasDefaultValue(false) 4869 - .HasColumnName("emailVerified"); 4870 - 4871 - b.Property<bool>("FilterInaccessible") 4872 - .ValueGeneratedOnAdd() 4873 - .HasColumnType("boolean") 4874 - .HasDefaultValue(false) 4875 - .HasColumnName("filterInaccessible"); 4876 - 4877 - b.Property<string>("Password") 4878 - .HasMaxLength(128) 4879 - .HasColumnType("character varying(128)") 4880 - .HasColumnName("password"); 4881 - 4882 - b.Property<bool>("PrivateMode") 4883 - .ValueGeneratedOnAdd() 4884 - .HasColumnType("boolean") 4885 - .HasDefaultValue(false) 4886 - .HasColumnName("privateMode"); 4887 - 4888 - b.Property<bool>("TwoFactorEnabled") 4889 - .ValueGeneratedOnAdd() 4890 - .HasColumnType("boolean") 4891 - .HasDefaultValue(false) 4892 - .HasColumnName("twoFactorEnabled"); 4893 - 4894 - b.Property<string>("TwoFactorSecret") 4895 - .HasMaxLength(128) 4896 - .HasColumnType("character varying(128)") 4897 - .HasColumnName("twoFactorSecret"); 4898 - 4899 - b.Property<string>("TwoFactorTempSecret") 4900 - .HasMaxLength(128) 4901 - .HasColumnType("character varying(128)") 4902 - .HasColumnName("twoFactorTempSecret"); 4903 - 4904 - b.HasKey("UserId"); 4905 - 4906 - b.ToTable("user_settings"); 4907 - }); 4908 - 4909 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Webhook", b => 4910 - { 4911 - b.Property<string>("Id") 4912 - .HasMaxLength(32) 4913 - .HasColumnType("character varying(32)") 4914 - .HasColumnName("id"); 4915 - 4916 - b.Property<bool>("Active") 4917 - .ValueGeneratedOnAdd() 4918 - .HasColumnType("boolean") 4919 - .HasDefaultValue(true) 4920 - .HasColumnName("active"); 4921 - 4922 - b.Property<DateTime>("CreatedAt") 4923 - .HasColumnType("timestamp with time zone") 4924 - .HasColumnName("createdAt") 4925 - .HasComment("The created date of the Antenna."); 4926 - 4927 - b.Property<DateTime?>("LatestSentAt") 4928 - .HasColumnType("timestamp with time zone") 4929 - .HasColumnName("latestSentAt"); 4930 - 4931 - b.Property<int?>("LatestStatus") 4932 - .HasColumnType("integer") 4933 - .HasColumnName("latestStatus"); 4934 - 4935 - b.Property<string>("Name") 4936 - .IsRequired() 4937 - .HasMaxLength(128) 4938 - .HasColumnType("character varying(128)") 4939 - .HasColumnName("name") 4940 - .HasComment("The name of the Antenna."); 4941 - 4942 - b.PrimitiveCollection<List<string>>("On") 4943 - .IsRequired() 4944 - .ValueGeneratedOnAdd() 4945 - .HasColumnType("character varying(128)[]") 4946 - .HasColumnName("on") 4947 - .HasDefaultValueSql("'{}'::character varying[]"); 4948 - 4949 - b.Property<string>("Secret") 4950 - .IsRequired() 4951 - .HasMaxLength(1024) 4952 - .HasColumnType("character varying(1024)") 4953 - .HasColumnName("secret"); 4954 - 4955 - b.Property<string>("Url") 4956 - .IsRequired() 4957 - .HasMaxLength(1024) 4958 - .HasColumnType("character varying(1024)") 4959 - .HasColumnName("url"); 4960 - 4961 - b.Property<string>("UserId") 4962 - .IsRequired() 4963 - .HasMaxLength(32) 4964 - .HasColumnType("character varying(32)") 4965 - .HasColumnName("userId") 4966 - .HasComment("The owner ID."); 4967 - 4968 - b.HasKey("Id"); 4969 - 4970 - b.HasIndex("Active"); 4971 - 4972 - b.HasIndex("On"); 4973 - 4974 - b.HasIndex("UserId"); 4975 - 4976 - b.ToTable("webhook"); 4977 - }); 4978 - 4979 - modelBuilder.Entity("Microsoft.AspNetCore.DataProtection.EntityFrameworkCore.DataProtectionKey", b => 4980 - { 4981 - b.Property<int>("Id") 4982 - .ValueGeneratedOnAdd() 4983 - .HasColumnType("integer"); 4984 - 4985 - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id")); 4986 - 4987 - b.Property<string>("FriendlyName") 4988 - .HasColumnType("text"); 4989 - 4990 - b.Property<string>("Xml") 4991 - .HasColumnType("text"); 4992 - 4993 - b.HasKey("Id"); 4994 - 4995 - b.ToTable("data_protection_keys", (string)null); 4996 - }); 4997 - 4998 - modelBuilder.Entity("reported_note", b => 4999 - { 5000 - b.Property<string>("note_id") 5001 - .HasColumnType("character varying(32)"); 5002 - 5003 - b.Property<string>("report_id") 5004 - .HasColumnType("character varying(32)"); 5005 - 5006 - b.HasKey("note_id", "report_id"); 5007 - 5008 - b.HasIndex("report_id"); 5009 - 5010 - b.ToTable("reported_note"); 5011 - }); 5012 - 5013 - modelBuilder.Entity("reported_rule", b => 5014 - { 5015 - b.Property<string>("report_id") 5016 - .HasColumnType("character varying(32)"); 5017 - 5018 - b.Property<string>("rule_id") 5019 - .HasColumnType("character varying(32)"); 5020 - 5021 - b.HasKey("report_id", "rule_id"); 5022 - 5023 - b.HasIndex("rule_id"); 5024 - 5025 - b.ToTable("reported_rule"); 5026 - }); 5027 - 5028 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.AnnouncementRead", b => 5029 - { 5030 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Announcement", "Announcement") 5031 - .WithMany("AnnouncementReads") 5032 - .HasForeignKey("AnnouncementId") 5033 - .OnDelete(DeleteBehavior.Cascade) 5034 - .IsRequired(); 5035 - 5036 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5037 - .WithMany("AnnouncementReads") 5038 - .HasForeignKey("UserId") 5039 - .OnDelete(DeleteBehavior.Cascade) 5040 - .IsRequired(); 5041 - 5042 - b.Navigation("Announcement"); 5043 - 5044 - b.Navigation("User"); 5045 - }); 5046 - 5047 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Antenna", b => 5048 - { 5049 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.UserGroupMember", "UserGroupMember") 5050 - .WithMany("Antennas") 5051 - .HasForeignKey("UserGroupMemberId") 5052 - .OnDelete(DeleteBehavior.Cascade); 5053 - 5054 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5055 - .WithMany("Antennas") 5056 - .HasForeignKey("UserId") 5057 - .OnDelete(DeleteBehavior.Cascade) 5058 - .IsRequired(); 5059 - 5060 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.UserList", "UserList") 5061 - .WithMany("Antennas") 5062 - .HasForeignKey("UserListId") 5063 - .OnDelete(DeleteBehavior.Cascade); 5064 - 5065 - b.Navigation("User"); 5066 - 5067 - b.Navigation("UserGroupMember"); 5068 - 5069 - b.Navigation("UserList"); 5070 - }); 5071 - 5072 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.AttestationChallenge", b => 5073 - { 5074 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5075 - .WithMany("AttestationChallenges") 5076 - .HasForeignKey("UserId") 5077 - .OnDelete(DeleteBehavior.Cascade) 5078 - .IsRequired(); 5079 - 5080 - b.Navigation("User"); 5081 - }); 5082 - 5083 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Bite", b => 5084 - { 5085 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Bite", "TargetBite") 5086 - .WithMany() 5087 - .HasForeignKey("TargetBiteId") 5088 - .OnDelete(DeleteBehavior.Cascade); 5089 - 5090 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "TargetNote") 5091 - .WithMany() 5092 - .HasForeignKey("TargetNoteId") 5093 - .OnDelete(DeleteBehavior.Cascade); 5094 - 5095 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "TargetUser") 5096 - .WithMany() 5097 - .HasForeignKey("TargetUserId") 5098 - .OnDelete(DeleteBehavior.Cascade); 5099 - 5100 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5101 - .WithMany() 5102 - .HasForeignKey("UserId") 5103 - .OnDelete(DeleteBehavior.Cascade) 5104 - .IsRequired(); 5105 - 5106 - b.Navigation("TargetBite"); 5107 - 5108 - b.Navigation("TargetNote"); 5109 - 5110 - b.Navigation("TargetUser"); 5111 - 5112 - b.Navigation("User"); 5113 - }); 5114 - 5115 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Blocking", b => 5116 - { 5117 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "Blockee") 5118 - .WithMany("IncomingBlocks") 5119 - .HasForeignKey("BlockeeId") 5120 - .OnDelete(DeleteBehavior.Cascade) 5121 - .IsRequired(); 5122 - 5123 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "Blocker") 5124 - .WithMany("OutgoingBlocks") 5125 - .HasForeignKey("BlockerId") 5126 - .OnDelete(DeleteBehavior.Cascade) 5127 - .IsRequired(); 5128 - 5129 - b.Navigation("Blockee"); 5130 - 5131 - b.Navigation("Blocker"); 5132 - }); 5133 - 5134 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Channel", b => 5135 - { 5136 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.DriveFile", "Banner") 5137 - .WithMany("Channels") 5138 - .HasForeignKey("BannerId") 5139 - .OnDelete(DeleteBehavior.SetNull); 5140 - 5141 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5142 - .WithMany("Channels") 5143 - .HasForeignKey("UserId") 5144 - .OnDelete(DeleteBehavior.SetNull); 5145 - 5146 - b.Navigation("Banner"); 5147 - 5148 - b.Navigation("User"); 5149 - }); 5150 - 5151 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.ChannelFollowing", b => 5152 - { 5153 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Channel", "Followee") 5154 - .WithMany("ChannelFollowings") 5155 - .HasForeignKey("FolloweeId") 5156 - .OnDelete(DeleteBehavior.Cascade) 5157 - .IsRequired(); 5158 - 5159 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "Follower") 5160 - .WithMany("ChannelFollowings") 5161 - .HasForeignKey("FollowerId") 5162 - .OnDelete(DeleteBehavior.Cascade) 5163 - .IsRequired(); 5164 - 5165 - b.Navigation("Followee"); 5166 - 5167 - b.Navigation("Follower"); 5168 - }); 5169 - 5170 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.ChannelNotePin", b => 5171 - { 5172 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Channel", "Channel") 5173 - .WithMany("ChannelNotePins") 5174 - .HasForeignKey("ChannelId") 5175 - .OnDelete(DeleteBehavior.Cascade) 5176 - .IsRequired(); 5177 - 5178 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "Note") 5179 - .WithMany("ChannelNotePins") 5180 - .HasForeignKey("NoteId") 5181 - .OnDelete(DeleteBehavior.Cascade) 5182 - .IsRequired(); 5183 - 5184 - b.Navigation("Channel"); 5185 - 5186 - b.Navigation("Note"); 5187 - }); 5188 - 5189 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Clip", b => 5190 - { 5191 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5192 - .WithMany("Clips") 5193 - .HasForeignKey("UserId") 5194 - .OnDelete(DeleteBehavior.Cascade) 5195 - .IsRequired(); 5196 - 5197 - b.Navigation("User"); 5198 - }); 5199 - 5200 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.ClipNote", b => 5201 - { 5202 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Clip", "Clip") 5203 - .WithMany("ClipNotes") 5204 - .HasForeignKey("ClipId") 5205 - .OnDelete(DeleteBehavior.Cascade) 5206 - .IsRequired(); 5207 - 5208 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "Note") 5209 - .WithMany("ClipNotes") 5210 - .HasForeignKey("NoteId") 5211 - .OnDelete(DeleteBehavior.Cascade) 5212 - .IsRequired(); 5213 - 5214 - b.Navigation("Clip"); 5215 - 5216 - b.Navigation("Note"); 5217 - }); 5218 - 5219 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.DriveFile", b => 5220 - { 5221 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.DriveFolder", "Folder") 5222 - .WithMany("DriveFiles") 5223 - .HasForeignKey("FolderId") 5224 - .OnDelete(DeleteBehavior.SetNull); 5225 - 5226 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5227 - .WithMany("DriveFiles") 5228 - .HasForeignKey("UserId") 5229 - .OnDelete(DeleteBehavior.SetNull); 5230 - 5231 - b.Navigation("Folder"); 5232 - 5233 - b.Navigation("User"); 5234 - }); 5235 - 5236 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.DriveFolder", b => 5237 - { 5238 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.DriveFolder", "Parent") 5239 - .WithMany("InverseParent") 5240 - .HasForeignKey("ParentId") 5241 - .OnDelete(DeleteBehavior.SetNull); 5242 - 5243 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5244 - .WithMany("DriveFolders") 5245 - .HasForeignKey("UserId") 5246 - .OnDelete(DeleteBehavior.Cascade); 5247 - 5248 - b.Navigation("Parent"); 5249 - 5250 - b.Navigation("User"); 5251 - }); 5252 - 5253 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Filter", b => 5254 - { 5255 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5256 - .WithMany("Filters") 5257 - .HasForeignKey("user_id") 5258 - .OnDelete(DeleteBehavior.Cascade); 5259 - 5260 - b.Navigation("User"); 5261 - }); 5262 - 5263 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.FollowRequest", b => 5264 - { 5265 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "Followee") 5266 - .WithMany("IncomingFollowRequests") 5267 - .HasForeignKey("FolloweeId") 5268 - .OnDelete(DeleteBehavior.Cascade) 5269 - .IsRequired(); 5270 - 5271 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "Follower") 5272 - .WithMany("OutgoingFollowRequests") 5273 - .HasForeignKey("FollowerId") 5274 - .OnDelete(DeleteBehavior.Cascade) 5275 - .IsRequired(); 5276 - 5277 - b.Navigation("Followee"); 5278 - 5279 - b.Navigation("Follower"); 5280 - }); 5281 - 5282 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Following", b => 5283 - { 5284 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "Followee") 5285 - .WithMany("IncomingFollowRelationships") 5286 - .HasForeignKey("FolloweeId") 5287 - .OnDelete(DeleteBehavior.Cascade) 5288 - .IsRequired(); 5289 - 5290 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "Follower") 5291 - .WithMany("OutgoingFollowRelationships") 5292 - .HasForeignKey("FollowerId") 5293 - .OnDelete(DeleteBehavior.Cascade) 5294 - .IsRequired(); 5295 - 5296 - b.Navigation("Followee"); 5297 - 5298 - b.Navigation("Follower"); 5299 - }); 5300 - 5301 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.GalleryLike", b => 5302 - { 5303 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.GalleryPost", "Post") 5304 - .WithMany("GalleryLikes") 5305 - .HasForeignKey("PostId") 5306 - .OnDelete(DeleteBehavior.Cascade) 5307 - .IsRequired(); 5308 - 5309 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5310 - .WithMany("GalleryLikes") 5311 - .HasForeignKey("UserId") 5312 - .OnDelete(DeleteBehavior.Cascade) 5313 - .IsRequired(); 5314 - 5315 - b.Navigation("Post"); 5316 - 5317 - b.Navigation("User"); 5318 - }); 5319 - 5320 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.GalleryPost", b => 5321 - { 5322 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5323 - .WithMany("GalleryPosts") 5324 - .HasForeignKey("UserId") 5325 - .OnDelete(DeleteBehavior.Cascade) 5326 - .IsRequired(); 5327 - 5328 - b.Navigation("User"); 5329 - }); 5330 - 5331 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Marker", b => 5332 - { 5333 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5334 - .WithMany("Markers") 5335 - .HasForeignKey("UserId") 5336 - .OnDelete(DeleteBehavior.Cascade) 5337 - .IsRequired(); 5338 - 5339 - b.Navigation("User"); 5340 - }); 5341 - 5342 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.MessagingMessage", b => 5343 - { 5344 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.DriveFile", "File") 5345 - .WithMany("MessagingMessages") 5346 - .HasForeignKey("FileId") 5347 - .OnDelete(DeleteBehavior.Cascade); 5348 - 5349 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.UserGroup", "Group") 5350 - .WithMany("MessagingMessages") 5351 - .HasForeignKey("GroupId") 5352 - .OnDelete(DeleteBehavior.Cascade); 5353 - 5354 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "Recipient") 5355 - .WithMany("MessagingMessageRecipients") 5356 - .HasForeignKey("RecipientId") 5357 - .OnDelete(DeleteBehavior.Cascade); 5358 - 5359 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5360 - .WithMany("MessagingMessageUsers") 5361 - .HasForeignKey("UserId") 5362 - .OnDelete(DeleteBehavior.Cascade) 5363 - .IsRequired(); 5364 - 5365 - b.Navigation("File"); 5366 - 5367 - b.Navigation("Group"); 5368 - 5369 - b.Navigation("Recipient"); 5370 - 5371 - b.Navigation("User"); 5372 - }); 5373 - 5374 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.ModerationLog", b => 5375 - { 5376 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5377 - .WithMany("ModerationLogs") 5378 - .HasForeignKey("UserId") 5379 - .OnDelete(DeleteBehavior.Cascade) 5380 - .IsRequired(); 5381 - 5382 - b.Navigation("User"); 5383 - }); 5384 - 5385 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Muting", b => 5386 - { 5387 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "Mutee") 5388 - .WithMany("IncomingMutes") 5389 - .HasForeignKey("MuteeId") 5390 - .OnDelete(DeleteBehavior.Cascade) 5391 - .IsRequired(); 5392 - 5393 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "Muter") 5394 - .WithMany("OutgoingMutes") 5395 - .HasForeignKey("MuterId") 5396 - .OnDelete(DeleteBehavior.Cascade) 5397 - .IsRequired(); 5398 - 5399 - b.Navigation("Mutee"); 5400 - 5401 - b.Navigation("Muter"); 5402 - }); 5403 - 5404 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Note", b => 5405 - { 5406 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Channel", "Channel") 5407 - .WithMany("Notes") 5408 - .HasForeignKey("ChannelId") 5409 - .OnDelete(DeleteBehavior.Cascade); 5410 - 5411 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "Renote") 5412 - .WithMany("InverseRenote") 5413 - .HasForeignKey("RenoteId") 5414 - .OnDelete(DeleteBehavior.Cascade); 5415 - 5416 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "Reply") 5417 - .WithMany("InverseReply") 5418 - .HasForeignKey("ReplyId") 5419 - .OnDelete(DeleteBehavior.Cascade); 5420 - 5421 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.NoteThread", "Thread") 5422 - .WithMany("Notes") 5423 - .HasForeignKey("ThreadId") 5424 - .OnDelete(DeleteBehavior.Cascade) 5425 - .IsRequired(); 5426 - 5427 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5428 - .WithMany("Notes") 5429 - .HasForeignKey("UserId") 5430 - .OnDelete(DeleteBehavior.Cascade) 5431 - .IsRequired(); 5432 - 5433 - b.Navigation("Channel"); 5434 - 5435 - b.Navigation("Renote"); 5436 - 5437 - b.Navigation("Reply"); 5438 - 5439 - b.Navigation("Thread"); 5440 - 5441 - b.Navigation("User"); 5442 - }); 5443 - 5444 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.NoteBookmark", b => 5445 - { 5446 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "Note") 5447 - .WithMany("NoteBookmarks") 5448 - .HasForeignKey("NoteId") 5449 - .OnDelete(DeleteBehavior.Cascade) 5450 - .IsRequired(); 5451 - 5452 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5453 - .WithMany("NoteBookmarks") 5454 - .HasForeignKey("UserId") 5455 - .OnDelete(DeleteBehavior.Cascade) 5456 - .IsRequired(); 5457 - 5458 - b.Navigation("Note"); 5459 - 5460 - b.Navigation("User"); 5461 - }); 5462 - 5463 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.NoteEdit", b => 5464 - { 5465 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "Note") 5466 - .WithMany("NoteEdits") 5467 - .HasForeignKey("NoteId") 5468 - .OnDelete(DeleteBehavior.Cascade) 5469 - .IsRequired(); 5470 - 5471 - b.Navigation("Note"); 5472 - }); 5473 - 5474 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.NoteLike", b => 5475 - { 5476 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "Note") 5477 - .WithMany("NoteLikes") 5478 - .HasForeignKey("NoteId") 5479 - .OnDelete(DeleteBehavior.Cascade) 5480 - .IsRequired(); 5481 - 5482 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5483 - .WithMany("NoteLikes") 5484 - .HasForeignKey("UserId") 5485 - .OnDelete(DeleteBehavior.Cascade) 5486 - .IsRequired(); 5487 - 5488 - b.Navigation("Note"); 5489 - 5490 - b.Navigation("User"); 5491 - }); 5492 - 5493 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.NoteReaction", b => 5494 - { 5495 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "Note") 5496 - .WithMany("NoteReactions") 5497 - .HasForeignKey("NoteId") 5498 - .OnDelete(DeleteBehavior.Cascade) 5499 - .IsRequired(); 5500 - 5501 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5502 - .WithMany("NoteReactions") 5503 - .HasForeignKey("UserId") 5504 - .OnDelete(DeleteBehavior.Cascade) 5505 - .IsRequired(); 5506 - 5507 - b.Navigation("Note"); 5508 - 5509 - b.Navigation("User"); 5510 - }); 5511 - 5512 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.NoteThread", b => 5513 - { 5514 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5515 - .WithMany() 5516 - .HasForeignKey("UserId") 5517 - .OnDelete(DeleteBehavior.SetNull); 5518 - 5519 - b.Navigation("User"); 5520 - }); 5521 - 5522 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.NoteThreadMuting", b => 5523 - { 5524 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.NoteThread", "Thread") 5525 - .WithMany("NoteThreadMutings") 5526 - .HasForeignKey("ThreadId") 5527 - .OnDelete(DeleteBehavior.Cascade) 5528 - .IsRequired(); 5529 - 5530 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5531 - .WithMany("NoteThreadMutings") 5532 - .HasForeignKey("UserId") 5533 - .OnDelete(DeleteBehavior.Cascade) 5534 - .IsRequired(); 5535 - 5536 - b.Navigation("Thread"); 5537 - 5538 - b.Navigation("User"); 5539 - }); 5540 - 5541 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.NoteUnread", b => 5542 - { 5543 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "Note") 5544 - .WithMany("NoteUnreads") 5545 - .HasForeignKey("NoteId") 5546 - .OnDelete(DeleteBehavior.Cascade) 5547 - .IsRequired(); 5548 - 5549 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5550 - .WithMany("NoteUnreads") 5551 - .HasForeignKey("UserId") 5552 - .OnDelete(DeleteBehavior.Cascade) 5553 - .IsRequired(); 5554 - 5555 - b.Navigation("Note"); 5556 - 5557 - b.Navigation("User"); 5558 - }); 5559 - 5560 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.NoteWatching", b => 5561 - { 5562 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "Note") 5563 - .WithMany("NoteWatchings") 5564 - .HasForeignKey("NoteId") 5565 - .OnDelete(DeleteBehavior.Cascade) 5566 - .IsRequired(); 5567 - 5568 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5569 - .WithMany("NoteWatchings") 5570 - .HasForeignKey("UserId") 5571 - .OnDelete(DeleteBehavior.Cascade) 5572 - .IsRequired(); 5573 - 5574 - b.Navigation("Note"); 5575 - 5576 - b.Navigation("User"); 5577 - }); 5578 - 5579 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Notification", b => 5580 - { 5581 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Bite", "Bite") 5582 - .WithMany() 5583 - .HasForeignKey("BiteId"); 5584 - 5585 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.FollowRequest", "FollowRequest") 5586 - .WithMany("Notifications") 5587 - .HasForeignKey("FollowRequestId") 5588 - .OnDelete(DeleteBehavior.Cascade); 5589 - 5590 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "Note") 5591 - .WithMany("Notifications") 5592 - .HasForeignKey("NoteId") 5593 - .OnDelete(DeleteBehavior.Cascade); 5594 - 5595 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "Notifiee") 5596 - .WithMany("NotificationNotifiees") 5597 - .HasForeignKey("NotifieeId") 5598 - .OnDelete(DeleteBehavior.Cascade) 5599 - .IsRequired(); 5600 - 5601 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "Notifier") 5602 - .WithMany("NotificationNotifiers") 5603 - .HasForeignKey("NotifierId") 5604 - .OnDelete(DeleteBehavior.Cascade); 5605 - 5606 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Report", "Report") 5607 - .WithMany() 5608 - .HasForeignKey("ReportId"); 5609 - 5610 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.UserGroupInvitation", "UserGroupInvitation") 5611 - .WithMany("Notifications") 5612 - .HasForeignKey("UserGroupInvitationId") 5613 - .OnDelete(DeleteBehavior.Cascade); 5614 - 5615 - b.Navigation("Bite"); 5616 - 5617 - b.Navigation("FollowRequest"); 5618 - 5619 - b.Navigation("Note"); 5620 - 5621 - b.Navigation("Notifiee"); 5622 - 5623 - b.Navigation("Notifier"); 5624 - 5625 - b.Navigation("Report"); 5626 - 5627 - b.Navigation("UserGroupInvitation"); 5628 - }); 5629 - 5630 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.OauthToken", b => 5631 - { 5632 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.OauthApp", "App") 5633 - .WithMany("OauthTokens") 5634 - .HasForeignKey("AppId") 5635 - .OnDelete(DeleteBehavior.Cascade) 5636 - .IsRequired(); 5637 - 5638 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5639 - .WithMany("OauthTokens") 5640 - .HasForeignKey("UserId") 5641 - .OnDelete(DeleteBehavior.Cascade) 5642 - .IsRequired(); 5643 - 5644 - b.Navigation("App"); 5645 - 5646 - b.Navigation("User"); 5647 - }); 5648 - 5649 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Page", b => 5650 - { 5651 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.DriveFile", "EyeCatchingImage") 5652 - .WithMany("Pages") 5653 - .HasForeignKey("EyeCatchingImageId") 5654 - .OnDelete(DeleteBehavior.Cascade); 5655 - 5656 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5657 - .WithMany("Pages") 5658 - .HasForeignKey("UserId") 5659 - .OnDelete(DeleteBehavior.Cascade) 5660 - .IsRequired(); 5661 - 5662 - b.Navigation("EyeCatchingImage"); 5663 - 5664 - b.Navigation("User"); 5665 - }); 5666 - 5667 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.PageLike", b => 5668 - { 5669 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Page", "Page") 5670 - .WithMany("PageLikes") 5671 - .HasForeignKey("PageId") 5672 - .OnDelete(DeleteBehavior.Cascade) 5673 - .IsRequired(); 5674 - 5675 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5676 - .WithMany("PageLikes") 5677 - .HasForeignKey("UserId") 5678 - .OnDelete(DeleteBehavior.Cascade) 5679 - .IsRequired(); 5680 - 5681 - b.Navigation("Page"); 5682 - 5683 - b.Navigation("User"); 5684 - }); 5685 - 5686 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.PasswordResetRequest", b => 5687 - { 5688 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5689 - .WithMany("PasswordResetRequests") 5690 - .HasForeignKey("UserId") 5691 - .OnDelete(DeleteBehavior.Cascade) 5692 - .IsRequired(); 5693 - 5694 - b.Navigation("User"); 5695 - }); 5696 - 5697 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Poll", b => 5698 - { 5699 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "Note") 5700 - .WithOne("Poll") 5701 - .HasForeignKey("Iceshrimp.Backend.Core.Database.Tables.Poll", "NoteId") 5702 - .OnDelete(DeleteBehavior.Cascade) 5703 - .IsRequired(); 5704 - 5705 - b.Navigation("Note"); 5706 - }); 5707 - 5708 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.PollVote", b => 5709 - { 5710 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "Note") 5711 - .WithMany("PollVotes") 5712 - .HasForeignKey("NoteId") 5713 - .OnDelete(DeleteBehavior.Cascade) 5714 - .IsRequired(); 5715 - 5716 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5717 - .WithMany("PollVotes") 5718 - .HasForeignKey("UserId") 5719 - .OnDelete(DeleteBehavior.Cascade) 5720 - .IsRequired(); 5721 - 5722 - b.Navigation("Note"); 5723 - 5724 - b.Navigation("User"); 5725 - }); 5726 - 5727 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.PromoNote", b => 5728 - { 5729 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "Note") 5730 - .WithOne("PromoNote") 5731 - .HasForeignKey("Iceshrimp.Backend.Core.Database.Tables.PromoNote", "NoteId") 5732 - .OnDelete(DeleteBehavior.Cascade) 5733 - .IsRequired(); 5734 - 5735 - b.Navigation("Note"); 5736 - }); 5737 - 5738 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.PromoRead", b => 5739 - { 5740 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "Note") 5741 - .WithMany("PromoReads") 5742 - .HasForeignKey("NoteId") 5743 - .OnDelete(DeleteBehavior.Cascade) 5744 - .IsRequired(); 5745 - 5746 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5747 - .WithMany("PromoReads") 5748 - .HasForeignKey("UserId") 5749 - .OnDelete(DeleteBehavior.Cascade) 5750 - .IsRequired(); 5751 - 5752 - b.Navigation("Note"); 5753 - 5754 - b.Navigation("User"); 5755 - }); 5756 - 5757 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.PushSubscription", b => 5758 - { 5759 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.OauthToken", "OauthToken") 5760 - .WithOne("PushSubscription") 5761 - .HasForeignKey("Iceshrimp.Backend.Core.Database.Tables.PushSubscription", "OauthTokenId") 5762 - .OnDelete(DeleteBehavior.Cascade) 5763 - .IsRequired(); 5764 - 5765 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5766 - .WithMany("PushSubscriptions") 5767 - .HasForeignKey("UserId") 5768 - .OnDelete(DeleteBehavior.Cascade) 5769 - .IsRequired(); 5770 - 5771 - b.Navigation("OauthToken"); 5772 - 5773 - b.Navigation("User"); 5774 - }); 5775 - 5776 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.RegistrationInvite", b => 5777 - { 5778 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "CreatedBy") 5779 - .WithMany() 5780 - .HasForeignKey("CreatedById"); 5781 - 5782 - b.Navigation("CreatedBy"); 5783 - }); 5784 - 5785 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.RegistryItem", b => 5786 - { 5787 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5788 - .WithMany("RegistryItems") 5789 - .HasForeignKey("UserId") 5790 - .OnDelete(DeleteBehavior.Cascade) 5791 - .IsRequired(); 5792 - 5793 - b.Navigation("User"); 5794 - }); 5795 - 5796 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.RenoteMuting", b => 5797 - { 5798 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "Mutee") 5799 - .WithMany("RenoteMutingMutees") 5800 - .HasForeignKey("MuteeId") 5801 - .OnDelete(DeleteBehavior.Cascade) 5802 - .IsRequired(); 5803 - 5804 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "Muter") 5805 - .WithMany("RenoteMutingMuters") 5806 - .HasForeignKey("MuterId") 5807 - .OnDelete(DeleteBehavior.Cascade) 5808 - .IsRequired(); 5809 - 5810 - b.Navigation("Mutee"); 5811 - 5812 - b.Navigation("Muter"); 5813 - }); 5814 - 5815 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Report", b => 5816 - { 5817 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "Assignee") 5818 - .WithMany("AbuseUserReportAssignees") 5819 - .HasForeignKey("AssigneeId") 5820 - .OnDelete(DeleteBehavior.SetNull); 5821 - 5822 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "Reporter") 5823 - .WithMany("AbuseUserReportReporters") 5824 - .HasForeignKey("ReporterId") 5825 - .OnDelete(DeleteBehavior.Cascade) 5826 - .IsRequired(); 5827 - 5828 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "TargetUser") 5829 - .WithMany("AbuseUserReportTargetUsers") 5830 - .HasForeignKey("TargetUserId") 5831 - .OnDelete(DeleteBehavior.Cascade) 5832 - .IsRequired(); 5833 - 5834 - b.Navigation("Assignee"); 5835 - 5836 - b.Navigation("Reporter"); 5837 - 5838 - b.Navigation("TargetUser"); 5839 - }); 5840 - 5841 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Session", b => 5842 - { 5843 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.OauthToken", "MastodonToken") 5844 - .WithOne("WebSession") 5845 - .HasForeignKey("Iceshrimp.Backend.Core.Database.Tables.Session", "MastodonTokenId") 5846 - .OnDelete(DeleteBehavior.Cascade); 5847 - 5848 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5849 - .WithMany("Sessions") 5850 - .HasForeignKey("UserId") 5851 - .OnDelete(DeleteBehavior.Cascade) 5852 - .IsRequired(); 5853 - 5854 - b.Navigation("MastodonToken"); 5855 - 5856 - b.Navigation("User"); 5857 - }); 5858 - 5859 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.SwSubscription", b => 5860 - { 5861 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5862 - .WithMany("SwSubscriptions") 5863 - .HasForeignKey("UserId") 5864 - .OnDelete(DeleteBehavior.Cascade) 5865 - .IsRequired(); 5866 - 5867 - b.Navigation("User"); 5868 - }); 5869 - 5870 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.User", b => 5871 - { 5872 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.DriveFile", "Avatar") 5873 - .WithOne("UserAvatar") 5874 - .HasForeignKey("Iceshrimp.Backend.Core.Database.Tables.User", "AvatarId") 5875 - .OnDelete(DeleteBehavior.SetNull); 5876 - 5877 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.DriveFile", "Banner") 5878 - .WithOne("UserBanner") 5879 - .HasForeignKey("Iceshrimp.Backend.Core.Database.Tables.User", "BannerId") 5880 - .OnDelete(DeleteBehavior.SetNull); 5881 - 5882 - b.Navigation("Avatar"); 5883 - 5884 - b.Navigation("Banner"); 5885 - }); 5886 - 5887 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserGroup", b => 5888 - { 5889 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5890 - .WithMany("UserGroups") 5891 - .HasForeignKey("UserId") 5892 - .OnDelete(DeleteBehavior.Cascade) 5893 - .IsRequired(); 5894 - 5895 - b.Navigation("User"); 5896 - }); 5897 - 5898 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserGroupInvitation", b => 5899 - { 5900 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.UserGroup", "UserGroup") 5901 - .WithMany("UserGroupInvitations") 5902 - .HasForeignKey("UserGroupId") 5903 - .OnDelete(DeleteBehavior.Cascade) 5904 - .IsRequired(); 5905 - 5906 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5907 - .WithMany("UserGroupInvitations") 5908 - .HasForeignKey("UserId") 5909 - .OnDelete(DeleteBehavior.Cascade) 5910 - .IsRequired(); 5911 - 5912 - b.Navigation("User"); 5913 - 5914 - b.Navigation("UserGroup"); 5915 - }); 5916 - 5917 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserGroupMember", b => 5918 - { 5919 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.UserGroup", "UserGroup") 5920 - .WithMany("UserGroupMembers") 5921 - .HasForeignKey("UserGroupId") 5922 - .OnDelete(DeleteBehavior.Cascade) 5923 - .IsRequired(); 5924 - 5925 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5926 - .WithMany("UserGroupMemberships") 5927 - .HasForeignKey("UserId") 5928 - .OnDelete(DeleteBehavior.Cascade) 5929 - .IsRequired(); 5930 - 5931 - b.Navigation("User"); 5932 - 5933 - b.Navigation("UserGroup"); 5934 - }); 5935 - 5936 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserKeypair", b => 5937 - { 5938 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5939 - .WithOne("UserKeypair") 5940 - .HasForeignKey("Iceshrimp.Backend.Core.Database.Tables.UserKeypair", "UserId") 5941 - .OnDelete(DeleteBehavior.Cascade) 5942 - .IsRequired(); 5943 - 5944 - b.Navigation("User"); 5945 - }); 5946 - 5947 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserList", b => 5948 - { 5949 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5950 - .WithMany("UserLists") 5951 - .HasForeignKey("UserId") 5952 - .OnDelete(DeleteBehavior.Cascade) 5953 - .IsRequired(); 5954 - 5955 - b.Navigation("User"); 5956 - }); 5957 - 5958 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserListMember", b => 5959 - { 5960 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5961 - .WithMany("UserListMembers") 5962 - .HasForeignKey("UserId") 5963 - .OnDelete(DeleteBehavior.Cascade) 5964 - .IsRequired(); 5965 - 5966 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.UserList", "UserList") 5967 - .WithMany("UserListMembers") 5968 - .HasForeignKey("UserListId") 5969 - .OnDelete(DeleteBehavior.Cascade) 5970 - .IsRequired(); 5971 - 5972 - b.Navigation("User"); 5973 - 5974 - b.Navigation("UserList"); 5975 - }); 5976 - 5977 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserNotePin", b => 5978 - { 5979 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "Note") 5980 - .WithMany("UserNotePins") 5981 - .HasForeignKey("NoteId") 5982 - .OnDelete(DeleteBehavior.Cascade) 5983 - .IsRequired(); 5984 - 5985 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5986 - .WithMany("UserNotePins") 5987 - .HasForeignKey("UserId") 5988 - .OnDelete(DeleteBehavior.Cascade) 5989 - .IsRequired(); 5990 - 5991 - b.Navigation("Note"); 5992 - 5993 - b.Navigation("User"); 5994 - }); 5995 - 5996 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserProfile", b => 5997 - { 5998 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Page", "PinnedPage") 5999 - .WithOne("UserProfile") 6000 - .HasForeignKey("Iceshrimp.Backend.Core.Database.Tables.UserProfile", "PinnedPageId") 6001 - .OnDelete(DeleteBehavior.SetNull); 6002 - 6003 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 6004 - .WithOne("UserProfile") 6005 - .HasForeignKey("Iceshrimp.Backend.Core.Database.Tables.UserProfile", "UserId") 6006 - .OnDelete(DeleteBehavior.Cascade) 6007 - .IsRequired(); 6008 - 6009 - b.Navigation("PinnedPage"); 6010 - 6011 - b.Navigation("User"); 6012 - }); 6013 - 6014 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserPublickey", b => 6015 - { 6016 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 6017 - .WithOne("UserPublickey") 6018 - .HasForeignKey("Iceshrimp.Backend.Core.Database.Tables.UserPublickey", "UserId") 6019 - .OnDelete(DeleteBehavior.Cascade) 6020 - .IsRequired(); 6021 - 6022 - b.Navigation("User"); 6023 - }); 6024 - 6025 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserSecurityKey", b => 6026 - { 6027 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 6028 - .WithMany("UserSecurityKeys") 6029 - .HasForeignKey("UserId") 6030 - .OnDelete(DeleteBehavior.Cascade) 6031 - .IsRequired(); 6032 - 6033 - b.Navigation("User"); 6034 - }); 6035 - 6036 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserSettings", b => 6037 - { 6038 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 6039 - .WithOne("UserSettings") 6040 - .HasForeignKey("Iceshrimp.Backend.Core.Database.Tables.UserSettings", "UserId") 6041 - .OnDelete(DeleteBehavior.Cascade) 6042 - .IsRequired(); 6043 - 6044 - b.Navigation("User"); 6045 - }); 6046 - 6047 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Webhook", b => 6048 - { 6049 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 6050 - .WithMany("Webhooks") 6051 - .HasForeignKey("UserId") 6052 - .OnDelete(DeleteBehavior.Cascade) 6053 - .IsRequired(); 6054 - 6055 - b.Navigation("User"); 6056 - }); 6057 - 6058 - modelBuilder.Entity("reported_note", b => 6059 - { 6060 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", null) 6061 - .WithMany() 6062 - .HasForeignKey("note_id") 6063 - .OnDelete(DeleteBehavior.Cascade) 6064 - .IsRequired(); 6065 - 6066 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Report", null) 6067 - .WithMany() 6068 - .HasForeignKey("report_id") 6069 - .OnDelete(DeleteBehavior.Cascade) 6070 - .IsRequired(); 6071 - }); 6072 - 6073 - modelBuilder.Entity("reported_rule", b => 6074 - { 6075 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Report", null) 6076 - .WithMany() 6077 - .HasForeignKey("report_id") 6078 - .OnDelete(DeleteBehavior.Cascade) 6079 - .IsRequired(); 6080 - 6081 - b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Rule", null) 6082 - .WithMany() 6083 - .HasForeignKey("rule_id") 6084 - .OnDelete(DeleteBehavior.Cascade) 6085 - .IsRequired(); 6086 - }); 6087 - 6088 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Announcement", b => 6089 - { 6090 - b.Navigation("AnnouncementReads"); 6091 - }); 6092 - 6093 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Channel", b => 6094 - { 6095 - b.Navigation("ChannelFollowings"); 6096 - 6097 - b.Navigation("ChannelNotePins"); 6098 - 6099 - b.Navigation("Notes"); 6100 - }); 6101 - 6102 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Clip", b => 6103 - { 6104 - b.Navigation("ClipNotes"); 6105 - }); 6106 - 6107 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.DriveFile", b => 6108 - { 6109 - b.Navigation("Channels"); 6110 - 6111 - b.Navigation("MessagingMessages"); 6112 - 6113 - b.Navigation("Pages"); 6114 - 6115 - b.Navigation("UserAvatar"); 6116 - 6117 - b.Navigation("UserBanner"); 6118 - }); 6119 - 6120 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.DriveFolder", b => 6121 - { 6122 - b.Navigation("DriveFiles"); 6123 - 6124 - b.Navigation("InverseParent"); 6125 - }); 6126 - 6127 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.FollowRequest", b => 6128 - { 6129 - b.Navigation("Notifications"); 6130 - }); 6131 - 6132 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.GalleryPost", b => 6133 - { 6134 - b.Navigation("GalleryLikes"); 6135 - }); 6136 - 6137 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Note", b => 6138 - { 6139 - b.Navigation("ChannelNotePins"); 6140 - 6141 - b.Navigation("ClipNotes"); 6142 - 6143 - b.Navigation("InverseRenote"); 6144 - 6145 - b.Navigation("InverseReply"); 6146 - 6147 - b.Navigation("NoteBookmarks"); 6148 - 6149 - b.Navigation("NoteEdits"); 6150 - 6151 - b.Navigation("NoteLikes"); 6152 - 6153 - b.Navigation("NoteReactions"); 6154 - 6155 - b.Navigation("NoteUnreads"); 6156 - 6157 - b.Navigation("NoteWatchings"); 6158 - 6159 - b.Navigation("Notifications"); 6160 - 6161 - b.Navigation("Poll"); 6162 - 6163 - b.Navigation("PollVotes"); 6164 - 6165 - b.Navigation("PromoNote"); 6166 - 6167 - b.Navigation("PromoReads"); 6168 - 6169 - b.Navigation("UserNotePins"); 6170 - }); 6171 - 6172 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.NoteThread", b => 6173 - { 6174 - b.Navigation("NoteThreadMutings"); 6175 - 6176 - b.Navigation("Notes"); 6177 - }); 6178 - 6179 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.OauthApp", b => 6180 - { 6181 - b.Navigation("OauthTokens"); 6182 - }); 6183 - 6184 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.OauthToken", b => 6185 - { 6186 - b.Navigation("PushSubscription"); 6187 - 6188 - b.Navigation("WebSession"); 6189 - }); 6190 - 6191 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Page", b => 6192 - { 6193 - b.Navigation("PageLikes"); 6194 - 6195 - b.Navigation("UserProfile"); 6196 - }); 6197 - 6198 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.User", b => 6199 - { 6200 - b.Navigation("AbuseUserReportAssignees"); 6201 - 6202 - b.Navigation("AbuseUserReportReporters"); 6203 - 6204 - b.Navigation("AbuseUserReportTargetUsers"); 6205 - 6206 - b.Navigation("AnnouncementReads"); 6207 - 6208 - b.Navigation("Antennas"); 6209 - 6210 - b.Navigation("AttestationChallenges"); 6211 - 6212 - b.Navigation("ChannelFollowings"); 6213 - 6214 - b.Navigation("Channels"); 6215 - 6216 - b.Navigation("Clips"); 6217 - 6218 - b.Navigation("DriveFiles"); 6219 - 6220 - b.Navigation("DriveFolders"); 6221 - 6222 - b.Navigation("Filters"); 6223 - 6224 - b.Navigation("GalleryLikes"); 6225 - 6226 - b.Navigation("GalleryPosts"); 6227 - 6228 - b.Navigation("IncomingBlocks"); 6229 - 6230 - b.Navigation("IncomingFollowRelationships"); 6231 - 6232 - b.Navigation("IncomingFollowRequests"); 6233 - 6234 - b.Navigation("IncomingMutes"); 6235 - 6236 - b.Navigation("Markers"); 6237 - 6238 - b.Navigation("MessagingMessageRecipients"); 6239 - 6240 - b.Navigation("MessagingMessageUsers"); 6241 - 6242 - b.Navigation("ModerationLogs"); 6243 - 6244 - b.Navigation("NoteBookmarks"); 6245 - 6246 - b.Navigation("NoteLikes"); 6247 - 6248 - b.Navigation("NoteReactions"); 6249 - 6250 - b.Navigation("NoteThreadMutings"); 6251 - 6252 - b.Navigation("NoteUnreads"); 6253 - 6254 - b.Navigation("NoteWatchings"); 6255 - 6256 - b.Navigation("Notes"); 6257 - 6258 - b.Navigation("NotificationNotifiees"); 6259 - 6260 - b.Navigation("NotificationNotifiers"); 6261 - 6262 - b.Navigation("OauthTokens"); 6263 - 6264 - b.Navigation("OutgoingBlocks"); 6265 - 6266 - b.Navigation("OutgoingFollowRelationships"); 6267 - 6268 - b.Navigation("OutgoingFollowRequests"); 6269 - 6270 - b.Navigation("OutgoingMutes"); 6271 - 6272 - b.Navigation("PageLikes"); 6273 - 6274 - b.Navigation("Pages"); 6275 - 6276 - b.Navigation("PasswordResetRequests"); 6277 - 6278 - b.Navigation("PollVotes"); 6279 - 6280 - b.Navigation("PromoReads"); 6281 - 6282 - b.Navigation("PushSubscriptions"); 6283 - 6284 - b.Navigation("RegistryItems"); 6285 - 6286 - b.Navigation("RenoteMutingMutees"); 6287 - 6288 - b.Navigation("RenoteMutingMuters"); 6289 - 6290 - b.Navigation("Sessions"); 6291 - 6292 - b.Navigation("SwSubscriptions"); 6293 - 6294 - b.Navigation("UserGroupInvitations"); 6295 - 6296 - b.Navigation("UserGroupMemberships"); 6297 - 6298 - b.Navigation("UserGroups"); 6299 - 6300 - b.Navigation("UserKeypair"); 6301 - 6302 - b.Navigation("UserListMembers"); 6303 - 6304 - b.Navigation("UserLists"); 6305 - 6306 - b.Navigation("UserNotePins"); 6307 - 6308 - b.Navigation("UserProfile"); 6309 - 6310 - b.Navigation("UserPublickey"); 6311 - 6312 - b.Navigation("UserSecurityKeys"); 6313 - 6314 - b.Navigation("UserSettings"); 6315 - 6316 - b.Navigation("Webhooks"); 6317 - }); 6318 - 6319 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserGroup", b => 6320 - { 6321 - b.Navigation("MessagingMessages"); 6322 - 6323 - b.Navigation("UserGroupInvitations"); 6324 - 6325 - b.Navigation("UserGroupMembers"); 6326 - }); 6327 - 6328 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserGroupInvitation", b => 6329 - { 6330 - b.Navigation("Notifications"); 6331 - }); 6332 - 6333 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserGroupMember", b => 6334 - { 6335 - b.Navigation("Antennas"); 6336 - }); 6337 - 6338 - modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserList", b => 6339 - { 6340 - b.Navigation("Antennas"); 6341 - 6342 - b.Navigation("UserListMembers"); 6343 - }); 6344 - #pragma warning restore 612, 618 6345 - } 6346 - } 6347 - } 1 + // <auto-generated /> 2 + using System; 3 + using System.Collections.Generic; 4 + using Iceshrimp.Backend.Core.Database; 5 + using Iceshrimp.Backend.Core.Database.Tables; 6 + using Microsoft.EntityFrameworkCore; 7 + using Microsoft.EntityFrameworkCore.Infrastructure; 8 + using Microsoft.EntityFrameworkCore.Storage.ValueConversion; 9 + using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; 10 + 11 + #nullable disable 12 + 13 + namespace Iceshrimp.Backend.Core.Database.Migrations 14 + { 15 + [DbContext(typeof(DatabaseContext))] 16 + partial class DatabaseContextModelSnapshot : ModelSnapshot 17 + { 18 + protected override void BuildModel(ModelBuilder modelBuilder) 19 + { 20 + #pragma warning disable 612, 618 21 + modelBuilder 22 + .HasAnnotation("ProductVersion", "9.0.9") 23 + .HasAnnotation("Relational:MaxIdentifierLength", 63); 24 + 25 + NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "antenna_src_enum", new[] { "home", "all", "users", "list", "group", "instances" }); 26 + NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "filter_action_enum", new[] { "warn", "hide" }); 27 + NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "filter_context_enum", new[] { "home", "lists", "threads", "notifications", "accounts", "public" }); 28 + NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "interaction_stamp_type", new[] { "quote" }); 29 + NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "job_status", new[] { "queued", "delayed", "running", "completed", "failed" }); 30 + NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "marker_type_enum", new[] { "home", "notifications" }); 31 + NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "note_visibility_enum", new[] { "public", "home", "followers", "specified" }); 32 + NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "notification_type_enum", new[] { "follow", "mention", "reply", "renote", "quote", "like", "reaction", "pollVote", "pollEnded", "receiveFollowRequest", "followRequestAccepted", "groupInvited", "app", "edit", "bite", "report" }); 33 + NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "page_visibility_enum", new[] { "public", "followers", "specified" }); 34 + NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "push_subscription_policy_enum", new[] { "all", "followed", "follower", "none" }); 35 + NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "relay_status_enum", new[] { "requesting", "accepted", "rejected" }); 36 + NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "user_profile_ffvisibility_enum", new[] { "public", "followers", "private" }); 37 + NpgsqlModelBuilderExtensions.HasPostgresExtension(modelBuilder, "pg_trgm"); 38 + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); 39 + 40 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.AllowedInstance", b => 41 + { 42 + b.Property<string>("Host") 43 + .HasMaxLength(256) 44 + .HasColumnType("character varying(256)") 45 + .HasColumnName("host"); 46 + 47 + b.Property<bool>("IsImported") 48 + .ValueGeneratedOnAdd() 49 + .HasColumnType("boolean") 50 + .HasDefaultValue(false) 51 + .HasColumnName("imported"); 52 + 53 + b.HasKey("Host"); 54 + 55 + b.ToTable("allowed_instance"); 56 + }); 57 + 58 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Announcement", b => 59 + { 60 + b.Property<string>("Id") 61 + .HasMaxLength(32) 62 + .HasColumnType("character varying(32)") 63 + .HasColumnName("id"); 64 + 65 + b.Property<DateTime>("CreatedAt") 66 + .HasColumnType("timestamp with time zone") 67 + .HasColumnName("createdAt") 68 + .HasComment("The created date of the Announcement."); 69 + 70 + b.PrimitiveCollection<List<string>>("Emojis") 71 + .IsRequired() 72 + .ValueGeneratedOnAdd() 73 + .HasColumnType("character varying(128)[]") 74 + .HasColumnName("emojis") 75 + .HasDefaultValueSql("'{}'::character varying[]"); 76 + 77 + b.Property<string>("ImageUrl") 78 + .HasMaxLength(1024) 79 + .HasColumnType("character varying(1024)") 80 + .HasColumnName("imageUrl"); 81 + 82 + b.Property<bool>("IsGoodNews") 83 + .ValueGeneratedOnAdd() 84 + .HasColumnType("boolean") 85 + .HasDefaultValue(false) 86 + .HasColumnName("isGoodNews"); 87 + 88 + b.PrimitiveCollection<List<string>>("Mentions") 89 + .IsRequired() 90 + .ValueGeneratedOnAdd() 91 + .HasColumnType("character varying(32)[]") 92 + .HasColumnName("mentions") 93 + .HasDefaultValueSql("'{}'::character varying[]"); 94 + 95 + b.Property<bool>("ShowPopup") 96 + .ValueGeneratedOnAdd() 97 + .HasColumnType("boolean") 98 + .HasDefaultValue(false) 99 + .HasColumnName("showPopup"); 100 + 101 + b.PrimitiveCollection<List<string>>("Tags") 102 + .IsRequired() 103 + .ValueGeneratedOnAdd() 104 + .HasColumnType("character varying(128)[]") 105 + .HasColumnName("tags") 106 + .HasDefaultValueSql("'{}'::character varying[]"); 107 + 108 + b.Property<string>("Text") 109 + .IsRequired() 110 + .HasMaxLength(8192) 111 + .HasColumnType("character varying(8192)") 112 + .HasColumnName("text"); 113 + 114 + b.Property<string>("Title") 115 + .IsRequired() 116 + .HasMaxLength(256) 117 + .HasColumnType("character varying(256)") 118 + .HasColumnName("title"); 119 + 120 + b.Property<DateTime?>("UpdatedAt") 121 + .HasColumnType("timestamp with time zone") 122 + .HasColumnName("updatedAt") 123 + .HasComment("The updated date of the Announcement."); 124 + 125 + b.HasKey("Id"); 126 + 127 + b.HasIndex("CreatedAt"); 128 + 129 + b.ToTable("announcement"); 130 + }); 131 + 132 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.AnnouncementRead", b => 133 + { 134 + b.Property<string>("Id") 135 + .HasMaxLength(32) 136 + .HasColumnType("character varying(32)") 137 + .HasColumnName("id"); 138 + 139 + b.Property<string>("AnnouncementId") 140 + .IsRequired() 141 + .HasMaxLength(32) 142 + .HasColumnType("character varying(32)") 143 + .HasColumnName("announcementId"); 144 + 145 + b.Property<DateTime>("CreatedAt") 146 + .HasColumnType("timestamp with time zone") 147 + .HasColumnName("createdAt") 148 + .HasComment("The created date of the AnnouncementRead."); 149 + 150 + b.Property<string>("UserId") 151 + .IsRequired() 152 + .HasMaxLength(32) 153 + .HasColumnType("character varying(32)") 154 + .HasColumnName("userId"); 155 + 156 + b.HasKey("Id"); 157 + 158 + b.HasIndex("AnnouncementId"); 159 + 160 + b.HasIndex("UserId"); 161 + 162 + b.HasIndex("UserId", "AnnouncementId") 163 + .IsUnique(); 164 + 165 + b.ToTable("announcement_read"); 166 + }); 167 + 168 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Antenna", b => 169 + { 170 + b.Property<string>("Id") 171 + .HasMaxLength(32) 172 + .HasColumnType("character varying(32)") 173 + .HasColumnName("id"); 174 + 175 + b.Property<bool>("CaseSensitive") 176 + .ValueGeneratedOnAdd() 177 + .HasColumnType("boolean") 178 + .HasDefaultValue(false) 179 + .HasColumnName("caseSensitive"); 180 + 181 + b.Property<DateTime>("CreatedAt") 182 + .HasColumnType("timestamp with time zone") 183 + .HasColumnName("createdAt") 184 + .HasComment("The created date of the Antenna."); 185 + 186 + b.Property<List<List<string>>>("ExcludeKeywords") 187 + .IsRequired() 188 + .ValueGeneratedOnAdd() 189 + .HasColumnType("jsonb") 190 + .HasColumnName("excludeKeywords") 191 + .HasDefaultValueSql("'[]'::jsonb"); 192 + 193 + b.Property<string>("Expression") 194 + .HasMaxLength(2048) 195 + .HasColumnType("character varying(2048)") 196 + .HasColumnName("expression"); 197 + 198 + b.Property<List<string>>("Instances") 199 + .IsRequired() 200 + .ValueGeneratedOnAdd() 201 + .HasColumnType("jsonb") 202 + .HasColumnName("instances") 203 + .HasDefaultValueSql("'[]'::jsonb"); 204 + 205 + b.Property<List<List<string>>>("Keywords") 206 + .IsRequired() 207 + .ValueGeneratedOnAdd() 208 + .HasColumnType("jsonb") 209 + .HasColumnName("keywords") 210 + .HasDefaultValueSql("'[]'::jsonb"); 211 + 212 + b.Property<string>("Name") 213 + .IsRequired() 214 + .HasMaxLength(128) 215 + .HasColumnType("character varying(128)") 216 + .HasColumnName("name") 217 + .HasComment("The name of the Antenna."); 218 + 219 + b.Property<bool>("Notify") 220 + .HasColumnType("boolean") 221 + .HasColumnName("notify"); 222 + 223 + b.Property<Antenna.AntennaSource>("Source") 224 + .HasColumnType("antenna_src_enum") 225 + .HasColumnName("src"); 226 + 227 + b.Property<string>("UserGroupMemberId") 228 + .HasMaxLength(32) 229 + .HasColumnType("character varying(32)") 230 + .HasColumnName("userGroupMemberId"); 231 + 232 + b.Property<string>("UserId") 233 + .IsRequired() 234 + .HasMaxLength(32) 235 + .HasColumnType("character varying(32)") 236 + .HasColumnName("userId") 237 + .HasComment("The owner ID."); 238 + 239 + b.Property<string>("UserListId") 240 + .HasMaxLength(32) 241 + .HasColumnType("character varying(32)") 242 + .HasColumnName("userListId"); 243 + 244 + b.PrimitiveCollection<List<string>>("Users") 245 + .IsRequired() 246 + .ValueGeneratedOnAdd() 247 + .HasColumnType("character varying(1024)[]") 248 + .HasColumnName("users") 249 + .HasDefaultValueSql("'{}'::character varying[]"); 250 + 251 + b.Property<bool>("WithFile") 252 + .HasColumnType("boolean") 253 + .HasColumnName("withFile"); 254 + 255 + b.Property<bool>("WithReplies") 256 + .ValueGeneratedOnAdd() 257 + .HasColumnType("boolean") 258 + .HasDefaultValue(false) 259 + .HasColumnName("withReplies"); 260 + 261 + b.HasKey("Id"); 262 + 263 + b.HasIndex("UserGroupMemberId"); 264 + 265 + b.HasIndex("UserId"); 266 + 267 + b.HasIndex("UserListId"); 268 + 269 + b.ToTable("antenna"); 270 + }); 271 + 272 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.AttestationChallenge", b => 273 + { 274 + b.Property<string>("Id") 275 + .HasMaxLength(32) 276 + .HasColumnType("character varying(32)") 277 + .HasColumnName("id"); 278 + 279 + b.Property<string>("UserId") 280 + .HasMaxLength(32) 281 + .HasColumnType("character varying(32)") 282 + .HasColumnName("userId"); 283 + 284 + b.Property<string>("Challenge") 285 + .IsRequired() 286 + .HasMaxLength(64) 287 + .HasColumnType("character varying(64)") 288 + .HasColumnName("challenge") 289 + .HasComment("Hex-encoded sha256 hash of the challenge."); 290 + 291 + b.Property<DateTime>("CreatedAt") 292 + .HasColumnType("timestamp with time zone") 293 + .HasColumnName("createdAt") 294 + .HasComment("The date challenge was created for expiry purposes."); 295 + 296 + b.Property<bool>("RegistrationChallenge") 297 + .ValueGeneratedOnAdd() 298 + .HasColumnType("boolean") 299 + .HasDefaultValue(false) 300 + .HasColumnName("registrationChallenge") 301 + .HasComment("Indicates that the challenge is only for registration purposes if true to prevent the challenge for being used as authentication."); 302 + 303 + b.HasKey("Id", "UserId"); 304 + 305 + b.HasIndex("Challenge"); 306 + 307 + b.HasIndex("UserId"); 308 + 309 + b.ToTable("attestation_challenge"); 310 + }); 311 + 312 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Bite", b => 313 + { 314 + b.Property<string>("Id") 315 + .HasMaxLength(32) 316 + .HasColumnType("character varying(32)") 317 + .HasColumnName("id"); 318 + 319 + b.Property<DateTime>("CreatedAt") 320 + .HasColumnType("timestamp with time zone") 321 + .HasColumnName("createdAt"); 322 + 323 + b.Property<string>("TargetBiteId") 324 + .HasMaxLength(32) 325 + .HasColumnType("character varying(32)") 326 + .HasColumnName("targetBiteId"); 327 + 328 + b.Property<string>("TargetNoteId") 329 + .HasMaxLength(32) 330 + .HasColumnType("character varying(32)") 331 + .HasColumnName("targetNoteId"); 332 + 333 + b.Property<string>("TargetUserId") 334 + .HasMaxLength(32) 335 + .HasColumnType("character varying(32)") 336 + .HasColumnName("targetUserId"); 337 + 338 + b.Property<string>("Uri") 339 + .HasMaxLength(512) 340 + .HasColumnType("character varying(512)") 341 + .HasColumnName("uri"); 342 + 343 + b.Property<string>("UserHost") 344 + .HasMaxLength(512) 345 + .HasColumnType("character varying(512)") 346 + .HasColumnName("userHost"); 347 + 348 + b.Property<string>("UserId") 349 + .IsRequired() 350 + .HasMaxLength(32) 351 + .HasColumnType("character varying(32)") 352 + .HasColumnName("userId"); 353 + 354 + b.HasKey("Id"); 355 + 356 + b.HasIndex("TargetBiteId"); 357 + 358 + b.HasIndex("TargetNoteId"); 359 + 360 + b.HasIndex("TargetUserId"); 361 + 362 + b.HasIndex("Uri"); 363 + 364 + b.HasIndex("UserHost"); 365 + 366 + b.HasIndex("UserId"); 367 + 368 + b.ToTable("bite"); 369 + }); 370 + 371 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.BlockedInstance", b => 372 + { 373 + b.Property<string>("Host") 374 + .HasMaxLength(256) 375 + .HasColumnType("character varying(256)") 376 + .HasColumnName("host"); 377 + 378 + b.Property<bool>("IsImported") 379 + .ValueGeneratedOnAdd() 380 + .HasColumnType("boolean") 381 + .HasDefaultValue(false) 382 + .HasColumnName("imported"); 383 + 384 + b.Property<string>("Reason") 385 + .HasMaxLength(1024) 386 + .HasColumnType("character varying(1024)") 387 + .HasColumnName("reason"); 388 + 389 + b.HasKey("Host"); 390 + 391 + b.ToTable("blocked_instance"); 392 + }); 393 + 394 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Blocking", b => 395 + { 396 + b.Property<string>("Id") 397 + .HasMaxLength(32) 398 + .HasColumnType("character varying(32)") 399 + .HasColumnName("id"); 400 + 401 + b.Property<string>("BlockeeId") 402 + .IsRequired() 403 + .HasMaxLength(32) 404 + .HasColumnType("character varying(32)") 405 + .HasColumnName("blockeeId") 406 + .HasComment("The blockee user ID."); 407 + 408 + b.Property<string>("BlockerId") 409 + .IsRequired() 410 + .HasMaxLength(32) 411 + .HasColumnType("character varying(32)") 412 + .HasColumnName("blockerId") 413 + .HasComment("The blocker user ID."); 414 + 415 + b.Property<DateTime>("CreatedAt") 416 + .HasColumnType("timestamp with time zone") 417 + .HasColumnName("createdAt") 418 + .HasComment("The created date of the Blocking."); 419 + 420 + b.HasKey("Id"); 421 + 422 + b.HasIndex("BlockeeId"); 423 + 424 + b.HasIndex("BlockerId"); 425 + 426 + b.HasIndex("CreatedAt"); 427 + 428 + b.HasIndex("BlockerId", "BlockeeId") 429 + .IsUnique(); 430 + 431 + b.ToTable("blocking"); 432 + }); 433 + 434 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.BubbleInstance", b => 435 + { 436 + b.Property<string>("Host") 437 + .HasMaxLength(256) 438 + .HasColumnType("character varying(256)") 439 + .HasColumnName("host"); 440 + 441 + b.HasKey("Host"); 442 + 443 + b.ToTable("bubble_instance"); 444 + }); 445 + 446 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.CacheEntry", b => 447 + { 448 + b.Property<string>("Key") 449 + .HasMaxLength(128) 450 + .HasColumnType("character varying(128)") 451 + .HasColumnName("key"); 452 + 453 + b.Property<DateTime?>("Expiry") 454 + .HasColumnType("timestamp with time zone") 455 + .HasColumnName("expiry"); 456 + 457 + b.Property<TimeSpan?>("Ttl") 458 + .HasColumnType("interval") 459 + .HasColumnName("ttl"); 460 + 461 + b.Property<string>("Value") 462 + .HasColumnType("text") 463 + .HasColumnName("value"); 464 + 465 + b.HasKey("Key"); 466 + 467 + b.HasIndex("Expiry"); 468 + 469 + b.ToTable("cache_store"); 470 + }); 471 + 472 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Channel", b => 473 + { 474 + b.Property<string>("Id") 475 + .HasMaxLength(32) 476 + .HasColumnType("character varying(32)") 477 + .HasColumnName("id"); 478 + 479 + b.Property<string>("BannerId") 480 + .HasMaxLength(32) 481 + .HasColumnType("character varying(32)") 482 + .HasColumnName("bannerId") 483 + .HasComment("The ID of banner Channel."); 484 + 485 + b.Property<DateTime>("CreatedAt") 486 + .HasColumnType("timestamp with time zone") 487 + .HasColumnName("createdAt") 488 + .HasComment("The created date of the Channel."); 489 + 490 + b.Property<string>("Description") 491 + .HasMaxLength(2048) 492 + .HasColumnType("character varying(2048)") 493 + .HasColumnName("description") 494 + .HasComment("The description of the Channel."); 495 + 496 + b.Property<DateTime?>("LastNotedAt") 497 + .HasColumnType("timestamp with time zone") 498 + .HasColumnName("lastNotedAt"); 499 + 500 + b.Property<string>("Name") 501 + .IsRequired() 502 + .HasMaxLength(128) 503 + .HasColumnType("character varying(128)") 504 + .HasColumnName("name") 505 + .HasComment("The name of the Channel."); 506 + 507 + b.Property<int>("NotesCount") 508 + .ValueGeneratedOnAdd() 509 + .HasColumnType("integer") 510 + .HasDefaultValue(0) 511 + .HasColumnName("notesCount") 512 + .HasComment("The count of notes."); 513 + 514 + b.Property<string>("UserId") 515 + .HasMaxLength(32) 516 + .HasColumnType("character varying(32)") 517 + .HasColumnName("userId") 518 + .HasComment("The owner ID."); 519 + 520 + b.Property<int>("UsersCount") 521 + .ValueGeneratedOnAdd() 522 + .HasColumnType("integer") 523 + .HasDefaultValue(0) 524 + .HasColumnName("usersCount") 525 + .HasComment("The count of users."); 526 + 527 + b.HasKey("Id"); 528 + 529 + b.HasIndex("BannerId"); 530 + 531 + b.HasIndex("CreatedAt"); 532 + 533 + b.HasIndex("LastNotedAt"); 534 + 535 + b.HasIndex("NotesCount"); 536 + 537 + b.HasIndex("UserId"); 538 + 539 + b.HasIndex("UsersCount"); 540 + 541 + b.ToTable("channel"); 542 + }); 543 + 544 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.ChannelFollowing", b => 545 + { 546 + b.Property<string>("Id") 547 + .HasMaxLength(32) 548 + .HasColumnType("character varying(32)") 549 + .HasColumnName("id"); 550 + 551 + b.Property<DateTime>("CreatedAt") 552 + .HasColumnType("timestamp with time zone") 553 + .HasColumnName("createdAt") 554 + .HasComment("The created date of the ChannelFollowing."); 555 + 556 + b.Property<string>("FolloweeId") 557 + .IsRequired() 558 + .HasMaxLength(32) 559 + .HasColumnType("character varying(32)") 560 + .HasColumnName("followeeId") 561 + .HasComment("The followee channel ID."); 562 + 563 + b.Property<string>("FollowerId") 564 + .IsRequired() 565 + .HasMaxLength(32) 566 + .HasColumnType("character varying(32)") 567 + .HasColumnName("followerId") 568 + .HasComment("The follower user ID."); 569 + 570 + b.HasKey("Id"); 571 + 572 + b.HasIndex("CreatedAt"); 573 + 574 + b.HasIndex("FolloweeId"); 575 + 576 + b.HasIndex("FollowerId"); 577 + 578 + b.HasIndex("FollowerId", "FolloweeId") 579 + .IsUnique(); 580 + 581 + b.ToTable("channel_following"); 582 + }); 583 + 584 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.ChannelNotePin", b => 585 + { 586 + b.Property<string>("Id") 587 + .HasMaxLength(32) 588 + .HasColumnType("character varying(32)") 589 + .HasColumnName("id"); 590 + 591 + b.Property<string>("ChannelId") 592 + .IsRequired() 593 + .HasMaxLength(32) 594 + .HasColumnType("character varying(32)") 595 + .HasColumnName("channelId"); 596 + 597 + b.Property<DateTime>("CreatedAt") 598 + .HasColumnType("timestamp with time zone") 599 + .HasColumnName("createdAt") 600 + .HasComment("The created date of the ChannelNotePin."); 601 + 602 + b.Property<string>("NoteId") 603 + .IsRequired() 604 + .HasMaxLength(32) 605 + .HasColumnType("character varying(32)") 606 + .HasColumnName("noteId"); 607 + 608 + b.HasKey("Id"); 609 + 610 + b.HasIndex("ChannelId"); 611 + 612 + b.HasIndex("NoteId"); 613 + 614 + b.HasIndex("ChannelId", "NoteId") 615 + .IsUnique(); 616 + 617 + b.ToTable("channel_note_pin"); 618 + }); 619 + 620 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Clip", b => 621 + { 622 + b.Property<string>("Id") 623 + .HasMaxLength(32) 624 + .HasColumnType("character varying(32)") 625 + .HasColumnName("id"); 626 + 627 + b.Property<DateTime>("CreatedAt") 628 + .HasColumnType("timestamp with time zone") 629 + .HasColumnName("createdAt") 630 + .HasComment("The created date of the Clip."); 631 + 632 + b.Property<string>("Description") 633 + .HasMaxLength(2048) 634 + .HasColumnType("character varying(2048)") 635 + .HasColumnName("description") 636 + .HasComment("The description of the Clip."); 637 + 638 + b.Property<bool>("IsPublic") 639 + .ValueGeneratedOnAdd() 640 + .HasColumnType("boolean") 641 + .HasDefaultValue(false) 642 + .HasColumnName("isPublic"); 643 + 644 + b.Property<string>("Name") 645 + .IsRequired() 646 + .HasMaxLength(128) 647 + .HasColumnType("character varying(128)") 648 + .HasColumnName("name") 649 + .HasComment("The name of the Clip."); 650 + 651 + b.Property<string>("UserId") 652 + .IsRequired() 653 + .HasMaxLength(32) 654 + .HasColumnType("character varying(32)") 655 + .HasColumnName("userId") 656 + .HasComment("The owner ID."); 657 + 658 + b.HasKey("Id"); 659 + 660 + b.HasIndex("UserId"); 661 + 662 + b.ToTable("clip"); 663 + }); 664 + 665 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.ClipNote", b => 666 + { 667 + b.Property<string>("Id") 668 + .HasMaxLength(32) 669 + .HasColumnType("character varying(32)") 670 + .HasColumnName("id"); 671 + 672 + b.Property<string>("ClipId") 673 + .IsRequired() 674 + .HasMaxLength(32) 675 + .HasColumnType("character varying(32)") 676 + .HasColumnName("clipId") 677 + .HasComment("The clip ID."); 678 + 679 + b.Property<string>("NoteId") 680 + .IsRequired() 681 + .HasMaxLength(32) 682 + .HasColumnType("character varying(32)") 683 + .HasColumnName("noteId") 684 + .HasComment("The note ID."); 685 + 686 + b.HasKey("Id"); 687 + 688 + b.HasIndex("ClipId"); 689 + 690 + b.HasIndex("NoteId"); 691 + 692 + b.HasIndex("NoteId", "ClipId") 693 + .IsUnique(); 694 + 695 + b.ToTable("clip_note"); 696 + }); 697 + 698 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.DriveFile", b => 699 + { 700 + b.Property<string>("Id") 701 + .HasMaxLength(32) 702 + .HasColumnType("character varying(32)") 703 + .HasColumnName("id"); 704 + 705 + b.Property<string>("AccessKey") 706 + .IsRequired() 707 + .HasMaxLength(256) 708 + .HasColumnType("character varying(256)") 709 + .HasColumnName("accessKey"); 710 + 711 + b.Property<string>("Blurhash") 712 + .HasMaxLength(128) 713 + .HasColumnType("character varying(128)") 714 + .HasColumnName("blurhash") 715 + .HasComment("The BlurHash string."); 716 + 717 + b.Property<string>("Comment") 718 + .HasColumnType("text") 719 + .HasColumnName("comment") 720 + .HasComment("The comment of the DriveFile."); 721 + 722 + b.Property<DateTime>("CreatedAt") 723 + .HasColumnType("timestamp with time zone") 724 + .HasColumnName("createdAt") 725 + .HasComment("The created date of the DriveFile."); 726 + 727 + b.Property<string>("FolderId") 728 + .HasMaxLength(32) 729 + .HasColumnType("character varying(32)") 730 + .HasColumnName("folderId") 731 + .HasComment("The parent folder ID. If null, it means the DriveFile is located in root."); 732 + 733 + b.Property<bool>("IsLink") 734 + .ValueGeneratedOnAdd() 735 + .HasColumnType("boolean") 736 + .HasDefaultValue(false) 737 + .HasColumnName("isLink") 738 + .HasComment("Whether the DriveFile is direct link to remote server."); 739 + 740 + b.Property<bool>("IsSensitive") 741 + .ValueGeneratedOnAdd() 742 + .HasColumnType("boolean") 743 + .HasDefaultValue(false) 744 + .HasColumnName("isSensitive") 745 + .HasComment("Whether the DriveFile is NSFW."); 746 + 747 + b.Property<string>("Name") 748 + .IsRequired() 749 + .HasMaxLength(256) 750 + .HasColumnType("character varying(256)") 751 + .HasColumnName("name") 752 + .HasComment("The file name of the DriveFile."); 753 + 754 + b.Property<DriveFile.FileProperties>("Properties") 755 + .IsRequired() 756 + .ValueGeneratedOnAdd() 757 + .HasColumnType("jsonb") 758 + .HasColumnName("properties") 759 + .HasDefaultValueSql("'{}'::jsonb") 760 + .HasComment("The any properties of the DriveFile. For example, it includes image width/height."); 761 + 762 + b.Property<string>("PublicAccessKey") 763 + .HasMaxLength(256) 764 + .HasColumnType("character varying(256)") 765 + .HasColumnName("webpublicAccessKey"); 766 + 767 + b.Property<string>("PublicMimeType") 768 + .HasMaxLength(128) 769 + .HasColumnType("character varying(128)") 770 + .HasColumnName("webpublicType"); 771 + 772 + b.Property<string>("PublicUrl") 773 + .HasMaxLength(512) 774 + .HasColumnType("character varying(512)") 775 + .HasColumnName("webpublicUrl") 776 + .HasComment("The URL of the webpublic of the DriveFile."); 777 + 778 + b.Property<Dictionary<string, string>>("RequestHeaders") 779 + .ValueGeneratedOnAdd() 780 + .HasColumnType("jsonb") 781 + .HasColumnName("requestHeaders") 782 + .HasDefaultValueSql("'{}'::jsonb"); 783 + 784 + b.Property<string>("RequestIp") 785 + .HasMaxLength(128) 786 + .HasColumnType("character varying(128)") 787 + .HasColumnName("requestIp"); 788 + 789 + b.Property<string>("Sha256") 790 + .HasMaxLength(64) 791 + .HasColumnType("character varying(64)") 792 + .HasColumnName("sha256") 793 + .HasComment("The SHA256 hash of the DriveFile."); 794 + 795 + b.Property<int>("Size") 796 + .HasColumnType("integer") 797 + .HasColumnName("size") 798 + .HasComment("The file size (bytes) of the DriveFile."); 799 + 800 + b.Property<string>("Src") 801 + .HasMaxLength(512) 802 + .HasColumnType("character varying(512)") 803 + .HasColumnName("src"); 804 + 805 + b.Property<bool>("StoredInternal") 806 + .HasColumnType("boolean") 807 + .HasColumnName("storedInternal"); 808 + 809 + b.Property<string>("ThumbnailAccessKey") 810 + .HasMaxLength(256) 811 + .HasColumnType("character varying(256)") 812 + .HasColumnName("thumbnailAccessKey"); 813 + 814 + b.Property<string>("ThumbnailMimeType") 815 + .HasMaxLength(128) 816 + .HasColumnType("character varying(128)") 817 + .HasColumnName("thumbnailType"); 818 + 819 + b.Property<string>("ThumbnailUrl") 820 + .HasMaxLength(512) 821 + .HasColumnType("character varying(512)") 822 + .HasColumnName("thumbnailUrl") 823 + .HasComment("The URL of the thumbnail of the DriveFile."); 824 + 825 + b.Property<string>("Type") 826 + .IsRequired() 827 + .HasMaxLength(128) 828 + .HasColumnType("character varying(128)") 829 + .HasColumnName("type") 830 + .HasComment("The content type (MIME) of the DriveFile."); 831 + 832 + b.Property<string>("Uri") 833 + .HasMaxLength(512) 834 + .HasColumnType("character varying(512)") 835 + .HasColumnName("uri") 836 + .HasComment("The URI of the DriveFile. it will be null when the DriveFile is local."); 837 + 838 + b.Property<string>("Url") 839 + .IsRequired() 840 + .HasMaxLength(512) 841 + .HasColumnType("character varying(512)") 842 + .HasColumnName("url") 843 + .HasComment("The URL of the DriveFile."); 844 + 845 + b.Property<string>("UserHost") 846 + .HasMaxLength(512) 847 + .HasColumnType("character varying(512)") 848 + .HasColumnName("userHost") 849 + .HasComment("The host of owner. It will be null if the user in local."); 850 + 851 + b.Property<string>("UserId") 852 + .HasMaxLength(32) 853 + .HasColumnType("character varying(32)") 854 + .HasColumnName("userId") 855 + .HasComment("The owner ID."); 856 + 857 + b.HasKey("Id"); 858 + 859 + b.HasIndex("AccessKey"); 860 + 861 + b.HasIndex("CreatedAt"); 862 + 863 + b.HasIndex("FolderId"); 864 + 865 + b.HasIndex("IsLink"); 866 + 867 + b.HasIndex("IsSensitive"); 868 + 869 + b.HasIndex("PublicAccessKey"); 870 + 871 + b.HasIndex("Sha256"); 872 + 873 + b.HasIndex("ThumbnailAccessKey"); 874 + 875 + b.HasIndex("Type"); 876 + 877 + b.HasIndex("Uri"); 878 + 879 + b.HasIndex("UserHost"); 880 + 881 + b.HasIndex("UserId"); 882 + 883 + b.HasIndex("UserId", "FolderId", "Id"); 884 + 885 + b.ToTable("drive_file"); 886 + }); 887 + 888 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.DriveFolder", b => 889 + { 890 + b.Property<string>("Id") 891 + .HasMaxLength(32) 892 + .HasColumnType("character varying(32)") 893 + .HasColumnName("id"); 894 + 895 + b.Property<DateTime>("CreatedAt") 896 + .HasColumnType("timestamp with time zone") 897 + .HasColumnName("createdAt") 898 + .HasComment("The created date of the DriveFolder."); 899 + 900 + b.Property<string>("Name") 901 + .IsRequired() 902 + .HasMaxLength(128) 903 + .HasColumnType("character varying(128)") 904 + .HasColumnName("name") 905 + .HasComment("The name of the DriveFolder."); 906 + 907 + b.Property<string>("ParentId") 908 + .HasMaxLength(32) 909 + .HasColumnType("character varying(32)") 910 + .HasColumnName("parentId") 911 + .HasComment("The parent folder ID. If null, it means the DriveFolder is located in root."); 912 + 913 + b.Property<string>("UserId") 914 + .HasMaxLength(32) 915 + .HasColumnType("character varying(32)") 916 + .HasColumnName("userId") 917 + .HasComment("The owner ID."); 918 + 919 + b.HasKey("Id"); 920 + 921 + b.HasIndex("CreatedAt"); 922 + 923 + b.HasIndex("ParentId"); 924 + 925 + b.HasIndex("UserId"); 926 + 927 + b.ToTable("drive_folder"); 928 + }); 929 + 930 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Emoji", b => 931 + { 932 + b.Property<string>("Id") 933 + .HasMaxLength(32) 934 + .HasColumnType("character varying(32)") 935 + .HasColumnName("id"); 936 + 937 + b.Property<string>("Category") 938 + .HasMaxLength(128) 939 + .HasColumnType("character varying(128)") 940 + .HasColumnName("category"); 941 + 942 + b.Property<int?>("Height") 943 + .HasColumnType("integer") 944 + .HasColumnName("height") 945 + .HasComment("Image height"); 946 + 947 + b.Property<string>("Host") 948 + .HasMaxLength(512) 949 + .HasColumnType("character varying(512)") 950 + .HasColumnName("host"); 951 + 952 + b.Property<string>("License") 953 + .HasMaxLength(1024) 954 + .HasColumnType("character varying(1024)") 955 + .HasColumnName("license"); 956 + 957 + b.Property<string>("Name") 958 + .IsRequired() 959 + .HasMaxLength(128) 960 + .HasColumnType("character varying(128)") 961 + .HasColumnName("name"); 962 + 963 + b.Property<string>("OriginalUrl") 964 + .IsRequired() 965 + .HasMaxLength(512) 966 + .HasColumnType("character varying(512)") 967 + .HasColumnName("originalUrl"); 968 + 969 + b.Property<string>("RawPublicUrl") 970 + .IsRequired() 971 + .ValueGeneratedOnAdd() 972 + .HasMaxLength(512) 973 + .HasColumnType("character varying(512)") 974 + .HasColumnName("publicUrl") 975 + .HasDefaultValueSql("''::character varying"); 976 + 977 + b.Property<bool>("Sensitive") 978 + .HasColumnType("boolean") 979 + .HasColumnName("sensitive"); 980 + 981 + b.PrimitiveCollection<List<string>>("Tags") 982 + .IsRequired() 983 + .ValueGeneratedOnAdd() 984 + .HasColumnType("character varying(128)[]") 985 + .HasColumnName("tags") 986 + .HasDefaultValueSql("'{}'::character varying[]"); 987 + 988 + b.Property<string>("Type") 989 + .HasMaxLength(64) 990 + .HasColumnType("character varying(64)") 991 + .HasColumnName("type"); 992 + 993 + b.Property<DateTime?>("UpdatedAt") 994 + .HasColumnType("timestamp with time zone") 995 + .HasColumnName("updatedAt"); 996 + 997 + b.Property<string>("Uri") 998 + .HasMaxLength(512) 999 + .HasColumnType("character varying(512)") 1000 + .HasColumnName("uri"); 1001 + 1002 + b.Property<int?>("Width") 1003 + .HasColumnType("integer") 1004 + .HasColumnName("width") 1005 + .HasComment("Image width"); 1006 + 1007 + b.HasKey("Id"); 1008 + 1009 + b.HasIndex("Host"); 1010 + 1011 + b.HasIndex("Name"); 1012 + 1013 + b.HasIndex("Name", "Host") 1014 + .IsUnique(); 1015 + 1016 + NpgsqlIndexBuilderExtensions.AreNullsDistinct(b.HasIndex("Name", "Host"), false); 1017 + 1018 + b.HasIndex(new[] { "Host" }, "GIN_TRGM_emoji_host"); 1019 + 1020 + NpgsqlIndexBuilderExtensions.HasMethod(b.HasIndex(new[] { "Host" }, "GIN_TRGM_emoji_host"), "gin"); 1021 + NpgsqlIndexBuilderExtensions.HasOperators(b.HasIndex(new[] { "Host" }, "GIN_TRGM_emoji_host"), new[] { "gin_trgm_ops" }); 1022 + 1023 + b.HasIndex(new[] { "Name" }, "GIN_TRGM_emoji_name"); 1024 + 1025 + NpgsqlIndexBuilderExtensions.HasMethod(b.HasIndex(new[] { "Name" }, "GIN_TRGM_emoji_name"), "gin"); 1026 + NpgsqlIndexBuilderExtensions.HasOperators(b.HasIndex(new[] { "Name" }, "GIN_TRGM_emoji_name"), new[] { "gin_trgm_ops" }); 1027 + 1028 + b.ToTable("emoji"); 1029 + }); 1030 + 1031 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Filter", b => 1032 + { 1033 + b.Property<long>("Id") 1034 + .ValueGeneratedOnAdd() 1035 + .HasColumnType("bigint") 1036 + .HasColumnName("id"); 1037 + 1038 + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id")); 1039 + 1040 + b.Property<Filter.FilterAction>("Action") 1041 + .HasColumnType("filter_action_enum") 1042 + .HasColumnName("action"); 1043 + 1044 + b.PrimitiveCollection<List<Filter.FilterContext>>("Contexts") 1045 + .IsRequired() 1046 + .ValueGeneratedOnAdd() 1047 + .HasColumnType("filter_context_enum[]") 1048 + .HasColumnName("contexts") 1049 + .HasDefaultValueSql("'{}'::public.filter_context_enum[]"); 1050 + 1051 + b.Property<DateTime?>("Expiry") 1052 + .HasColumnType("timestamp with time zone") 1053 + .HasColumnName("expiry"); 1054 + 1055 + b.PrimitiveCollection<List<string>>("Keywords") 1056 + .IsRequired() 1057 + .ValueGeneratedOnAdd() 1058 + .HasColumnType("text[]") 1059 + .HasColumnName("keywords") 1060 + .HasDefaultValueSql("'{}'::varchar[]"); 1061 + 1062 + b.Property<string>("Name") 1063 + .IsRequired() 1064 + .HasColumnType("text") 1065 + .HasColumnName("name"); 1066 + 1067 + b.Property<string>("user_id") 1068 + .HasColumnType("character varying(32)"); 1069 + 1070 + b.HasKey("Id"); 1071 + 1072 + b.HasIndex("user_id"); 1073 + 1074 + b.ToTable("filter"); 1075 + }); 1076 + 1077 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.FollowRequest", b => 1078 + { 1079 + b.Property<string>("Id") 1080 + .HasMaxLength(32) 1081 + .HasColumnType("character varying(32)") 1082 + .HasColumnName("id"); 1083 + 1084 + b.Property<DateTime>("CreatedAt") 1085 + .HasColumnType("timestamp with time zone") 1086 + .HasColumnName("createdAt") 1087 + .HasComment("The created date of the FollowRequest."); 1088 + 1089 + b.Property<string>("FolloweeHost") 1090 + .HasMaxLength(512) 1091 + .HasColumnType("character varying(512)") 1092 + .HasColumnName("followeeHost") 1093 + .HasComment("[Denormalized]"); 1094 + 1095 + b.Property<string>("FolloweeId") 1096 + .IsRequired() 1097 + .HasMaxLength(32) 1098 + .HasColumnType("character varying(32)") 1099 + .HasColumnName("followeeId") 1100 + .HasComment("The followee user ID."); 1101 + 1102 + b.Property<string>("FolloweeInbox") 1103 + .HasMaxLength(512) 1104 + .HasColumnType("character varying(512)") 1105 + .HasColumnName("followeeInbox") 1106 + .HasComment("[Denormalized]"); 1107 + 1108 + b.Property<string>("FolloweeSharedInbox") 1109 + .HasMaxLength(512) 1110 + .HasColumnType("character varying(512)") 1111 + .HasColumnName("followeeSharedInbox") 1112 + .HasComment("[Denormalized]"); 1113 + 1114 + b.Property<string>("FollowerHost") 1115 + .HasMaxLength(512) 1116 + .HasColumnType("character varying(512)") 1117 + .HasColumnName("followerHost") 1118 + .HasComment("[Denormalized]"); 1119 + 1120 + b.Property<string>("FollowerId") 1121 + .IsRequired() 1122 + .HasMaxLength(32) 1123 + .HasColumnType("character varying(32)") 1124 + .HasColumnName("followerId") 1125 + .HasComment("The follower user ID."); 1126 + 1127 + b.Property<string>("FollowerInbox") 1128 + .HasMaxLength(512) 1129 + .HasColumnType("character varying(512)") 1130 + .HasColumnName("followerInbox") 1131 + .HasComment("[Denormalized]"); 1132 + 1133 + b.Property<string>("FollowerSharedInbox") 1134 + .HasMaxLength(512) 1135 + .HasColumnType("character varying(512)") 1136 + .HasColumnName("followerSharedInbox") 1137 + .HasComment("[Denormalized]"); 1138 + 1139 + b.Property<Guid?>("RelationshipId") 1140 + .HasColumnType("uuid") 1141 + .HasColumnName("relationshipId"); 1142 + 1143 + b.Property<string>("RequestId") 1144 + .HasMaxLength(512) 1145 + .HasColumnType("character varying(512)") 1146 + .HasColumnName("requestId") 1147 + .HasComment("id of Follow Activity."); 1148 + 1149 + b.HasKey("Id"); 1150 + 1151 + b.HasIndex("FolloweeId"); 1152 + 1153 + b.HasIndex("FollowerId"); 1154 + 1155 + b.HasIndex("FollowerId", "FolloweeId") 1156 + .IsUnique(); 1157 + 1158 + b.ToTable("follow_request"); 1159 + }); 1160 + 1161 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Following", b => 1162 + { 1163 + b.Property<string>("Id") 1164 + .HasMaxLength(32) 1165 + .HasColumnType("character varying(32)") 1166 + .HasColumnName("id"); 1167 + 1168 + b.Property<DateTime>("CreatedAt") 1169 + .HasColumnType("timestamp with time zone") 1170 + .HasColumnName("createdAt") 1171 + .HasComment("The created date of the Following."); 1172 + 1173 + b.Property<string>("FolloweeHost") 1174 + .HasMaxLength(512) 1175 + .HasColumnType("character varying(512)") 1176 + .HasColumnName("followeeHost") 1177 + .HasComment("[Denormalized]"); 1178 + 1179 + b.Property<string>("FolloweeId") 1180 + .IsRequired() 1181 + .HasMaxLength(32) 1182 + .HasColumnType("character varying(32)") 1183 + .HasColumnName("followeeId") 1184 + .HasComment("The followee user ID."); 1185 + 1186 + b.Property<string>("FolloweeInbox") 1187 + .HasMaxLength(512) 1188 + .HasColumnType("character varying(512)") 1189 + .HasColumnName("followeeInbox") 1190 + .HasComment("[Denormalized]"); 1191 + 1192 + b.Property<string>("FolloweeSharedInbox") 1193 + .HasMaxLength(512) 1194 + .HasColumnType("character varying(512)") 1195 + .HasColumnName("followeeSharedInbox") 1196 + .HasComment("[Denormalized]"); 1197 + 1198 + b.Property<string>("FollowerHost") 1199 + .HasMaxLength(512) 1200 + .HasColumnType("character varying(512)") 1201 + .HasColumnName("followerHost") 1202 + .HasComment("[Denormalized]"); 1203 + 1204 + b.Property<string>("FollowerId") 1205 + .IsRequired() 1206 + .HasMaxLength(32) 1207 + .HasColumnType("character varying(32)") 1208 + .HasColumnName("followerId") 1209 + .HasComment("The follower user ID."); 1210 + 1211 + b.Property<string>("FollowerInbox") 1212 + .HasMaxLength(512) 1213 + .HasColumnType("character varying(512)") 1214 + .HasColumnName("followerInbox") 1215 + .HasComment("[Denormalized]"); 1216 + 1217 + b.Property<string>("FollowerSharedInbox") 1218 + .HasMaxLength(512) 1219 + .HasColumnType("character varying(512)") 1220 + .HasColumnName("followerSharedInbox") 1221 + .HasComment("[Denormalized]"); 1222 + 1223 + b.Property<Guid?>("RelationshipId") 1224 + .HasColumnType("uuid") 1225 + .HasColumnName("relationshipId"); 1226 + 1227 + b.HasKey("Id"); 1228 + 1229 + b.HasIndex("CreatedAt"); 1230 + 1231 + b.HasIndex("FolloweeHost"); 1232 + 1233 + b.HasIndex("FolloweeId"); 1234 + 1235 + b.HasIndex("FollowerHost"); 1236 + 1237 + b.HasIndex("FollowerId"); 1238 + 1239 + b.HasIndex("FollowerId", "FolloweeId") 1240 + .IsUnique(); 1241 + 1242 + b.ToTable("following"); 1243 + }); 1244 + 1245 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.GalleryLike", b => 1246 + { 1247 + b.Property<string>("Id") 1248 + .HasMaxLength(32) 1249 + .HasColumnType("character varying(32)") 1250 + .HasColumnName("id"); 1251 + 1252 + b.Property<DateTime>("CreatedAt") 1253 + .HasColumnType("timestamp with time zone") 1254 + .HasColumnName("createdAt"); 1255 + 1256 + b.Property<string>("PostId") 1257 + .IsRequired() 1258 + .HasMaxLength(32) 1259 + .HasColumnType("character varying(32)") 1260 + .HasColumnName("postId"); 1261 + 1262 + b.Property<string>("UserId") 1263 + .IsRequired() 1264 + .HasMaxLength(32) 1265 + .HasColumnType("character varying(32)") 1266 + .HasColumnName("userId"); 1267 + 1268 + b.HasKey("Id"); 1269 + 1270 + b.HasIndex("PostId"); 1271 + 1272 + b.HasIndex("UserId"); 1273 + 1274 + b.HasIndex("UserId", "PostId") 1275 + .IsUnique(); 1276 + 1277 + b.ToTable("gallery_like"); 1278 + }); 1279 + 1280 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.GalleryPost", b => 1281 + { 1282 + b.Property<string>("Id") 1283 + .HasMaxLength(32) 1284 + .HasColumnType("character varying(32)") 1285 + .HasColumnName("id"); 1286 + 1287 + b.Property<DateTime>("CreatedAt") 1288 + .HasColumnType("timestamp with time zone") 1289 + .HasColumnName("createdAt") 1290 + .HasComment("The created date of the GalleryPost."); 1291 + 1292 + b.Property<string>("Description") 1293 + .HasMaxLength(2048) 1294 + .HasColumnType("character varying(2048)") 1295 + .HasColumnName("description"); 1296 + 1297 + b.PrimitiveCollection<List<string>>("FileIds") 1298 + .IsRequired() 1299 + .ValueGeneratedOnAdd() 1300 + .HasColumnType("character varying(32)[]") 1301 + .HasColumnName("fileIds") 1302 + .HasDefaultValueSql("'{}'::character varying[]"); 1303 + 1304 + b.Property<bool>("IsSensitive") 1305 + .ValueGeneratedOnAdd() 1306 + .HasColumnType("boolean") 1307 + .HasDefaultValue(false) 1308 + .HasColumnName("isSensitive") 1309 + .HasComment("Whether the post is sensitive."); 1310 + 1311 + b.Property<int>("LikedCount") 1312 + .ValueGeneratedOnAdd() 1313 + .HasColumnType("integer") 1314 + .HasDefaultValue(0) 1315 + .HasColumnName("likedCount"); 1316 + 1317 + b.PrimitiveCollection<List<string>>("Tags") 1318 + .IsRequired() 1319 + .ValueGeneratedOnAdd() 1320 + .HasColumnType("character varying(128)[]") 1321 + .HasColumnName("tags") 1322 + .HasDefaultValueSql("'{}'::character varying[]"); 1323 + 1324 + b.Property<string>("Title") 1325 + .IsRequired() 1326 + .HasMaxLength(256) 1327 + .HasColumnType("character varying(256)") 1328 + .HasColumnName("title"); 1329 + 1330 + b.Property<DateTime>("UpdatedAt") 1331 + .HasColumnType("timestamp with time zone") 1332 + .HasColumnName("updatedAt") 1333 + .HasComment("The updated date of the GalleryPost."); 1334 + 1335 + b.Property<string>("UserId") 1336 + .IsRequired() 1337 + .HasMaxLength(32) 1338 + .HasColumnType("character varying(32)") 1339 + .HasColumnName("userId") 1340 + .HasComment("The ID of author."); 1341 + 1342 + b.HasKey("Id"); 1343 + 1344 + b.HasIndex("CreatedAt"); 1345 + 1346 + b.HasIndex("FileIds"); 1347 + 1348 + b.HasIndex("IsSensitive"); 1349 + 1350 + b.HasIndex("LikedCount"); 1351 + 1352 + b.HasIndex("Tags"); 1353 + 1354 + b.HasIndex("UpdatedAt"); 1355 + 1356 + b.HasIndex("UserId"); 1357 + 1358 + b.ToTable("gallery_post"); 1359 + }); 1360 + 1361 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Hashtag", b => 1362 + { 1363 + b.Property<string>("Id") 1364 + .HasMaxLength(32) 1365 + .HasColumnType("character varying(32)") 1366 + .HasColumnName("id"); 1367 + 1368 + b.Property<string>("Name") 1369 + .IsRequired() 1370 + .HasMaxLength(128) 1371 + .HasColumnType("character varying(128)") 1372 + .HasColumnName("name"); 1373 + 1374 + b.HasKey("Id"); 1375 + 1376 + b.HasIndex("Name") 1377 + .IsUnique(); 1378 + 1379 + b.ToTable("hashtag"); 1380 + }); 1381 + 1382 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Instance", b => 1383 + { 1384 + b.Property<string>("Id") 1385 + .HasMaxLength(32) 1386 + .HasColumnType("character varying(32)") 1387 + .HasColumnName("id"); 1388 + 1389 + b.Property<DateTime>("CaughtAt") 1390 + .HasColumnType("timestamp with time zone") 1391 + .HasColumnName("caughtAt") 1392 + .HasComment("The caught date of the Instance."); 1393 + 1394 + b.Property<string>("Description") 1395 + .HasMaxLength(4096) 1396 + .HasColumnType("character varying(4096)") 1397 + .HasColumnName("description"); 1398 + 1399 + b.Property<string>("FaviconUrl") 1400 + .HasMaxLength(4096) 1401 + .HasColumnType("character varying(4096)") 1402 + .HasColumnName("faviconUrl"); 1403 + 1404 + b.Property<string>("Host") 1405 + .IsRequired() 1406 + .HasMaxLength(512) 1407 + .HasColumnType("character varying(512)") 1408 + .HasColumnName("host") 1409 + .HasComment("The host of the Instance."); 1410 + 1411 + b.Property<string>("IconUrl") 1412 + .HasMaxLength(4096) 1413 + .HasColumnType("character varying(4096)") 1414 + .HasColumnName("iconUrl"); 1415 + 1416 + b.Property<int>("IncomingFollows") 1417 + .ValueGeneratedOnAdd() 1418 + .HasColumnType("integer") 1419 + .HasDefaultValue(0) 1420 + .HasColumnName("incomingFollows"); 1421 + 1422 + b.Property<DateTime?>("InfoUpdatedAt") 1423 + .HasColumnType("timestamp with time zone") 1424 + .HasColumnName("infoUpdatedAt"); 1425 + 1426 + b.Property<bool>("IsNotResponding") 1427 + .ValueGeneratedOnAdd() 1428 + .HasColumnType("boolean") 1429 + .HasDefaultValue(false) 1430 + .HasColumnName("isNotResponding"); 1431 + 1432 + b.Property<bool>("IsSuspended") 1433 + .ValueGeneratedOnAdd() 1434 + .HasColumnType("boolean") 1435 + .HasDefaultValue(false) 1436 + .HasColumnName("isSuspended"); 1437 + 1438 + b.Property<DateTime>("LastCommunicatedAt") 1439 + .HasColumnType("timestamp with time zone") 1440 + .HasColumnName("lastCommunicatedAt"); 1441 + 1442 + b.Property<DateTime?>("LatestRequestReceivedAt") 1443 + .HasColumnType("timestamp with time zone") 1444 + .HasColumnName("latestRequestReceivedAt"); 1445 + 1446 + b.Property<DateTime?>("LatestRequestSentAt") 1447 + .HasColumnType("timestamp with time zone") 1448 + .HasColumnName("latestRequestSentAt"); 1449 + 1450 + b.Property<int?>("LatestStatus") 1451 + .HasColumnType("integer") 1452 + .HasColumnName("latestStatus"); 1453 + 1454 + b.Property<string>("MaintainerEmail") 1455 + .HasMaxLength(256) 1456 + .HasColumnType("character varying(256)") 1457 + .HasColumnName("maintainerEmail"); 1458 + 1459 + b.Property<string>("MaintainerName") 1460 + .HasMaxLength(128) 1461 + .HasColumnType("character varying(128)") 1462 + .HasColumnName("maintainerName"); 1463 + 1464 + b.Property<string>("Name") 1465 + .HasMaxLength(256) 1466 + .HasColumnType("character varying(256)") 1467 + .HasColumnName("name"); 1468 + 1469 + b.Property<int>("NotesCount") 1470 + .ValueGeneratedOnAdd() 1471 + .HasColumnType("integer") 1472 + .HasDefaultValue(0) 1473 + .HasColumnName("notesCount") 1474 + .HasComment("The count of the notes of the Instance."); 1475 + 1476 + b.Property<bool?>("OpenRegistrations") 1477 + .HasColumnType("boolean") 1478 + .HasColumnName("openRegistrations"); 1479 + 1480 + b.Property<int>("OutgoingFollows") 1481 + .ValueGeneratedOnAdd() 1482 + .HasColumnType("integer") 1483 + .HasDefaultValue(0) 1484 + .HasColumnName("outgoingFollows"); 1485 + 1486 + b.Property<string>("SoftwareName") 1487 + .HasMaxLength(256) 1488 + .HasColumnType("character varying(256)") 1489 + .HasColumnName("softwareName") 1490 + .HasComment("The software of the Instance."); 1491 + 1492 + b.Property<string>("SoftwareVersion") 1493 + .HasMaxLength(256) 1494 + .HasColumnType("character varying(256)") 1495 + .HasColumnName("softwareVersion"); 1496 + 1497 + b.Property<string>("ThemeColor") 1498 + .HasMaxLength(64) 1499 + .HasColumnType("character varying(64)") 1500 + .HasColumnName("themeColor"); 1501 + 1502 + b.Property<int>("UsersCount") 1503 + .ValueGeneratedOnAdd() 1504 + .HasColumnType("integer") 1505 + .HasDefaultValue(0) 1506 + .HasColumnName("usersCount") 1507 + .HasComment("The count of the users of the Instance."); 1508 + 1509 + b.HasKey("Id"); 1510 + 1511 + b.HasIndex("CaughtAt"); 1512 + 1513 + b.HasIndex("Host") 1514 + .IsUnique(); 1515 + 1516 + b.HasIndex("IncomingFollows"); 1517 + 1518 + b.HasIndex("IsSuspended"); 1519 + 1520 + b.HasIndex("OutgoingFollows"); 1521 + 1522 + b.ToTable("instance"); 1523 + }); 1524 + 1525 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.InteractionStamp", b => 1526 + { 1527 + b.Property<string>("Id") 1528 + .HasMaxLength(32) 1529 + .HasColumnType("character varying(32)") 1530 + .HasColumnName("id"); 1531 + 1532 + b.Property<string>("NoteId") 1533 + .IsRequired() 1534 + .HasMaxLength(32) 1535 + .HasColumnType("character varying(32)") 1536 + .HasColumnName("noteId") 1537 + .HasComment("The note doing the interaction (quote, reply, whatever)"); 1538 + 1539 + b.Property<string>("TargetNoteId") 1540 + .IsRequired() 1541 + .HasMaxLength(32) 1542 + .HasColumnType("character varying(32)") 1543 + .HasColumnName("targetNoteId") 1544 + .HasComment("The note being interacted with"); 1545 + 1546 + b.Property<InteractionStamp.InteractionStampType>("Type") 1547 + .HasColumnType("interaction_stamp_type") 1548 + .HasColumnName("type"); 1549 + 1550 + b.HasKey("Id"); 1551 + 1552 + b.HasIndex("NoteId") 1553 + .IsUnique(); 1554 + 1555 + b.HasIndex("TargetNoteId"); 1556 + 1557 + b.ToTable("interaction_stamp"); 1558 + }); 1559 + 1560 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Job", b => 1561 + { 1562 + b.Property<Guid>("Id") 1563 + .HasColumnType("uuid") 1564 + .HasColumnName("id"); 1565 + 1566 + b.Property<string>("Data") 1567 + .IsRequired() 1568 + .HasColumnType("text") 1569 + .HasColumnName("data"); 1570 + 1571 + b.Property<DateTime?>("DelayedUntil") 1572 + .HasColumnType("timestamp with time zone") 1573 + .HasColumnName("delayed_until"); 1574 + 1575 + b.Property<string>("Exception") 1576 + .HasColumnType("text") 1577 + .HasColumnName("exception"); 1578 + 1579 + b.Property<string>("ExceptionMessage") 1580 + .HasColumnType("text") 1581 + .HasColumnName("exception_message"); 1582 + 1583 + b.Property<string>("ExceptionSource") 1584 + .HasColumnType("text") 1585 + .HasColumnName("exception_source"); 1586 + 1587 + b.Property<DateTime?>("FinishedAt") 1588 + .HasColumnType("timestamp with time zone") 1589 + .HasColumnName("finished_at"); 1590 + 1591 + b.Property<string>("Mutex") 1592 + .HasColumnType("text") 1593 + .HasColumnName("mutex"); 1594 + 1595 + b.Property<string>("Queue") 1596 + .IsRequired() 1597 + .HasColumnType("text") 1598 + .HasColumnName("queue"); 1599 + 1600 + b.Property<DateTime>("QueuedAt") 1601 + .ValueGeneratedOnAdd() 1602 + .HasColumnType("timestamp with time zone") 1603 + .HasColumnName("queued_at") 1604 + .HasDefaultValueSql("now()"); 1605 + 1606 + b.Property<int>("RetryCount") 1607 + .HasColumnType("integer") 1608 + .HasColumnName("retry_count"); 1609 + 1610 + b.Property<string>("StackTrace") 1611 + .HasColumnType("text") 1612 + .HasColumnName("stack_trace"); 1613 + 1614 + b.Property<DateTime?>("StartedAt") 1615 + .HasColumnType("timestamp with time zone") 1616 + .HasColumnName("started_at"); 1617 + 1618 + b.Property<Job.JobStatus>("Status") 1619 + .ValueGeneratedOnAdd() 1620 + .HasColumnType("job_status") 1621 + .HasDefaultValue(Job.JobStatus.Queued) 1622 + .HasColumnName("status"); 1623 + 1624 + b.HasKey("Id"); 1625 + 1626 + b.HasIndex("DelayedUntil"); 1627 + 1628 + b.HasIndex("FinishedAt"); 1629 + 1630 + b.HasIndex("Mutex") 1631 + .IsUnique(); 1632 + 1633 + b.HasIndex("Queue"); 1634 + 1635 + b.HasIndex("Status"); 1636 + 1637 + b.ToTable("jobs"); 1638 + }); 1639 + 1640 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Marker", b => 1641 + { 1642 + b.Property<string>("UserId") 1643 + .HasMaxLength(32) 1644 + .HasColumnType("character varying(32)") 1645 + .HasColumnName("userId"); 1646 + 1647 + b.Property<Marker.MarkerType>("Type") 1648 + .HasMaxLength(32) 1649 + .HasColumnType("marker_type_enum") 1650 + .HasColumnName("type"); 1651 + 1652 + b.Property<DateTime>("LastUpdatedAt") 1653 + .HasColumnType("timestamp with time zone") 1654 + .HasColumnName("lastUpdated"); 1655 + 1656 + b.Property<string>("Position") 1657 + .IsRequired() 1658 + .HasMaxLength(32) 1659 + .HasColumnType("character varying(32)") 1660 + .HasColumnName("position"); 1661 + 1662 + b.Property<int>("Version") 1663 + .IsConcurrencyToken() 1664 + .ValueGeneratedOnAdd() 1665 + .HasColumnType("integer") 1666 + .HasDefaultValue(0) 1667 + .HasColumnName("version"); 1668 + 1669 + b.HasKey("UserId", "Type"); 1670 + 1671 + b.HasIndex("UserId"); 1672 + 1673 + b.ToTable("marker"); 1674 + }); 1675 + 1676 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.MessagingMessage", b => 1677 + { 1678 + b.Property<string>("Id") 1679 + .HasMaxLength(32) 1680 + .HasColumnType("character varying(32)") 1681 + .HasColumnName("id"); 1682 + 1683 + b.Property<DateTime>("CreatedAt") 1684 + .HasColumnType("timestamp with time zone") 1685 + .HasColumnName("createdAt") 1686 + .HasComment("The created date of the MessagingMessage."); 1687 + 1688 + b.Property<string>("FileId") 1689 + .HasMaxLength(32) 1690 + .HasColumnType("character varying(32)") 1691 + .HasColumnName("fileId"); 1692 + 1693 + b.Property<string>("GroupId") 1694 + .HasMaxLength(32) 1695 + .HasColumnType("character varying(32)") 1696 + .HasColumnName("groupId") 1697 + .HasComment("The recipient group ID."); 1698 + 1699 + b.Property<bool>("IsRead") 1700 + .ValueGeneratedOnAdd() 1701 + .HasColumnType("boolean") 1702 + .HasDefaultValue(false) 1703 + .HasColumnName("isRead"); 1704 + 1705 + b.PrimitiveCollection<List<string>>("Reads") 1706 + .IsRequired() 1707 + .ValueGeneratedOnAdd() 1708 + .HasColumnType("character varying(32)[]") 1709 + .HasColumnName("reads") 1710 + .HasDefaultValueSql("'{}'::character varying[]"); 1711 + 1712 + b.Property<string>("RecipientId") 1713 + .HasMaxLength(32) 1714 + .HasColumnType("character varying(32)") 1715 + .HasColumnName("recipientId") 1716 + .HasComment("The recipient user ID."); 1717 + 1718 + b.Property<string>("Text") 1719 + .HasMaxLength(4096) 1720 + .HasColumnType("character varying(4096)") 1721 + .HasColumnName("text"); 1722 + 1723 + b.Property<string>("Uri") 1724 + .HasMaxLength(512) 1725 + .HasColumnType("character varying(512)") 1726 + .HasColumnName("uri"); 1727 + 1728 + b.Property<string>("UserId") 1729 + .IsRequired() 1730 + .HasMaxLength(32) 1731 + .HasColumnType("character varying(32)") 1732 + .HasColumnName("userId") 1733 + .HasComment("The sender user ID."); 1734 + 1735 + b.HasKey("Id"); 1736 + 1737 + b.HasIndex("CreatedAt"); 1738 + 1739 + b.HasIndex("FileId"); 1740 + 1741 + b.HasIndex("GroupId"); 1742 + 1743 + b.HasIndex("RecipientId"); 1744 + 1745 + b.HasIndex("UserId"); 1746 + 1747 + b.ToTable("messaging_message"); 1748 + }); 1749 + 1750 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Meta", b => 1751 + { 1752 + b.Property<string>("Id") 1753 + .HasMaxLength(32) 1754 + .HasColumnType("character varying(32)") 1755 + .HasColumnName("id"); 1756 + 1757 + b.PrimitiveCollection<List<string>>("AllowedHosts") 1758 + .IsRequired() 1759 + .ValueGeneratedOnAdd() 1760 + .HasColumnType("character varying(256)[]") 1761 + .HasColumnName("allowedHosts") 1762 + .HasDefaultValueSql("'{}'::character varying[]"); 1763 + 1764 + b.Property<string>("AutofollowedAccount") 1765 + .HasMaxLength(128) 1766 + .HasColumnType("character varying(128)") 1767 + .HasColumnName("autofollowedAccount"); 1768 + 1769 + b.Property<string>("BackgroundImageUrl") 1770 + .HasMaxLength(512) 1771 + .HasColumnType("character varying(512)") 1772 + .HasColumnName("backgroundImageUrl"); 1773 + 1774 + b.Property<string>("BannerUrl") 1775 + .HasMaxLength(512) 1776 + .HasColumnType("character varying(512)") 1777 + .HasColumnName("bannerUrl"); 1778 + 1779 + b.PrimitiveCollection<List<string>>("BlockedHosts") 1780 + .IsRequired() 1781 + .ValueGeneratedOnAdd() 1782 + .HasColumnType("character varying(256)[]") 1783 + .HasColumnName("blockedHosts") 1784 + .HasDefaultValueSql("'{}'::character varying[]"); 1785 + 1786 + b.Property<bool>("CacheRemoteFiles") 1787 + .ValueGeneratedOnAdd() 1788 + .HasColumnType("boolean") 1789 + .HasDefaultValue(false) 1790 + .HasColumnName("cacheRemoteFiles"); 1791 + 1792 + b.PrimitiveCollection<List<string>>("CustomMotd") 1793 + .IsRequired() 1794 + .ValueGeneratedOnAdd() 1795 + .HasColumnType("character varying(256)[]") 1796 + .HasColumnName("customMOTD") 1797 + .HasDefaultValueSql("'{}'::character varying[]"); 1798 + 1799 + b.PrimitiveCollection<List<string>>("CustomSplashIcons") 1800 + .IsRequired() 1801 + .ValueGeneratedOnAdd() 1802 + .HasColumnType("character varying(256)[]") 1803 + .HasColumnName("customSplashIcons") 1804 + .HasDefaultValueSql("'{}'::character varying[]"); 1805 + 1806 + b.Property<string>("DeeplAuthKey") 1807 + .HasMaxLength(128) 1808 + .HasColumnType("character varying(128)") 1809 + .HasColumnName("deeplAuthKey"); 1810 + 1811 + b.Property<bool>("DeeplIsPro") 1812 + .ValueGeneratedOnAdd() 1813 + .HasColumnType("boolean") 1814 + .HasDefaultValue(false) 1815 + .HasColumnName("deeplIsPro"); 1816 + 1817 + b.Property<string>("DefaultDarkTheme") 1818 + .HasMaxLength(8192) 1819 + .HasColumnType("character varying(8192)") 1820 + .HasColumnName("defaultDarkTheme"); 1821 + 1822 + b.Property<string>("DefaultLightTheme") 1823 + .HasMaxLength(8192) 1824 + .HasColumnType("character varying(8192)") 1825 + .HasColumnName("defaultLightTheme"); 1826 + 1827 + b.Property<string>("DefaultReaction") 1828 + .IsRequired() 1829 + .ValueGeneratedOnAdd() 1830 + .HasMaxLength(256) 1831 + .HasColumnType("character varying(256)") 1832 + .HasColumnName("defaultReaction") 1833 + .HasDefaultValueSql("'⭐'::character varying"); 1834 + 1835 + b.Property<string>("Description") 1836 + .HasMaxLength(1024) 1837 + .HasColumnType("character varying(1024)") 1838 + .HasColumnName("description"); 1839 + 1840 + b.Property<bool>("DisableGlobalTimeline") 1841 + .ValueGeneratedOnAdd() 1842 + .HasColumnType("boolean") 1843 + .HasDefaultValue(false) 1844 + .HasColumnName("disableGlobalTimeline"); 1845 + 1846 + b.Property<bool>("DisableLocalTimeline") 1847 + .ValueGeneratedOnAdd() 1848 + .HasColumnType("boolean") 1849 + .HasDefaultValue(false) 1850 + .HasColumnName("disableLocalTimeline"); 1851 + 1852 + b.Property<bool>("DisableRecommendedTimeline") 1853 + .ValueGeneratedOnAdd() 1854 + .HasColumnType("boolean") 1855 + .HasDefaultValue(true) 1856 + .HasColumnName("disableRecommendedTimeline"); 1857 + 1858 + b.Property<bool>("DisableRegistration") 1859 + .ValueGeneratedOnAdd() 1860 + .HasColumnType("boolean") 1861 + .HasDefaultValue(false) 1862 + .HasColumnName("disableRegistration"); 1863 + 1864 + b.Property<string>("DiscordClientId") 1865 + .HasMaxLength(128) 1866 + .HasColumnType("character varying(128)") 1867 + .HasColumnName("discordClientId"); 1868 + 1869 + b.Property<string>("DiscordClientSecret") 1870 + .HasMaxLength(128) 1871 + .HasColumnType("character varying(128)") 1872 + .HasColumnName("discordClientSecret"); 1873 + 1874 + b.Property<string>("DonationLink") 1875 + .HasMaxLength(256) 1876 + .HasColumnType("character varying(256)") 1877 + .HasColumnName("donationLink"); 1878 + 1879 + b.Property<string>("Email") 1880 + .HasMaxLength(128) 1881 + .HasColumnType("character varying(128)") 1882 + .HasColumnName("email"); 1883 + 1884 + b.Property<bool>("EmailRequiredForSignup") 1885 + .ValueGeneratedOnAdd() 1886 + .HasColumnType("boolean") 1887 + .HasDefaultValue(false) 1888 + .HasColumnName("emailRequiredForSignup"); 1889 + 1890 + b.Property<bool>("EnableActiveEmailValidation") 1891 + .ValueGeneratedOnAdd() 1892 + .HasColumnType("boolean") 1893 + .HasDefaultValue(true) 1894 + .HasColumnName("enableActiveEmailValidation"); 1895 + 1896 + b.Property<bool>("EnableDiscordIntegration") 1897 + .ValueGeneratedOnAdd() 1898 + .HasColumnType("boolean") 1899 + .HasDefaultValue(false) 1900 + .HasColumnName("enableDiscordIntegration"); 1901 + 1902 + b.Property<bool>("EnableEmail") 1903 + .ValueGeneratedOnAdd() 1904 + .HasColumnType("boolean") 1905 + .HasDefaultValue(false) 1906 + .HasColumnName("enableEmail"); 1907 + 1908 + b.Property<bool>("EnableGithubIntegration") 1909 + .ValueGeneratedOnAdd() 1910 + .HasColumnType("boolean") 1911 + .HasDefaultValue(false) 1912 + .HasColumnName("enableGithubIntegration"); 1913 + 1914 + b.Property<bool>("EnableHcaptcha") 1915 + .ValueGeneratedOnAdd() 1916 + .HasColumnType("boolean") 1917 + .HasDefaultValue(false) 1918 + .HasColumnName("enableHcaptcha"); 1919 + 1920 + b.Property<bool>("EnableIdenticonGeneration") 1921 + .ValueGeneratedOnAdd() 1922 + .HasColumnType("boolean") 1923 + .HasDefaultValue(true) 1924 + .HasColumnName("enableIdenticonGeneration"); 1925 + 1926 + b.Property<bool>("EnableIpLogging") 1927 + .ValueGeneratedOnAdd() 1928 + .HasColumnType("boolean") 1929 + .HasDefaultValue(false) 1930 + .HasColumnName("enableIpLogging"); 1931 + 1932 + b.Property<bool>("EnableRecaptcha") 1933 + .ValueGeneratedOnAdd() 1934 + .HasColumnType("boolean") 1935 + .HasDefaultValue(false) 1936 + .HasColumnName("enableRecaptcha"); 1937 + 1938 + b.Property<bool>("EnableServerMachineStats") 1939 + .ValueGeneratedOnAdd() 1940 + .HasColumnType("boolean") 1941 + .HasDefaultValue(false) 1942 + .HasColumnName("enableServerMachineStats"); 1943 + 1944 + b.Property<string>("ErrorImageUrl") 1945 + .ValueGeneratedOnAdd() 1946 + .HasMaxLength(512) 1947 + .HasColumnType("character varying(512)") 1948 + .HasColumnName("errorImageUrl") 1949 + .HasDefaultValueSql("'/static-assets/badges/error.png'::character varying"); 1950 + 1951 + b.Property<Dictionary<string, bool>>("ExperimentalFeatures") 1952 + .IsRequired() 1953 + .ValueGeneratedOnAdd() 1954 + .HasColumnType("jsonb") 1955 + .HasColumnName("experimentalFeatures") 1956 + .HasDefaultValueSql("'{}'::jsonb"); 1957 + 1958 + b.Property<string>("FeedbackUrl") 1959 + .ValueGeneratedOnAdd() 1960 + .HasMaxLength(512) 1961 + .HasColumnType("character varying(512)") 1962 + .HasColumnName("feedbackUrl") 1963 + .HasDefaultValueSql("'https://iceshrimp.dev/iceshrimp/iceshrimp/issues/new'::character varying"); 1964 + 1965 + b.Property<string>("GithubClientId") 1966 + .HasMaxLength(128) 1967 + .HasColumnType("character varying(128)") 1968 + .HasColumnName("githubClientId"); 1969 + 1970 + b.Property<string>("GithubClientSecret") 1971 + .HasMaxLength(128) 1972 + .HasColumnType("character varying(128)") 1973 + .HasColumnName("githubClientSecret"); 1974 + 1975 + b.Property<string>("HcaptchaSecretKey") 1976 + .HasMaxLength(64) 1977 + .HasColumnType("character varying(64)") 1978 + .HasColumnName("hcaptchaSecretKey"); 1979 + 1980 + b.Property<string>("HcaptchaSiteKey") 1981 + .HasMaxLength(64) 1982 + .HasColumnType("character varying(64)") 1983 + .HasColumnName("hcaptchaSiteKey"); 1984 + 1985 + b.PrimitiveCollection<List<string>>("HiddenTags") 1986 + .IsRequired() 1987 + .ValueGeneratedOnAdd() 1988 + .HasColumnType("character varying(256)[]") 1989 + .HasColumnName("hiddenTags") 1990 + .HasDefaultValueSql("'{}'::character varying[]"); 1991 + 1992 + b.Property<string>("IconUrl") 1993 + .HasMaxLength(512) 1994 + .HasColumnType("character varying(512)") 1995 + .HasColumnName("iconUrl"); 1996 + 1997 + b.PrimitiveCollection<List<string>>("Langs") 1998 + .IsRequired() 1999 + .ValueGeneratedOnAdd() 2000 + .HasColumnType("character varying(64)[]") 2001 + .HasColumnName("langs") 2002 + .HasDefaultValueSql("'{}'::character varying[]"); 2003 + 2004 + b.Property<string>("LibreTranslateApiKey") 2005 + .HasMaxLength(128) 2006 + .HasColumnType("character varying(128)") 2007 + .HasColumnName("libreTranslateApiKey"); 2008 + 2009 + b.Property<string>("LibreTranslateApiUrl") 2010 + .HasMaxLength(512) 2011 + .HasColumnType("character varying(512)") 2012 + .HasColumnName("libreTranslateApiUrl"); 2013 + 2014 + b.Property<int>("LocalDriveCapacityMb") 2015 + .ValueGeneratedOnAdd() 2016 + .HasColumnType("integer") 2017 + .HasDefaultValue(1024) 2018 + .HasColumnName("localDriveCapacityMb") 2019 + .HasComment("Drive capacity of a local user (MB)"); 2020 + 2021 + b.Property<string>("LogoImageUrl") 2022 + .HasMaxLength(512) 2023 + .HasColumnType("character varying(512)") 2024 + .HasColumnName("logoImageUrl"); 2025 + 2026 + b.Property<string>("MaintainerEmail") 2027 + .HasMaxLength(128) 2028 + .HasColumnType("character varying(128)") 2029 + .HasColumnName("maintainerEmail"); 2030 + 2031 + b.Property<string>("MaintainerName") 2032 + .HasMaxLength(128) 2033 + .HasColumnType("character varying(128)") 2034 + .HasColumnName("maintainerName"); 2035 + 2036 + b.Property<string>("MascotImageUrl") 2037 + .ValueGeneratedOnAdd() 2038 + .HasMaxLength(512) 2039 + .HasColumnType("character varying(512)") 2040 + .HasColumnName("mascotImageUrl") 2041 + .HasDefaultValueSql("'/static-assets/badges/info.png'::character varying"); 2042 + 2043 + b.Property<string>("Name") 2044 + .HasMaxLength(128) 2045 + .HasColumnType("character varying(128)") 2046 + .HasColumnName("name"); 2047 + 2048 + b.Property<string>("ObjectStorageAccessKey") 2049 + .HasMaxLength(512) 2050 + .HasColumnType("character varying(512)") 2051 + .HasColumnName("objectStorageAccessKey"); 2052 + 2053 + b.Property<string>("ObjectStorageBaseUrl") 2054 + .HasMaxLength(512) 2055 + .HasColumnType("character varying(512)") 2056 + .HasColumnName("objectStorageBaseUrl"); 2057 + 2058 + b.Property<string>("ObjectStorageBucket") 2059 + .HasMaxLength(512) 2060 + .HasColumnType("character varying(512)") 2061 + .HasColumnName("objectStorageBucket"); 2062 + 2063 + b.Property<string>("ObjectStorageEndpoint") 2064 + .HasMaxLength(512) 2065 + .HasColumnType("character varying(512)") 2066 + .HasColumnName("objectStorageEndpoint"); 2067 + 2068 + b.Property<int?>("ObjectStoragePort") 2069 + .HasColumnType("integer") 2070 + .HasColumnName("objectStoragePort"); 2071 + 2072 + b.Property<string>("ObjectStoragePrefix") 2073 + .HasMaxLength(512) 2074 + .HasColumnType("character varying(512)") 2075 + .HasColumnName("objectStoragePrefix"); 2076 + 2077 + b.Property<string>("ObjectStorageRegion") 2078 + .HasMaxLength(512) 2079 + .HasColumnType("character varying(512)") 2080 + .HasColumnName("objectStorageRegion"); 2081 + 2082 + b.Property<bool>("ObjectStorageS3ForcePathStyle") 2083 + .ValueGeneratedOnAdd() 2084 + .HasColumnType("boolean") 2085 + .HasDefaultValue(true) 2086 + .HasColumnName("objectStorageS3ForcePathStyle"); 2087 + 2088 + b.Property<string>("ObjectStorageSecretKey") 2089 + .HasMaxLength(512) 2090 + .HasColumnType("character varying(512)") 2091 + .HasColumnName("objectStorageSecretKey"); 2092 + 2093 + b.Property<bool>("ObjectStorageSetPublicRead") 2094 + .ValueGeneratedOnAdd() 2095 + .HasColumnType("boolean") 2096 + .HasDefaultValue(false) 2097 + .HasColumnName("objectStorageSetPublicRead"); 2098 + 2099 + b.Property<bool>("ObjectStorageUseProxy") 2100 + .ValueGeneratedOnAdd() 2101 + .HasColumnType("boolean") 2102 + .HasDefaultValue(true) 2103 + .HasColumnName("objectStorageUseProxy"); 2104 + 2105 + b.Property<bool>("ObjectStorageUseSsl") 2106 + .ValueGeneratedOnAdd() 2107 + .HasColumnType("boolean") 2108 + .HasDefaultValue(true) 2109 + .HasColumnName("objectStorageUseSSL"); 2110 + 2111 + b.Property<string>("PinnedClipId") 2112 + .HasMaxLength(32) 2113 + .HasColumnType("character varying(32)") 2114 + .HasColumnName("pinnedClipId"); 2115 + 2116 + b.PrimitiveCollection<List<string>>("PinnedPages") 2117 + .IsRequired() 2118 + .ValueGeneratedOnAdd() 2119 + .HasColumnType("character varying(512)[]") 2120 + .HasColumnName("pinnedPages") 2121 + .HasDefaultValueSql("'{/featured,/channels,/explore,/pages,/about-iceshrimp}'::character varying[]"); 2122 + 2123 + b.PrimitiveCollection<List<string>>("PinnedUsers") 2124 + .IsRequired() 2125 + .ValueGeneratedOnAdd() 2126 + .HasColumnType("character varying(256)[]") 2127 + .HasColumnName("pinnedUsers") 2128 + .HasDefaultValueSql("'{}'::character varying[]"); 2129 + 2130 + b.Property<bool>("PrivateMode") 2131 + .ValueGeneratedOnAdd() 2132 + .HasColumnType("boolean") 2133 + .HasDefaultValue(false) 2134 + .HasColumnName("privateMode"); 2135 + 2136 + b.Property<string>("RecaptchaSecretKey") 2137 + .HasMaxLength(64) 2138 + .HasColumnType("character varying(64)") 2139 + .HasColumnName("recaptchaSecretKey"); 2140 + 2141 + b.Property<string>("RecaptchaSiteKey") 2142 + .HasMaxLength(64) 2143 + .HasColumnType("character varying(64)") 2144 + .HasColumnName("recaptchaSiteKey"); 2145 + 2146 + b.PrimitiveCollection<List<string>>("RecommendedInstances") 2147 + .IsRequired() 2148 + .ValueGeneratedOnAdd() 2149 + .HasColumnType("character varying(256)[]") 2150 + .HasColumnName("recommendedInstances") 2151 + .HasDefaultValueSql("'{}'::character varying[]"); 2152 + 2153 + b.Property<int>("RemoteDriveCapacityMb") 2154 + .ValueGeneratedOnAdd() 2155 + .HasColumnType("integer") 2156 + .HasDefaultValue(32) 2157 + .HasColumnName("remoteDriveCapacityMb") 2158 + .HasComment("Drive capacity of a remote user (MB)"); 2159 + 2160 + b.Property<string>("RepositoryUrl") 2161 + .IsRequired() 2162 + .ValueGeneratedOnAdd() 2163 + .HasMaxLength(512) 2164 + .HasColumnType("character varying(512)") 2165 + .HasColumnName("repositoryUrl") 2166 + .HasDefaultValueSql("'https://iceshrimp.dev/iceshrimp/iceshrimp'::character varying"); 2167 + 2168 + b.Property<bool>("SecureMode") 2169 + .ValueGeneratedOnAdd() 2170 + .HasColumnType("boolean") 2171 + .HasDefaultValue(true) 2172 + .HasColumnName("secureMode"); 2173 + 2174 + b.PrimitiveCollection<List<string>>("SilencedHosts") 2175 + .IsRequired() 2176 + .ValueGeneratedOnAdd() 2177 + .HasColumnType("character varying(256)[]") 2178 + .HasColumnName("silencedHosts") 2179 + .HasDefaultValueSql("'{}'::character varying[]"); 2180 + 2181 + b.Property<string>("SmtpHost") 2182 + .HasMaxLength(128) 2183 + .HasColumnType("character varying(128)") 2184 + .HasColumnName("smtpHost"); 2185 + 2186 + b.Property<string>("SmtpPass") 2187 + .HasMaxLength(1024) 2188 + .HasColumnType("character varying(1024)") 2189 + .HasColumnName("smtpPass"); 2190 + 2191 + b.Property<int?>("SmtpPort") 2192 + .HasColumnType("integer") 2193 + .HasColumnName("smtpPort"); 2194 + 2195 + b.Property<bool>("SmtpSecure") 2196 + .ValueGeneratedOnAdd() 2197 + .HasColumnType("boolean") 2198 + .HasDefaultValue(false) 2199 + .HasColumnName("smtpSecure"); 2200 + 2201 + b.Property<string>("SmtpUser") 2202 + .HasMaxLength(1024) 2203 + .HasColumnType("character varying(1024)") 2204 + .HasColumnName("smtpUser"); 2205 + 2206 + b.Property<string>("SummalyProxy") 2207 + .HasMaxLength(128) 2208 + .HasColumnType("character varying(128)") 2209 + .HasColumnName("summalyProxy"); 2210 + 2211 + b.Property<string>("SwPrivateKey") 2212 + .IsRequired() 2213 + .HasMaxLength(128) 2214 + .HasColumnType("character varying(128)") 2215 + .HasColumnName("swPrivateKey"); 2216 + 2217 + b.Property<string>("SwPublicKey") 2218 + .IsRequired() 2219 + .HasMaxLength(128) 2220 + .HasColumnType("character varying(128)") 2221 + .HasColumnName("swPublicKey"); 2222 + 2223 + b.Property<string>("ThemeColor") 2224 + .HasMaxLength(512) 2225 + .HasColumnType("character varying(512)") 2226 + .HasColumnName("themeColor"); 2227 + 2228 + b.Property<string>("ToSurl") 2229 + .HasMaxLength(512) 2230 + .HasColumnType("character varying(512)") 2231 + .HasColumnName("ToSUrl"); 2232 + 2233 + b.Property<bool>("UseObjectStorage") 2234 + .ValueGeneratedOnAdd() 2235 + .HasColumnType("boolean") 2236 + .HasDefaultValue(false) 2237 + .HasColumnName("useObjectStorage"); 2238 + 2239 + b.HasKey("Id"); 2240 + 2241 + b.ToTable("meta"); 2242 + }); 2243 + 2244 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.MetaStoreEntry", b => 2245 + { 2246 + b.Property<string>("Key") 2247 + .HasMaxLength(128) 2248 + .HasColumnType("character varying(128)") 2249 + .HasColumnName("key"); 2250 + 2251 + b.Property<string>("Value") 2252 + .HasColumnType("text") 2253 + .HasColumnName("value"); 2254 + 2255 + b.HasKey("Key"); 2256 + 2257 + b.HasIndex("Key", "Value"); 2258 + 2259 + b.ToTable("meta_store"); 2260 + }); 2261 + 2262 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.ModerationLog", b => 2263 + { 2264 + b.Property<string>("Id") 2265 + .HasMaxLength(32) 2266 + .HasColumnType("character varying(32)") 2267 + .HasColumnName("id"); 2268 + 2269 + b.Property<DateTime>("CreatedAt") 2270 + .HasColumnType("timestamp with time zone") 2271 + .HasColumnName("createdAt") 2272 + .HasComment("The created date of the ModerationLog."); 2273 + 2274 + b.Property<string>("Info") 2275 + .IsRequired() 2276 + .HasColumnType("jsonb") 2277 + .HasColumnName("info"); 2278 + 2279 + b.Property<string>("Type") 2280 + .IsRequired() 2281 + .HasMaxLength(128) 2282 + .HasColumnType("character varying(128)") 2283 + .HasColumnName("type"); 2284 + 2285 + b.Property<string>("UserId") 2286 + .IsRequired() 2287 + .HasMaxLength(32) 2288 + .HasColumnType("character varying(32)") 2289 + .HasColumnName("userId"); 2290 + 2291 + b.HasKey("Id"); 2292 + 2293 + b.HasIndex("UserId"); 2294 + 2295 + b.ToTable("moderation_log"); 2296 + }); 2297 + 2298 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Muting", b => 2299 + { 2300 + b.Property<string>("Id") 2301 + .HasMaxLength(32) 2302 + .HasColumnType("character varying(32)") 2303 + .HasColumnName("id"); 2304 + 2305 + b.Property<DateTime>("CreatedAt") 2306 + .HasColumnType("timestamp with time zone") 2307 + .HasColumnName("createdAt") 2308 + .HasComment("The created date of the Muting."); 2309 + 2310 + b.Property<DateTime?>("ExpiresAt") 2311 + .HasColumnType("timestamp with time zone") 2312 + .HasColumnName("expiresAt"); 2313 + 2314 + b.Property<string>("MuteeId") 2315 + .IsRequired() 2316 + .HasMaxLength(32) 2317 + .HasColumnType("character varying(32)") 2318 + .HasColumnName("muteeId") 2319 + .HasComment("The mutee user ID."); 2320 + 2321 + b.Property<string>("MuterId") 2322 + .IsRequired() 2323 + .HasMaxLength(32) 2324 + .HasColumnType("character varying(32)") 2325 + .HasColumnName("muterId") 2326 + .HasComment("The muter user ID."); 2327 + 2328 + b.HasKey("Id"); 2329 + 2330 + b.HasIndex("CreatedAt"); 2331 + 2332 + b.HasIndex("ExpiresAt"); 2333 + 2334 + b.HasIndex("MuteeId"); 2335 + 2336 + b.HasIndex("MuterId"); 2337 + 2338 + b.HasIndex("MuterId", "MuteeId") 2339 + .IsUnique(); 2340 + 2341 + b.ToTable("muting"); 2342 + }); 2343 + 2344 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Note", b => 2345 + { 2346 + b.Property<string>("Id") 2347 + .HasMaxLength(32) 2348 + .HasColumnType("character varying(32)") 2349 + .HasColumnName("id"); 2350 + 2351 + b.PrimitiveCollection<List<string>>("AttachedFileTypes") 2352 + .IsRequired() 2353 + .ValueGeneratedOnAdd() 2354 + .HasColumnType("character varying(256)[]") 2355 + .HasColumnName("attachedFileTypes") 2356 + .HasDefaultValueSql("'{}'::character varying[]"); 2357 + 2358 + b.Property<string>("ChannelId") 2359 + .HasMaxLength(32) 2360 + .HasColumnType("character varying(32)") 2361 + .HasColumnName("channelId") 2362 + .HasComment("The ID of source channel."); 2363 + 2364 + b.Property<string>("CombinedAltText") 2365 + .HasColumnType("text") 2366 + .HasColumnName("combinedAltText"); 2367 + 2368 + b.Property<DateTime>("CreatedAt") 2369 + .HasColumnType("timestamp with time zone") 2370 + .HasColumnName("createdAt") 2371 + .HasComment("The created date of the Note."); 2372 + 2373 + b.Property<string>("Cw") 2374 + .HasColumnType("text") 2375 + .HasColumnName("cw"); 2376 + 2377 + b.PrimitiveCollection<List<string>>("Emojis") 2378 + .IsRequired() 2379 + .ValueGeneratedOnAdd() 2380 + .HasColumnType("character varying(128)[]") 2381 + .HasColumnName("emojis") 2382 + .HasDefaultValueSql("'{}'::character varying[]"); 2383 + 2384 + b.PrimitiveCollection<List<string>>("FileIds") 2385 + .IsRequired() 2386 + .ValueGeneratedOnAdd() 2387 + .HasColumnType("character varying(32)[]") 2388 + .HasColumnName("fileIds") 2389 + .HasDefaultValueSql("'{}'::character varying[]"); 2390 + 2391 + b.Property<bool>("HasPoll") 2392 + .ValueGeneratedOnAdd() 2393 + .HasColumnType("boolean") 2394 + .HasDefaultValue(false) 2395 + .HasColumnName("hasPoll"); 2396 + 2397 + b.Property<int>("LikeCount") 2398 + .ValueGeneratedOnAdd() 2399 + .HasColumnType("integer") 2400 + .HasDefaultValue(0) 2401 + .HasColumnName("likeCount"); 2402 + 2403 + b.Property<bool>("LocalOnly") 2404 + .ValueGeneratedOnAdd() 2405 + .HasColumnType("boolean") 2406 + .HasDefaultValue(false) 2407 + .HasColumnName("localOnly"); 2408 + 2409 + b.Property<string>("MastoReplyUserId") 2410 + .HasMaxLength(32) 2411 + .HasColumnType("character varying(32)") 2412 + .HasColumnName("mastoReplyUserId"); 2413 + 2414 + b.Property<List<Note.MentionedUser>>("MentionedRemoteUsers") 2415 + .IsRequired() 2416 + .ValueGeneratedOnAdd() 2417 + .HasColumnType("jsonb") 2418 + .HasColumnName("mentionedRemoteUsers") 2419 + .HasDefaultValueSql("'[]'::jsonb"); 2420 + 2421 + b.PrimitiveCollection<List<string>>("Mentions") 2422 + .IsRequired() 2423 + .ValueGeneratedOnAdd() 2424 + .HasColumnType("character varying(32)[]") 2425 + .HasColumnName("mentions") 2426 + .HasDefaultValueSql("'{}'::character varying[]"); 2427 + 2428 + b.Property<string>("Name") 2429 + .HasMaxLength(256) 2430 + .HasColumnType("character varying(256)") 2431 + .HasColumnName("name"); 2432 + 2433 + b.Property<short>("QuotesCount") 2434 + .HasColumnType("smallint") 2435 + .HasColumnName("quotesCount"); 2436 + 2437 + b.Property<Dictionary<string, long>>("Reactions") 2438 + .IsRequired() 2439 + .ValueGeneratedOnAdd() 2440 + .HasColumnType("jsonb") 2441 + .HasColumnName("reactions") 2442 + .HasDefaultValueSql("'{}'::jsonb"); 2443 + 2444 + b.Property<short>("RenoteCount") 2445 + .ValueGeneratedOnAdd() 2446 + .HasColumnType("smallint") 2447 + .HasDefaultValue((short)0) 2448 + .HasColumnName("renoteCount"); 2449 + 2450 + b.Property<string>("RenoteId") 2451 + .HasMaxLength(32) 2452 + .HasColumnType("character varying(32)") 2453 + .HasColumnName("renoteId") 2454 + .HasComment("The ID of renote target."); 2455 + 2456 + b.Property<string>("RenoteUri") 2457 + .HasMaxLength(512) 2458 + .HasColumnType("character varying(512)") 2459 + .HasColumnName("renoteUri") 2460 + .HasComment("The URI of the renote target, if it couldn't be resolved at time of ingestion."); 2461 + 2462 + b.Property<string>("RenoteUserHost") 2463 + .HasMaxLength(512) 2464 + .HasColumnType("character varying(512)") 2465 + .HasColumnName("renoteUserHost") 2466 + .HasComment("[Denormalized]"); 2467 + 2468 + b.Property<string>("RenoteUserId") 2469 + .HasMaxLength(32) 2470 + .HasColumnType("character varying(32)") 2471 + .HasColumnName("renoteUserId") 2472 + .HasComment("[Denormalized]"); 2473 + 2474 + b.Property<string>("RepliesCollection") 2475 + .HasMaxLength(512) 2476 + .HasColumnType("character varying(512)") 2477 + .HasColumnName("repliesCollection"); 2478 + 2479 + b.Property<short>("RepliesCount") 2480 + .ValueGeneratedOnAdd() 2481 + .HasColumnType("smallint") 2482 + .HasDefaultValue((short)0) 2483 + .HasColumnName("repliesCount"); 2484 + 2485 + b.Property<DateTime?>("RepliesFetchedAt") 2486 + .HasColumnType("timestamp with time zone") 2487 + .HasColumnName("repliesFetchedAt"); 2488 + 2489 + b.Property<string>("ReplyId") 2490 + .HasMaxLength(32) 2491 + .HasColumnType("character varying(32)") 2492 + .HasColumnName("replyId") 2493 + .HasComment("The ID of reply target."); 2494 + 2495 + b.Property<string>("ReplyUri") 2496 + .HasMaxLength(512) 2497 + .HasColumnType("character varying(512)") 2498 + .HasColumnName("replyUri") 2499 + .HasComment("The URI of the reply target, if it couldn't be resolved at time of ingestion."); 2500 + 2501 + b.Property<string>("ReplyUserHost") 2502 + .HasMaxLength(512) 2503 + .HasColumnType("character varying(512)") 2504 + .HasColumnName("replyUserHost") 2505 + .HasComment("[Denormalized]"); 2506 + 2507 + b.Property<string>("ReplyUserId") 2508 + .HasMaxLength(32) 2509 + .HasColumnType("character varying(32)") 2510 + .HasColumnName("replyUserId") 2511 + .HasComment("[Denormalized]"); 2512 + 2513 + b.Property<int>("Score") 2514 + .ValueGeneratedOnAdd() 2515 + .HasColumnType("integer") 2516 + .HasDefaultValue(0) 2517 + .HasColumnName("score"); 2518 + 2519 + b.PrimitiveCollection<List<string>>("Tags") 2520 + .IsRequired() 2521 + .ValueGeneratedOnAdd() 2522 + .HasColumnType("character varying(128)[]") 2523 + .HasColumnName("tags") 2524 + .HasDefaultValueSql("'{}'::character varying[]"); 2525 + 2526 + b.Property<string>("Text") 2527 + .HasColumnType("text") 2528 + .HasColumnName("text"); 2529 + 2530 + b.Property<string>("ThreadId") 2531 + .IsRequired() 2532 + .HasMaxLength(256) 2533 + .HasColumnType("character varying(256)") 2534 + .HasColumnName("threadId"); 2535 + 2536 + b.Property<DateTime?>("UpdatedAt") 2537 + .HasColumnType("timestamp with time zone") 2538 + .HasColumnName("updatedAt") 2539 + .HasComment("The updated date of the Note."); 2540 + 2541 + b.Property<string>("Uri") 2542 + .HasMaxLength(512) 2543 + .HasColumnType("character varying(512)") 2544 + .HasColumnName("uri") 2545 + .HasComment("The URI of a note. it will be null when the note is local."); 2546 + 2547 + b.Property<string>("Url") 2548 + .HasMaxLength(512) 2549 + .HasColumnType("character varying(512)") 2550 + .HasColumnName("url") 2551 + .HasComment("The human readable url of a note. it will be null when the note is local."); 2552 + 2553 + b.Property<string>("UserHost") 2554 + .HasMaxLength(512) 2555 + .HasColumnType("character varying(512)") 2556 + .HasColumnName("userHost") 2557 + .HasComment("[Denormalized]"); 2558 + 2559 + b.Property<string>("UserId") 2560 + .IsRequired() 2561 + .HasMaxLength(32) 2562 + .HasColumnType("character varying(32)") 2563 + .HasColumnName("userId") 2564 + .HasComment("The ID of author."); 2565 + 2566 + b.Property<Note.NoteVisibility>("Visibility") 2567 + .HasColumnType("note_visibility_enum") 2568 + .HasColumnName("visibility"); 2569 + 2570 + b.PrimitiveCollection<List<string>>("VisibleUserIds") 2571 + .IsRequired() 2572 + .ValueGeneratedOnAdd() 2573 + .HasColumnType("character varying(32)[]") 2574 + .HasColumnName("visibleUserIds") 2575 + .HasDefaultValueSql("'{}'::character varying[]"); 2576 + 2577 + b.HasKey("Id"); 2578 + 2579 + b.HasIndex("AttachedFileTypes"); 2580 + 2581 + b.HasIndex("ChannelId"); 2582 + 2583 + b.HasIndex("CreatedAt"); 2584 + 2585 + b.HasIndex("FileIds"); 2586 + 2587 + b.HasIndex("Mentions"); 2588 + 2589 + b.HasIndex("RenoteId"); 2590 + 2591 + b.HasIndex("RenoteUri"); 2592 + 2593 + b.HasIndex("ReplyId"); 2594 + 2595 + b.HasIndex("ReplyUri"); 2596 + 2597 + b.HasIndex("Tags"); 2598 + 2599 + b.HasIndex("ThreadId"); 2600 + 2601 + b.HasIndex("Uri") 2602 + .IsUnique(); 2603 + 2604 + b.HasIndex("Url"); 2605 + 2606 + b.HasIndex("UserHost"); 2607 + 2608 + b.HasIndex("UserId"); 2609 + 2610 + b.HasIndex("Visibility"); 2611 + 2612 + b.HasIndex("VisibleUserIds"); 2613 + 2614 + b.HasIndex("CreatedAt", "UserId"); 2615 + 2616 + b.HasIndex("Id", "UserHost"); 2617 + 2618 + b.HasIndex("UserId", "Id"); 2619 + 2620 + b.HasIndex(new[] { "CombinedAltText" }, "GIN_TRGM_note_combined_alt_text"); 2621 + 2622 + NpgsqlIndexBuilderExtensions.HasMethod(b.HasIndex(new[] { "CombinedAltText" }, "GIN_TRGM_note_combined_alt_text"), "gin"); 2623 + NpgsqlIndexBuilderExtensions.HasOperators(b.HasIndex(new[] { "CombinedAltText" }, "GIN_TRGM_note_combined_alt_text"), new[] { "gin_trgm_ops" }); 2624 + 2625 + b.HasIndex(new[] { "Cw" }, "GIN_TRGM_note_cw"); 2626 + 2627 + NpgsqlIndexBuilderExtensions.HasMethod(b.HasIndex(new[] { "Cw" }, "GIN_TRGM_note_cw"), "gin"); 2628 + NpgsqlIndexBuilderExtensions.HasOperators(b.HasIndex(new[] { "Cw" }, "GIN_TRGM_note_cw"), new[] { "gin_trgm_ops" }); 2629 + 2630 + b.HasIndex(new[] { "Text" }, "GIN_TRGM_note_text"); 2631 + 2632 + NpgsqlIndexBuilderExtensions.HasMethod(b.HasIndex(new[] { "Text" }, "GIN_TRGM_note_text"), "gin"); 2633 + NpgsqlIndexBuilderExtensions.HasOperators(b.HasIndex(new[] { "Text" }, "GIN_TRGM_note_text"), new[] { "gin_trgm_ops" }); 2634 + 2635 + b.HasIndex(new[] { "Emojis" }, "GIN_note_emojis"); 2636 + 2637 + NpgsqlIndexBuilderExtensions.HasMethod(b.HasIndex(new[] { "Emojis" }, "GIN_note_emojis"), "gin"); 2638 + 2639 + b.HasIndex(new[] { "Mentions" }, "GIN_note_mentions"); 2640 + 2641 + NpgsqlIndexBuilderExtensions.HasMethod(b.HasIndex(new[] { "Mentions" }, "GIN_note_mentions"), "gin"); 2642 + 2643 + b.HasIndex(new[] { "Tags" }, "GIN_note_tags"); 2644 + 2645 + NpgsqlIndexBuilderExtensions.HasMethod(b.HasIndex(new[] { "Tags" }, "GIN_note_tags"), "gin"); 2646 + 2647 + b.HasIndex(new[] { "VisibleUserIds" }, "GIN_note_visibleUserIds"); 2648 + 2649 + NpgsqlIndexBuilderExtensions.HasMethod(b.HasIndex(new[] { "VisibleUserIds" }, "GIN_note_visibleUserIds"), "gin"); 2650 + 2651 + b.ToTable("note"); 2652 + }); 2653 + 2654 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.NoteBookmark", b => 2655 + { 2656 + b.Property<string>("Id") 2657 + .HasMaxLength(32) 2658 + .HasColumnType("character varying(32)") 2659 + .HasColumnName("id"); 2660 + 2661 + b.Property<DateTime>("CreatedAt") 2662 + .HasColumnType("timestamp with time zone") 2663 + .HasColumnName("createdAt") 2664 + .HasComment("The created date of the NoteBookmark."); 2665 + 2666 + b.Property<string>("NoteId") 2667 + .IsRequired() 2668 + .HasMaxLength(32) 2669 + .HasColumnType("character varying(32)") 2670 + .HasColumnName("noteId"); 2671 + 2672 + b.Property<string>("UserId") 2673 + .IsRequired() 2674 + .HasMaxLength(32) 2675 + .HasColumnType("character varying(32)") 2676 + .HasColumnName("userId"); 2677 + 2678 + b.HasKey("Id"); 2679 + 2680 + b.HasIndex("NoteId"); 2681 + 2682 + b.HasIndex("UserId"); 2683 + 2684 + b.HasIndex("UserId", "NoteId") 2685 + .IsUnique(); 2686 + 2687 + b.ToTable("note_bookmark"); 2688 + }); 2689 + 2690 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.NoteEdit", b => 2691 + { 2692 + b.Property<string>("Id") 2693 + .HasMaxLength(32) 2694 + .HasColumnType("character varying(32)") 2695 + .HasColumnName("id"); 2696 + 2697 + b.Property<string>("Cw") 2698 + .HasMaxLength(512) 2699 + .HasColumnType("character varying(512)") 2700 + .HasColumnName("cw"); 2701 + 2702 + b.PrimitiveCollection<List<string>>("FileIds") 2703 + .IsRequired() 2704 + .ValueGeneratedOnAdd() 2705 + .HasColumnType("character varying(32)[]") 2706 + .HasColumnName("fileIds") 2707 + .HasDefaultValueSql("'{}'::character varying[]"); 2708 + 2709 + b.Property<string>("NoteId") 2710 + .IsRequired() 2711 + .HasMaxLength(32) 2712 + .HasColumnType("character varying(32)") 2713 + .HasColumnName("noteId") 2714 + .HasComment("The ID of note."); 2715 + 2716 + b.Property<string>("Text") 2717 + .HasColumnType("text") 2718 + .HasColumnName("text"); 2719 + 2720 + b.Property<DateTime>("UpdatedAt") 2721 + .HasColumnType("timestamp with time zone") 2722 + .HasColumnName("updatedAt") 2723 + .HasComment("The updated date of the Note."); 2724 + 2725 + b.HasKey("Id"); 2726 + 2727 + b.HasIndex("NoteId"); 2728 + 2729 + b.ToTable("note_edit"); 2730 + }); 2731 + 2732 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.NoteLike", b => 2733 + { 2734 + b.Property<string>("Id") 2735 + .HasMaxLength(32) 2736 + .HasColumnType("character varying(32)") 2737 + .HasColumnName("id"); 2738 + 2739 + b.Property<DateTime>("CreatedAt") 2740 + .HasColumnType("timestamp with time zone") 2741 + .HasColumnName("createdAt"); 2742 + 2743 + b.Property<string>("NoteId") 2744 + .IsRequired() 2745 + .HasMaxLength(32) 2746 + .HasColumnType("character varying(32)") 2747 + .HasColumnName("noteId"); 2748 + 2749 + b.Property<string>("UserId") 2750 + .IsRequired() 2751 + .HasMaxLength(32) 2752 + .HasColumnType("character varying(32)") 2753 + .HasColumnName("userId"); 2754 + 2755 + b.HasKey("Id"); 2756 + 2757 + b.HasIndex("NoteId"); 2758 + 2759 + b.HasIndex("UserId"); 2760 + 2761 + b.HasIndex("UserId", "NoteId") 2762 + .IsUnique(); 2763 + 2764 + b.ToTable("note_like"); 2765 + }); 2766 + 2767 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.NoteReaction", b => 2768 + { 2769 + b.Property<string>("Id") 2770 + .HasMaxLength(32) 2771 + .HasColumnType("character varying(32)") 2772 + .HasColumnName("id"); 2773 + 2774 + b.Property<DateTime>("CreatedAt") 2775 + .HasColumnType("timestamp with time zone") 2776 + .HasColumnName("createdAt") 2777 + .HasComment("The created date of the NoteReaction."); 2778 + 2779 + b.Property<string>("NoteId") 2780 + .IsRequired() 2781 + .HasMaxLength(32) 2782 + .HasColumnType("character varying(32)") 2783 + .HasColumnName("noteId"); 2784 + 2785 + b.Property<string>("Reaction") 2786 + .IsRequired() 2787 + .HasMaxLength(260) 2788 + .HasColumnType("character varying(260)") 2789 + .HasColumnName("reaction"); 2790 + 2791 + b.Property<string>("UserId") 2792 + .IsRequired() 2793 + .HasMaxLength(32) 2794 + .HasColumnType("character varying(32)") 2795 + .HasColumnName("userId"); 2796 + 2797 + b.HasKey("Id"); 2798 + 2799 + b.HasIndex("CreatedAt"); 2800 + 2801 + b.HasIndex("NoteId"); 2802 + 2803 + b.HasIndex("UserId"); 2804 + 2805 + b.HasIndex("UserId", "NoteId", "Reaction") 2806 + .IsUnique(); 2807 + 2808 + b.ToTable("note_reaction"); 2809 + }); 2810 + 2811 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.NoteThread", b => 2812 + { 2813 + b.Property<string>("Id") 2814 + .HasMaxLength(256) 2815 + .HasColumnType("character varying(256)") 2816 + .HasColumnName("id"); 2817 + 2818 + b.Property<DateTime?>("BackfilledAt") 2819 + .HasColumnType("timestamp with time zone") 2820 + .HasColumnName("backfilledAt"); 2821 + 2822 + b.Property<bool?>("IsResolvable") 2823 + .HasColumnType("boolean") 2824 + .HasColumnName("isResolvable"); 2825 + 2826 + b.Property<string>("Uri") 2827 + .HasMaxLength(512) 2828 + .HasColumnType("character varying(512)") 2829 + .HasColumnName("uri"); 2830 + 2831 + b.Property<string>("UserId") 2832 + .HasMaxLength(32) 2833 + .HasColumnType("character varying(32)") 2834 + .HasColumnName("userId"); 2835 + 2836 + b.HasKey("Id"); 2837 + 2838 + b.HasIndex("Uri") 2839 + .IsUnique(); 2840 + 2841 + b.HasIndex("UserId"); 2842 + 2843 + b.ToTable("note_thread"); 2844 + }); 2845 + 2846 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.NoteThreadMuting", b => 2847 + { 2848 + b.Property<string>("Id") 2849 + .HasMaxLength(32) 2850 + .HasColumnType("character varying(32)") 2851 + .HasColumnName("id"); 2852 + 2853 + b.Property<DateTime>("CreatedAt") 2854 + .HasColumnType("timestamp with time zone") 2855 + .HasColumnName("createdAt"); 2856 + 2857 + b.Property<string>("ThreadId") 2858 + .IsRequired() 2859 + .HasMaxLength(256) 2860 + .HasColumnType("character varying(256)") 2861 + .HasColumnName("threadId"); 2862 + 2863 + b.Property<string>("UserId") 2864 + .IsRequired() 2865 + .HasMaxLength(32) 2866 + .HasColumnType("character varying(32)") 2867 + .HasColumnName("userId"); 2868 + 2869 + b.HasKey("Id"); 2870 + 2871 + b.HasIndex("ThreadId"); 2872 + 2873 + b.HasIndex("UserId"); 2874 + 2875 + b.HasIndex("UserId", "ThreadId") 2876 + .IsUnique(); 2877 + 2878 + b.ToTable("note_thread_muting"); 2879 + }); 2880 + 2881 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.NoteUnread", b => 2882 + { 2883 + b.Property<string>("Id") 2884 + .HasMaxLength(32) 2885 + .HasColumnType("character varying(32)") 2886 + .HasColumnName("id"); 2887 + 2888 + b.Property<bool>("IsMentioned") 2889 + .HasColumnType("boolean") 2890 + .HasColumnName("isMentioned"); 2891 + 2892 + b.Property<bool>("IsSpecified") 2893 + .HasColumnType("boolean") 2894 + .HasColumnName("isSpecified"); 2895 + 2896 + b.Property<string>("NoteChannelId") 2897 + .HasMaxLength(32) 2898 + .HasColumnType("character varying(32)") 2899 + .HasColumnName("noteChannelId") 2900 + .HasComment("[Denormalized]"); 2901 + 2902 + b.Property<string>("NoteId") 2903 + .IsRequired() 2904 + .HasMaxLength(32) 2905 + .HasColumnType("character varying(32)") 2906 + .HasColumnName("noteId"); 2907 + 2908 + b.Property<string>("NoteUserId") 2909 + .IsRequired() 2910 + .HasMaxLength(32) 2911 + .HasColumnType("character varying(32)") 2912 + .HasColumnName("noteUserId") 2913 + .HasComment("[Denormalized]"); 2914 + 2915 + b.Property<string>("UserId") 2916 + .IsRequired() 2917 + .HasMaxLength(32) 2918 + .HasColumnType("character varying(32)") 2919 + .HasColumnName("userId"); 2920 + 2921 + b.HasKey("Id"); 2922 + 2923 + b.HasIndex("IsMentioned"); 2924 + 2925 + b.HasIndex("IsSpecified"); 2926 + 2927 + b.HasIndex("NoteChannelId"); 2928 + 2929 + b.HasIndex("NoteId"); 2930 + 2931 + b.HasIndex("NoteUserId"); 2932 + 2933 + b.HasIndex("UserId"); 2934 + 2935 + b.HasIndex("UserId", "NoteId") 2936 + .IsUnique(); 2937 + 2938 + b.ToTable("note_unread"); 2939 + }); 2940 + 2941 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.NoteWatching", b => 2942 + { 2943 + b.Property<string>("Id") 2944 + .HasMaxLength(32) 2945 + .HasColumnType("character varying(32)") 2946 + .HasColumnName("id"); 2947 + 2948 + b.Property<DateTime>("CreatedAt") 2949 + .HasColumnType("timestamp with time zone") 2950 + .HasColumnName("createdAt") 2951 + .HasComment("The created date of the NoteWatching."); 2952 + 2953 + b.Property<string>("NoteId") 2954 + .IsRequired() 2955 + .HasMaxLength(32) 2956 + .HasColumnType("character varying(32)") 2957 + .HasColumnName("noteId") 2958 + .HasComment("The target Note ID."); 2959 + 2960 + b.Property<string>("NoteUserId") 2961 + .IsRequired() 2962 + .HasMaxLength(32) 2963 + .HasColumnType("character varying(32)") 2964 + .HasColumnName("noteUserId") 2965 + .HasComment("[Denormalized]"); 2966 + 2967 + b.Property<string>("UserId") 2968 + .IsRequired() 2969 + .HasMaxLength(32) 2970 + .HasColumnType("character varying(32)") 2971 + .HasColumnName("userId") 2972 + .HasComment("The watcher ID."); 2973 + 2974 + b.HasKey("Id"); 2975 + 2976 + b.HasIndex("CreatedAt"); 2977 + 2978 + b.HasIndex("NoteId"); 2979 + 2980 + b.HasIndex("NoteUserId"); 2981 + 2982 + b.HasIndex("UserId"); 2983 + 2984 + b.HasIndex("UserId", "NoteId") 2985 + .IsUnique(); 2986 + 2987 + b.ToTable("note_watching"); 2988 + }); 2989 + 2990 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Notification", b => 2991 + { 2992 + b.Property<string>("Id") 2993 + .HasMaxLength(32) 2994 + .HasColumnType("character varying(32)") 2995 + .HasColumnName("id"); 2996 + 2997 + b.Property<string>("AppAccessTokenId") 2998 + .HasMaxLength(32) 2999 + .HasColumnType("character varying(32)") 3000 + .HasColumnName("appAccessTokenId"); 3001 + 3002 + b.Property<string>("BiteId") 3003 + .HasMaxLength(32) 3004 + .HasColumnType("character varying(32)") 3005 + .HasColumnName("biteId"); 3006 + 3007 + b.Property<int?>("Choice") 3008 + .HasColumnType("integer") 3009 + .HasColumnName("choice"); 3010 + 3011 + b.Property<DateTime>("CreatedAt") 3012 + .HasColumnType("timestamp with time zone") 3013 + .HasColumnName("createdAt") 3014 + .HasComment("The created date of the Notification."); 3015 + 3016 + b.Property<string>("CustomBody") 3017 + .HasMaxLength(2048) 3018 + .HasColumnType("character varying(2048)") 3019 + .HasColumnName("customBody"); 3020 + 3021 + b.Property<string>("CustomHeader") 3022 + .HasMaxLength(256) 3023 + .HasColumnType("character varying(256)") 3024 + .HasColumnName("customHeader"); 3025 + 3026 + b.Property<string>("CustomIcon") 3027 + .HasMaxLength(1024) 3028 + .HasColumnType("character varying(1024)") 3029 + .HasColumnName("customIcon"); 3030 + 3031 + b.Property<string>("FollowRequestId") 3032 + .HasMaxLength(32) 3033 + .HasColumnType("character varying(32)") 3034 + .HasColumnName("followRequestId"); 3035 + 3036 + b.Property<bool>("IsRead") 3037 + .ValueGeneratedOnAdd() 3038 + .HasColumnType("boolean") 3039 + .HasDefaultValue(false) 3040 + .HasColumnName("isRead") 3041 + .HasComment("Whether the notification was read."); 3042 + 3043 + b.Property<long>("MastoId") 3044 + .ValueGeneratedOnAdd() 3045 + .HasColumnType("bigint") 3046 + .HasColumnName("masto_id"); 3047 + 3048 + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("MastoId")); 3049 + 3050 + b.Property<string>("NoteId") 3051 + .HasMaxLength(32) 3052 + .HasColumnType("character varying(32)") 3053 + .HasColumnName("noteId"); 3054 + 3055 + b.Property<string>("NotifieeId") 3056 + .IsRequired() 3057 + .HasMaxLength(32) 3058 + .HasColumnType("character varying(32)") 3059 + .HasColumnName("notifieeId") 3060 + .HasComment("The ID of recipient user of the Notification."); 3061 + 3062 + b.Property<string>("NotifierId") 3063 + .HasMaxLength(32) 3064 + .HasColumnType("character varying(32)") 3065 + .HasColumnName("notifierId") 3066 + .HasComment("The ID of sender user of the Notification."); 3067 + 3068 + b.Property<string>("Reaction") 3069 + .HasMaxLength(128) 3070 + .HasColumnType("character varying(128)") 3071 + .HasColumnName("reaction"); 3072 + 3073 + b.Property<string>("ReportId") 3074 + .HasMaxLength(32) 3075 + .HasColumnType("character varying(32)") 3076 + .HasColumnName("reportId"); 3077 + 3078 + b.Property<Notification.NotificationType>("Type") 3079 + .HasColumnType("notification_type_enum") 3080 + .HasColumnName("type") 3081 + .HasComment("The type of the Notification."); 3082 + 3083 + b.Property<string>("UserGroupInvitationId") 3084 + .HasMaxLength(32) 3085 + .HasColumnType("character varying(32)") 3086 + .HasColumnName("userGroupInvitationId"); 3087 + 3088 + b.HasKey("Id"); 3089 + 3090 + b.HasIndex("AppAccessTokenId"); 3091 + 3092 + b.HasIndex("BiteId"); 3093 + 3094 + b.HasIndex("CreatedAt"); 3095 + 3096 + b.HasIndex("FollowRequestId"); 3097 + 3098 + b.HasIndex("IsRead"); 3099 + 3100 + b.HasIndex("MastoId"); 3101 + 3102 + b.HasIndex("NoteId"); 3103 + 3104 + b.HasIndex("NotifieeId"); 3105 + 3106 + b.HasIndex("NotifierId"); 3107 + 3108 + b.HasIndex("ReportId"); 3109 + 3110 + b.HasIndex("Type"); 3111 + 3112 + b.HasIndex("UserGroupInvitationId"); 3113 + 3114 + b.ToTable("notification"); 3115 + }); 3116 + 3117 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.OauthApp", b => 3118 + { 3119 + b.Property<string>("Id") 3120 + .HasMaxLength(32) 3121 + .HasColumnType("character varying(32)") 3122 + .HasColumnName("id"); 3123 + 3124 + b.Property<string>("ClientId") 3125 + .IsRequired() 3126 + .HasMaxLength(64) 3127 + .HasColumnType("character varying(64)") 3128 + .HasColumnName("clientId") 3129 + .HasComment("The client id of the OAuth application"); 3130 + 3131 + b.Property<string>("ClientSecret") 3132 + .IsRequired() 3133 + .HasMaxLength(64) 3134 + .HasColumnType("character varying(64)") 3135 + .HasColumnName("clientSecret") 3136 + .HasComment("The client secret of the OAuth application"); 3137 + 3138 + b.Property<DateTime>("CreatedAt") 3139 + .HasColumnType("timestamp with time zone") 3140 + .HasColumnName("createdAt") 3141 + .HasComment("The created date of the OAuth application"); 3142 + 3143 + b.Property<string>("Name") 3144 + .IsRequired() 3145 + .HasMaxLength(128) 3146 + .HasColumnType("character varying(128)") 3147 + .HasColumnName("name") 3148 + .HasComment("The name of the OAuth application"); 3149 + 3150 + b.PrimitiveCollection<List<string>>("RedirectUris") 3151 + .IsRequired() 3152 + .HasColumnType("character varying(512)[]") 3153 + .HasColumnName("redirectUris") 3154 + .HasComment("The redirect URIs of the OAuth application"); 3155 + 3156 + b.PrimitiveCollection<List<string>>("Scopes") 3157 + .IsRequired() 3158 + .HasColumnType("character varying(64)[]") 3159 + .HasColumnName("scopes") 3160 + .HasComment("The scopes requested by the OAuth application"); 3161 + 3162 + b.Property<string>("Website") 3163 + .HasMaxLength(256) 3164 + .HasColumnType("character varying(256)") 3165 + .HasColumnName("website") 3166 + .HasComment("The website of the OAuth application"); 3167 + 3168 + b.HasKey("Id"); 3169 + 3170 + b.HasIndex("ClientId") 3171 + .IsUnique(); 3172 + 3173 + b.ToTable("oauth_app"); 3174 + }); 3175 + 3176 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.OauthToken", b => 3177 + { 3178 + b.Property<string>("Id") 3179 + .HasMaxLength(32) 3180 + .HasColumnType("character varying(32)") 3181 + .HasColumnName("id"); 3182 + 3183 + b.Property<bool>("Active") 3184 + .HasColumnType("boolean") 3185 + .HasColumnName("active") 3186 + .HasComment("Whether or not the token has been activated"); 3187 + 3188 + b.Property<string>("AppId") 3189 + .IsRequired() 3190 + .HasMaxLength(32) 3191 + .HasColumnType("character varying(32)") 3192 + .HasColumnName("appId"); 3193 + 3194 + b.Property<bool>("AutoDetectQuotes") 3195 + .ValueGeneratedOnAdd() 3196 + .HasColumnType("boolean") 3197 + .HasDefaultValue(true) 3198 + .HasColumnName("autoDetectQuotes") 3199 + .HasComment("Whether the backend should automatically detect quote posts coming from this client"); 3200 + 3201 + b.Property<string>("Code") 3202 + .IsRequired() 3203 + .HasMaxLength(64) 3204 + .HasColumnType("character varying(64)") 3205 + .HasColumnName("code") 3206 + .HasComment("The auth code for the OAuth token"); 3207 + 3208 + b.Property<DateTime>("CreatedAt") 3209 + .HasColumnType("timestamp with time zone") 3210 + .HasColumnName("createdAt") 3211 + .HasComment("The created date of the OAuth token"); 3212 + 3213 + b.Property<bool>("IsPleroma") 3214 + .ValueGeneratedOnAdd() 3215 + .HasColumnType("boolean") 3216 + .HasDefaultValue(false) 3217 + .HasColumnName("isPleroma") 3218 + .HasComment("Whether Pleroma or Akkoma specific behavior should be enabled for this client"); 3219 + 3220 + b.Property<DateTime?>("LastActiveDate") 3221 + .HasColumnType("timestamp with time zone") 3222 + .HasColumnName("lastActiveDate"); 3223 + 3224 + b.Property<string>("RedirectUri") 3225 + .IsRequired() 3226 + .HasMaxLength(512) 3227 + .HasColumnType("character varying(512)") 3228 + .HasColumnName("redirectUri") 3229 + .HasComment("The redirect URI of the OAuth token"); 3230 + 3231 + b.PrimitiveCollection<List<string>>("Scopes") 3232 + .IsRequired() 3233 + .HasColumnType("character varying(64)[]") 3234 + .HasColumnName("scopes") 3235 + .HasComment("The scopes requested by the OAuth token"); 3236 + 3237 + b.Property<bool>("SupportsHtmlFormatting") 3238 + .ValueGeneratedOnAdd() 3239 + .HasColumnType("boolean") 3240 + .HasDefaultValue(true) 3241 + .HasColumnName("supportsHtmlFormatting") 3242 + .HasComment("Whether the client supports HTML inline formatting (bold, italic, strikethrough, ...)"); 3243 + 3244 + b.Property<bool>("SupportsInlineMedia") 3245 + .HasColumnType("boolean") 3246 + .HasColumnName("supportsInlineMedia"); 3247 + 3248 + b.Property<string>("Token") 3249 + .IsRequired() 3250 + .HasMaxLength(64) 3251 + .HasColumnType("character varying(64)") 3252 + .HasColumnName("token") 3253 + .HasComment("The OAuth token"); 3254 + 3255 + b.Property<string>("UserId") 3256 + .IsRequired() 3257 + .HasMaxLength(32) 3258 + .HasColumnType("character varying(32)") 3259 + .HasColumnName("userId"); 3260 + 3261 + b.HasKey("Id"); 3262 + 3263 + b.HasIndex("AppId"); 3264 + 3265 + b.HasIndex("Code"); 3266 + 3267 + b.HasIndex("Token"); 3268 + 3269 + b.HasIndex("UserId"); 3270 + 3271 + b.ToTable("oauth_token"); 3272 + }); 3273 + 3274 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Page", b => 3275 + { 3276 + b.Property<string>("Id") 3277 + .HasMaxLength(32) 3278 + .HasColumnType("character varying(32)") 3279 + .HasColumnName("id"); 3280 + 3281 + b.Property<bool>("AlignCenter") 3282 + .HasColumnType("boolean") 3283 + .HasColumnName("alignCenter"); 3284 + 3285 + b.Property<string>("Content") 3286 + .IsRequired() 3287 + .ValueGeneratedOnAdd() 3288 + .HasColumnType("jsonb") 3289 + .HasColumnName("content") 3290 + .HasDefaultValueSql("'[]'::jsonb"); 3291 + 3292 + b.Property<DateTime>("CreatedAt") 3293 + .HasColumnType("timestamp with time zone") 3294 + .HasColumnName("createdAt") 3295 + .HasComment("The created date of the Page."); 3296 + 3297 + b.Property<string>("EyeCatchingImageId") 3298 + .HasMaxLength(32) 3299 + .HasColumnType("character varying(32)") 3300 + .HasColumnName("eyeCatchingImageId"); 3301 + 3302 + b.Property<string>("Font") 3303 + .IsRequired() 3304 + .HasMaxLength(32) 3305 + .HasColumnType("character varying(32)") 3306 + .HasColumnName("font"); 3307 + 3308 + b.Property<bool>("HideTitleWhenPinned") 3309 + .ValueGeneratedOnAdd() 3310 + .HasColumnType("boolean") 3311 + .HasDefaultValue(false) 3312 + .HasColumnName("hideTitleWhenPinned"); 3313 + 3314 + b.Property<bool>("IsPublic") 3315 + .HasColumnType("boolean") 3316 + .HasColumnName("isPublic"); 3317 + 3318 + b.Property<int>("LikedCount") 3319 + .ValueGeneratedOnAdd() 3320 + .HasColumnType("integer") 3321 + .HasDefaultValue(0) 3322 + .HasColumnName("likedCount"); 3323 + 3324 + b.Property<string>("Name") 3325 + .IsRequired() 3326 + .HasMaxLength(256) 3327 + .HasColumnType("character varying(256)") 3328 + .HasColumnName("name"); 3329 + 3330 + b.Property<string>("Script") 3331 + .IsRequired() 3332 + .ValueGeneratedOnAdd() 3333 + .HasMaxLength(16384) 3334 + .HasColumnType("character varying(16384)") 3335 + .HasColumnName("script") 3336 + .HasDefaultValueSql("''::character varying"); 3337 + 3338 + b.Property<string>("Summary") 3339 + .HasMaxLength(256) 3340 + .HasColumnType("character varying(256)") 3341 + .HasColumnName("summary"); 3342 + 3343 + b.Property<string>("Title") 3344 + .IsRequired() 3345 + .HasMaxLength(256) 3346 + .HasColumnType("character varying(256)") 3347 + .HasColumnName("title"); 3348 + 3349 + b.Property<DateTime>("UpdatedAt") 3350 + .HasColumnType("timestamp with time zone") 3351 + .HasColumnName("updatedAt") 3352 + .HasComment("The updated date of the Page."); 3353 + 3354 + b.Property<string>("UserId") 3355 + .IsRequired() 3356 + .HasMaxLength(32) 3357 + .HasColumnType("character varying(32)") 3358 + .HasColumnName("userId") 3359 + .HasComment("The ID of author."); 3360 + 3361 + b.Property<string>("Variables") 3362 + .IsRequired() 3363 + .ValueGeneratedOnAdd() 3364 + .HasColumnType("jsonb") 3365 + .HasColumnName("variables") 3366 + .HasDefaultValueSql("'[]'::jsonb"); 3367 + 3368 + b.Property<Page.PageVisibility>("Visibility") 3369 + .HasColumnType("page_visibility_enum") 3370 + .HasColumnName("visibility"); 3371 + 3372 + b.PrimitiveCollection<List<string>>("VisibleUserIds") 3373 + .IsRequired() 3374 + .ValueGeneratedOnAdd() 3375 + .HasColumnType("character varying(32)[]") 3376 + .HasColumnName("visibleUserIds") 3377 + .HasDefaultValueSql("'{}'::character varying[]"); 3378 + 3379 + b.HasKey("Id"); 3380 + 3381 + b.HasIndex("CreatedAt"); 3382 + 3383 + b.HasIndex("EyeCatchingImageId"); 3384 + 3385 + b.HasIndex("Name"); 3386 + 3387 + b.HasIndex("UpdatedAt"); 3388 + 3389 + b.HasIndex("UserId"); 3390 + 3391 + b.HasIndex("VisibleUserIds"); 3392 + 3393 + b.HasIndex("UserId", "Name") 3394 + .IsUnique(); 3395 + 3396 + b.ToTable("page"); 3397 + }); 3398 + 3399 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.PageLike", b => 3400 + { 3401 + b.Property<string>("Id") 3402 + .HasMaxLength(32) 3403 + .HasColumnType("character varying(32)") 3404 + .HasColumnName("id"); 3405 + 3406 + b.Property<DateTime>("CreatedAt") 3407 + .HasColumnType("timestamp with time zone") 3408 + .HasColumnName("createdAt"); 3409 + 3410 + b.Property<string>("PageId") 3411 + .IsRequired() 3412 + .HasMaxLength(32) 3413 + .HasColumnType("character varying(32)") 3414 + .HasColumnName("pageId"); 3415 + 3416 + b.Property<string>("UserId") 3417 + .IsRequired() 3418 + .HasMaxLength(32) 3419 + .HasColumnType("character varying(32)") 3420 + .HasColumnName("userId"); 3421 + 3422 + b.HasKey("Id"); 3423 + 3424 + b.HasIndex("PageId"); 3425 + 3426 + b.HasIndex("UserId"); 3427 + 3428 + b.HasIndex("UserId", "PageId") 3429 + .IsUnique(); 3430 + 3431 + b.ToTable("page_like"); 3432 + }); 3433 + 3434 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.PasswordResetRequest", b => 3435 + { 3436 + b.Property<string>("Id") 3437 + .HasMaxLength(32) 3438 + .HasColumnType("character varying(32)") 3439 + .HasColumnName("id"); 3440 + 3441 + b.Property<DateTime>("CreatedAt") 3442 + .HasColumnType("timestamp with time zone") 3443 + .HasColumnName("createdAt"); 3444 + 3445 + b.Property<string>("Token") 3446 + .IsRequired() 3447 + .HasMaxLength(256) 3448 + .HasColumnType("character varying(256)") 3449 + .HasColumnName("token"); 3450 + 3451 + b.Property<string>("UserId") 3452 + .IsRequired() 3453 + .HasMaxLength(32) 3454 + .HasColumnType("character varying(32)") 3455 + .HasColumnName("userId"); 3456 + 3457 + b.HasKey("Id"); 3458 + 3459 + b.HasIndex("Token") 3460 + .IsUnique(); 3461 + 3462 + b.HasIndex("UserId"); 3463 + 3464 + b.ToTable("password_reset_request"); 3465 + }); 3466 + 3467 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.PluginStoreEntry", b => 3468 + { 3469 + b.Property<Guid>("Id") 3470 + .ValueGeneratedOnAdd() 3471 + .HasColumnType("uuid") 3472 + .HasColumnName("id"); 3473 + 3474 + b.Property<string>("Data") 3475 + .IsRequired() 3476 + .ValueGeneratedOnAdd() 3477 + .HasColumnType("jsonb") 3478 + .HasColumnName("data") 3479 + .HasDefaultValueSql("'{}'::jsonb") 3480 + .HasComment("The plugin-specific data object"); 3481 + 3482 + b.Property<string>("Name") 3483 + .IsRequired() 3484 + .HasColumnType("text") 3485 + .HasColumnName("name"); 3486 + 3487 + b.HasKey("Id"); 3488 + 3489 + b.HasIndex("Id"); 3490 + 3491 + b.ToTable("plugin_store"); 3492 + }); 3493 + 3494 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.PolicyConfiguration", b => 3495 + { 3496 + b.Property<string>("Name") 3497 + .HasColumnType("text") 3498 + .HasColumnName("name"); 3499 + 3500 + b.Property<string>("Data") 3501 + .IsRequired() 3502 + .ValueGeneratedOnAdd() 3503 + .HasColumnType("jsonb") 3504 + .HasColumnName("data") 3505 + .HasDefaultValueSql("'{}'::jsonb") 3506 + .HasComment("The plugin-specific data object"); 3507 + 3508 + b.HasKey("Name"); 3509 + 3510 + b.ToTable("policy_configuration"); 3511 + }); 3512 + 3513 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Poll", b => 3514 + { 3515 + b.Property<string>("NoteId") 3516 + .HasMaxLength(32) 3517 + .HasColumnType("character varying(32)") 3518 + .HasColumnName("noteId"); 3519 + 3520 + b.PrimitiveCollection<List<string>>("Choices") 3521 + .IsRequired() 3522 + .ValueGeneratedOnAdd() 3523 + .HasColumnType("character varying(256)[]") 3524 + .HasColumnName("choices") 3525 + .HasDefaultValueSql("'{}'::character varying[]"); 3526 + 3527 + b.Property<DateTime?>("ExpiresAt") 3528 + .HasColumnType("timestamp with time zone") 3529 + .HasColumnName("expiresAt"); 3530 + 3531 + b.Property<bool>("Multiple") 3532 + .HasColumnType("boolean") 3533 + .HasColumnName("multiple"); 3534 + 3535 + b.Property<Note.NoteVisibility>("NoteVisibility") 3536 + .HasColumnType("note_visibility_enum") 3537 + .HasColumnName("noteVisibility") 3538 + .HasComment("[Denormalized]"); 3539 + 3540 + b.Property<string>("UserHost") 3541 + .HasMaxLength(512) 3542 + .HasColumnType("character varying(512)") 3543 + .HasColumnName("userHost") 3544 + .HasComment("[Denormalized]"); 3545 + 3546 + b.Property<string>("UserId") 3547 + .IsRequired() 3548 + .HasMaxLength(32) 3549 + .HasColumnType("character varying(32)") 3550 + .HasColumnName("userId") 3551 + .HasComment("[Denormalized]"); 3552 + 3553 + b.Property<int?>("VotersCount") 3554 + .HasColumnType("integer") 3555 + .HasColumnName("votersCount"); 3556 + 3557 + b.PrimitiveCollection<List<int>>("Votes") 3558 + .IsRequired() 3559 + .HasColumnType("integer[]") 3560 + .HasColumnName("votes"); 3561 + 3562 + b.HasKey("NoteId"); 3563 + 3564 + b.HasIndex("UserHost"); 3565 + 3566 + b.HasIndex("UserId"); 3567 + 3568 + b.ToTable("poll"); 3569 + }); 3570 + 3571 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.PollVote", b => 3572 + { 3573 + b.Property<string>("Id") 3574 + .HasMaxLength(32) 3575 + .HasColumnType("character varying(32)") 3576 + .HasColumnName("id"); 3577 + 3578 + b.Property<int>("Choice") 3579 + .HasColumnType("integer") 3580 + .HasColumnName("choice"); 3581 + 3582 + b.Property<DateTime>("CreatedAt") 3583 + .HasColumnType("timestamp with time zone") 3584 + .HasColumnName("createdAt") 3585 + .HasComment("The created date of the PollVote."); 3586 + 3587 + b.Property<string>("NoteId") 3588 + .IsRequired() 3589 + .HasMaxLength(32) 3590 + .HasColumnType("character varying(32)") 3591 + .HasColumnName("noteId"); 3592 + 3593 + b.Property<string>("UserId") 3594 + .IsRequired() 3595 + .HasMaxLength(32) 3596 + .HasColumnType("character varying(32)") 3597 + .HasColumnName("userId"); 3598 + 3599 + b.HasKey("Id"); 3600 + 3601 + b.HasIndex("CreatedAt"); 3602 + 3603 + b.HasIndex("NoteId"); 3604 + 3605 + b.HasIndex("UserId"); 3606 + 3607 + b.HasIndex("UserId", "NoteId", "Choice") 3608 + .IsUnique(); 3609 + 3610 + b.ToTable("poll_vote"); 3611 + }); 3612 + 3613 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.PromoNote", b => 3614 + { 3615 + b.Property<string>("NoteId") 3616 + .HasMaxLength(32) 3617 + .HasColumnType("character varying(32)") 3618 + .HasColumnName("noteId"); 3619 + 3620 + b.Property<DateTime>("ExpiresAt") 3621 + .HasColumnType("timestamp with time zone") 3622 + .HasColumnName("expiresAt"); 3623 + 3624 + b.Property<string>("UserId") 3625 + .IsRequired() 3626 + .HasMaxLength(32) 3627 + .HasColumnType("character varying(32)") 3628 + .HasColumnName("userId") 3629 + .HasComment("[Denormalized]"); 3630 + 3631 + b.HasKey("NoteId"); 3632 + 3633 + b.HasIndex("UserId"); 3634 + 3635 + b.ToTable("promo_note"); 3636 + }); 3637 + 3638 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.PromoRead", b => 3639 + { 3640 + b.Property<string>("Id") 3641 + .HasMaxLength(32) 3642 + .HasColumnType("character varying(32)") 3643 + .HasColumnName("id"); 3644 + 3645 + b.Property<DateTime>("CreatedAt") 3646 + .HasColumnType("timestamp with time zone") 3647 + .HasColumnName("createdAt") 3648 + .HasComment("The created date of the PromoRead."); 3649 + 3650 + b.Property<string>("NoteId") 3651 + .IsRequired() 3652 + .HasMaxLength(32) 3653 + .HasColumnType("character varying(32)") 3654 + .HasColumnName("noteId"); 3655 + 3656 + b.Property<string>("UserId") 3657 + .IsRequired() 3658 + .HasMaxLength(32) 3659 + .HasColumnType("character varying(32)") 3660 + .HasColumnName("userId"); 3661 + 3662 + b.HasKey("Id"); 3663 + 3664 + b.HasIndex("NoteId"); 3665 + 3666 + b.HasIndex("UserId"); 3667 + 3668 + b.HasIndex("UserId", "NoteId") 3669 + .IsUnique(); 3670 + 3671 + b.ToTable("promo_read"); 3672 + }); 3673 + 3674 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.PushSubscription", b => 3675 + { 3676 + b.Property<string>("Id") 3677 + .HasMaxLength(32) 3678 + .HasColumnType("character varying(32)") 3679 + .HasColumnName("id"); 3680 + 3681 + b.Property<string>("AuthSecret") 3682 + .IsRequired() 3683 + .HasMaxLength(256) 3684 + .HasColumnType("character varying(256)") 3685 + .HasColumnName("auth"); 3686 + 3687 + b.Property<DateTime>("CreatedAt") 3688 + .HasColumnType("timestamp with time zone") 3689 + .HasColumnName("createdAt"); 3690 + 3691 + b.Property<string>("Endpoint") 3692 + .IsRequired() 3693 + .HasMaxLength(512) 3694 + .HasColumnType("character varying(512)") 3695 + .HasColumnName("endpoint"); 3696 + 3697 + b.Property<string>("OauthTokenId") 3698 + .IsRequired() 3699 + .HasMaxLength(32) 3700 + .HasColumnType("character varying(32)") 3701 + .HasColumnName("oauthTokenId"); 3702 + 3703 + b.Property<PushSubscription.PushPolicy>("Policy") 3704 + .ValueGeneratedOnAdd() 3705 + .HasColumnType("push_subscription_policy_enum") 3706 + .HasDefaultValue(PushSubscription.PushPolicy.All) 3707 + .HasColumnName("policy"); 3708 + 3709 + b.Property<string>("PublicKey") 3710 + .IsRequired() 3711 + .HasMaxLength(128) 3712 + .HasColumnType("character varying(128)") 3713 + .HasColumnName("publickey"); 3714 + 3715 + b.PrimitiveCollection<List<string>>("Types") 3716 + .IsRequired() 3717 + .ValueGeneratedOnAdd() 3718 + .HasColumnType("character varying(32)[]") 3719 + .HasColumnName("types") 3720 + .HasDefaultValueSql("'{}'::character varying[]"); 3721 + 3722 + b.Property<string>("UserId") 3723 + .IsRequired() 3724 + .HasMaxLength(32) 3725 + .HasColumnType("character varying(32)") 3726 + .HasColumnName("userId"); 3727 + 3728 + b.HasKey("Id"); 3729 + 3730 + b.HasIndex("OauthTokenId") 3731 + .IsUnique(); 3732 + 3733 + b.HasIndex("UserId"); 3734 + 3735 + b.ToTable("push_subscription"); 3736 + }); 3737 + 3738 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.RegistrationInvite", b => 3739 + { 3740 + b.Property<string>("Id") 3741 + .HasMaxLength(32) 3742 + .HasColumnType("character varying(32)") 3743 + .HasColumnName("id"); 3744 + 3745 + b.Property<string>("Code") 3746 + .IsRequired() 3747 + .HasMaxLength(64) 3748 + .HasColumnType("character varying(64)") 3749 + .HasColumnName("code"); 3750 + 3751 + b.Property<DateTime>("CreatedAt") 3752 + .HasColumnType("timestamp with time zone") 3753 + .HasColumnName("createdAt"); 3754 + 3755 + b.Property<string>("CreatedById") 3756 + .HasMaxLength(32) 3757 + .HasColumnType("character varying(32)") 3758 + .HasColumnName("createdById"); 3759 + 3760 + b.HasKey("Id"); 3761 + 3762 + b.HasIndex("Code") 3763 + .IsUnique(); 3764 + 3765 + b.HasIndex("CreatedById"); 3766 + 3767 + b.ToTable("registration_invite"); 3768 + }); 3769 + 3770 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.RegistryItem", b => 3771 + { 3772 + b.Property<string>("Id") 3773 + .HasMaxLength(32) 3774 + .HasColumnType("character varying(32)") 3775 + .HasColumnName("id"); 3776 + 3777 + b.Property<DateTime>("CreatedAt") 3778 + .HasColumnType("timestamp with time zone") 3779 + .HasColumnName("createdAt") 3780 + .HasComment("The created date of the RegistryItem."); 3781 + 3782 + b.Property<string>("Domain") 3783 + .HasMaxLength(512) 3784 + .HasColumnType("character varying(512)") 3785 + .HasColumnName("domain"); 3786 + 3787 + b.Property<string>("Key") 3788 + .IsRequired() 3789 + .HasMaxLength(1024) 3790 + .HasColumnType("character varying(1024)") 3791 + .HasColumnName("key") 3792 + .HasComment("The key of the RegistryItem."); 3793 + 3794 + b.PrimitiveCollection<List<string>>("Scope") 3795 + .IsRequired() 3796 + .ValueGeneratedOnAdd() 3797 + .HasColumnType("character varying(1024)[]") 3798 + .HasColumnName("scope") 3799 + .HasDefaultValueSql("'{}'::character varying[]"); 3800 + 3801 + b.Property<DateTime>("UpdatedAt") 3802 + .HasColumnType("timestamp with time zone") 3803 + .HasColumnName("updatedAt") 3804 + .HasComment("The updated date of the RegistryItem."); 3805 + 3806 + b.Property<string>("UserId") 3807 + .IsRequired() 3808 + .HasMaxLength(32) 3809 + .HasColumnType("character varying(32)") 3810 + .HasColumnName("userId") 3811 + .HasComment("The owner ID."); 3812 + 3813 + b.Property<string>("Value") 3814 + .ValueGeneratedOnAdd() 3815 + .HasColumnType("jsonb") 3816 + .HasColumnName("value") 3817 + .HasDefaultValueSql("'{}'::jsonb") 3818 + .HasComment("The value of the RegistryItem."); 3819 + 3820 + b.HasKey("Id"); 3821 + 3822 + b.HasIndex("Domain"); 3823 + 3824 + b.HasIndex("Scope"); 3825 + 3826 + b.HasIndex("UserId"); 3827 + 3828 + b.ToTable("registry_item"); 3829 + }); 3830 + 3831 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Relay", b => 3832 + { 3833 + b.Property<string>("Id") 3834 + .HasMaxLength(32) 3835 + .HasColumnType("character varying(32)") 3836 + .HasColumnName("id"); 3837 + 3838 + b.Property<string>("Inbox") 3839 + .IsRequired() 3840 + .HasMaxLength(512) 3841 + .HasColumnType("character varying(512)") 3842 + .HasColumnName("inbox"); 3843 + 3844 + b.Property<Relay.RelayStatus>("Status") 3845 + .HasColumnType("relay_status_enum") 3846 + .HasColumnName("status"); 3847 + 3848 + b.HasKey("Id"); 3849 + 3850 + b.HasIndex("Inbox") 3851 + .IsUnique(); 3852 + 3853 + b.ToTable("relay"); 3854 + }); 3855 + 3856 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.RenoteMuting", b => 3857 + { 3858 + b.Property<string>("Id") 3859 + .HasMaxLength(32) 3860 + .HasColumnType("character varying(32)") 3861 + .HasColumnName("id"); 3862 + 3863 + b.Property<DateTime>("CreatedAt") 3864 + .HasColumnType("timestamp with time zone") 3865 + .HasColumnName("createdAt") 3866 + .HasComment("The created date of the Muting."); 3867 + 3868 + b.Property<string>("MuteeId") 3869 + .IsRequired() 3870 + .HasMaxLength(32) 3871 + .HasColumnType("character varying(32)") 3872 + .HasColumnName("muteeId") 3873 + .HasComment("The mutee user ID."); 3874 + 3875 + b.Property<string>("MuterId") 3876 + .IsRequired() 3877 + .HasMaxLength(32) 3878 + .HasColumnType("character varying(32)") 3879 + .HasColumnName("muterId") 3880 + .HasComment("The muter user ID."); 3881 + 3882 + b.HasKey("Id"); 3883 + 3884 + b.HasIndex("CreatedAt"); 3885 + 3886 + b.HasIndex("MuteeId"); 3887 + 3888 + b.HasIndex("MuterId"); 3889 + 3890 + b.HasIndex("MuterId", "MuteeId") 3891 + .IsUnique(); 3892 + 3893 + b.ToTable("renote_muting"); 3894 + }); 3895 + 3896 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Report", b => 3897 + { 3898 + b.Property<string>("Id") 3899 + .HasMaxLength(32) 3900 + .HasColumnType("character varying(32)") 3901 + .HasColumnName("id"); 3902 + 3903 + b.Property<string>("AssigneeId") 3904 + .HasMaxLength(32) 3905 + .HasColumnType("character varying(32)") 3906 + .HasColumnName("assigneeId"); 3907 + 3908 + b.Property<string>("Comment") 3909 + .IsRequired() 3910 + .HasMaxLength(2048) 3911 + .HasColumnType("character varying(2048)") 3912 + .HasColumnName("comment"); 3913 + 3914 + b.Property<DateTime>("CreatedAt") 3915 + .HasColumnType("timestamp with time zone") 3916 + .HasColumnName("createdAt") 3917 + .HasComment("The created date of the Report."); 3918 + 3919 + b.Property<bool>("Forwarded") 3920 + .ValueGeneratedOnAdd() 3921 + .HasColumnType("boolean") 3922 + .HasDefaultValue(false) 3923 + .HasColumnName("forwarded"); 3924 + 3925 + b.Property<string>("ReporterHost") 3926 + .HasMaxLength(512) 3927 + .HasColumnType("character varying(512)") 3928 + .HasColumnName("reporterHost") 3929 + .HasComment("[Denormalized]"); 3930 + 3931 + b.Property<string>("ReporterId") 3932 + .IsRequired() 3933 + .HasMaxLength(32) 3934 + .HasColumnType("character varying(32)") 3935 + .HasColumnName("reporterId"); 3936 + 3937 + b.Property<bool>("Resolved") 3938 + .ValueGeneratedOnAdd() 3939 + .HasColumnType("boolean") 3940 + .HasDefaultValue(false) 3941 + .HasColumnName("resolved"); 3942 + 3943 + b.Property<string>("TargetUserHost") 3944 + .HasMaxLength(512) 3945 + .HasColumnType("character varying(512)") 3946 + .HasColumnName("targetUserHost") 3947 + .HasComment("[Denormalized]"); 3948 + 3949 + b.Property<string>("TargetUserId") 3950 + .IsRequired() 3951 + .HasMaxLength(32) 3952 + .HasColumnType("character varying(32)") 3953 + .HasColumnName("targetUserId"); 3954 + 3955 + b.HasKey("Id"); 3956 + 3957 + b.HasIndex("AssigneeId"); 3958 + 3959 + b.HasIndex("CreatedAt"); 3960 + 3961 + b.HasIndex("ReporterHost"); 3962 + 3963 + b.HasIndex("ReporterId"); 3964 + 3965 + b.HasIndex("Resolved"); 3966 + 3967 + b.HasIndex("TargetUserHost"); 3968 + 3969 + b.HasIndex("TargetUserId"); 3970 + 3971 + b.ToTable("report"); 3972 + }); 3973 + 3974 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Rule", b => 3975 + { 3976 + b.Property<string>("Id") 3977 + .HasMaxLength(32) 3978 + .HasColumnType("character varying(32)") 3979 + .HasColumnName("id"); 3980 + 3981 + b.Property<string>("Description") 3982 + .HasMaxLength(512) 3983 + .HasColumnType("character varying(512)") 3984 + .HasColumnName("description"); 3985 + 3986 + b.Property<int>("Order") 3987 + .HasColumnType("integer") 3988 + .HasColumnName("order"); 3989 + 3990 + b.Property<string>("Text") 3991 + .IsRequired() 3992 + .HasMaxLength(128) 3993 + .HasColumnType("character varying(128)") 3994 + .HasColumnName("text"); 3995 + 3996 + b.HasKey("Id"); 3997 + 3998 + b.ToTable("rule"); 3999 + }); 4000 + 4001 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Session", b => 4002 + { 4003 + b.Property<string>("Id") 4004 + .HasMaxLength(32) 4005 + .HasColumnType("character varying(32)") 4006 + .HasColumnName("id"); 4007 + 4008 + b.Property<bool>("Active") 4009 + .HasColumnType("boolean") 4010 + .HasColumnName("active") 4011 + .HasComment("Whether or not the token has been activated (i.e. 2fa has been confirmed)"); 4012 + 4013 + b.Property<DateTime>("CreatedAt") 4014 + .HasColumnType("timestamp with time zone") 4015 + .HasColumnName("createdAt") 4016 + .HasComment("The created date of the OAuth token"); 4017 + 4018 + b.Property<DateTime?>("LastActiveDate") 4019 + .HasColumnType("timestamp with time zone") 4020 + .HasColumnName("lastActiveDate"); 4021 + 4022 + b.Property<string>("MastodonTokenId") 4023 + .HasMaxLength(32) 4024 + .HasColumnType("character varying(32)") 4025 + .HasColumnName("mastodonTokenId"); 4026 + 4027 + b.Property<string>("Token") 4028 + .IsRequired() 4029 + .HasMaxLength(64) 4030 + .HasColumnType("character varying(64)") 4031 + .HasColumnName("token") 4032 + .HasComment("The authorization token"); 4033 + 4034 + b.Property<string>("UserId") 4035 + .IsRequired() 4036 + .HasMaxLength(32) 4037 + .HasColumnType("character varying(32)") 4038 + .HasColumnName("userId"); 4039 + 4040 + b.HasKey("Id"); 4041 + 4042 + b.HasIndex("MastodonTokenId") 4043 + .IsUnique(); 4044 + 4045 + b.HasIndex("Token"); 4046 + 4047 + b.HasIndex("UserId"); 4048 + 4049 + b.ToTable("session"); 4050 + }); 4051 + 4052 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.SwSubscription", b => 4053 + { 4054 + b.Property<string>("Id") 4055 + .HasMaxLength(32) 4056 + .HasColumnType("character varying(32)") 4057 + .HasColumnName("id"); 4058 + 4059 + b.Property<string>("AuthSecret") 4060 + .IsRequired() 4061 + .HasMaxLength(256) 4062 + .HasColumnType("character varying(256)") 4063 + .HasColumnName("auth"); 4064 + 4065 + b.Property<DateTime>("CreatedAt") 4066 + .HasColumnType("timestamp with time zone") 4067 + .HasColumnName("createdAt"); 4068 + 4069 + b.Property<string>("Endpoint") 4070 + .IsRequired() 4071 + .HasMaxLength(512) 4072 + .HasColumnType("character varying(512)") 4073 + .HasColumnName("endpoint"); 4074 + 4075 + b.Property<string>("PublicKey") 4076 + .IsRequired() 4077 + .HasMaxLength(128) 4078 + .HasColumnType("character varying(128)") 4079 + .HasColumnName("publickey"); 4080 + 4081 + b.Property<bool>("SendReadMessage") 4082 + .ValueGeneratedOnAdd() 4083 + .HasColumnType("boolean") 4084 + .HasDefaultValue(false) 4085 + .HasColumnName("sendReadMessage"); 4086 + 4087 + b.Property<string>("UserId") 4088 + .IsRequired() 4089 + .HasMaxLength(32) 4090 + .HasColumnType("character varying(32)") 4091 + .HasColumnName("userId"); 4092 + 4093 + b.HasKey("Id"); 4094 + 4095 + b.HasIndex("UserId"); 4096 + 4097 + b.ToTable("sw_subscription"); 4098 + }); 4099 + 4100 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UsedUsername", b => 4101 + { 4102 + b.Property<string>("Username") 4103 + .HasMaxLength(128) 4104 + .HasColumnType("character varying(128)") 4105 + .HasColumnName("username"); 4106 + 4107 + b.Property<DateTime>("CreatedAt") 4108 + .HasColumnType("timestamp with time zone") 4109 + .HasColumnName("createdAt"); 4110 + 4111 + b.HasKey("Username"); 4112 + 4113 + b.ToTable("used_username"); 4114 + }); 4115 + 4116 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.User", b => 4117 + { 4118 + b.Property<string>("Id") 4119 + .HasMaxLength(32) 4120 + .HasColumnType("character varying(32)") 4121 + .HasColumnName("id"); 4122 + 4123 + b.PrimitiveCollection<List<string>>("AlsoKnownAs") 4124 + .HasColumnType("text[]") 4125 + .HasColumnName("alsoKnownAs") 4126 + .HasComment("URIs the user is known as too"); 4127 + 4128 + b.Property<string>("AvatarBlurhash") 4129 + .HasMaxLength(128) 4130 + .HasColumnType("character varying(128)") 4131 + .HasColumnName("avatarBlurhash") 4132 + .HasComment("The blurhash of the avatar DriveFile"); 4133 + 4134 + b.Property<string>("AvatarId") 4135 + .HasMaxLength(32) 4136 + .HasColumnType("character varying(32)") 4137 + .HasColumnName("avatarId") 4138 + .HasComment("The ID of avatar DriveFile."); 4139 + 4140 + b.Property<string>("BannerBlurhash") 4141 + .HasMaxLength(128) 4142 + .HasColumnType("character varying(128)") 4143 + .HasColumnName("bannerBlurhash") 4144 + .HasComment("The blurhash of the banner DriveFile"); 4145 + 4146 + b.Property<string>("BannerId") 4147 + .HasMaxLength(32) 4148 + .HasColumnType("character varying(32)") 4149 + .HasColumnName("bannerId") 4150 + .HasComment("The ID of banner DriveFile."); 4151 + 4152 + b.Property<DateTime>("CreatedAt") 4153 + .HasColumnType("timestamp with time zone") 4154 + .HasColumnName("createdAt") 4155 + .HasComment("The created date of the User."); 4156 + 4157 + b.Property<string>("DisplayName") 4158 + .HasMaxLength(128) 4159 + .HasColumnType("character varying(128)") 4160 + .HasColumnName("name") 4161 + .HasComment("The name of the User."); 4162 + 4163 + b.Property<int?>("DriveCapacityOverrideMb") 4164 + .HasColumnType("integer") 4165 + .HasColumnName("driveCapacityOverrideMb") 4166 + .HasComment("Overrides user drive capacity limit"); 4167 + 4168 + b.PrimitiveCollection<List<string>>("Emojis") 4169 + .IsRequired() 4170 + .ValueGeneratedOnAdd() 4171 + .HasColumnType("character varying(128)[]") 4172 + .HasColumnName("emojis") 4173 + .HasDefaultValueSql("'{}'::character varying[]"); 4174 + 4175 + b.Property<string>("Featured") 4176 + .HasMaxLength(512) 4177 + .HasColumnType("character varying(512)") 4178 + .HasColumnName("featured") 4179 + .HasComment("The featured URL of the User. It will be null if the origin of the user is local."); 4180 + 4181 + b.Property<int>("FollowersCount") 4182 + .ValueGeneratedOnAdd() 4183 + .HasColumnType("integer") 4184 + .HasDefaultValue(0) 4185 + .HasColumnName("followersCount") 4186 + .HasComment("The count of followers."); 4187 + 4188 + b.Property<string>("FollowersUri") 4189 + .HasMaxLength(512) 4190 + .HasColumnType("character varying(512)") 4191 + .HasColumnName("followersUri") 4192 + .HasComment("The URI of the user Follower Collection. It will be null if the origin of the user is local."); 4193 + 4194 + b.Property<int>("FollowingCount") 4195 + .ValueGeneratedOnAdd() 4196 + .HasColumnType("integer") 4197 + .HasDefaultValue(0) 4198 + .HasColumnName("followingCount") 4199 + .HasComment("The count of following."); 4200 + 4201 + b.Property<string>("Host") 4202 + .HasMaxLength(512) 4203 + .HasColumnType("character varying(512)") 4204 + .HasColumnName("host") 4205 + .HasComment("The host of the User. It will be null if the origin of the user is local."); 4206 + 4207 + b.Property<string>("Inbox") 4208 + .HasMaxLength(512) 4209 + .HasColumnType("character varying(512)") 4210 + .HasColumnName("inbox") 4211 + .HasComment("The inbox URL of the User. It will be null if the origin of the user is local."); 4212 + 4213 + b.Property<bool>("IsAdmin") 4214 + .ValueGeneratedOnAdd() 4215 + .HasColumnType("boolean") 4216 + .HasDefaultValue(false) 4217 + .HasColumnName("isAdmin") 4218 + .HasComment("Whether the User is the admin."); 4219 + 4220 + b.Property<bool>("IsBot") 4221 + .ValueGeneratedOnAdd() 4222 + .HasColumnType("boolean") 4223 + .HasDefaultValue(false) 4224 + .HasColumnName("isBot") 4225 + .HasComment("Whether the User is a bot."); 4226 + 4227 + b.Property<bool>("IsCat") 4228 + .ValueGeneratedOnAdd() 4229 + .HasColumnType("boolean") 4230 + .HasDefaultValue(false) 4231 + .HasColumnName("isCat") 4232 + .HasComment("Whether the User is a cat."); 4233 + 4234 + b.Property<bool>("IsDeleted") 4235 + .ValueGeneratedOnAdd() 4236 + .HasColumnType("boolean") 4237 + .HasDefaultValue(false) 4238 + .HasColumnName("isDeleted") 4239 + .HasComment("Whether the User is deleted."); 4240 + 4241 + b.Property<bool>("IsExplorable") 4242 + .ValueGeneratedOnAdd() 4243 + .HasColumnType("boolean") 4244 + .HasDefaultValue(true) 4245 + .HasColumnName("isExplorable") 4246 + .HasComment("Whether the User is explorable."); 4247 + 4248 + b.Property<bool>("IsLocked") 4249 + .ValueGeneratedOnAdd() 4250 + .HasColumnType("boolean") 4251 + .HasDefaultValue(false) 4252 + .HasColumnName("isLocked") 4253 + .HasComment("Whether the User is locked."); 4254 + 4255 + b.Property<bool>("IsModerator") 4256 + .ValueGeneratedOnAdd() 4257 + .HasColumnType("boolean") 4258 + .HasDefaultValue(false) 4259 + .HasColumnName("isModerator") 4260 + .HasComment("Whether the User is a moderator."); 4261 + 4262 + b.Property<bool>("IsRelayActor") 4263 + .HasColumnType("boolean") 4264 + .HasColumnName("isRelayActor"); 4265 + 4266 + b.Property<bool>("IsSilenced") 4267 + .ValueGeneratedOnAdd() 4268 + .HasColumnType("boolean") 4269 + .HasDefaultValue(false) 4270 + .HasColumnName("isSilenced") 4271 + .HasComment("Whether the User is silenced."); 4272 + 4273 + b.Property<bool>("IsSuspended") 4274 + .ValueGeneratedOnAdd() 4275 + .HasColumnType("boolean") 4276 + .HasDefaultValue(false) 4277 + .HasColumnName("isSuspended") 4278 + .HasComment("Whether the User is suspended."); 4279 + 4280 + b.Property<bool>("IsSystemUser") 4281 + .HasColumnType("boolean") 4282 + .HasColumnName("isSystem"); 4283 + 4284 + b.Property<DateTime?>("LastActiveDate") 4285 + .HasColumnType("timestamp with time zone") 4286 + .HasColumnName("lastActiveDate"); 4287 + 4288 + b.Property<DateTime?>("LastFetchedAt") 4289 + .HasColumnType("timestamp with time zone") 4290 + .HasColumnName("lastFetchedAt"); 4291 + 4292 + b.Property<DateTime?>("LastNoteAt") 4293 + .HasColumnType("timestamp with time zone") 4294 + .HasColumnName("lastNoteAt"); 4295 + 4296 + b.Property<string>("MovedToUri") 4297 + .HasMaxLength(512) 4298 + .HasColumnType("character varying(512)") 4299 + .HasColumnName("movedToUri") 4300 + .HasComment("The URI of the new account of the User"); 4301 + 4302 + b.Property<int>("NotesCount") 4303 + .ValueGeneratedOnAdd() 4304 + .HasColumnType("integer") 4305 + .HasDefaultValue(0) 4306 + .HasColumnName("notesCount") 4307 + .HasComment("The count of notes."); 4308 + 4309 + b.Property<string>("Outbox") 4310 + .HasMaxLength(512) 4311 + .HasColumnType("character varying(512)") 4312 + .HasColumnName("outbox"); 4313 + 4314 + b.Property<DateTime?>("OutboxFetchedAt") 4315 + .HasColumnType("timestamp with time zone") 4316 + .HasColumnName("outboxFetchedAt"); 4317 + 4318 + b.Property<string>("SharedInbox") 4319 + .HasMaxLength(512) 4320 + .HasColumnType("character varying(512)") 4321 + .HasColumnName("sharedInbox") 4322 + .HasComment("The sharedInbox URL of the User. It will be null if the origin of the user is local."); 4323 + 4324 + b.Property<bool>("SpeakAsCat") 4325 + .ValueGeneratedOnAdd() 4326 + .HasColumnType("boolean") 4327 + .HasDefaultValue(true) 4328 + .HasColumnName("speakAsCat") 4329 + .HasComment("Whether to speak as a cat if isCat."); 4330 + 4331 + b.Property<bool>("SplitDomainResolved") 4332 + .ValueGeneratedOnAdd() 4333 + .HasColumnType("boolean") 4334 + .HasDefaultValue(false) 4335 + .HasColumnName("splitDomainResolved"); 4336 + 4337 + b.PrimitiveCollection<List<string>>("Tags") 4338 + .IsRequired() 4339 + .ValueGeneratedOnAdd() 4340 + .HasColumnType("character varying(128)[]") 4341 + .HasColumnName("tags") 4342 + .HasDefaultValueSql("'{}'::character varying[]"); 4343 + 4344 + b.Property<DateTime?>("UpdatedAt") 4345 + .HasColumnType("timestamp with time zone") 4346 + .HasColumnName("updatedAt") 4347 + .HasComment("The updated date of the User."); 4348 + 4349 + b.Property<string>("Uri") 4350 + .HasMaxLength(512) 4351 + .HasColumnType("character varying(512)") 4352 + .HasColumnName("uri") 4353 + .HasComment("The URI of the User. It will be null if the origin of the user is local."); 4354 + 4355 + b.Property<string>("Username") 4356 + .IsRequired() 4357 + .HasMaxLength(128) 4358 + .HasColumnType("character varying(128)") 4359 + .HasColumnName("username") 4360 + .HasComment("The username of the User."); 4361 + 4362 + b.Property<string>("UsernameLower") 4363 + .IsRequired() 4364 + .HasMaxLength(128) 4365 + .HasColumnType("character varying(128)") 4366 + .HasColumnName("usernameLower") 4367 + .HasComment("The username (lowercased) of the User."); 4368 + 4369 + b.HasKey("Id"); 4370 + 4371 + b.HasIndex("AvatarId") 4372 + .IsUnique(); 4373 + 4374 + b.HasIndex("BannerId") 4375 + .IsUnique(); 4376 + 4377 + b.HasIndex("CreatedAt"); 4378 + 4379 + b.HasIndex("Host"); 4380 + 4381 + b.HasIndex("IsAdmin"); 4382 + 4383 + b.HasIndex("IsExplorable"); 4384 + 4385 + b.HasIndex("IsModerator"); 4386 + 4387 + b.HasIndex("IsSuspended"); 4388 + 4389 + b.HasIndex("LastActiveDate"); 4390 + 4391 + b.HasIndex("Tags"); 4392 + 4393 + b.HasIndex("UpdatedAt"); 4394 + 4395 + b.HasIndex("Uri"); 4396 + 4397 + b.HasIndex("UsernameLower"); 4398 + 4399 + b.HasIndex("UsernameLower", "Host") 4400 + .IsUnique(); 4401 + 4402 + b.ToTable("user"); 4403 + }); 4404 + 4405 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserGroup", b => 4406 + { 4407 + b.Property<string>("Id") 4408 + .HasMaxLength(32) 4409 + .HasColumnType("character varying(32)") 4410 + .HasColumnName("id"); 4411 + 4412 + b.Property<DateTime>("CreatedAt") 4413 + .HasColumnType("timestamp with time zone") 4414 + .HasColumnName("createdAt") 4415 + .HasComment("The created date of the UserGroup."); 4416 + 4417 + b.Property<bool>("IsPrivate") 4418 + .ValueGeneratedOnAdd() 4419 + .HasColumnType("boolean") 4420 + .HasDefaultValue(false) 4421 + .HasColumnName("isPrivate"); 4422 + 4423 + b.Property<string>("Name") 4424 + .IsRequired() 4425 + .HasMaxLength(256) 4426 + .HasColumnType("character varying(256)") 4427 + .HasColumnName("name"); 4428 + 4429 + b.Property<string>("UserId") 4430 + .IsRequired() 4431 + .HasMaxLength(32) 4432 + .HasColumnType("character varying(32)") 4433 + .HasColumnName("userId") 4434 + .HasComment("The ID of owner."); 4435 + 4436 + b.HasKey("Id"); 4437 + 4438 + b.HasIndex("CreatedAt"); 4439 + 4440 + b.HasIndex("UserId"); 4441 + 4442 + b.ToTable("user_group"); 4443 + }); 4444 + 4445 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserGroupInvitation", b => 4446 + { 4447 + b.Property<string>("Id") 4448 + .HasMaxLength(32) 4449 + .HasColumnType("character varying(32)") 4450 + .HasColumnName("id"); 4451 + 4452 + b.Property<DateTime>("CreatedAt") 4453 + .HasColumnType("timestamp with time zone") 4454 + .HasColumnName("createdAt") 4455 + .HasComment("The created date of the UserGroupInvitation."); 4456 + 4457 + b.Property<string>("UserGroupId") 4458 + .IsRequired() 4459 + .HasMaxLength(32) 4460 + .HasColumnType("character varying(32)") 4461 + .HasColumnName("userGroupId") 4462 + .HasComment("The group ID."); 4463 + 4464 + b.Property<string>("UserId") 4465 + .IsRequired() 4466 + .HasMaxLength(32) 4467 + .HasColumnType("character varying(32)") 4468 + .HasColumnName("userId") 4469 + .HasComment("The user ID."); 4470 + 4471 + b.HasKey("Id"); 4472 + 4473 + b.HasIndex("UserGroupId"); 4474 + 4475 + b.HasIndex("UserId"); 4476 + 4477 + b.HasIndex("UserId", "UserGroupId") 4478 + .IsUnique(); 4479 + 4480 + b.ToTable("user_group_invitation"); 4481 + }); 4482 + 4483 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserGroupMember", b => 4484 + { 4485 + b.Property<string>("Id") 4486 + .HasMaxLength(32) 4487 + .HasColumnType("character varying(32)") 4488 + .HasColumnName("id"); 4489 + 4490 + b.Property<DateTime>("CreatedAt") 4491 + .HasColumnType("timestamp with time zone") 4492 + .HasColumnName("createdAt") 4493 + .HasComment("The created date of the UserGroupMember."); 4494 + 4495 + b.Property<string>("UserGroupId") 4496 + .IsRequired() 4497 + .HasMaxLength(32) 4498 + .HasColumnType("character varying(32)") 4499 + .HasColumnName("userGroupId") 4500 + .HasComment("The group ID."); 4501 + 4502 + b.Property<string>("UserId") 4503 + .IsRequired() 4504 + .HasMaxLength(32) 4505 + .HasColumnType("character varying(32)") 4506 + .HasColumnName("userId") 4507 + .HasComment("The user ID."); 4508 + 4509 + b.HasKey("Id"); 4510 + 4511 + b.HasIndex("UserGroupId"); 4512 + 4513 + b.HasIndex("UserId"); 4514 + 4515 + b.HasIndex("UserId", "UserGroupId") 4516 + .IsUnique(); 4517 + 4518 + b.ToTable("user_group_member"); 4519 + }); 4520 + 4521 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserKeypair", b => 4522 + { 4523 + b.Property<string>("UserId") 4524 + .HasMaxLength(32) 4525 + .HasColumnType("character varying(32)") 4526 + .HasColumnName("userId"); 4527 + 4528 + b.Property<string>("PrivateKey") 4529 + .IsRequired() 4530 + .HasMaxLength(4096) 4531 + .HasColumnType("character varying(4096)") 4532 + .HasColumnName("privateKey"); 4533 + 4534 + b.Property<string>("PublicKey") 4535 + .IsRequired() 4536 + .HasMaxLength(4096) 4537 + .HasColumnType("character varying(4096)") 4538 + .HasColumnName("publicKey"); 4539 + 4540 + b.HasKey("UserId"); 4541 + 4542 + b.ToTable("user_keypair"); 4543 + }); 4544 + 4545 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserList", b => 4546 + { 4547 + b.Property<string>("Id") 4548 + .HasMaxLength(32) 4549 + .HasColumnType("character varying(32)") 4550 + .HasColumnName("id"); 4551 + 4552 + b.Property<DateTime>("CreatedAt") 4553 + .HasColumnType("timestamp with time zone") 4554 + .HasColumnName("createdAt") 4555 + .HasComment("The created date of the UserList."); 4556 + 4557 + b.Property<bool>("HideFromHomeTl") 4558 + .ValueGeneratedOnAdd() 4559 + .HasColumnType("boolean") 4560 + .HasDefaultValue(false) 4561 + .HasColumnName("hideFromHomeTl") 4562 + .HasComment("Whether posts from list members should be hidden from the home timeline."); 4563 + 4564 + b.Property<string>("Name") 4565 + .IsRequired() 4566 + .HasMaxLength(128) 4567 + .HasColumnType("character varying(128)") 4568 + .HasColumnName("name") 4569 + .HasComment("The name of the UserList."); 4570 + 4571 + b.Property<string>("UserId") 4572 + .IsRequired() 4573 + .HasMaxLength(32) 4574 + .HasColumnType("character varying(32)") 4575 + .HasColumnName("userId") 4576 + .HasComment("The owner ID."); 4577 + 4578 + b.HasKey("Id"); 4579 + 4580 + b.HasIndex("UserId"); 4581 + 4582 + b.ToTable("user_list"); 4583 + }); 4584 + 4585 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserListMember", b => 4586 + { 4587 + b.Property<string>("Id") 4588 + .HasMaxLength(32) 4589 + .HasColumnType("character varying(32)") 4590 + .HasColumnName("id"); 4591 + 4592 + b.Property<DateTime>("CreatedAt") 4593 + .HasColumnType("timestamp with time zone") 4594 + .HasColumnName("createdAt") 4595 + .HasComment("The created date of the UserListMember."); 4596 + 4597 + b.Property<string>("UserId") 4598 + .IsRequired() 4599 + .HasMaxLength(32) 4600 + .HasColumnType("character varying(32)") 4601 + .HasColumnName("userId") 4602 + .HasComment("The user ID."); 4603 + 4604 + b.Property<string>("UserListId") 4605 + .IsRequired() 4606 + .HasMaxLength(32) 4607 + .HasColumnType("character varying(32)") 4608 + .HasColumnName("userListId") 4609 + .HasComment("The list ID."); 4610 + 4611 + b.HasKey("Id"); 4612 + 4613 + b.HasIndex("UserId"); 4614 + 4615 + b.HasIndex("UserListId"); 4616 + 4617 + b.HasIndex("UserId", "UserListId") 4618 + .IsUnique(); 4619 + 4620 + b.ToTable("user_list_member"); 4621 + }); 4622 + 4623 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserNotePin", b => 4624 + { 4625 + b.Property<string>("Id") 4626 + .HasMaxLength(32) 4627 + .HasColumnType("character varying(32)") 4628 + .HasColumnName("id"); 4629 + 4630 + b.Property<DateTime>("CreatedAt") 4631 + .HasColumnType("timestamp with time zone") 4632 + .HasColumnName("createdAt") 4633 + .HasComment("The created date of the UserNotePins."); 4634 + 4635 + b.Property<string>("NoteId") 4636 + .IsRequired() 4637 + .HasMaxLength(32) 4638 + .HasColumnType("character varying(32)") 4639 + .HasColumnName("noteId"); 4640 + 4641 + b.Property<string>("UserId") 4642 + .IsRequired() 4643 + .HasMaxLength(32) 4644 + .HasColumnType("character varying(32)") 4645 + .HasColumnName("userId"); 4646 + 4647 + b.HasKey("Id"); 4648 + 4649 + b.HasIndex("NoteId"); 4650 + 4651 + b.HasIndex("UserId"); 4652 + 4653 + b.HasIndex("UserId", "NoteId") 4654 + .IsUnique(); 4655 + 4656 + b.ToTable("user_note_pin"); 4657 + }); 4658 + 4659 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserPending", b => 4660 + { 4661 + b.Property<string>("Id") 4662 + .HasMaxLength(32) 4663 + .HasColumnType("character varying(32)") 4664 + .HasColumnName("id"); 4665 + 4666 + b.Property<string>("Code") 4667 + .IsRequired() 4668 + .HasMaxLength(128) 4669 + .HasColumnType("character varying(128)") 4670 + .HasColumnName("code"); 4671 + 4672 + b.Property<DateTime>("CreatedAt") 4673 + .HasColumnType("timestamp with time zone") 4674 + .HasColumnName("createdAt"); 4675 + 4676 + b.Property<string>("Email") 4677 + .IsRequired() 4678 + .HasMaxLength(128) 4679 + .HasColumnType("character varying(128)") 4680 + .HasColumnName("email"); 4681 + 4682 + b.Property<string>("Password") 4683 + .IsRequired() 4684 + .HasMaxLength(128) 4685 + .HasColumnType("character varying(128)") 4686 + .HasColumnName("password"); 4687 + 4688 + b.Property<string>("Username") 4689 + .IsRequired() 4690 + .HasMaxLength(128) 4691 + .HasColumnType("character varying(128)") 4692 + .HasColumnName("username"); 4693 + 4694 + b.HasKey("Id"); 4695 + 4696 + b.HasIndex("Code") 4697 + .IsUnique(); 4698 + 4699 + b.ToTable("user_pending"); 4700 + }); 4701 + 4702 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserProfile", b => 4703 + { 4704 + b.Property<string>("UserId") 4705 + .HasMaxLength(32) 4706 + .HasColumnType("character varying(32)") 4707 + .HasColumnName("userId"); 4708 + 4709 + b.Property<string>("Birthday") 4710 + .HasMaxLength(10) 4711 + .HasColumnType("character(10)") 4712 + .HasColumnName("birthday") 4713 + .IsFixedLength() 4714 + .HasComment("The birthday (YYYY-MM-DD) of the User."); 4715 + 4716 + b.Property<string>("Description") 4717 + .HasMaxLength(2048) 4718 + .HasColumnType("character varying(2048)") 4719 + .HasColumnName("description") 4720 + .HasComment("The description (bio) of the User."); 4721 + 4722 + b.Property<UserProfile.UserProfileFFVisibility>("FFVisibility") 4723 + .ValueGeneratedOnAdd() 4724 + .HasColumnType("user_profile_ffvisibility_enum") 4725 + .HasDefaultValue(UserProfile.UserProfileFFVisibility.Public) 4726 + .HasColumnName("ffVisibility"); 4727 + 4728 + b.Property<UserProfile.Field[]>("Fields") 4729 + .IsRequired() 4730 + .ValueGeneratedOnAdd() 4731 + .HasColumnType("jsonb") 4732 + .HasColumnName("fields") 4733 + .HasDefaultValueSql("'[]'::jsonb"); 4734 + 4735 + b.Property<string>("Lang") 4736 + .HasMaxLength(32) 4737 + .HasColumnType("character varying(32)") 4738 + .HasColumnName("lang"); 4739 + 4740 + b.Property<string>("Location") 4741 + .HasMaxLength(128) 4742 + .HasColumnType("character varying(128)") 4743 + .HasColumnName("location") 4744 + .HasComment("The location of the User."); 4745 + 4746 + b.Property<List<Note.MentionedUser>>("Mentions") 4747 + .IsRequired() 4748 + .ValueGeneratedOnAdd() 4749 + .HasColumnType("jsonb") 4750 + .HasColumnName("mentions") 4751 + .HasDefaultValueSql("'[]'::jsonb"); 4752 + 4753 + b.Property<bool>("MentionsResolved") 4754 + .ValueGeneratedOnAdd() 4755 + .HasColumnType("boolean") 4756 + .HasDefaultValue(false) 4757 + .HasColumnName("mentionsResolved"); 4758 + 4759 + b.Property<string>("ModerationNote") 4760 + .IsRequired() 4761 + .ValueGeneratedOnAdd() 4762 + .HasMaxLength(8192) 4763 + .HasColumnType("character varying(8192)") 4764 + .HasColumnName("moderationNote") 4765 + .HasDefaultValueSql("''::character varying"); 4766 + 4767 + b.Property<string>("PinnedPageId") 4768 + .HasMaxLength(32) 4769 + .HasColumnType("character varying(32)") 4770 + .HasColumnName("pinnedPageId"); 4771 + 4772 + b.Property<Dictionary<string, string>>("Pronouns") 4773 + .HasColumnType("jsonb") 4774 + .HasColumnName("pronouns"); 4775 + 4776 + b.Property<string>("Url") 4777 + .HasMaxLength(512) 4778 + .HasColumnType("character varying(512)") 4779 + .HasColumnName("url") 4780 + .HasComment("Remote URL of the user."); 4781 + 4782 + b.Property<string>("UserHost") 4783 + .HasMaxLength(512) 4784 + .HasColumnType("character varying(512)") 4785 + .HasColumnName("userHost") 4786 + .HasComment("[Denormalized]"); 4787 + 4788 + b.HasKey("UserId"); 4789 + 4790 + b.HasIndex("PinnedPageId") 4791 + .IsUnique(); 4792 + 4793 + b.HasIndex("UserHost"); 4794 + 4795 + b.ToTable("user_profile"); 4796 + }); 4797 + 4798 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserPublickey", b => 4799 + { 4800 + b.Property<string>("UserId") 4801 + .HasMaxLength(32) 4802 + .HasColumnType("character varying(32)") 4803 + .HasColumnName("userId"); 4804 + 4805 + b.Property<string>("KeyId") 4806 + .IsRequired() 4807 + .HasMaxLength(512) 4808 + .HasColumnType("character varying(512)") 4809 + .HasColumnName("keyId"); 4810 + 4811 + b.Property<string>("KeyPem") 4812 + .IsRequired() 4813 + .HasMaxLength(4096) 4814 + .HasColumnType("character varying(4096)") 4815 + .HasColumnName("keyPem"); 4816 + 4817 + b.HasKey("UserId"); 4818 + 4819 + b.HasIndex("KeyId") 4820 + .IsUnique(); 4821 + 4822 + b.ToTable("user_publickey"); 4823 + }); 4824 + 4825 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserSecurityKey", b => 4826 + { 4827 + b.Property<string>("Id") 4828 + .HasColumnType("character varying") 4829 + .HasColumnName("id") 4830 + .HasComment("Variable-length id given to navigator.credentials.get()"); 4831 + 4832 + b.Property<DateTime>("LastUsed") 4833 + .HasColumnType("timestamp with time zone") 4834 + .HasColumnName("lastUsed") 4835 + .HasComment("The date of the last time the UserSecurityKey was successfully validated."); 4836 + 4837 + b.Property<string>("Name") 4838 + .IsRequired() 4839 + .HasMaxLength(30) 4840 + .HasColumnType("character varying(30)") 4841 + .HasColumnName("name") 4842 + .HasComment("User-defined name for this key"); 4843 + 4844 + b.Property<string>("PublicKey") 4845 + .IsRequired() 4846 + .HasColumnType("character varying") 4847 + .HasColumnName("publicKey") 4848 + .HasComment("Variable-length public key used to verify attestations (hex-encoded)."); 4849 + 4850 + b.Property<string>("UserId") 4851 + .IsRequired() 4852 + .HasMaxLength(32) 4853 + .HasColumnType("character varying(32)") 4854 + .HasColumnName("userId"); 4855 + 4856 + b.HasKey("Id"); 4857 + 4858 + b.HasIndex("PublicKey"); 4859 + 4860 + b.HasIndex("UserId"); 4861 + 4862 + b.ToTable("user_security_key"); 4863 + }); 4864 + 4865 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserSettings", b => 4866 + { 4867 + b.Property<string>("UserId") 4868 + .HasMaxLength(32) 4869 + .HasColumnType("character varying(32)") 4870 + .HasColumnName("userId"); 4871 + 4872 + b.Property<bool>("AlwaysMarkSensitive") 4873 + .ValueGeneratedOnAdd() 4874 + .HasColumnType("boolean") 4875 + .HasDefaultValue(false) 4876 + .HasColumnName("alwaysMarkNsfw"); 4877 + 4878 + b.Property<bool>("AutoAcceptFollowed") 4879 + .ValueGeneratedOnAdd() 4880 + .HasColumnType("boolean") 4881 + .HasDefaultValue(false) 4882 + .HasColumnName("autoAcceptFollowed"); 4883 + 4884 + b.Property<Note.NoteVisibility>("DefaultNoteVisibility") 4885 + .ValueGeneratedOnAdd() 4886 + .HasColumnType("note_visibility_enum") 4887 + .HasDefaultValue(Note.NoteVisibility.Public) 4888 + .HasColumnName("defaultNoteVisibility"); 4889 + 4890 + b.Property<Note.NoteVisibility>("DefaultRenoteVisibility") 4891 + .ValueGeneratedOnAdd() 4892 + .HasColumnType("note_visibility_enum") 4893 + .HasDefaultValue(Note.NoteVisibility.Public) 4894 + .HasColumnName("defaultRenoteVisibility"); 4895 + 4896 + b.Property<string>("Email") 4897 + .HasMaxLength(128) 4898 + .HasColumnType("character varying(128)") 4899 + .HasColumnName("email"); 4900 + 4901 + b.Property<bool>("EmailVerified") 4902 + .ValueGeneratedOnAdd() 4903 + .HasColumnType("boolean") 4904 + .HasDefaultValue(false) 4905 + .HasColumnName("emailVerified"); 4906 + 4907 + b.Property<bool>("FilterInaccessible") 4908 + .ValueGeneratedOnAdd() 4909 + .HasColumnType("boolean") 4910 + .HasDefaultValue(false) 4911 + .HasColumnName("filterInaccessible"); 4912 + 4913 + b.Property<string>("Password") 4914 + .HasMaxLength(128) 4915 + .HasColumnType("character varying(128)") 4916 + .HasColumnName("password"); 4917 + 4918 + b.Property<bool>("PrivateMode") 4919 + .ValueGeneratedOnAdd() 4920 + .HasColumnType("boolean") 4921 + .HasDefaultValue(false) 4922 + .HasColumnName("privateMode"); 4923 + 4924 + b.Property<bool>("TwoFactorEnabled") 4925 + .ValueGeneratedOnAdd() 4926 + .HasColumnType("boolean") 4927 + .HasDefaultValue(false) 4928 + .HasColumnName("twoFactorEnabled"); 4929 + 4930 + b.Property<string>("TwoFactorSecret") 4931 + .HasMaxLength(128) 4932 + .HasColumnType("character varying(128)") 4933 + .HasColumnName("twoFactorSecret"); 4934 + 4935 + b.Property<string>("TwoFactorTempSecret") 4936 + .HasMaxLength(128) 4937 + .HasColumnType("character varying(128)") 4938 + .HasColumnName("twoFactorTempSecret"); 4939 + 4940 + b.HasKey("UserId"); 4941 + 4942 + b.ToTable("user_settings"); 4943 + }); 4944 + 4945 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Webhook", b => 4946 + { 4947 + b.Property<string>("Id") 4948 + .HasMaxLength(32) 4949 + .HasColumnType("character varying(32)") 4950 + .HasColumnName("id"); 4951 + 4952 + b.Property<bool>("Active") 4953 + .ValueGeneratedOnAdd() 4954 + .HasColumnType("boolean") 4955 + .HasDefaultValue(true) 4956 + .HasColumnName("active"); 4957 + 4958 + b.Property<DateTime>("CreatedAt") 4959 + .HasColumnType("timestamp with time zone") 4960 + .HasColumnName("createdAt") 4961 + .HasComment("The created date of the Antenna."); 4962 + 4963 + b.Property<DateTime?>("LatestSentAt") 4964 + .HasColumnType("timestamp with time zone") 4965 + .HasColumnName("latestSentAt"); 4966 + 4967 + b.Property<int?>("LatestStatus") 4968 + .HasColumnType("integer") 4969 + .HasColumnName("latestStatus"); 4970 + 4971 + b.Property<string>("Name") 4972 + .IsRequired() 4973 + .HasMaxLength(128) 4974 + .HasColumnType("character varying(128)") 4975 + .HasColumnName("name") 4976 + .HasComment("The name of the Antenna."); 4977 + 4978 + b.PrimitiveCollection<List<string>>("On") 4979 + .IsRequired() 4980 + .ValueGeneratedOnAdd() 4981 + .HasColumnType("character varying(128)[]") 4982 + .HasColumnName("on") 4983 + .HasDefaultValueSql("'{}'::character varying[]"); 4984 + 4985 + b.Property<string>("Secret") 4986 + .IsRequired() 4987 + .HasMaxLength(1024) 4988 + .HasColumnType("character varying(1024)") 4989 + .HasColumnName("secret"); 4990 + 4991 + b.Property<string>("Url") 4992 + .IsRequired() 4993 + .HasMaxLength(1024) 4994 + .HasColumnType("character varying(1024)") 4995 + .HasColumnName("url"); 4996 + 4997 + b.Property<string>("UserId") 4998 + .IsRequired() 4999 + .HasMaxLength(32) 5000 + .HasColumnType("character varying(32)") 5001 + .HasColumnName("userId") 5002 + .HasComment("The owner ID."); 5003 + 5004 + b.HasKey("Id"); 5005 + 5006 + b.HasIndex("Active"); 5007 + 5008 + b.HasIndex("On"); 5009 + 5010 + b.HasIndex("UserId"); 5011 + 5012 + b.ToTable("webhook"); 5013 + }); 5014 + 5015 + modelBuilder.Entity("Microsoft.AspNetCore.DataProtection.EntityFrameworkCore.DataProtectionKey", b => 5016 + { 5017 + b.Property<int>("Id") 5018 + .ValueGeneratedOnAdd() 5019 + .HasColumnType("integer"); 5020 + 5021 + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id")); 5022 + 5023 + b.Property<string>("FriendlyName") 5024 + .HasColumnType("text"); 5025 + 5026 + b.Property<string>("Xml") 5027 + .HasColumnType("text"); 5028 + 5029 + b.HasKey("Id"); 5030 + 5031 + b.ToTable("data_protection_keys", (string)null); 5032 + }); 5033 + 5034 + modelBuilder.Entity("reported_note", b => 5035 + { 5036 + b.Property<string>("note_id") 5037 + .HasColumnType("character varying(32)"); 5038 + 5039 + b.Property<string>("report_id") 5040 + .HasColumnType("character varying(32)"); 5041 + 5042 + b.HasKey("note_id", "report_id"); 5043 + 5044 + b.HasIndex("report_id"); 5045 + 5046 + b.ToTable("reported_note"); 5047 + }); 5048 + 5049 + modelBuilder.Entity("reported_rule", b => 5050 + { 5051 + b.Property<string>("report_id") 5052 + .HasColumnType("character varying(32)"); 5053 + 5054 + b.Property<string>("rule_id") 5055 + .HasColumnType("character varying(32)"); 5056 + 5057 + b.HasKey("report_id", "rule_id"); 5058 + 5059 + b.HasIndex("rule_id"); 5060 + 5061 + b.ToTable("reported_rule"); 5062 + }); 5063 + 5064 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.AnnouncementRead", b => 5065 + { 5066 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Announcement", "Announcement") 5067 + .WithMany("AnnouncementReads") 5068 + .HasForeignKey("AnnouncementId") 5069 + .OnDelete(DeleteBehavior.Cascade) 5070 + .IsRequired(); 5071 + 5072 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5073 + .WithMany("AnnouncementReads") 5074 + .HasForeignKey("UserId") 5075 + .OnDelete(DeleteBehavior.Cascade) 5076 + .IsRequired(); 5077 + 5078 + b.Navigation("Announcement"); 5079 + 5080 + b.Navigation("User"); 5081 + }); 5082 + 5083 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Antenna", b => 5084 + { 5085 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.UserGroupMember", "UserGroupMember") 5086 + .WithMany("Antennas") 5087 + .HasForeignKey("UserGroupMemberId") 5088 + .OnDelete(DeleteBehavior.Cascade); 5089 + 5090 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5091 + .WithMany("Antennas") 5092 + .HasForeignKey("UserId") 5093 + .OnDelete(DeleteBehavior.Cascade) 5094 + .IsRequired(); 5095 + 5096 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.UserList", "UserList") 5097 + .WithMany("Antennas") 5098 + .HasForeignKey("UserListId") 5099 + .OnDelete(DeleteBehavior.Cascade); 5100 + 5101 + b.Navigation("User"); 5102 + 5103 + b.Navigation("UserGroupMember"); 5104 + 5105 + b.Navigation("UserList"); 5106 + }); 5107 + 5108 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.AttestationChallenge", b => 5109 + { 5110 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5111 + .WithMany("AttestationChallenges") 5112 + .HasForeignKey("UserId") 5113 + .OnDelete(DeleteBehavior.Cascade) 5114 + .IsRequired(); 5115 + 5116 + b.Navigation("User"); 5117 + }); 5118 + 5119 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Bite", b => 5120 + { 5121 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Bite", "TargetBite") 5122 + .WithMany() 5123 + .HasForeignKey("TargetBiteId") 5124 + .OnDelete(DeleteBehavior.Cascade); 5125 + 5126 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "TargetNote") 5127 + .WithMany() 5128 + .HasForeignKey("TargetNoteId") 5129 + .OnDelete(DeleteBehavior.Cascade); 5130 + 5131 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "TargetUser") 5132 + .WithMany() 5133 + .HasForeignKey("TargetUserId") 5134 + .OnDelete(DeleteBehavior.Cascade); 5135 + 5136 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5137 + .WithMany() 5138 + .HasForeignKey("UserId") 5139 + .OnDelete(DeleteBehavior.Cascade) 5140 + .IsRequired(); 5141 + 5142 + b.Navigation("TargetBite"); 5143 + 5144 + b.Navigation("TargetNote"); 5145 + 5146 + b.Navigation("TargetUser"); 5147 + 5148 + b.Navigation("User"); 5149 + }); 5150 + 5151 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Blocking", b => 5152 + { 5153 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "Blockee") 5154 + .WithMany("IncomingBlocks") 5155 + .HasForeignKey("BlockeeId") 5156 + .OnDelete(DeleteBehavior.Cascade) 5157 + .IsRequired(); 5158 + 5159 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "Blocker") 5160 + .WithMany("OutgoingBlocks") 5161 + .HasForeignKey("BlockerId") 5162 + .OnDelete(DeleteBehavior.Cascade) 5163 + .IsRequired(); 5164 + 5165 + b.Navigation("Blockee"); 5166 + 5167 + b.Navigation("Blocker"); 5168 + }); 5169 + 5170 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Channel", b => 5171 + { 5172 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.DriveFile", "Banner") 5173 + .WithMany("Channels") 5174 + .HasForeignKey("BannerId") 5175 + .OnDelete(DeleteBehavior.SetNull); 5176 + 5177 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5178 + .WithMany("Channels") 5179 + .HasForeignKey("UserId") 5180 + .OnDelete(DeleteBehavior.SetNull); 5181 + 5182 + b.Navigation("Banner"); 5183 + 5184 + b.Navigation("User"); 5185 + }); 5186 + 5187 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.ChannelFollowing", b => 5188 + { 5189 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Channel", "Followee") 5190 + .WithMany("ChannelFollowings") 5191 + .HasForeignKey("FolloweeId") 5192 + .OnDelete(DeleteBehavior.Cascade) 5193 + .IsRequired(); 5194 + 5195 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "Follower") 5196 + .WithMany("ChannelFollowings") 5197 + .HasForeignKey("FollowerId") 5198 + .OnDelete(DeleteBehavior.Cascade) 5199 + .IsRequired(); 5200 + 5201 + b.Navigation("Followee"); 5202 + 5203 + b.Navigation("Follower"); 5204 + }); 5205 + 5206 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.ChannelNotePin", b => 5207 + { 5208 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Channel", "Channel") 5209 + .WithMany("ChannelNotePins") 5210 + .HasForeignKey("ChannelId") 5211 + .OnDelete(DeleteBehavior.Cascade) 5212 + .IsRequired(); 5213 + 5214 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "Note") 5215 + .WithMany("ChannelNotePins") 5216 + .HasForeignKey("NoteId") 5217 + .OnDelete(DeleteBehavior.Cascade) 5218 + .IsRequired(); 5219 + 5220 + b.Navigation("Channel"); 5221 + 5222 + b.Navigation("Note"); 5223 + }); 5224 + 5225 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Clip", b => 5226 + { 5227 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5228 + .WithMany("Clips") 5229 + .HasForeignKey("UserId") 5230 + .OnDelete(DeleteBehavior.Cascade) 5231 + .IsRequired(); 5232 + 5233 + b.Navigation("User"); 5234 + }); 5235 + 5236 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.ClipNote", b => 5237 + { 5238 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Clip", "Clip") 5239 + .WithMany("ClipNotes") 5240 + .HasForeignKey("ClipId") 5241 + .OnDelete(DeleteBehavior.Cascade) 5242 + .IsRequired(); 5243 + 5244 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "Note") 5245 + .WithMany("ClipNotes") 5246 + .HasForeignKey("NoteId") 5247 + .OnDelete(DeleteBehavior.Cascade) 5248 + .IsRequired(); 5249 + 5250 + b.Navigation("Clip"); 5251 + 5252 + b.Navigation("Note"); 5253 + }); 5254 + 5255 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.DriveFile", b => 5256 + { 5257 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.DriveFolder", "Folder") 5258 + .WithMany("DriveFiles") 5259 + .HasForeignKey("FolderId") 5260 + .OnDelete(DeleteBehavior.SetNull); 5261 + 5262 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5263 + .WithMany("DriveFiles") 5264 + .HasForeignKey("UserId") 5265 + .OnDelete(DeleteBehavior.SetNull); 5266 + 5267 + b.Navigation("Folder"); 5268 + 5269 + b.Navigation("User"); 5270 + }); 5271 + 5272 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.DriveFolder", b => 5273 + { 5274 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.DriveFolder", "Parent") 5275 + .WithMany("InverseParent") 5276 + .HasForeignKey("ParentId") 5277 + .OnDelete(DeleteBehavior.SetNull); 5278 + 5279 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5280 + .WithMany("DriveFolders") 5281 + .HasForeignKey("UserId") 5282 + .OnDelete(DeleteBehavior.Cascade); 5283 + 5284 + b.Navigation("Parent"); 5285 + 5286 + b.Navigation("User"); 5287 + }); 5288 + 5289 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Filter", b => 5290 + { 5291 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5292 + .WithMany("Filters") 5293 + .HasForeignKey("user_id") 5294 + .OnDelete(DeleteBehavior.Cascade); 5295 + 5296 + b.Navigation("User"); 5297 + }); 5298 + 5299 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.FollowRequest", b => 5300 + { 5301 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "Followee") 5302 + .WithMany("IncomingFollowRequests") 5303 + .HasForeignKey("FolloweeId") 5304 + .OnDelete(DeleteBehavior.Cascade) 5305 + .IsRequired(); 5306 + 5307 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "Follower") 5308 + .WithMany("OutgoingFollowRequests") 5309 + .HasForeignKey("FollowerId") 5310 + .OnDelete(DeleteBehavior.Cascade) 5311 + .IsRequired(); 5312 + 5313 + b.Navigation("Followee"); 5314 + 5315 + b.Navigation("Follower"); 5316 + }); 5317 + 5318 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Following", b => 5319 + { 5320 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "Followee") 5321 + .WithMany("IncomingFollowRelationships") 5322 + .HasForeignKey("FolloweeId") 5323 + .OnDelete(DeleteBehavior.Cascade) 5324 + .IsRequired(); 5325 + 5326 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "Follower") 5327 + .WithMany("OutgoingFollowRelationships") 5328 + .HasForeignKey("FollowerId") 5329 + .OnDelete(DeleteBehavior.Cascade) 5330 + .IsRequired(); 5331 + 5332 + b.Navigation("Followee"); 5333 + 5334 + b.Navigation("Follower"); 5335 + }); 5336 + 5337 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.GalleryLike", b => 5338 + { 5339 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.GalleryPost", "Post") 5340 + .WithMany("GalleryLikes") 5341 + .HasForeignKey("PostId") 5342 + .OnDelete(DeleteBehavior.Cascade) 5343 + .IsRequired(); 5344 + 5345 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5346 + .WithMany("GalleryLikes") 5347 + .HasForeignKey("UserId") 5348 + .OnDelete(DeleteBehavior.Cascade) 5349 + .IsRequired(); 5350 + 5351 + b.Navigation("Post"); 5352 + 5353 + b.Navigation("User"); 5354 + }); 5355 + 5356 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.GalleryPost", b => 5357 + { 5358 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5359 + .WithMany("GalleryPosts") 5360 + .HasForeignKey("UserId") 5361 + .OnDelete(DeleteBehavior.Cascade) 5362 + .IsRequired(); 5363 + 5364 + b.Navigation("User"); 5365 + }); 5366 + 5367 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.InteractionStamp", b => 5368 + { 5369 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "Note") 5370 + .WithMany() 5371 + .HasForeignKey("NoteId") 5372 + .OnDelete(DeleteBehavior.Cascade) 5373 + .IsRequired(); 5374 + 5375 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "TargetNote") 5376 + .WithMany() 5377 + .HasForeignKey("TargetNoteId") 5378 + .OnDelete(DeleteBehavior.Cascade) 5379 + .IsRequired(); 5380 + 5381 + b.Navigation("Note"); 5382 + 5383 + b.Navigation("TargetNote"); 5384 + }); 5385 + 5386 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Marker", b => 5387 + { 5388 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5389 + .WithMany("Markers") 5390 + .HasForeignKey("UserId") 5391 + .OnDelete(DeleteBehavior.Cascade) 5392 + .IsRequired(); 5393 + 5394 + b.Navigation("User"); 5395 + }); 5396 + 5397 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.MessagingMessage", b => 5398 + { 5399 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.DriveFile", "File") 5400 + .WithMany("MessagingMessages") 5401 + .HasForeignKey("FileId") 5402 + .OnDelete(DeleteBehavior.Cascade); 5403 + 5404 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.UserGroup", "Group") 5405 + .WithMany("MessagingMessages") 5406 + .HasForeignKey("GroupId") 5407 + .OnDelete(DeleteBehavior.Cascade); 5408 + 5409 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "Recipient") 5410 + .WithMany("MessagingMessageRecipients") 5411 + .HasForeignKey("RecipientId") 5412 + .OnDelete(DeleteBehavior.Cascade); 5413 + 5414 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5415 + .WithMany("MessagingMessageUsers") 5416 + .HasForeignKey("UserId") 5417 + .OnDelete(DeleteBehavior.Cascade) 5418 + .IsRequired(); 5419 + 5420 + b.Navigation("File"); 5421 + 5422 + b.Navigation("Group"); 5423 + 5424 + b.Navigation("Recipient"); 5425 + 5426 + b.Navigation("User"); 5427 + }); 5428 + 5429 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.ModerationLog", b => 5430 + { 5431 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5432 + .WithMany("ModerationLogs") 5433 + .HasForeignKey("UserId") 5434 + .OnDelete(DeleteBehavior.Cascade) 5435 + .IsRequired(); 5436 + 5437 + b.Navigation("User"); 5438 + }); 5439 + 5440 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Muting", b => 5441 + { 5442 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "Mutee") 5443 + .WithMany("IncomingMutes") 5444 + .HasForeignKey("MuteeId") 5445 + .OnDelete(DeleteBehavior.Cascade) 5446 + .IsRequired(); 5447 + 5448 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "Muter") 5449 + .WithMany("OutgoingMutes") 5450 + .HasForeignKey("MuterId") 5451 + .OnDelete(DeleteBehavior.Cascade) 5452 + .IsRequired(); 5453 + 5454 + b.Navigation("Mutee"); 5455 + 5456 + b.Navigation("Muter"); 5457 + }); 5458 + 5459 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Note", b => 5460 + { 5461 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Channel", "Channel") 5462 + .WithMany("Notes") 5463 + .HasForeignKey("ChannelId") 5464 + .OnDelete(DeleteBehavior.Cascade); 5465 + 5466 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "Renote") 5467 + .WithMany("InverseRenote") 5468 + .HasForeignKey("RenoteId") 5469 + .OnDelete(DeleteBehavior.Cascade); 5470 + 5471 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "Reply") 5472 + .WithMany("InverseReply") 5473 + .HasForeignKey("ReplyId") 5474 + .OnDelete(DeleteBehavior.Cascade); 5475 + 5476 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.NoteThread", "Thread") 5477 + .WithMany("Notes") 5478 + .HasForeignKey("ThreadId") 5479 + .OnDelete(DeleteBehavior.Cascade) 5480 + .IsRequired(); 5481 + 5482 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5483 + .WithMany("Notes") 5484 + .HasForeignKey("UserId") 5485 + .OnDelete(DeleteBehavior.Cascade) 5486 + .IsRequired(); 5487 + 5488 + b.Navigation("Channel"); 5489 + 5490 + b.Navigation("Renote"); 5491 + 5492 + b.Navigation("Reply"); 5493 + 5494 + b.Navigation("Thread"); 5495 + 5496 + b.Navigation("User"); 5497 + }); 5498 + 5499 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.NoteBookmark", b => 5500 + { 5501 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "Note") 5502 + .WithMany("NoteBookmarks") 5503 + .HasForeignKey("NoteId") 5504 + .OnDelete(DeleteBehavior.Cascade) 5505 + .IsRequired(); 5506 + 5507 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5508 + .WithMany("NoteBookmarks") 5509 + .HasForeignKey("UserId") 5510 + .OnDelete(DeleteBehavior.Cascade) 5511 + .IsRequired(); 5512 + 5513 + b.Navigation("Note"); 5514 + 5515 + b.Navigation("User"); 5516 + }); 5517 + 5518 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.NoteEdit", b => 5519 + { 5520 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "Note") 5521 + .WithMany("NoteEdits") 5522 + .HasForeignKey("NoteId") 5523 + .OnDelete(DeleteBehavior.Cascade) 5524 + .IsRequired(); 5525 + 5526 + b.Navigation("Note"); 5527 + }); 5528 + 5529 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.NoteLike", b => 5530 + { 5531 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "Note") 5532 + .WithMany("NoteLikes") 5533 + .HasForeignKey("NoteId") 5534 + .OnDelete(DeleteBehavior.Cascade) 5535 + .IsRequired(); 5536 + 5537 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5538 + .WithMany("NoteLikes") 5539 + .HasForeignKey("UserId") 5540 + .OnDelete(DeleteBehavior.Cascade) 5541 + .IsRequired(); 5542 + 5543 + b.Navigation("Note"); 5544 + 5545 + b.Navigation("User"); 5546 + }); 5547 + 5548 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.NoteReaction", b => 5549 + { 5550 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "Note") 5551 + .WithMany("NoteReactions") 5552 + .HasForeignKey("NoteId") 5553 + .OnDelete(DeleteBehavior.Cascade) 5554 + .IsRequired(); 5555 + 5556 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5557 + .WithMany("NoteReactions") 5558 + .HasForeignKey("UserId") 5559 + .OnDelete(DeleteBehavior.Cascade) 5560 + .IsRequired(); 5561 + 5562 + b.Navigation("Note"); 5563 + 5564 + b.Navigation("User"); 5565 + }); 5566 + 5567 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.NoteThread", b => 5568 + { 5569 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5570 + .WithMany() 5571 + .HasForeignKey("UserId") 5572 + .OnDelete(DeleteBehavior.SetNull); 5573 + 5574 + b.Navigation("User"); 5575 + }); 5576 + 5577 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.NoteThreadMuting", b => 5578 + { 5579 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.NoteThread", "Thread") 5580 + .WithMany("NoteThreadMutings") 5581 + .HasForeignKey("ThreadId") 5582 + .OnDelete(DeleteBehavior.Cascade) 5583 + .IsRequired(); 5584 + 5585 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5586 + .WithMany("NoteThreadMutings") 5587 + .HasForeignKey("UserId") 5588 + .OnDelete(DeleteBehavior.Cascade) 5589 + .IsRequired(); 5590 + 5591 + b.Navigation("Thread"); 5592 + 5593 + b.Navigation("User"); 5594 + }); 5595 + 5596 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.NoteUnread", b => 5597 + { 5598 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "Note") 5599 + .WithMany("NoteUnreads") 5600 + .HasForeignKey("NoteId") 5601 + .OnDelete(DeleteBehavior.Cascade) 5602 + .IsRequired(); 5603 + 5604 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5605 + .WithMany("NoteUnreads") 5606 + .HasForeignKey("UserId") 5607 + .OnDelete(DeleteBehavior.Cascade) 5608 + .IsRequired(); 5609 + 5610 + b.Navigation("Note"); 5611 + 5612 + b.Navigation("User"); 5613 + }); 5614 + 5615 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.NoteWatching", b => 5616 + { 5617 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "Note") 5618 + .WithMany("NoteWatchings") 5619 + .HasForeignKey("NoteId") 5620 + .OnDelete(DeleteBehavior.Cascade) 5621 + .IsRequired(); 5622 + 5623 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5624 + .WithMany("NoteWatchings") 5625 + .HasForeignKey("UserId") 5626 + .OnDelete(DeleteBehavior.Cascade) 5627 + .IsRequired(); 5628 + 5629 + b.Navigation("Note"); 5630 + 5631 + b.Navigation("User"); 5632 + }); 5633 + 5634 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Notification", b => 5635 + { 5636 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Bite", "Bite") 5637 + .WithMany() 5638 + .HasForeignKey("BiteId"); 5639 + 5640 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.FollowRequest", "FollowRequest") 5641 + .WithMany("Notifications") 5642 + .HasForeignKey("FollowRequestId") 5643 + .OnDelete(DeleteBehavior.Cascade); 5644 + 5645 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "Note") 5646 + .WithMany("Notifications") 5647 + .HasForeignKey("NoteId") 5648 + .OnDelete(DeleteBehavior.Cascade); 5649 + 5650 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "Notifiee") 5651 + .WithMany("NotificationNotifiees") 5652 + .HasForeignKey("NotifieeId") 5653 + .OnDelete(DeleteBehavior.Cascade) 5654 + .IsRequired(); 5655 + 5656 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "Notifier") 5657 + .WithMany("NotificationNotifiers") 5658 + .HasForeignKey("NotifierId") 5659 + .OnDelete(DeleteBehavior.Cascade); 5660 + 5661 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Report", "Report") 5662 + .WithMany() 5663 + .HasForeignKey("ReportId"); 5664 + 5665 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.UserGroupInvitation", "UserGroupInvitation") 5666 + .WithMany("Notifications") 5667 + .HasForeignKey("UserGroupInvitationId") 5668 + .OnDelete(DeleteBehavior.Cascade); 5669 + 5670 + b.Navigation("Bite"); 5671 + 5672 + b.Navigation("FollowRequest"); 5673 + 5674 + b.Navigation("Note"); 5675 + 5676 + b.Navigation("Notifiee"); 5677 + 5678 + b.Navigation("Notifier"); 5679 + 5680 + b.Navigation("Report"); 5681 + 5682 + b.Navigation("UserGroupInvitation"); 5683 + }); 5684 + 5685 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.OauthToken", b => 5686 + { 5687 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.OauthApp", "App") 5688 + .WithMany("OauthTokens") 5689 + .HasForeignKey("AppId") 5690 + .OnDelete(DeleteBehavior.Cascade) 5691 + .IsRequired(); 5692 + 5693 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5694 + .WithMany("OauthTokens") 5695 + .HasForeignKey("UserId") 5696 + .OnDelete(DeleteBehavior.Cascade) 5697 + .IsRequired(); 5698 + 5699 + b.Navigation("App"); 5700 + 5701 + b.Navigation("User"); 5702 + }); 5703 + 5704 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Page", b => 5705 + { 5706 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.DriveFile", "EyeCatchingImage") 5707 + .WithMany("Pages") 5708 + .HasForeignKey("EyeCatchingImageId") 5709 + .OnDelete(DeleteBehavior.Cascade); 5710 + 5711 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5712 + .WithMany("Pages") 5713 + .HasForeignKey("UserId") 5714 + .OnDelete(DeleteBehavior.Cascade) 5715 + .IsRequired(); 5716 + 5717 + b.Navigation("EyeCatchingImage"); 5718 + 5719 + b.Navigation("User"); 5720 + }); 5721 + 5722 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.PageLike", b => 5723 + { 5724 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Page", "Page") 5725 + .WithMany("PageLikes") 5726 + .HasForeignKey("PageId") 5727 + .OnDelete(DeleteBehavior.Cascade) 5728 + .IsRequired(); 5729 + 5730 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5731 + .WithMany("PageLikes") 5732 + .HasForeignKey("UserId") 5733 + .OnDelete(DeleteBehavior.Cascade) 5734 + .IsRequired(); 5735 + 5736 + b.Navigation("Page"); 5737 + 5738 + b.Navigation("User"); 5739 + }); 5740 + 5741 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.PasswordResetRequest", b => 5742 + { 5743 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5744 + .WithMany("PasswordResetRequests") 5745 + .HasForeignKey("UserId") 5746 + .OnDelete(DeleteBehavior.Cascade) 5747 + .IsRequired(); 5748 + 5749 + b.Navigation("User"); 5750 + }); 5751 + 5752 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Poll", b => 5753 + { 5754 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "Note") 5755 + .WithOne("Poll") 5756 + .HasForeignKey("Iceshrimp.Backend.Core.Database.Tables.Poll", "NoteId") 5757 + .OnDelete(DeleteBehavior.Cascade) 5758 + .IsRequired(); 5759 + 5760 + b.Navigation("Note"); 5761 + }); 5762 + 5763 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.PollVote", b => 5764 + { 5765 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "Note") 5766 + .WithMany("PollVotes") 5767 + .HasForeignKey("NoteId") 5768 + .OnDelete(DeleteBehavior.Cascade) 5769 + .IsRequired(); 5770 + 5771 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5772 + .WithMany("PollVotes") 5773 + .HasForeignKey("UserId") 5774 + .OnDelete(DeleteBehavior.Cascade) 5775 + .IsRequired(); 5776 + 5777 + b.Navigation("Note"); 5778 + 5779 + b.Navigation("User"); 5780 + }); 5781 + 5782 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.PromoNote", b => 5783 + { 5784 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "Note") 5785 + .WithOne("PromoNote") 5786 + .HasForeignKey("Iceshrimp.Backend.Core.Database.Tables.PromoNote", "NoteId") 5787 + .OnDelete(DeleteBehavior.Cascade) 5788 + .IsRequired(); 5789 + 5790 + b.Navigation("Note"); 5791 + }); 5792 + 5793 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.PromoRead", b => 5794 + { 5795 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "Note") 5796 + .WithMany("PromoReads") 5797 + .HasForeignKey("NoteId") 5798 + .OnDelete(DeleteBehavior.Cascade) 5799 + .IsRequired(); 5800 + 5801 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5802 + .WithMany("PromoReads") 5803 + .HasForeignKey("UserId") 5804 + .OnDelete(DeleteBehavior.Cascade) 5805 + .IsRequired(); 5806 + 5807 + b.Navigation("Note"); 5808 + 5809 + b.Navigation("User"); 5810 + }); 5811 + 5812 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.PushSubscription", b => 5813 + { 5814 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.OauthToken", "OauthToken") 5815 + .WithOne("PushSubscription") 5816 + .HasForeignKey("Iceshrimp.Backend.Core.Database.Tables.PushSubscription", "OauthTokenId") 5817 + .OnDelete(DeleteBehavior.Cascade) 5818 + .IsRequired(); 5819 + 5820 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5821 + .WithMany("PushSubscriptions") 5822 + .HasForeignKey("UserId") 5823 + .OnDelete(DeleteBehavior.Cascade) 5824 + .IsRequired(); 5825 + 5826 + b.Navigation("OauthToken"); 5827 + 5828 + b.Navigation("User"); 5829 + }); 5830 + 5831 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.RegistrationInvite", b => 5832 + { 5833 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "CreatedBy") 5834 + .WithMany() 5835 + .HasForeignKey("CreatedById"); 5836 + 5837 + b.Navigation("CreatedBy"); 5838 + }); 5839 + 5840 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.RegistryItem", b => 5841 + { 5842 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5843 + .WithMany("RegistryItems") 5844 + .HasForeignKey("UserId") 5845 + .OnDelete(DeleteBehavior.Cascade) 5846 + .IsRequired(); 5847 + 5848 + b.Navigation("User"); 5849 + }); 5850 + 5851 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.RenoteMuting", b => 5852 + { 5853 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "Mutee") 5854 + .WithMany("RenoteMutingMutees") 5855 + .HasForeignKey("MuteeId") 5856 + .OnDelete(DeleteBehavior.Cascade) 5857 + .IsRequired(); 5858 + 5859 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "Muter") 5860 + .WithMany("RenoteMutingMuters") 5861 + .HasForeignKey("MuterId") 5862 + .OnDelete(DeleteBehavior.Cascade) 5863 + .IsRequired(); 5864 + 5865 + b.Navigation("Mutee"); 5866 + 5867 + b.Navigation("Muter"); 5868 + }); 5869 + 5870 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Report", b => 5871 + { 5872 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "Assignee") 5873 + .WithMany("AbuseUserReportAssignees") 5874 + .HasForeignKey("AssigneeId") 5875 + .OnDelete(DeleteBehavior.SetNull); 5876 + 5877 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "Reporter") 5878 + .WithMany("AbuseUserReportReporters") 5879 + .HasForeignKey("ReporterId") 5880 + .OnDelete(DeleteBehavior.Cascade) 5881 + .IsRequired(); 5882 + 5883 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "TargetUser") 5884 + .WithMany("AbuseUserReportTargetUsers") 5885 + .HasForeignKey("TargetUserId") 5886 + .OnDelete(DeleteBehavior.Cascade) 5887 + .IsRequired(); 5888 + 5889 + b.Navigation("Assignee"); 5890 + 5891 + b.Navigation("Reporter"); 5892 + 5893 + b.Navigation("TargetUser"); 5894 + }); 5895 + 5896 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Session", b => 5897 + { 5898 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.OauthToken", "MastodonToken") 5899 + .WithOne("WebSession") 5900 + .HasForeignKey("Iceshrimp.Backend.Core.Database.Tables.Session", "MastodonTokenId") 5901 + .OnDelete(DeleteBehavior.Cascade); 5902 + 5903 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5904 + .WithMany("Sessions") 5905 + .HasForeignKey("UserId") 5906 + .OnDelete(DeleteBehavior.Cascade) 5907 + .IsRequired(); 5908 + 5909 + b.Navigation("MastodonToken"); 5910 + 5911 + b.Navigation("User"); 5912 + }); 5913 + 5914 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.SwSubscription", b => 5915 + { 5916 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5917 + .WithMany("SwSubscriptions") 5918 + .HasForeignKey("UserId") 5919 + .OnDelete(DeleteBehavior.Cascade) 5920 + .IsRequired(); 5921 + 5922 + b.Navigation("User"); 5923 + }); 5924 + 5925 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.User", b => 5926 + { 5927 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.DriveFile", "Avatar") 5928 + .WithOne("UserAvatar") 5929 + .HasForeignKey("Iceshrimp.Backend.Core.Database.Tables.User", "AvatarId") 5930 + .OnDelete(DeleteBehavior.SetNull); 5931 + 5932 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.DriveFile", "Banner") 5933 + .WithOne("UserBanner") 5934 + .HasForeignKey("Iceshrimp.Backend.Core.Database.Tables.User", "BannerId") 5935 + .OnDelete(DeleteBehavior.SetNull); 5936 + 5937 + b.Navigation("Avatar"); 5938 + 5939 + b.Navigation("Banner"); 5940 + }); 5941 + 5942 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserGroup", b => 5943 + { 5944 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5945 + .WithMany("UserGroups") 5946 + .HasForeignKey("UserId") 5947 + .OnDelete(DeleteBehavior.Cascade) 5948 + .IsRequired(); 5949 + 5950 + b.Navigation("User"); 5951 + }); 5952 + 5953 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserGroupInvitation", b => 5954 + { 5955 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.UserGroup", "UserGroup") 5956 + .WithMany("UserGroupInvitations") 5957 + .HasForeignKey("UserGroupId") 5958 + .OnDelete(DeleteBehavior.Cascade) 5959 + .IsRequired(); 5960 + 5961 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5962 + .WithMany("UserGroupInvitations") 5963 + .HasForeignKey("UserId") 5964 + .OnDelete(DeleteBehavior.Cascade) 5965 + .IsRequired(); 5966 + 5967 + b.Navigation("User"); 5968 + 5969 + b.Navigation("UserGroup"); 5970 + }); 5971 + 5972 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserGroupMember", b => 5973 + { 5974 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.UserGroup", "UserGroup") 5975 + .WithMany("UserGroupMembers") 5976 + .HasForeignKey("UserGroupId") 5977 + .OnDelete(DeleteBehavior.Cascade) 5978 + .IsRequired(); 5979 + 5980 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5981 + .WithMany("UserGroupMemberships") 5982 + .HasForeignKey("UserId") 5983 + .OnDelete(DeleteBehavior.Cascade) 5984 + .IsRequired(); 5985 + 5986 + b.Navigation("User"); 5987 + 5988 + b.Navigation("UserGroup"); 5989 + }); 5990 + 5991 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserKeypair", b => 5992 + { 5993 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 5994 + .WithOne("UserKeypair") 5995 + .HasForeignKey("Iceshrimp.Backend.Core.Database.Tables.UserKeypair", "UserId") 5996 + .OnDelete(DeleteBehavior.Cascade) 5997 + .IsRequired(); 5998 + 5999 + b.Navigation("User"); 6000 + }); 6001 + 6002 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserList", b => 6003 + { 6004 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 6005 + .WithMany("UserLists") 6006 + .HasForeignKey("UserId") 6007 + .OnDelete(DeleteBehavior.Cascade) 6008 + .IsRequired(); 6009 + 6010 + b.Navigation("User"); 6011 + }); 6012 + 6013 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserListMember", b => 6014 + { 6015 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 6016 + .WithMany("UserListMembers") 6017 + .HasForeignKey("UserId") 6018 + .OnDelete(DeleteBehavior.Cascade) 6019 + .IsRequired(); 6020 + 6021 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.UserList", "UserList") 6022 + .WithMany("UserListMembers") 6023 + .HasForeignKey("UserListId") 6024 + .OnDelete(DeleteBehavior.Cascade) 6025 + .IsRequired(); 6026 + 6027 + b.Navigation("User"); 6028 + 6029 + b.Navigation("UserList"); 6030 + }); 6031 + 6032 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserNotePin", b => 6033 + { 6034 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", "Note") 6035 + .WithMany("UserNotePins") 6036 + .HasForeignKey("NoteId") 6037 + .OnDelete(DeleteBehavior.Cascade) 6038 + .IsRequired(); 6039 + 6040 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 6041 + .WithMany("UserNotePins") 6042 + .HasForeignKey("UserId") 6043 + .OnDelete(DeleteBehavior.Cascade) 6044 + .IsRequired(); 6045 + 6046 + b.Navigation("Note"); 6047 + 6048 + b.Navigation("User"); 6049 + }); 6050 + 6051 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserProfile", b => 6052 + { 6053 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Page", "PinnedPage") 6054 + .WithOne("UserProfile") 6055 + .HasForeignKey("Iceshrimp.Backend.Core.Database.Tables.UserProfile", "PinnedPageId") 6056 + .OnDelete(DeleteBehavior.SetNull); 6057 + 6058 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 6059 + .WithOne("UserProfile") 6060 + .HasForeignKey("Iceshrimp.Backend.Core.Database.Tables.UserProfile", "UserId") 6061 + .OnDelete(DeleteBehavior.Cascade) 6062 + .IsRequired(); 6063 + 6064 + b.Navigation("PinnedPage"); 6065 + 6066 + b.Navigation("User"); 6067 + }); 6068 + 6069 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserPublickey", b => 6070 + { 6071 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 6072 + .WithOne("UserPublickey") 6073 + .HasForeignKey("Iceshrimp.Backend.Core.Database.Tables.UserPublickey", "UserId") 6074 + .OnDelete(DeleteBehavior.Cascade) 6075 + .IsRequired(); 6076 + 6077 + b.Navigation("User"); 6078 + }); 6079 + 6080 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserSecurityKey", b => 6081 + { 6082 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 6083 + .WithMany("UserSecurityKeys") 6084 + .HasForeignKey("UserId") 6085 + .OnDelete(DeleteBehavior.Cascade) 6086 + .IsRequired(); 6087 + 6088 + b.Navigation("User"); 6089 + }); 6090 + 6091 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserSettings", b => 6092 + { 6093 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 6094 + .WithOne("UserSettings") 6095 + .HasForeignKey("Iceshrimp.Backend.Core.Database.Tables.UserSettings", "UserId") 6096 + .OnDelete(DeleteBehavior.Cascade) 6097 + .IsRequired(); 6098 + 6099 + b.Navigation("User"); 6100 + }); 6101 + 6102 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Webhook", b => 6103 + { 6104 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.User", "User") 6105 + .WithMany("Webhooks") 6106 + .HasForeignKey("UserId") 6107 + .OnDelete(DeleteBehavior.Cascade) 6108 + .IsRequired(); 6109 + 6110 + b.Navigation("User"); 6111 + }); 6112 + 6113 + modelBuilder.Entity("reported_note", b => 6114 + { 6115 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Note", null) 6116 + .WithMany() 6117 + .HasForeignKey("note_id") 6118 + .OnDelete(DeleteBehavior.Cascade) 6119 + .IsRequired(); 6120 + 6121 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Report", null) 6122 + .WithMany() 6123 + .HasForeignKey("report_id") 6124 + .OnDelete(DeleteBehavior.Cascade) 6125 + .IsRequired(); 6126 + }); 6127 + 6128 + modelBuilder.Entity("reported_rule", b => 6129 + { 6130 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Report", null) 6131 + .WithMany() 6132 + .HasForeignKey("report_id") 6133 + .OnDelete(DeleteBehavior.Cascade) 6134 + .IsRequired(); 6135 + 6136 + b.HasOne("Iceshrimp.Backend.Core.Database.Tables.Rule", null) 6137 + .WithMany() 6138 + .HasForeignKey("rule_id") 6139 + .OnDelete(DeleteBehavior.Cascade) 6140 + .IsRequired(); 6141 + }); 6142 + 6143 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Announcement", b => 6144 + { 6145 + b.Navigation("AnnouncementReads"); 6146 + }); 6147 + 6148 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Channel", b => 6149 + { 6150 + b.Navigation("ChannelFollowings"); 6151 + 6152 + b.Navigation("ChannelNotePins"); 6153 + 6154 + b.Navigation("Notes"); 6155 + }); 6156 + 6157 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Clip", b => 6158 + { 6159 + b.Navigation("ClipNotes"); 6160 + }); 6161 + 6162 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.DriveFile", b => 6163 + { 6164 + b.Navigation("Channels"); 6165 + 6166 + b.Navigation("MessagingMessages"); 6167 + 6168 + b.Navigation("Pages"); 6169 + 6170 + b.Navigation("UserAvatar"); 6171 + 6172 + b.Navigation("UserBanner"); 6173 + }); 6174 + 6175 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.DriveFolder", b => 6176 + { 6177 + b.Navigation("DriveFiles"); 6178 + 6179 + b.Navigation("InverseParent"); 6180 + }); 6181 + 6182 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.FollowRequest", b => 6183 + { 6184 + b.Navigation("Notifications"); 6185 + }); 6186 + 6187 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.GalleryPost", b => 6188 + { 6189 + b.Navigation("GalleryLikes"); 6190 + }); 6191 + 6192 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Note", b => 6193 + { 6194 + b.Navigation("ChannelNotePins"); 6195 + 6196 + b.Navigation("ClipNotes"); 6197 + 6198 + b.Navigation("InverseRenote"); 6199 + 6200 + b.Navigation("InverseReply"); 6201 + 6202 + b.Navigation("NoteBookmarks"); 6203 + 6204 + b.Navigation("NoteEdits"); 6205 + 6206 + b.Navigation("NoteLikes"); 6207 + 6208 + b.Navigation("NoteReactions"); 6209 + 6210 + b.Navigation("NoteUnreads"); 6211 + 6212 + b.Navigation("NoteWatchings"); 6213 + 6214 + b.Navigation("Notifications"); 6215 + 6216 + b.Navigation("Poll"); 6217 + 6218 + b.Navigation("PollVotes"); 6219 + 6220 + b.Navigation("PromoNote"); 6221 + 6222 + b.Navigation("PromoReads"); 6223 + 6224 + b.Navigation("UserNotePins"); 6225 + }); 6226 + 6227 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.NoteThread", b => 6228 + { 6229 + b.Navigation("NoteThreadMutings"); 6230 + 6231 + b.Navigation("Notes"); 6232 + }); 6233 + 6234 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.OauthApp", b => 6235 + { 6236 + b.Navigation("OauthTokens"); 6237 + }); 6238 + 6239 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.OauthToken", b => 6240 + { 6241 + b.Navigation("PushSubscription"); 6242 + 6243 + b.Navigation("WebSession"); 6244 + }); 6245 + 6246 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.Page", b => 6247 + { 6248 + b.Navigation("PageLikes"); 6249 + 6250 + b.Navigation("UserProfile"); 6251 + }); 6252 + 6253 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.User", b => 6254 + { 6255 + b.Navigation("AbuseUserReportAssignees"); 6256 + 6257 + b.Navigation("AbuseUserReportReporters"); 6258 + 6259 + b.Navigation("AbuseUserReportTargetUsers"); 6260 + 6261 + b.Navigation("AnnouncementReads"); 6262 + 6263 + b.Navigation("Antennas"); 6264 + 6265 + b.Navigation("AttestationChallenges"); 6266 + 6267 + b.Navigation("ChannelFollowings"); 6268 + 6269 + b.Navigation("Channels"); 6270 + 6271 + b.Navigation("Clips"); 6272 + 6273 + b.Navigation("DriveFiles"); 6274 + 6275 + b.Navigation("DriveFolders"); 6276 + 6277 + b.Navigation("Filters"); 6278 + 6279 + b.Navigation("GalleryLikes"); 6280 + 6281 + b.Navigation("GalleryPosts"); 6282 + 6283 + b.Navigation("IncomingBlocks"); 6284 + 6285 + b.Navigation("IncomingFollowRelationships"); 6286 + 6287 + b.Navigation("IncomingFollowRequests"); 6288 + 6289 + b.Navigation("IncomingMutes"); 6290 + 6291 + b.Navigation("Markers"); 6292 + 6293 + b.Navigation("MessagingMessageRecipients"); 6294 + 6295 + b.Navigation("MessagingMessageUsers"); 6296 + 6297 + b.Navigation("ModerationLogs"); 6298 + 6299 + b.Navigation("NoteBookmarks"); 6300 + 6301 + b.Navigation("NoteLikes"); 6302 + 6303 + b.Navigation("NoteReactions"); 6304 + 6305 + b.Navigation("NoteThreadMutings"); 6306 + 6307 + b.Navigation("NoteUnreads"); 6308 + 6309 + b.Navigation("NoteWatchings"); 6310 + 6311 + b.Navigation("Notes"); 6312 + 6313 + b.Navigation("NotificationNotifiees"); 6314 + 6315 + b.Navigation("NotificationNotifiers"); 6316 + 6317 + b.Navigation("OauthTokens"); 6318 + 6319 + b.Navigation("OutgoingBlocks"); 6320 + 6321 + b.Navigation("OutgoingFollowRelationships"); 6322 + 6323 + b.Navigation("OutgoingFollowRequests"); 6324 + 6325 + b.Navigation("OutgoingMutes"); 6326 + 6327 + b.Navigation("PageLikes"); 6328 + 6329 + b.Navigation("Pages"); 6330 + 6331 + b.Navigation("PasswordResetRequests"); 6332 + 6333 + b.Navigation("PollVotes"); 6334 + 6335 + b.Navigation("PromoReads"); 6336 + 6337 + b.Navigation("PushSubscriptions"); 6338 + 6339 + b.Navigation("RegistryItems"); 6340 + 6341 + b.Navigation("RenoteMutingMutees"); 6342 + 6343 + b.Navigation("RenoteMutingMuters"); 6344 + 6345 + b.Navigation("Sessions"); 6346 + 6347 + b.Navigation("SwSubscriptions"); 6348 + 6349 + b.Navigation("UserGroupInvitations"); 6350 + 6351 + b.Navigation("UserGroupMemberships"); 6352 + 6353 + b.Navigation("UserGroups"); 6354 + 6355 + b.Navigation("UserKeypair"); 6356 + 6357 + b.Navigation("UserListMembers"); 6358 + 6359 + b.Navigation("UserLists"); 6360 + 6361 + b.Navigation("UserNotePins"); 6362 + 6363 + b.Navigation("UserProfile"); 6364 + 6365 + b.Navigation("UserPublickey"); 6366 + 6367 + b.Navigation("UserSecurityKeys"); 6368 + 6369 + b.Navigation("UserSettings"); 6370 + 6371 + b.Navigation("Webhooks"); 6372 + }); 6373 + 6374 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserGroup", b => 6375 + { 6376 + b.Navigation("MessagingMessages"); 6377 + 6378 + b.Navigation("UserGroupInvitations"); 6379 + 6380 + b.Navigation("UserGroupMembers"); 6381 + }); 6382 + 6383 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserGroupInvitation", b => 6384 + { 6385 + b.Navigation("Notifications"); 6386 + }); 6387 + 6388 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserGroupMember", b => 6389 + { 6390 + b.Navigation("Antennas"); 6391 + }); 6392 + 6393 + modelBuilder.Entity("Iceshrimp.Backend.Core.Database.Tables.UserList", b => 6394 + { 6395 + b.Navigation("Antennas"); 6396 + 6397 + b.Navigation("UserListMembers"); 6398 + }); 6399 + #pragma warning restore 612, 618 6400 + } 6401 + } 6402 + }
+116
Iceshrimp.Backend/Core/Database/Migrations/v2025.1-beta6/20251016232810_AddInteractionStamp.cs
··· 1 + using Iceshrimp.Backend.Core.Database.Tables; 2 + using Microsoft.EntityFrameworkCore.Infrastructure; 3 + using Microsoft.EntityFrameworkCore.Migrations; 4 + 5 + #nullable disable 6 + 7 + namespace Iceshrimp.Backend.Core.Database.Migrations.v2025._1beta6 8 + { 9 + /// <inheritdoc /> 10 + [DbContext(typeof(DatabaseContext))] 11 + [Migration("20251016232810_AddInteractionStamp")] 12 + public partial class AddInteractionStamp : Migration 13 + { 14 + /// <inheritdoc /> 15 + protected override void Up(MigrationBuilder migrationBuilder) 16 + { 17 + migrationBuilder.AlterDatabase() 18 + .Annotation("Npgsql:Enum:antenna_src_enum", "home,all,users,list,group,instances") 19 + .Annotation("Npgsql:Enum:filter_action_enum", "warn,hide") 20 + .Annotation("Npgsql:Enum:filter_context_enum", "home,lists,threads,notifications,accounts,public") 21 + .Annotation("Npgsql:Enum:interaction_stamp_type", "quote") 22 + .Annotation("Npgsql:Enum:job_status", "queued,delayed,running,completed,failed") 23 + .Annotation("Npgsql:Enum:marker_type_enum", "home,notifications") 24 + .Annotation("Npgsql:Enum:note_visibility_enum", "public,home,followers,specified") 25 + .Annotation("Npgsql:Enum:notification_type_enum", "follow,mention,reply,renote,quote,like,reaction,pollVote,pollEnded,receiveFollowRequest,followRequestAccepted,groupInvited,app,edit,bite,report") 26 + .Annotation("Npgsql:Enum:page_visibility_enum", "public,followers,specified") 27 + .Annotation("Npgsql:Enum:push_subscription_policy_enum", "all,followed,follower,none") 28 + .Annotation("Npgsql:Enum:relay_status_enum", "requesting,accepted,rejected") 29 + .Annotation("Npgsql:Enum:user_profile_ffvisibility_enum", "public,followers,private") 30 + .Annotation("Npgsql:PostgresExtension:pg_trgm", ",,") 31 + .OldAnnotation("Npgsql:Enum:antenna_src_enum", "home,all,users,list,group,instances") 32 + .OldAnnotation("Npgsql:Enum:filter_action_enum", "warn,hide") 33 + .OldAnnotation("Npgsql:Enum:filter_context_enum", "home,lists,threads,notifications,accounts,public") 34 + .OldAnnotation("Npgsql:Enum:job_status", "queued,delayed,running,completed,failed") 35 + .OldAnnotation("Npgsql:Enum:marker_type_enum", "home,notifications") 36 + .OldAnnotation("Npgsql:Enum:note_visibility_enum", "public,home,followers,specified") 37 + .OldAnnotation("Npgsql:Enum:notification_type_enum", "follow,mention,reply,renote,quote,like,reaction,pollVote,pollEnded,receiveFollowRequest,followRequestAccepted,groupInvited,app,edit,bite,report") 38 + .OldAnnotation("Npgsql:Enum:page_visibility_enum", "public,followers,specified") 39 + .OldAnnotation("Npgsql:Enum:push_subscription_policy_enum", "all,followed,follower,none") 40 + .OldAnnotation("Npgsql:Enum:relay_status_enum", "requesting,accepted,rejected") 41 + .OldAnnotation("Npgsql:Enum:user_profile_ffvisibility_enum", "public,followers,private") 42 + .OldAnnotation("Npgsql:PostgresExtension:pg_trgm", ",,"); 43 + 44 + migrationBuilder.CreateTable( 45 + name: "interaction_stamp", 46 + columns: table => new 47 + { 48 + id = table.Column<string>(type: "character varying(32)", maxLength: 32, nullable: false), 49 + type = table.Column<InteractionStamp.InteractionStampType>(type: "interaction_stamp_type", nullable: false), 50 + targetNoteId = table.Column<string>(type: "character varying(32)", maxLength: 32, nullable: false, comment: "The note being interacted with"), 51 + noteId = table.Column<string>(type: "character varying(32)", maxLength: 32, nullable: false, comment: "The note doing the interaction (quote, reply, whatever)") 52 + }, 53 + constraints: table => 54 + { 55 + table.PrimaryKey("PK_interaction_stamp", x => x.id); 56 + table.ForeignKey( 57 + name: "FK_interaction_stamp_note_noteId", 58 + column: x => x.noteId, 59 + principalTable: "note", 60 + principalColumn: "id", 61 + onDelete: ReferentialAction.Cascade); 62 + table.ForeignKey( 63 + name: "FK_interaction_stamp_note_targetNoteId", 64 + column: x => x.targetNoteId, 65 + principalTable: "note", 66 + principalColumn: "id", 67 + onDelete: ReferentialAction.Cascade); 68 + }); 69 + 70 + migrationBuilder.CreateIndex( 71 + name: "IX_interaction_stamp_noteId", 72 + table: "interaction_stamp", 73 + column: "noteId", 74 + unique: true); 75 + 76 + migrationBuilder.CreateIndex( 77 + name: "IX_interaction_stamp_targetNoteId", 78 + table: "interaction_stamp", 79 + column: "targetNoteId"); 80 + } 81 + 82 + /// <inheritdoc /> 83 + protected override void Down(MigrationBuilder migrationBuilder) 84 + { 85 + migrationBuilder.DropTable( 86 + name: "interaction_stamp"); 87 + 88 + migrationBuilder.AlterDatabase() 89 + .Annotation("Npgsql:Enum:antenna_src_enum", "home,all,users,list,group,instances") 90 + .Annotation("Npgsql:Enum:filter_action_enum", "warn,hide") 91 + .Annotation("Npgsql:Enum:filter_context_enum", "home,lists,threads,notifications,accounts,public") 92 + .Annotation("Npgsql:Enum:job_status", "queued,delayed,running,completed,failed") 93 + .Annotation("Npgsql:Enum:marker_type_enum", "home,notifications") 94 + .Annotation("Npgsql:Enum:note_visibility_enum", "public,home,followers,specified") 95 + .Annotation("Npgsql:Enum:notification_type_enum", "follow,mention,reply,renote,quote,like,reaction,pollVote,pollEnded,receiveFollowRequest,followRequestAccepted,groupInvited,app,edit,bite,report") 96 + .Annotation("Npgsql:Enum:page_visibility_enum", "public,followers,specified") 97 + .Annotation("Npgsql:Enum:push_subscription_policy_enum", "all,followed,follower,none") 98 + .Annotation("Npgsql:Enum:relay_status_enum", "requesting,accepted,rejected") 99 + .Annotation("Npgsql:Enum:user_profile_ffvisibility_enum", "public,followers,private") 100 + .Annotation("Npgsql:PostgresExtension:pg_trgm", ",,") 101 + .OldAnnotation("Npgsql:Enum:antenna_src_enum", "home,all,users,list,group,instances") 102 + .OldAnnotation("Npgsql:Enum:filter_action_enum", "warn,hide") 103 + .OldAnnotation("Npgsql:Enum:filter_context_enum", "home,lists,threads,notifications,accounts,public") 104 + .OldAnnotation("Npgsql:Enum:interaction_stamp_type", "quote") 105 + .OldAnnotation("Npgsql:Enum:job_status", "queued,delayed,running,completed,failed") 106 + .OldAnnotation("Npgsql:Enum:marker_type_enum", "home,notifications") 107 + .OldAnnotation("Npgsql:Enum:note_visibility_enum", "public,home,followers,specified") 108 + .OldAnnotation("Npgsql:Enum:notification_type_enum", "follow,mention,reply,renote,quote,like,reaction,pollVote,pollEnded,receiveFollowRequest,followRequestAccepted,groupInvited,app,edit,bite,report") 109 + .OldAnnotation("Npgsql:Enum:page_visibility_enum", "public,followers,specified") 110 + .OldAnnotation("Npgsql:Enum:push_subscription_policy_enum", "all,followed,follower,none") 111 + .OldAnnotation("Npgsql:Enum:relay_status_enum", "requesting,accepted,rejected") 112 + .OldAnnotation("Npgsql:Enum:user_profile_ffvisibility_enum", "public,followers,private") 113 + .OldAnnotation("Npgsql:PostgresExtension:pg_trgm", ",,"); 114 + } 115 + } 116 + }