20251109052850_ImportOldSchemaForPostgres.Designer.cs
1 // <auto-generated /> 2 using System; 3 using Microsoft.EntityFrameworkCore; 4 using Microsoft.EntityFrameworkCore.Infrastructure; 5 using Microsoft.EntityFrameworkCore.Migrations; 6 using Microsoft.EntityFrameworkCore.Storage.ValueConversion; 7 using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; 8 using _5uhr.Data; 9 10 #nullable disable 11 12 namespace _5uhr.Migrations 13 { 14 [DbContext(typeof(ApplicationDbContext))] 15 [Migration("20251109052850_ImportOldSchemaForPostgres")] 16 partial class ImportOldSchemaForPostgres 17 { 18 /// <inheritdoc /> 19 protected override void BuildTargetModel(ModelBuilder modelBuilder) 20 { 21 #pragma warning disable 612, 618 22 modelBuilder 23 .HasAnnotation("ProductVersion", "9.0.10") 24 .HasAnnotation("Relational:MaxIdentifierLength", 63); 25 26 NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); 27 28 modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => 29 { 30 b.Property<string>("Id") 31 .HasColumnType("text"); 32 33 b.Property<string>("ConcurrencyStamp") 34 .IsConcurrencyToken() 35 .HasColumnType("text"); 36 37 b.Property<string>("Name") 38 .HasMaxLength(256) 39 .HasColumnType("character varying(256)"); 40 41 b.Property<string>("NormalizedName") 42 .HasMaxLength(256) 43 .HasColumnType("character varying(256)"); 44 45 b.HasKey("Id"); 46 47 b.HasIndex("NormalizedName") 48 .IsUnique() 49 .HasDatabaseName("RoleNameIndex"); 50 51 b.ToTable("AspNetRoles", (string)null); 52 }); 53 54 modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b => 55 { 56 b.Property<int>("Id") 57 .ValueGeneratedOnAdd() 58 .HasColumnType("integer"); 59 60 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id")); 61 62 b.Property<string>("ClaimType") 63 .HasColumnType("text"); 64 65 b.Property<string>("ClaimValue") 66 .HasColumnType("text"); 67 68 b.Property<string>("RoleId") 69 .IsRequired() 70 .HasColumnType("text"); 71 72 b.HasKey("Id"); 73 74 b.HasIndex("RoleId"); 75 76 b.ToTable("AspNetRoleClaims", (string)null); 77 }); 78 79 modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUser", b => 80 { 81 b.Property<string>("Id") 82 .HasColumnType("text"); 83 84 b.Property<int>("AccessFailedCount") 85 .HasColumnType("integer"); 86 87 b.Property<string>("ConcurrencyStamp") 88 .IsConcurrencyToken() 89 .HasColumnType("text"); 90 91 b.Property<string>("Email") 92 .HasMaxLength(256) 93 .HasColumnType("character varying(256)"); 94 95 b.Property<bool>("EmailConfirmed") 96 .HasColumnType("boolean"); 97 98 b.Property<bool>("LockoutEnabled") 99 .HasColumnType("boolean"); 100 101 b.Property<DateTimeOffset?>("LockoutEnd") 102 .HasColumnType("timestamp with time zone"); 103 104 b.Property<string>("NormalizedEmail") 105 .HasMaxLength(256) 106 .HasColumnType("character varying(256)"); 107 108 b.Property<string>("NormalizedUserName") 109 .HasMaxLength(256) 110 .HasColumnType("character varying(256)"); 111 112 b.Property<string>("PasswordHash") 113 .HasColumnType("text"); 114 115 b.Property<string>("PhoneNumber") 116 .HasColumnType("text"); 117 118 b.Property<bool>("PhoneNumberConfirmed") 119 .HasColumnType("boolean"); 120 121 b.Property<string>("SecurityStamp") 122 .HasColumnType("text"); 123 124 b.Property<bool>("TwoFactorEnabled") 125 .HasColumnType("boolean"); 126 127 b.Property<string>("UserName") 128 .HasMaxLength(256) 129 .HasColumnType("character varying(256)"); 130 131 b.HasKey("Id"); 132 133 b.HasIndex("NormalizedEmail") 134 .HasDatabaseName("EmailIndex"); 135 136 b.HasIndex("NormalizedUserName") 137 .IsUnique() 138 .HasDatabaseName("UserNameIndex"); 139 140 b.ToTable("AspNetUsers", (string)null); 141 }); 142 143 modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b => 144 { 145 b.Property<int>("Id") 146 .ValueGeneratedOnAdd() 147 .HasColumnType("integer"); 148 149 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id")); 150 151 b.Property<string>("ClaimType") 152 .HasColumnType("text"); 153 154 b.Property<string>("ClaimValue") 155 .HasColumnType("text"); 156 157 b.Property<string>("UserId") 158 .IsRequired() 159 .HasColumnType("text"); 160 161 b.HasKey("Id"); 162 163 b.HasIndex("UserId"); 164 165 b.ToTable("AspNetUserClaims", (string)null); 166 }); 167 168 modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b => 169 { 170 b.Property<string>("LoginProvider") 171 .HasMaxLength(128) 172 .HasColumnType("character varying(128)"); 173 174 b.Property<string>("ProviderKey") 175 .HasMaxLength(128) 176 .HasColumnType("character varying(128)"); 177 178 b.Property<string>("ProviderDisplayName") 179 .HasColumnType("text"); 180 181 b.Property<string>("UserId") 182 .IsRequired() 183 .HasColumnType("text"); 184 185 b.HasKey("LoginProvider", "ProviderKey"); 186 187 b.HasIndex("UserId"); 188 189 b.ToTable("AspNetUserLogins", (string)null); 190 }); 191 192 modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b => 193 { 194 b.Property<string>("UserId") 195 .HasColumnType("text"); 196 197 b.Property<string>("RoleId") 198 .HasColumnType("text"); 199 200 b.HasKey("UserId", "RoleId"); 201 202 b.HasIndex("RoleId"); 203 204 b.ToTable("AspNetUserRoles", (string)null); 205 }); 206 207 modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b => 208 { 209 b.Property<string>("UserId") 210 .HasColumnType("text"); 211 212 b.Property<string>("LoginProvider") 213 .HasMaxLength(128) 214 .HasColumnType("character varying(128)"); 215 216 b.Property<string>("Name") 217 .HasMaxLength(128) 218 .HasColumnType("character varying(128)"); 219 220 b.Property<string>("Value") 221 .HasColumnType("text"); 222 223 b.HasKey("UserId", "LoginProvider", "Name"); 224 225 b.ToTable("AspNetUserTokens", (string)null); 226 }); 227 228 modelBuilder.Entity("_5uhr.Data.CheckIn", b => 229 { 230 b.Property<Guid>("Id") 231 .ValueGeneratedOnAdd() 232 .HasColumnType("uuid"); 233 234 b.Property<DateTimeOffset>("CheckInTime") 235 .HasColumnType("timestamp with time zone"); 236 237 b.Property<string>("ClaimedCheckpoint") 238 .IsRequired() 239 .HasColumnType("VARCHAR(4)"); 240 241 b.Property<Guid>("DayOfCheckInId") 242 .HasColumnType("uuid"); 243 244 b.Property<Guid>("MemberThatCheckedInId") 245 .HasColumnType("uuid"); 246 247 b.HasKey("Id"); 248 249 b.HasIndex("DayOfCheckInId"); 250 251 b.HasIndex("MemberThatCheckedInId"); 252 253 b.ToTable("CheckIn"); 254 }); 255 256 modelBuilder.Entity("_5uhr.Data.Configuration", b => 257 { 258 b.Property<Guid>("Id") 259 .ValueGeneratedOnAdd() 260 .HasColumnType("uuid"); 261 262 b.Property<decimal>("CheckInChannelId") 263 .HasColumnType("numeric(20,0)"); 264 265 b.Property<decimal>("GuildId") 266 .HasColumnType("numeric(20,0)"); 267 268 b.Property<decimal>("LeaderboardChannelId") 269 .HasColumnType("numeric(20,0)"); 270 271 b.HasKey("Id"); 272 273 b.ToTable("Configurations"); 274 }); 275 276 modelBuilder.Entity("_5uhr.Data.GangDay", b => 277 { 278 b.Property<Guid>("Id") 279 .ValueGeneratedOnAdd() 280 .HasColumnType("uuid"); 281 282 b.Property<Guid?>("NextId") 283 .HasColumnType("uuid"); 284 285 b.Property<DateTimeOffset>("Start") 286 .HasColumnType("timestamp with time zone"); 287 288 b.HasKey("Id"); 289 290 b.HasIndex("NextId") 291 .IsUnique(); 292 293 b.ToTable("Days"); 294 }); 295 296 modelBuilder.Entity("_5uhr.Data.Member", b => 297 { 298 b.Property<Guid>("Id") 299 .ValueGeneratedOnAdd() 300 .HasColumnType("uuid"); 301 302 b.Property<decimal?>("DiscordUserId") 303 .HasColumnType("numeric(20,0)"); 304 305 b.Property<string>("FriendlyName") 306 .HasColumnType("text"); 307 308 b.HasKey("Id"); 309 310 b.ToTable("Member"); 311 }); 312 313 modelBuilder.Entity("_5uhr.Data.Report", b => 314 { 315 b.Property<Guid>("Id") 316 .ValueGeneratedOnAdd() 317 .HasColumnType("uuid"); 318 319 b.Property<Guid>("CheckInThatWasReportedId") 320 .HasColumnType("uuid"); 321 322 b.Property<string>("EvidenceString") 323 .IsRequired() 324 .HasColumnType("text"); 325 326 b.Property<Guid>("MemberThatReportedId") 327 .HasColumnType("uuid"); 328 329 b.Property<string>("Reason") 330 .IsRequired() 331 .HasColumnType("text"); 332 333 b.Property<DateTimeOffset>("ReportTime") 334 .HasColumnType("timestamp with time zone"); 335 336 b.HasKey("Id"); 337 338 b.HasIndex("CheckInThatWasReportedId"); 339 340 b.HasIndex("MemberThatReportedId"); 341 342 b.ToTable("Reports"); 343 }); 344 345 modelBuilder.Entity("_5uhr.Data.Verification", b => 346 { 347 b.Property<Guid>("Id") 348 .ValueGeneratedOnAdd() 349 .HasColumnType("uuid"); 350 351 b.Property<Guid>("CheckInThatWasVerifiedId") 352 .HasColumnType("uuid"); 353 354 b.Property<Guid>("MemberThatVerifiedId") 355 .HasColumnType("uuid"); 356 357 b.Property<DateTimeOffset>("VerificationTime") 358 .HasColumnType("timestamp with time zone"); 359 360 b.HasKey("Id"); 361 362 b.HasIndex("CheckInThatWasVerifiedId"); 363 364 b.HasIndex("MemberThatVerifiedId"); 365 366 b.ToTable("Verifications"); 367 }); 368 369 modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b => 370 { 371 b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) 372 .WithMany() 373 .HasForeignKey("RoleId") 374 .OnDelete(DeleteBehavior.Cascade) 375 .IsRequired(); 376 }); 377 378 modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b => 379 { 380 b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) 381 .WithMany() 382 .HasForeignKey("UserId") 383 .OnDelete(DeleteBehavior.Cascade) 384 .IsRequired(); 385 }); 386 387 modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b => 388 { 389 b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) 390 .WithMany() 391 .HasForeignKey("UserId") 392 .OnDelete(DeleteBehavior.Cascade) 393 .IsRequired(); 394 }); 395 396 modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b => 397 { 398 b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) 399 .WithMany() 400 .HasForeignKey("RoleId") 401 .OnDelete(DeleteBehavior.Cascade) 402 .IsRequired(); 403 404 b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) 405 .WithMany() 406 .HasForeignKey("UserId") 407 .OnDelete(DeleteBehavior.Cascade) 408 .IsRequired(); 409 }); 410 411 modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b => 412 { 413 b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) 414 .WithMany() 415 .HasForeignKey("UserId") 416 .OnDelete(DeleteBehavior.Cascade) 417 .IsRequired(); 418 }); 419 420 modelBuilder.Entity("_5uhr.Data.CheckIn", b => 421 { 422 b.HasOne("_5uhr.Data.GangDay", "DayOfCheckIn") 423 .WithMany() 424 .HasForeignKey("DayOfCheckInId") 425 .OnDelete(DeleteBehavior.Cascade) 426 .IsRequired(); 427 428 b.HasOne("_5uhr.Data.Member", "MemberThatCheckedIn") 429 .WithMany("CheckIns") 430 .HasForeignKey("MemberThatCheckedInId") 431 .OnDelete(DeleteBehavior.Cascade) 432 .IsRequired(); 433 434 b.Navigation("DayOfCheckIn"); 435 436 b.Navigation("MemberThatCheckedIn"); 437 }); 438 439 modelBuilder.Entity("_5uhr.Data.GangDay", b => 440 { 441 b.HasOne("_5uhr.Data.GangDay", "Next") 442 .WithOne("Previous") 443 .HasForeignKey("_5uhr.Data.GangDay", "NextId"); 444 445 b.Navigation("Next"); 446 }); 447 448 modelBuilder.Entity("_5uhr.Data.Report", b => 449 { 450 b.HasOne("_5uhr.Data.CheckIn", "CheckInThatWasReported") 451 .WithMany("Reports") 452 .HasForeignKey("CheckInThatWasReportedId") 453 .OnDelete(DeleteBehavior.Cascade) 454 .IsRequired(); 455 456 b.HasOne("_5uhr.Data.Member", "MemberThatReported") 457 .WithMany("ReportsFiled") 458 .HasForeignKey("MemberThatReportedId") 459 .OnDelete(DeleteBehavior.Cascade) 460 .IsRequired(); 461 462 b.Navigation("CheckInThatWasReported"); 463 464 b.Navigation("MemberThatReported"); 465 }); 466 467 modelBuilder.Entity("_5uhr.Data.Verification", b => 468 { 469 b.HasOne("_5uhr.Data.CheckIn", "CheckInThatWasVerified") 470 .WithMany("Verifications") 471 .HasForeignKey("CheckInThatWasVerifiedId") 472 .OnDelete(DeleteBehavior.Cascade) 473 .IsRequired(); 474 475 b.HasOne("_5uhr.Data.Member", "MemberThatVerified") 476 .WithMany("VerificationsGiven") 477 .HasForeignKey("MemberThatVerifiedId") 478 .OnDelete(DeleteBehavior.Cascade) 479 .IsRequired(); 480 481 b.Navigation("CheckInThatWasVerified"); 482 483 b.Navigation("MemberThatVerified"); 484 }); 485 486 modelBuilder.Entity("_5uhr.Data.CheckIn", b => 487 { 488 b.Navigation("Reports"); 489 490 b.Navigation("Verifications"); 491 }); 492 493 modelBuilder.Entity("_5uhr.Data.GangDay", b => 494 { 495 b.Navigation("Previous"); 496 }); 497 498 modelBuilder.Entity("_5uhr.Data.Member", b => 499 { 500 b.Navigation("CheckIns"); 501 502 b.Navigation("ReportsFiled"); 503 504 b.Navigation("VerificationsGiven"); 505 }); 506 #pragma warning restore 612, 618 507 } 508 } 509 }