profileShare

rasmusjy / splitapp-backend-clean-onion

Read-only snapshot

No repository description.

main default branch 429 files Expires Sep 13, 2026, 9:06 AM
AppDbContextModelSnapshot.cs 46,727 bytes
1 // <auto-generated />
2 using System;
3 using App.DAL.EF;
4 using Microsoft.EntityFrameworkCore;
5 using Microsoft.EntityFrameworkCore.Infrastructure;
6 using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
7 using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
8
9 #nullable disable
10
11 namespace App.DAL.EF.Migrations
12 {
13 [DbContext(typeof(AppDbContext))]
14 partial class AppDbContextModelSnapshot : ModelSnapshot
15 {
16 protected override void BuildModel(ModelBuilder modelBuilder)
17 {
18 #pragma warning disable 612, 618
19 modelBuilder
20 .HasAnnotation("ProductVersion", "10.0.5")
21 .HasAnnotation("Relational:MaxIdentifierLength", 63);
22
23 NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
24
25 modelBuilder.Entity("App.Domain.BudgetCategory", b =>
26 {
27 b.Property<Guid>("Id")
28 .ValueGeneratedOnAdd()
29 .HasColumnType("uuid");
30
31 b.Property<DateTime>("CreatedAt")
32 .HasColumnType("timestamp with time zone");
33
34 b.Property<int>("DisplayOrder")
35 .HasColumnType("integer");
36
37 b.Property<string>("IconName")
38 .HasMaxLength(100)
39 .HasColumnType("character varying(100)");
40
41 b.Property<string>("Name")
42 .IsRequired()
43 .HasMaxLength(1024)
44 .HasColumnType("character varying(1024)");
45
46 b.Property<decimal?>("PlannedAmount")
47 .HasColumnType("numeric");
48
49 b.Property<Guid>("TripId")
50 .HasColumnType("uuid");
51
52 b.Property<DateTime>("UpdatedAt")
53 .HasColumnType("timestamp with time zone");
54
55 b.HasKey("Id");
56
57 b.HasIndex("TripId");
58
59 b.ToTable("BudgetCategories");
60 });
61
62 modelBuilder.Entity("App.Domain.Currency", b =>
63 {
64 b.Property<Guid>("Id")
65 .ValueGeneratedOnAdd()
66 .HasColumnType("uuid");
67
68 b.Property<string>("Code")
69 .IsRequired()
70 .HasMaxLength(3)
71 .HasColumnType("character varying(3)");
72
73 b.Property<DateTime>("CreatedAt")
74 .HasColumnType("timestamp with time zone");
75
76 b.Property<string>("Name")
77 .IsRequired()
78 .HasMaxLength(1024)
79 .HasColumnType("character varying(1024)");
80
81 b.Property<string>("Symbol")
82 .IsRequired()
83 .HasMaxLength(10)
84 .HasColumnType("character varying(10)");
85
86 b.Property<DateTime>("UpdatedAt")
87 .HasColumnType("timestamp with time zone");
88
89 b.HasKey("Id");
90
91 b.ToTable("Currencies");
92 });
93
94 modelBuilder.Entity("App.Domain.Expense", b =>
95 {
96 b.Property<Guid>("Id")
97 .ValueGeneratedOnAdd()
98 .HasColumnType("uuid");
99
100 b.Property<decimal>("Amount")
101 .HasColumnType("numeric");
102
103 b.Property<Guid?>("BudgetCategoryId")
104 .HasColumnType("uuid");
105
106 b.Property<DateTime>("CreatedAt")
107 .HasColumnType("timestamp with time zone");
108
109 b.Property<Guid?>("CurrencyId")
110 .HasColumnType("uuid");
111
112 b.Property<string>("Description")
113 .HasMaxLength(500)
114 .HasColumnType("character varying(500)");
115
116 b.Property<DateTime>("ExpenseDate")
117 .HasColumnType("timestamp with time zone");
118
119 b.Property<Guid>("PaidByUserId")
120 .HasColumnType("uuid");
121
122 b.Property<int>("SplitMethod")
123 .HasColumnType("integer");
124
125 b.Property<Guid>("TripId")
126 .HasColumnType("uuid");
127
128 b.Property<DateTime>("UpdatedAt")
129 .HasColumnType("timestamp with time zone");
130
131 b.HasKey("Id");
132
133 b.HasIndex("BudgetCategoryId");
134
135 b.HasIndex("CurrencyId");
136
137 b.HasIndex("PaidByUserId");
138
139 b.HasIndex("TripId");
140
141 b.ToTable("Expenses");
142 });
143
144 modelBuilder.Entity("App.Domain.ExpenseSplit", b =>
145 {
146 b.Property<Guid>("Id")
147 .ValueGeneratedOnAdd()
148 .HasColumnType("uuid");
149
150 b.Property<decimal>("Amount")
151 .HasColumnType("numeric");
152
153 b.Property<DateTime>("CreatedAt")
154 .HasColumnType("timestamp with time zone");
155
156 b.Property<Guid>("ExpenseId")
157 .HasColumnType("uuid");
158
159 b.Property<decimal?>("Percentage")
160 .HasColumnType("numeric");
161
162 b.Property<DateTime>("UpdatedAt")
163 .HasColumnType("timestamp with time zone");
164
165 b.Property<Guid>("UserId")
166 .HasColumnType("uuid");
167
168 b.HasKey("Id");
169
170 b.HasIndex("ExpenseId");
171
172 b.HasIndex("UserId");
173
174 b.ToTable("ExpenseSplits");
175 });
176
177 modelBuilder.Entity("App.Domain.Identity.AppRefreshToken", b =>
178 {
179 b.Property<Guid>("Id")
180 .ValueGeneratedOnAdd()
181 .HasColumnType("uuid");
182
183 b.Property<Guid>("AppUserId")
184 .HasColumnType("uuid");
185
186 b.Property<DateTime>("CreatedAt")
187 .HasColumnType("timestamp with time zone");
188
189 b.Property<DateTime>("ExpirationDT")
190 .HasColumnType("timestamp with time zone");
191
192 b.Property<DateTime>("PreviousExpirationDT")
193 .HasColumnType("timestamp with time zone");
194
195 b.Property<string>("PreviousRefreshToken")
196 .HasMaxLength(64)
197 .HasColumnType("character varying(64)");
198
199 b.Property<string>("RefreshToken")
200 .IsRequired()
201 .HasMaxLength(64)
202 .HasColumnType("character varying(64)");
203
204 b.Property<DateTime>("UpdatedAt")
205 .HasColumnType("timestamp with time zone");
206
207 b.HasKey("Id");
208
209 b.HasIndex("AppUserId");
210
211 b.ToTable("RefreshTokens");
212 });
213
214 modelBuilder.Entity("App.Domain.Identity.AppRole", b =>
215 {
216 b.Property<Guid>("Id")
217 .ValueGeneratedOnAdd()
218 .HasColumnType("uuid");
219
220 b.Property<string>("ConcurrencyStamp")
221 .IsConcurrencyToken()
222 .HasColumnType("text");
223
224 b.Property<string>("Name")
225 .HasMaxLength(256)
226 .HasColumnType("character varying(256)");
227
228 b.Property<string>("NormalizedName")
229 .HasMaxLength(256)
230 .HasColumnType("character varying(256)");
231
232 b.HasKey("Id");
233
234 b.HasIndex("NormalizedName")
235 .IsUnique()
236 .HasDatabaseName("RoleNameIndex");
237
238 b.ToTable("AspNetRoles", (string)null);
239 });
240
241 modelBuilder.Entity("App.Domain.Identity.AppUser", b =>
242 {
243 b.Property<Guid>("Id")
244 .ValueGeneratedOnAdd()
245 .HasColumnType("uuid");
246
247 b.Property<int>("AccessFailedCount")
248 .HasColumnType("integer");
249
250 b.Property<string>("ConcurrencyStamp")
251 .IsConcurrencyToken()
252 .HasColumnType("text");
253
254 b.Property<string>("Email")
255 .HasMaxLength(256)
256 .HasColumnType("character varying(256)");
257
258 b.Property<bool>("EmailConfirmed")
259 .HasColumnType("boolean");
260
261 b.Property<string>("FirstName")
262 .IsRequired()
263 .HasMaxLength(128)
264 .HasColumnType("character varying(128)");
265
266 b.Property<string>("LastName")
267 .IsRequired()
268 .HasMaxLength(128)
269 .HasColumnType("character varying(128)");
270
271 b.Property<bool>("LockoutEnabled")
272 .HasColumnType("boolean");
273
274 b.Property<DateTimeOffset?>("LockoutEnd")
275 .HasColumnType("timestamp with time zone");
276
277 b.Property<string>("NormalizedEmail")
278 .HasMaxLength(256)
279 .HasColumnType("character varying(256)");
280
281 b.Property<string>("NormalizedUserName")
282 .HasMaxLength(256)
283 .HasColumnType("character varying(256)");
284
285 b.Property<string>("PasswordHash")
286 .HasColumnType("text");
287
288 b.Property<string>("PhoneNumber")
289 .HasColumnType("text");
290
291 b.Property<bool>("PhoneNumberConfirmed")
292 .HasColumnType("boolean");
293
294 b.Property<string>("SecurityStamp")
295 .HasColumnType("text");
296
297 b.Property<bool>("TwoFactorEnabled")
298 .HasColumnType("boolean");
299
300 b.Property<string>("UserName")
301 .HasMaxLength(256)
302 .HasColumnType("character varying(256)");
303
304 b.HasKey("Id");
305
306 b.HasIndex("NormalizedEmail")
307 .HasDatabaseName("EmailIndex");
308
309 b.HasIndex("NormalizedUserName")
310 .IsUnique()
311 .HasDatabaseName("UserNameIndex");
312
313 b.ToTable("AspNetUsers", (string)null);
314 });
315
316 modelBuilder.Entity("App.Domain.SettlementPayment", b =>
317 {
318 b.Property<Guid>("Id")
319 .ValueGeneratedOnAdd()
320 .HasColumnType("uuid");
321
322 b.Property<decimal>("Amount")
323 .HasColumnType("numeric");
324
325 b.Property<DateTime?>("ConfirmedAt")
326 .HasColumnType("timestamp with time zone");
327
328 b.Property<DateTime>("CreatedAt")
329 .HasColumnType("timestamp with time zone");
330
331 b.Property<Guid>("FromUserId")
332 .HasColumnType("uuid");
333
334 b.Property<DateTime?>("MarkedPaidAt")
335 .HasColumnType("timestamp with time zone");
336
337 b.Property<Guid>("SettlementPlanId")
338 .HasColumnType("uuid");
339
340 b.Property<int>("Status")
341 .HasColumnType("integer");
342
343 b.Property<Guid>("ToUserId")
344 .HasColumnType("uuid");
345
346 b.Property<DateTime>("UpdatedAt")
347 .HasColumnType("timestamp with time zone");
348
349 b.HasKey("Id");
350
351 b.HasIndex("FromUserId");
352
353 b.HasIndex("SettlementPlanId");
354
355 b.HasIndex("ToUserId");
356
357 b.ToTable("SettlementPayments");
358 });
359
360 modelBuilder.Entity("App.Domain.SettlementPlan", b =>
361 {
362 b.Property<Guid>("Id")
363 .ValueGeneratedOnAdd()
364 .HasColumnType("uuid");
365
366 b.Property<DateTime?>("CompletedAt")
367 .HasColumnType("timestamp with time zone");
368
369 b.Property<DateTime>("CreatedAt")
370 .HasColumnType("timestamp with time zone");
371
372 b.Property<Guid>("CreatedByUserId")
373 .HasColumnType("uuid");
374
375 b.Property<int>("Status")
376 .HasColumnType("integer");
377
378 b.Property<decimal>("TotalAmount")
379 .HasColumnType("numeric");
380
381 b.Property<Guid>("TripId")
382 .HasColumnType("uuid");
383
384 b.Property<DateTime>("UpdatedAt")
385 .HasColumnType("timestamp with time zone");
386
387 b.HasKey("Id");
388
389 b.HasIndex("CreatedByUserId");
390
391 b.HasIndex("TripId");
392
393 b.ToTable("SettlementPlans");
394 });
395
396 modelBuilder.Entity("App.Domain.SplitPreset", b =>
397 {
398 b.Property<Guid>("Id")
399 .ValueGeneratedOnAdd()
400 .HasColumnType("uuid");
401
402 b.Property<DateTime>("CreatedAt")
403 .HasColumnType("timestamp with time zone");
404
405 b.Property<Guid>("CreatedById")
406 .HasColumnType("uuid");
407
408 b.Property<string>("Name")
409 .IsRequired()
410 .HasMaxLength(200)
411 .HasColumnType("character varying(200)");
412
413 b.Property<int>("SplitMethod")
414 .HasColumnType("integer");
415
416 b.Property<Guid>("TripId")
417 .HasColumnType("uuid");
418
419 b.Property<DateTime>("UpdatedAt")
420 .HasColumnType("timestamp with time zone");
421
422 b.HasKey("Id");
423
424 b.HasIndex("CreatedById");
425
426 b.HasIndex("TripId");
427
428 b.ToTable("SplitPresets");
429 });
430
431 modelBuilder.Entity("App.Domain.SplitPresetMember", b =>
432 {
433 b.Property<Guid>("Id")
434 .ValueGeneratedOnAdd()
435 .HasColumnType("uuid");
436
437 b.Property<DateTime>("CreatedAt")
438 .HasColumnType("timestamp with time zone");
439
440 b.Property<decimal?>("Percentage")
441 .HasColumnType("numeric");
442
443 b.Property<decimal?>("ShareWeight")
444 .HasColumnType("numeric");
445
446 b.Property<Guid>("SplitPresetId")
447 .HasColumnType("uuid");
448
449 b.Property<DateTime>("UpdatedAt")
450 .HasColumnType("timestamp with time zone");
451
452 b.Property<Guid>("UserId")
453 .HasColumnType("uuid");
454
455 b.HasKey("Id");
456
457 b.HasIndex("SplitPresetId");
458
459 b.HasIndex("UserId");
460
461 b.ToTable("SplitPresetMembers");
462 });
463
464 modelBuilder.Entity("App.Domain.Trip", b =>
465 {
466 b.Property<Guid>("Id")
467 .ValueGeneratedOnAdd()
468 .HasColumnType("uuid");
469
470 b.Property<DateTime>("CreatedAt")
471 .HasColumnType("timestamp with time zone");
472
473 b.Property<Guid>("CreatedById")
474 .HasColumnType("uuid");
475
476 b.Property<Guid>("DefaultCurrencyId")
477 .HasColumnType("uuid");
478
479 b.Property<string>("Description")
480 .HasColumnType("text");
481
482 b.Property<string>("Destination")
483 .HasMaxLength(200)
484 .HasColumnType("character varying(200)");
485
486 b.Property<DateTime?>("EndDate")
487 .HasColumnType("timestamp with time zone");
488
489 b.Property<string>("Name")
490 .IsRequired()
491 .HasMaxLength(200)
492 .HasColumnType("character varying(200)");
493
494 b.Property<DateTime?>("StartDate")
495 .HasColumnType("timestamp with time zone");
496
497 b.Property<int>("Status")
498 .HasColumnType("integer");
499
500 b.Property<DateTime>("UpdatedAt")
501 .HasColumnType("timestamp with time zone");
502
503 b.HasKey("Id");
504
505 b.HasIndex("CreatedById");
506
507 b.HasIndex("DefaultCurrencyId");
508
509 b.ToTable("Trips");
510 });
511
512 modelBuilder.Entity("App.Domain.TripInvitation", b =>
513 {
514 b.Property<Guid>("Id")
515 .ValueGeneratedOnAdd()
516 .HasColumnType("uuid");
517
518 b.Property<DateTime>("CreatedAt")
519 .HasColumnType("timestamp with time zone");
520
521 b.Property<DateTime>("ExpiresAt")
522 .HasColumnType("timestamp with time zone");
523
524 b.Property<Guid>("InvitedByUserId")
525 .HasColumnType("uuid");
526
527 b.Property<DateTime?>("RespondedAt")
528 .HasColumnType("timestamp with time zone");
529
530 b.Property<int>("Status")
531 .HasColumnType("integer");
532
533 b.Property<string>("Token")
534 .IsRequired()
535 .HasMaxLength(256)
536 .HasColumnType("character varying(256)");
537
538 b.Property<Guid>("TripId")
539 .HasColumnType("uuid");
540
541 b.Property<DateTime>("UpdatedAt")
542 .HasColumnType("timestamp with time zone");
543
544 b.HasKey("Id");
545
546 b.HasIndex("InvitedByUserId");
547
548 b.HasIndex("Token")
549 .IsUnique();
550
551 b.HasIndex("TripId");
552
553 b.ToTable("TripInvitations");
554 });
555
556 modelBuilder.Entity("App.Domain.TripParticipant", b =>
557 {
558 b.Property<Guid>("Id")
559 .ValueGeneratedOnAdd()
560 .HasColumnType("uuid");
561
562 b.Property<DateTime>("CreatedAt")
563 .HasColumnType("timestamp with time zone");
564
565 b.Property<bool>("IsActive")
566 .HasColumnType("boolean");
567
568 b.Property<DateTime>("JoinedAt")
569 .HasColumnType("timestamp with time zone");
570
571 b.Property<DateTime?>("LeftAt")
572 .HasColumnType("timestamp with time zone");
573
574 b.Property<string>("Nickname")
575 .HasMaxLength(100)
576 .HasColumnType("character varying(100)");
577
578 b.Property<int>("Role")
579 .HasColumnType("integer");
580
581 b.Property<Guid>("TripId")
582 .HasColumnType("uuid");
583
584 b.Property<DateTime>("UpdatedAt")
585 .HasColumnType("timestamp with time zone");
586
587 b.Property<Guid>("UserId")
588 .HasColumnType("uuid");
589
590 b.HasKey("Id");
591
592 b.HasIndex("UserId");
593
594 b.HasIndex("TripId", "UserId")
595 .IsUnique();
596
597 b.ToTable("TripParticipants");
598 });
599
600 modelBuilder.Entity("App.Domain.TripPoll", b =>
601 {
602 b.Property<Guid>("Id")
603 .ValueGeneratedOnAdd()
604 .HasColumnType("uuid");
605
606 b.Property<bool>("AllowMultipleVotes")
607 .HasColumnType("boolean");
608
609 b.Property<DateTime?>("ClosedAt")
610 .HasColumnType("timestamp with time zone");
611
612 b.Property<DateTime>("CreatedAt")
613 .HasColumnType("timestamp with time zone");
614
615 b.Property<Guid>("CreatedByUserId")
616 .HasColumnType("uuid");
617
618 b.Property<bool>("IsAnonymous")
619 .HasColumnType("boolean");
620
621 b.Property<string>("Question")
622 .IsRequired()
623 .HasMaxLength(500)
624 .HasColumnType("character varying(500)");
625
626 b.Property<Guid>("TripId")
627 .HasColumnType("uuid");
628
629 b.Property<DateTime>("UpdatedAt")
630 .HasColumnType("timestamp with time zone");
631
632 b.HasKey("Id");
633
634 b.HasIndex("CreatedByUserId");
635
636 b.HasIndex("TripId");
637
638 b.ToTable("TripPolls");
639 });
640
641 modelBuilder.Entity("App.Domain.TripPollOption", b =>
642 {
643 b.Property<Guid>("Id")
644 .ValueGeneratedOnAdd()
645 .HasColumnType("uuid");
646
647 b.Property<DateTime>("CreatedAt")
648 .HasColumnType("timestamp with time zone");
649
650 b.Property<int>("DisplayOrder")
651 .HasColumnType("integer");
652
653 b.Property<Guid>("PollId")
654 .HasColumnType("uuid");
655
656 b.Property<string>("Text")
657 .IsRequired()
658 .HasMaxLength(300)
659 .HasColumnType("character varying(300)");
660
661 b.Property<DateTime>("UpdatedAt")
662 .HasColumnType("timestamp with time zone");
663
664 b.HasKey("Id");
665
666 b.HasIndex("PollId");
667
668 b.ToTable("TripPollOptions");
669 });
670
671 modelBuilder.Entity("App.Domain.TripPollVote", b =>
672 {
673 b.Property<Guid>("Id")
674 .ValueGeneratedOnAdd()
675 .HasColumnType("uuid");
676
677 b.Property<DateTime>("CreatedAt")
678 .HasColumnType("timestamp with time zone");
679
680 b.Property<Guid>("PollOptionId")
681 .HasColumnType("uuid");
682
683 b.Property<DateTime>("UpdatedAt")
684 .HasColumnType("timestamp with time zone");
685
686 b.Property<Guid>("UserId")
687 .HasColumnType("uuid");
688
689 b.HasKey("Id");
690
691 b.HasIndex("UserId");
692
693 b.HasIndex("PollOptionId", "UserId")
694 .IsUnique();
695
696 b.ToTable("TripPollVotes");
697 });
698
699 modelBuilder.Entity("App.Domain.TripWishlistItem", b =>
700 {
701 b.Property<Guid>("Id")
702 .ValueGeneratedOnAdd()
703 .HasColumnType("uuid");
704
705 b.Property<Guid>("AddedByUserId")
706 .HasColumnType("uuid");
707
708 b.Property<int>("Category")
709 .HasColumnType("integer");
710
711 b.Property<DateTime?>("CompletedAt")
712 .HasColumnType("timestamp with time zone");
713
714 b.Property<DateTime>("CreatedAt")
715 .HasColumnType("timestamp with time zone");
716
717 b.Property<string>("Description")
718 .HasColumnType("text");
719
720 b.Property<int>("DisplayOrder")
721 .HasColumnType("integer");
722
723 b.Property<decimal?>("EstimatedCost")
724 .HasColumnType("numeric");
725
726 b.Property<bool>("IsCompleted")
727 .HasColumnType("boolean");
728
729 b.Property<string>("Location")
730 .HasMaxLength(300)
731 .HasColumnType("character varying(300)");
732
733 b.Property<int>("Priority")
734 .HasColumnType("integer");
735
736 b.Property<string>("Title")
737 .IsRequired()
738 .HasMaxLength(200)
739 .HasColumnType("character varying(200)");
740
741 b.Property<Guid>("TripId")
742 .HasColumnType("uuid");
743
744 b.Property<DateTime>("UpdatedAt")
745 .HasColumnType("timestamp with time zone");
746
747 b.Property<string>("Url")
748 .HasMaxLength(500)
749 .HasColumnType("character varying(500)");
750
751 b.HasKey("Id");
752
753 b.HasIndex("AddedByUserId");
754
755 b.HasIndex("TripId");
756
757 b.ToTable("TripWishlistItems");
758 });
759
760 modelBuilder.Entity("App.Domain.TripWishlistVote", b =>
761 {
762 b.Property<Guid>("Id")
763 .ValueGeneratedOnAdd()
764 .HasColumnType("uuid");
765
766 b.Property<DateTime>("CreatedAt")
767 .HasColumnType("timestamp with time zone");
768
769 b.Property<bool>("IsInterested")
770 .HasColumnType("boolean");
771
772 b.Property<DateTime>("UpdatedAt")
773 .HasColumnType("timestamp with time zone");
774
775 b.Property<Guid>("UserId")
776 .HasColumnType("uuid");
777
778 b.Property<Guid>("WishlistItemId")
779 .HasColumnType("uuid");
780
781 b.HasKey("Id");
782
783 b.HasIndex("UserId");
784
785 b.HasIndex("WishlistItemId", "UserId")
786 .IsUnique();
787
788 b.ToTable("TripWishlistVotes");
789 });
790
791 modelBuilder.Entity("Microsoft.AspNetCore.DataProtection.EntityFrameworkCore.DataProtectionKey", b =>
792 {
793 b.Property<int>("Id")
794 .ValueGeneratedOnAdd()
795 .HasColumnType("integer");
796
797 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
798
799 b.Property<string>("FriendlyName")
800 .HasColumnType("text");
801
802 b.Property<string>("Xml")
803 .HasColumnType("text");
804
805 b.HasKey("Id");
806
807 b.ToTable("DataProtectionKeys");
808 });
809
810 modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<System.Guid>", b =>
811 {
812 b.Property<int>("Id")
813 .ValueGeneratedOnAdd()
814 .HasColumnType("integer");
815
816 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
817
818 b.Property<string>("ClaimType")
819 .HasColumnType("text");
820
821 b.Property<string>("ClaimValue")
822 .HasColumnType("text");
823
824 b.Property<Guid>("RoleId")
825 .HasColumnType("uuid");
826
827 b.HasKey("Id");
828
829 b.HasIndex("RoleId");
830
831 b.ToTable("AspNetRoleClaims", (string)null);
832 });
833
834 modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<System.Guid>", b =>
835 {
836 b.Property<int>("Id")
837 .ValueGeneratedOnAdd()
838 .HasColumnType("integer");
839
840 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
841
842 b.Property<string>("ClaimType")
843 .HasColumnType("text");
844
845 b.Property<string>("ClaimValue")
846 .HasColumnType("text");
847
848 b.Property<Guid>("UserId")
849 .HasColumnType("uuid");
850
851 b.HasKey("Id");
852
853 b.HasIndex("UserId");
854
855 b.ToTable("AspNetUserClaims", (string)null);
856 });
857
858 modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<System.Guid>", b =>
859 {
860 b.Property<string>("LoginProvider")
861 .HasColumnType("text");
862
863 b.Property<string>("ProviderKey")
864 .HasColumnType("text");
865
866 b.Property<string>("ProviderDisplayName")
867 .HasColumnType("text");
868
869 b.Property<Guid>("UserId")
870 .HasColumnType("uuid");
871
872 b.HasKey("LoginProvider", "ProviderKey");
873
874 b.HasIndex("UserId");
875
876 b.ToTable("AspNetUserLogins", (string)null);
877 });
878
879 modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<System.Guid>", b =>
880 {
881 b.Property<Guid>("UserId")
882 .HasColumnType("uuid");
883
884 b.Property<Guid>("RoleId")
885 .HasColumnType("uuid");
886
887 b.HasKey("UserId", "RoleId");
888
889 b.HasIndex("RoleId");
890
891 b.ToTable("AspNetUserRoles", (string)null);
892 });
893
894 modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<System.Guid>", b =>
895 {
896 b.Property<Guid>("UserId")
897 .HasColumnType("uuid");
898
899 b.Property<string>("LoginProvider")
900 .HasColumnType("text");
901
902 b.Property<string>("Name")
903 .HasColumnType("text");
904
905 b.Property<string>("Value")
906 .HasColumnType("text");
907
908 b.HasKey("UserId", "LoginProvider", "Name");
909
910 b.ToTable("AspNetUserTokens", (string)null);
911 });
912
913 modelBuilder.Entity("App.Domain.BudgetCategory", b =>
914 {
915 b.HasOne("App.Domain.Trip", "Trip")
916 .WithMany("BudgetCategories")
917 .HasForeignKey("TripId")
918 .OnDelete(DeleteBehavior.Restrict)
919 .IsRequired();
920
921 b.Navigation("Trip");
922 });
923
924 modelBuilder.Entity("App.Domain.Expense", b =>
925 {
926 b.HasOne("App.Domain.BudgetCategory", "BudgetCategory")
927 .WithMany("Expenses")
928 .HasForeignKey("BudgetCategoryId")
929 .OnDelete(DeleteBehavior.Restrict);
930
931 b.HasOne("App.Domain.Currency", "Currency")
932 .WithMany()
933 .HasForeignKey("CurrencyId")
934 .OnDelete(DeleteBehavior.Restrict);
935
936 b.HasOne("App.Domain.Identity.AppUser", "PaidByUser")
937 .WithMany()
938 .HasForeignKey("PaidByUserId")
939 .OnDelete(DeleteBehavior.Restrict)
940 .IsRequired();
941
942 b.HasOne("App.Domain.Trip", "Trip")
943 .WithMany("Expenses")
944 .HasForeignKey("TripId")
945 .OnDelete(DeleteBehavior.Restrict)
946 .IsRequired();
947
948 b.Navigation("BudgetCategory");
949
950 b.Navigation("Currency");
951
952 b.Navigation("PaidByUser");
953
954 b.Navigation("Trip");
955 });
956
957 modelBuilder.Entity("App.Domain.ExpenseSplit", b =>
958 {
959 b.HasOne("App.Domain.Expense", "Expense")
960 .WithMany("Splits")
961 .HasForeignKey("ExpenseId")
962 .OnDelete(DeleteBehavior.Restrict)
963 .IsRequired();
964
965 b.HasOne("App.Domain.Identity.AppUser", "User")
966 .WithMany()
967 .HasForeignKey("UserId")
968 .OnDelete(DeleteBehavior.Restrict)
969 .IsRequired();
970
971 b.Navigation("Expense");
972
973 b.Navigation("User");
974 });
975
976 modelBuilder.Entity("App.Domain.Identity.AppRefreshToken", b =>
977 {
978 b.HasOne("App.Domain.Identity.AppUser", "AppUser")
979 .WithMany("RefreshTokens")
980 .HasForeignKey("AppUserId")
981 .OnDelete(DeleteBehavior.Restrict)
982 .IsRequired();
983
984 b.Navigation("AppUser");
985 });
986
987 modelBuilder.Entity("App.Domain.SettlementPayment", b =>
988 {
989 b.HasOne("App.Domain.Identity.AppUser", "FromUser")
990 .WithMany()
991 .HasForeignKey("FromUserId")
992 .OnDelete(DeleteBehavior.Restrict)
993 .IsRequired();
994
995 b.HasOne("App.Domain.SettlementPlan", "SettlementPlan")
996 .WithMany("Payments")
997 .HasForeignKey("SettlementPlanId")
998 .OnDelete(DeleteBehavior.Restrict)
999 .IsRequired();
1000
1001 b.HasOne("App.Domain.Identity.AppUser", "ToUser")
1002 .WithMany()
1003 .HasForeignKey("ToUserId")
1004 .OnDelete(DeleteBehavior.Restrict)
1005 .IsRequired();
1006
1007 b.Navigation("FromUser");
1008
1009 b.Navigation("SettlementPlan");
1010
1011 b.Navigation("ToUser");
1012 });
1013
1014 modelBuilder.Entity("App.Domain.SettlementPlan", b =>
1015 {
1016 b.HasOne("App.Domain.Identity.AppUser", "CreatedByUser")
1017 .WithMany()
1018 .HasForeignKey("CreatedByUserId")
1019 .OnDelete(DeleteBehavior.Restrict)
1020 .IsRequired();
1021
1022 b.HasOne("App.Domain.Trip", "Trip")
1023 .WithMany("SettlementPlans")
1024 .HasForeignKey("TripId")
1025 .OnDelete(DeleteBehavior.Restrict)
1026 .IsRequired();
1027
1028 b.Navigation("CreatedByUser");
1029
1030 b.Navigation("Trip");
1031 });
1032
1033 modelBuilder.Entity("App.Domain.SplitPreset", b =>
1034 {
1035 b.HasOne("App.Domain.Identity.AppUser", "CreatedBy")
1036 .WithMany()
1037 .HasForeignKey("CreatedById")
1038 .OnDelete(DeleteBehavior.Restrict)
1039 .IsRequired();
1040
1041 b.HasOne("App.Domain.Trip", "Trip")
1042 .WithMany()
1043 .HasForeignKey("TripId")
1044 .OnDelete(DeleteBehavior.Restrict)
1045 .IsRequired();
1046
1047 b.Navigation("CreatedBy");
1048
1049 b.Navigation("Trip");
1050 });
1051
1052 modelBuilder.Entity("App.Domain.SplitPresetMember", b =>
1053 {
1054 b.HasOne("App.Domain.SplitPreset", "SplitPreset")
1055 .WithMany("Members")
1056 .HasForeignKey("SplitPresetId")
1057 .OnDelete(DeleteBehavior.Restrict)
1058 .IsRequired();
1059
1060 b.HasOne("App.Domain.Identity.AppUser", "User")
1061 .WithMany()
1062 .HasForeignKey("UserId")
1063 .OnDelete(DeleteBehavior.Restrict)
1064 .IsRequired();
1065
1066 b.Navigation("SplitPreset");
1067
1068 b.Navigation("User");
1069 });
1070
1071 modelBuilder.Entity("App.Domain.Trip", b =>
1072 {
1073 b.HasOne("App.Domain.Identity.AppUser", "CreatedBy")
1074 .WithMany()
1075 .HasForeignKey("CreatedById")
1076 .OnDelete(DeleteBehavior.Restrict)
1077 .IsRequired();
1078
1079 b.HasOne("App.Domain.Currency", "DefaultCurrency")
1080 .WithMany()
1081 .HasForeignKey("DefaultCurrencyId")
1082 .OnDelete(DeleteBehavior.Restrict)
1083 .IsRequired();
1084
1085 b.Navigation("CreatedBy");
1086
1087 b.Navigation("DefaultCurrency");
1088 });
1089
1090 modelBuilder.Entity("App.Domain.TripInvitation", b =>
1091 {
1092 b.HasOne("App.Domain.Identity.AppUser", "InvitedByUser")
1093 .WithMany()
1094 .HasForeignKey("InvitedByUserId")
1095 .OnDelete(DeleteBehavior.Restrict)
1096 .IsRequired();
1097
1098 b.HasOne("App.Domain.Trip", "Trip")
1099 .WithMany("Invitations")
1100 .HasForeignKey("TripId")
1101 .OnDelete(DeleteBehavior.Restrict)
1102 .IsRequired();
1103
1104 b.Navigation("InvitedByUser");
1105
1106 b.Navigation("Trip");
1107 });
1108
1109 modelBuilder.Entity("App.Domain.TripParticipant", b =>
1110 {
1111 b.HasOne("App.Domain.Trip", "Trip")
1112 .WithMany("Participants")
1113 .HasForeignKey("TripId")
1114 .OnDelete(DeleteBehavior.Restrict)
1115 .IsRequired();
1116
1117 b.HasOne("App.Domain.Identity.AppUser", "User")
1118 .WithMany("TripParticipants")
1119 .HasForeignKey("UserId")
1120 .OnDelete(DeleteBehavior.Restrict)
1121 .IsRequired();
1122
1123 b.Navigation("Trip");
1124
1125 b.Navigation("User");
1126 });
1127
1128 modelBuilder.Entity("App.Domain.TripPoll", b =>
1129 {
1130 b.HasOne("App.Domain.Identity.AppUser", "CreatedByUser")
1131 .WithMany()
1132 .HasForeignKey("CreatedByUserId")
1133 .OnDelete(DeleteBehavior.Restrict)
1134 .IsRequired();
1135
1136 b.HasOne("App.Domain.Trip", "Trip")
1137 .WithMany("Polls")
1138 .HasForeignKey("TripId")
1139 .OnDelete(DeleteBehavior.Restrict)
1140 .IsRequired();
1141
1142 b.Navigation("CreatedByUser");
1143
1144 b.Navigation("Trip");
1145 });
1146
1147 modelBuilder.Entity("App.Domain.TripPollOption", b =>
1148 {
1149 b.HasOne("App.Domain.TripPoll", "Poll")
1150 .WithMany("Options")
1151 .HasForeignKey("PollId")
1152 .OnDelete(DeleteBehavior.Restrict)
1153 .IsRequired();
1154
1155 b.Navigation("Poll");
1156 });
1157
1158 modelBuilder.Entity("App.Domain.TripPollVote", b =>
1159 {
1160 b.HasOne("App.Domain.TripPollOption", "PollOption")
1161 .WithMany("Votes")
1162 .HasForeignKey("PollOptionId")
1163 .OnDelete(DeleteBehavior.Restrict)
1164 .IsRequired();
1165
1166 b.HasOne("App.Domain.Identity.AppUser", "User")
1167 .WithMany()
1168 .HasForeignKey("UserId")
1169 .OnDelete(DeleteBehavior.Restrict)
1170 .IsRequired();
1171
1172 b.Navigation("PollOption");
1173
1174 b.Navigation("User");
1175 });
1176
1177 modelBuilder.Entity("App.Domain.TripWishlistItem", b =>
1178 {
1179 b.HasOne("App.Domain.Identity.AppUser", "AddedByUser")
1180 .WithMany()
1181 .HasForeignKey("AddedByUserId")
1182 .OnDelete(DeleteBehavior.Restrict)
1183 .IsRequired();
1184
1185 b.HasOne("App.Domain.Trip", "Trip")
1186 .WithMany("WishlistItems")
1187 .HasForeignKey("TripId")
1188 .OnDelete(DeleteBehavior.Restrict)
1189 .IsRequired();
1190
1191 b.Navigation("AddedByUser");
1192
1193 b.Navigation("Trip");
1194 });
1195
1196 modelBuilder.Entity("App.Domain.TripWishlistVote", b =>
1197 {
1198 b.HasOne("App.Domain.Identity.AppUser", "User")
1199 .WithMany()
1200 .HasForeignKey("UserId")
1201 .OnDelete(DeleteBehavior.Restrict)
1202 .IsRequired();
1203
1204 b.HasOne("App.Domain.TripWishlistItem", "WishlistItem")
1205 .WithMany("Votes")
1206 .HasForeignKey("WishlistItemId")
1207 .OnDelete(DeleteBehavior.Restrict)
1208 .IsRequired();
1209
1210 b.Navigation("User");
1211
1212 b.Navigation("WishlistItem");
1213 });
1214
1215 modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<System.Guid>", b =>
1216 {
1217 b.HasOne("App.Domain.Identity.AppRole", null)
1218 .WithMany()
1219 .HasForeignKey("RoleId")
1220 .OnDelete(DeleteBehavior.Restrict)
1221 .IsRequired();
1222 });
1223
1224 modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<System.Guid>", b =>
1225 {
1226 b.HasOne("App.Domain.Identity.AppUser", null)
1227 .WithMany()
1228 .HasForeignKey("UserId")
1229 .OnDelete(DeleteBehavior.Restrict)
1230 .IsRequired();
1231 });
1232
1233 modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<System.Guid>", b =>
1234 {
1235 b.HasOne("App.Domain.Identity.AppUser", null)
1236 .WithMany()
1237 .HasForeignKey("UserId")
1238 .OnDelete(DeleteBehavior.Restrict)
1239 .IsRequired();
1240 });
1241
1242 modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<System.Guid>", b =>
1243 {
1244 b.HasOne("App.Domain.Identity.AppRole", null)
1245 .WithMany()
1246 .HasForeignKey("RoleId")
1247 .OnDelete(DeleteBehavior.Restrict)
1248 .IsRequired();
1249
1250 b.HasOne("App.Domain.Identity.AppUser", null)
1251 .WithMany()
1252 .HasForeignKey("UserId")
1253 .OnDelete(DeleteBehavior.Restrict)
1254 .IsRequired();
1255 });
1256
1257 modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<System.Guid>", b =>
1258 {
1259 b.HasOne("App.Domain.Identity.AppUser", null)
1260 .WithMany()
1261 .HasForeignKey("UserId")
1262 .OnDelete(DeleteBehavior.Restrict)
1263 .IsRequired();
1264 });
1265
1266 modelBuilder.Entity("App.Domain.BudgetCategory", b =>
1267 {
1268 b.Navigation("Expenses");
1269 });
1270
1271 modelBuilder.Entity("App.Domain.Expense", b =>
1272 {
1273 b.Navigation("Splits");
1274 });
1275
1276 modelBuilder.Entity("App.Domain.Identity.AppUser", b =>
1277 {
1278 b.Navigation("RefreshTokens");
1279
1280 b.Navigation("TripParticipants");
1281 });
1282
1283 modelBuilder.Entity("App.Domain.SettlementPlan", b =>
1284 {
1285 b.Navigation("Payments");
1286 });
1287
1288 modelBuilder.Entity("App.Domain.SplitPreset", b =>
1289 {
1290 b.Navigation("Members");
1291 });
1292
1293 modelBuilder.Entity("App.Domain.Trip", b =>
1294 {
1295 b.Navigation("BudgetCategories");
1296
1297 b.Navigation("Expenses");
1298
1299 b.Navigation("Invitations");
1300
1301 b.Navigation("Participants");
1302
1303 b.Navigation("Polls");
1304
1305 b.Navigation("SettlementPlans");
1306
1307 b.Navigation("WishlistItems");
1308 });
1309
1310 modelBuilder.Entity("App.Domain.TripPoll", b =>
1311 {
1312 b.Navigation("Options");
1313 });
1314
1315 modelBuilder.Entity("App.Domain.TripPollOption", b =>
1316 {
1317 b.Navigation("Votes");
1318 });
1319
1320 modelBuilder.Entity("App.Domain.TripWishlistItem", b =>
1321 {
1322 b.Navigation("Votes");
1323 });
1324 #pragma warning restore 612, 618
1325 }
1326 }
1327 }
1328