tgstation-server 6.16.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
PostgresSqlDatabaseContextModelSnapshot.cs
Go to the documentation of this file.
1// <auto-generated />
2using System;
3
4using Microsoft.EntityFrameworkCore;
5using Microsoft.EntityFrameworkCore.Infrastructure;
6
8{
9 [DbContext(typeof(PostgresSqlDatabaseContext))]
11 {
12 protected override void BuildModel(ModelBuilder modelBuilder)
13 {
14#pragma warning disable 612, 618
15 modelBuilder
16 .HasAnnotation("ProductVersion", "8.0.13")
17 .HasAnnotation("Relational:MaxIdentifierLength", 63);
18
19 NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
20
21 modelBuilder.Entity("Tgstation.Server.Host.Models.ChatBot", b =>
22 {
23 b.Property<long?>("Id")
24 .ValueGeneratedOnAdd()
25 .HasColumnType("bigint");
26
27 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long?>("Id"));
28
29 b.Property<int>("ChannelLimit")
30 .HasColumnType("integer");
31
32 b.Property<string>("ConnectionString")
33 .IsRequired()
34 .HasMaxLength(10000)
35 .HasColumnType("character varying(10000)");
36
37 b.Property<bool?>("Enabled")
38 .HasColumnType("boolean");
39
40 b.Property<long>("InstanceId")
41 .HasColumnType("bigint");
42
43 b.Property<string>("Name")
44 .IsRequired()
45 .HasMaxLength(100)
46 .HasColumnType("character varying(100)");
47
48 b.Property<int>("Provider")
49 .HasColumnType("integer");
50
51 b.Property<long>("ReconnectionInterval")
52 .HasColumnType("bigint");
53
54 b.HasKey("Id");
55
56 b.HasIndex("InstanceId", "Name")
57 .IsUnique();
58
59 b.ToTable("ChatBots");
60 });
61
62 modelBuilder.Entity("Tgstation.Server.Host.Models.ChatChannel", b =>
63 {
64 b.Property<long>("Id")
65 .ValueGeneratedOnAdd()
66 .HasColumnType("bigint");
67
68 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
69
70 b.Property<long>("ChatSettingsId")
71 .HasColumnType("bigint");
72
73 b.Property<decimal?>("DiscordChannelId")
74 .HasColumnType("numeric(20,0)");
75
76 b.Property<string>("IrcChannel")
77 .HasMaxLength(100)
78 .HasColumnType("character varying(100)");
79
80 b.Property<bool?>("IsAdminChannel")
81 .IsRequired()
82 .HasColumnType("boolean");
83
84 b.Property<bool?>("IsSystemChannel")
85 .IsRequired()
86 .HasColumnType("boolean");
87
88 b.Property<bool?>("IsUpdatesChannel")
89 .IsRequired()
90 .HasColumnType("boolean");
91
92 b.Property<bool?>("IsWatchdogChannel")
93 .IsRequired()
94 .HasColumnType("boolean");
95
96 b.Property<string>("Tag")
97 .HasMaxLength(10000)
98 .HasColumnType("character varying(10000)");
99
100 b.HasKey("Id");
101
102 b.HasIndex("ChatSettingsId", "DiscordChannelId")
103 .IsUnique();
104
105 b.HasIndex("ChatSettingsId", "IrcChannel")
106 .IsUnique();
107
108 b.ToTable("ChatChannels");
109 });
110
111 modelBuilder.Entity("Tgstation.Server.Host.Models.CompileJob", b =>
112 {
113 b.Property<long?>("Id")
114 .ValueGeneratedOnAdd()
115 .HasColumnType("bigint");
116
117 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long?>("Id"));
118
119 b.Property<int?>("DMApiMajorVersion")
120 .HasColumnType("integer");
121
122 b.Property<int?>("DMApiMinorVersion")
123 .HasColumnType("integer");
124
125 b.Property<int?>("DMApiPatchVersion")
126 .HasColumnType("integer");
127
128 b.Property<Guid?>("DirectoryName")
129 .IsRequired()
130 .HasColumnType("uuid");
131
132 b.Property<string>("DmeName")
133 .IsRequired()
134 .HasColumnType("text");
135
136 b.Property<string>("EngineVersion")
137 .IsRequired()
138 .HasColumnType("text");
139
140 b.Property<long?>("GitHubDeploymentId")
141 .HasColumnType("bigint");
142
143 b.Property<long?>("GitHubRepoId")
144 .HasColumnType("bigint");
145
146 b.Property<long>("JobId")
147 .HasColumnType("bigint");
148
149 b.Property<int?>("MinimumSecurityLevel")
150 .HasColumnType("integer");
151
152 b.Property<string>("Output")
153 .IsRequired()
154 .HasColumnType("text");
155
156 b.Property<string>("RepositoryOrigin")
157 .HasColumnType("text");
158
159 b.Property<long>("RevisionInformationId")
160 .HasColumnType("bigint");
161
162 b.HasKey("Id");
163
164 b.HasIndex("DirectoryName");
165
166 b.HasIndex("JobId")
167 .IsUnique();
168
169 b.HasIndex("RevisionInformationId");
170
171 b.ToTable("CompileJobs");
172 });
173
174 modelBuilder.Entity("Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
175 {
176 b.Property<long>("Id")
177 .ValueGeneratedOnAdd()
178 .HasColumnType("bigint");
179
180 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
181
182 b.Property<string>("AdditionalParameters")
183 .IsRequired()
184 .HasMaxLength(10000)
185 .HasColumnType("character varying(10000)");
186
187 b.Property<bool?>("AllowWebClient")
188 .IsRequired()
189 .HasColumnType("boolean");
190
191 b.Property<bool?>("AutoStart")
192 .IsRequired()
193 .HasColumnType("boolean");
194
195 b.Property<bool?>("DumpOnHealthCheckRestart")
196 .IsRequired()
197 .HasColumnType("boolean");
198
199 b.Property<long>("HealthCheckSeconds")
200 .HasColumnType("bigint");
201
202 b.Property<long>("InstanceId")
203 .HasColumnType("bigint");
204
205 b.Property<bool?>("LogOutput")
206 .IsRequired()
207 .HasColumnType("boolean");
208
209 b.Property<long>("MapThreads")
210 .HasColumnType("bigint");
211
212 b.Property<bool?>("Minidumps")
213 .IsRequired()
214 .HasColumnType("boolean");
215
216 b.Property<int>("OpenDreamTopicPort")
217 .HasColumnType("integer");
218
219 b.Property<int>("Port")
220 .HasColumnType("integer");
221
222 b.Property<int>("SecurityLevel")
223 .HasColumnType("integer");
224
225 b.Property<bool?>("StartProfiler")
226 .IsRequired()
227 .HasColumnType("boolean");
228
229 b.Property<long>("StartupTimeout")
230 .HasColumnType("bigint");
231
232 b.Property<long>("TopicRequestTimeout")
233 .HasColumnType("bigint");
234
235 b.Property<int>("Visibility")
236 .HasColumnType("integer");
237
238 b.HasKey("Id");
239
240 b.HasIndex("InstanceId")
241 .IsUnique();
242
243 b.ToTable("DreamDaemonSettings");
244 });
245
246 modelBuilder.Entity("Tgstation.Server.Host.Models.DreamMakerSettings", b =>
247 {
248 b.Property<long>("Id")
249 .ValueGeneratedOnAdd()
250 .HasColumnType("bigint");
251
252 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
253
254 b.Property<int>("ApiValidationPort")
255 .HasColumnType("integer");
256
257 b.Property<int>("ApiValidationSecurityLevel")
258 .HasColumnType("integer");
259
260 b.Property<string>("CompilerAdditionalArguments")
261 .HasMaxLength(10000)
262 .HasColumnType("character varying(10000)");
263
264 b.Property<int>("DMApiValidationMode")
265 .HasColumnType("integer");
266
267 b.Property<long>("InstanceId")
268 .HasColumnType("bigint");
269
270 b.Property<string>("ProjectName")
271 .HasMaxLength(10000)
272 .HasColumnType("character varying(10000)");
273
274 b.Property<TimeSpan?>("Timeout")
275 .IsRequired()
276 .HasColumnType("interval");
277
278 b.HasKey("Id");
279
280 b.HasIndex("InstanceId")
281 .IsUnique();
282
283 b.ToTable("DreamMakerSettings");
284 });
285
286 modelBuilder.Entity("Tgstation.Server.Host.Models.Instance", b =>
287 {
288 b.Property<long?>("Id")
289 .ValueGeneratedOnAdd()
290 .HasColumnType("bigint");
291
292 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long?>("Id"));
293
294 b.Property<string>("AutoStartCron")
295 .IsRequired()
296 .HasMaxLength(1000)
297 .HasColumnType("character varying(1000)");
298
299 b.Property<string>("AutoStopCron")
300 .IsRequired()
301 .HasMaxLength(1000)
302 .HasColumnType("character varying(1000)");
303
304 b.Property<string>("AutoUpdateCron")
305 .IsRequired()
306 .HasMaxLength(1000)
307 .HasColumnType("character varying(1000)");
308
309 b.Property<long>("AutoUpdateInterval")
310 .HasColumnType("bigint");
311
312 b.Property<int>("ChatBotLimit")
313 .HasColumnType("integer");
314
315 b.Property<int>("ConfigurationType")
316 .HasColumnType("integer");
317
318 b.Property<string>("Name")
319 .IsRequired()
320 .HasMaxLength(100)
321 .HasColumnType("character varying(100)");
322
323 b.Property<bool?>("Online")
324 .IsRequired()
325 .HasColumnType("boolean");
326
327 b.Property<string>("Path")
328 .IsRequired()
329 .HasColumnType("text");
330
331 b.Property<string>("SwarmIdentifer")
332 .HasColumnType("text");
333
334 b.HasKey("Id");
335
336 b.HasIndex("Path", "SwarmIdentifer")
337 .IsUnique();
338
339 b.ToTable("Instances");
340 });
341
342 modelBuilder.Entity("Tgstation.Server.Host.Models.InstancePermissionSet", b =>
343 {
344 b.Property<long>("Id")
345 .ValueGeneratedOnAdd()
346 .HasColumnType("bigint");
347
348 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
349
350 b.Property<decimal>("ChatBotRights")
351 .HasColumnType("numeric(20,0)");
352
353 b.Property<decimal>("ConfigurationRights")
354 .HasColumnType("numeric(20,0)");
355
356 b.Property<decimal>("DreamDaemonRights")
357 .HasColumnType("numeric(20,0)");
358
359 b.Property<decimal>("DreamMakerRights")
360 .HasColumnType("numeric(20,0)");
361
362 b.Property<decimal>("EngineRights")
363 .HasColumnType("numeric(20,0)");
364
365 b.Property<long>("InstanceId")
366 .HasColumnType("bigint");
367
368 b.Property<decimal>("InstancePermissionSetRights")
369 .HasColumnType("numeric(20,0)");
370
371 b.Property<long>("PermissionSetId")
372 .HasColumnType("bigint");
373
374 b.Property<decimal>("RepositoryRights")
375 .HasColumnType("numeric(20,0)");
376
377 b.HasKey("Id");
378
379 b.HasIndex("InstanceId");
380
381 b.HasIndex("PermissionSetId", "InstanceId")
382 .IsUnique();
383
384 b.ToTable("InstancePermissionSets");
385 });
386
387 modelBuilder.Entity("Tgstation.Server.Host.Models.Job", b =>
388 {
389 b.Property<long?>("Id")
390 .ValueGeneratedOnAdd()
391 .HasColumnType("bigint");
392
393 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long?>("Id"));
394
395 b.Property<decimal?>("CancelRight")
396 .HasColumnType("numeric(20,0)");
397
398 b.Property<decimal?>("CancelRightsType")
399 .HasColumnType("numeric(20,0)");
400
401 b.Property<bool?>("Cancelled")
402 .IsRequired()
403 .HasColumnType("boolean");
404
405 b.Property<long?>("CancelledById")
406 .HasColumnType("bigint");
407
408 b.Property<string>("Description")
409 .IsRequired()
410 .HasColumnType("text");
411
412 b.Property<long?>("ErrorCode")
413 .HasColumnType("bigint");
414
415 b.Property<string>("ExceptionDetails")
416 .HasColumnType("text");
417
418 b.Property<long>("InstanceId")
419 .HasColumnType("bigint");
420
421 b.Property<byte>("JobCode")
422 .HasColumnType("smallint");
423
424 b.Property<DateTimeOffset?>("StartedAt")
425 .IsRequired()
426 .HasColumnType("timestamp with time zone");
427
428 b.Property<long>("StartedById")
429 .HasColumnType("bigint");
430
431 b.Property<DateTimeOffset?>("StoppedAt")
432 .HasColumnType("timestamp with time zone");
433
434 b.HasKey("Id");
435
436 b.HasIndex("CancelledById");
437
438 b.HasIndex("InstanceId");
439
440 b.HasIndex("StartedById");
441
442 b.ToTable("Jobs");
443 });
444
445 modelBuilder.Entity("Tgstation.Server.Host.Models.OAuthConnection", b =>
446 {
447 b.Property<long>("Id")
448 .ValueGeneratedOnAdd()
449 .HasColumnType("bigint");
450
451 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
452
453 b.Property<string>("ExternalUserId")
454 .IsRequired()
455 .HasMaxLength(100)
456 .HasColumnType("character varying(100)");
457
458 b.Property<int>("Provider")
459 .HasColumnType("integer");
460
461 b.Property<long>("UserId")
462 .HasColumnType("bigint");
463
464 b.HasKey("Id");
465
466 b.HasIndex("UserId");
467
468 b.HasIndex("Provider", "ExternalUserId")
469 .IsUnique();
470
471 b.ToTable("OAuthConnections");
472 });
473
474 modelBuilder.Entity("Tgstation.Server.Host.Models.OidcConnection", b =>
475 {
476 b.Property<long>("Id")
477 .ValueGeneratedOnAdd()
478 .HasColumnType("bigint");
479
480 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
481
482 b.Property<string>("ExternalUserId")
483 .IsRequired()
484 .HasMaxLength(100)
485 .HasColumnType("character varying(100)");
486
487 b.Property<string>("SchemeKey")
488 .IsRequired()
489 .HasMaxLength(100)
490 .HasColumnType("character varying(100)");
491
492 b.Property<long>("UserId")
493 .HasColumnType("bigint");
494
495 b.HasKey("Id");
496
497 b.HasIndex("UserId");
498
499 b.HasIndex("SchemeKey", "ExternalUserId")
500 .IsUnique();
501
502 b.ToTable("OidcConnections");
503 });
504
505 modelBuilder.Entity("Tgstation.Server.Host.Models.PermissionSet", b =>
506 {
507 b.Property<long?>("Id")
508 .ValueGeneratedOnAdd()
509 .HasColumnType("bigint");
510
511 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long?>("Id"));
512
513 b.Property<decimal>("AdministrationRights")
514 .HasColumnType("numeric(20,0)");
515
516 b.Property<long?>("GroupId")
517 .HasColumnType("bigint");
518
519 b.Property<decimal>("InstanceManagerRights")
520 .HasColumnType("numeric(20,0)");
521
522 b.Property<long?>("UserId")
523 .HasColumnType("bigint");
524
525 b.HasKey("Id");
526
527 b.HasIndex("GroupId")
528 .IsUnique();
529
530 b.HasIndex("UserId")
531 .IsUnique();
532
533 b.ToTable("PermissionSets");
534 });
535
536 modelBuilder.Entity("Tgstation.Server.Host.Models.ReattachInformation", b =>
537 {
538 b.Property<long?>("Id")
539 .ValueGeneratedOnAdd()
540 .HasColumnType("bigint");
541
542 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long?>("Id"));
543
544 b.Property<string>("AccessIdentifier")
545 .IsRequired()
546 .HasColumnType("text");
547
548 b.Property<long>("CompileJobId")
549 .HasColumnType("bigint");
550
551 b.Property<long?>("InitialCompileJobId")
552 .HasColumnType("bigint");
553
554 b.Property<int>("LaunchSecurityLevel")
555 .HasColumnType("integer");
556
557 b.Property<int>("LaunchVisibility")
558 .HasColumnType("integer");
559
560 b.Property<int>("Port")
561 .HasColumnType("integer");
562
563 b.Property<int>("ProcessId")
564 .HasColumnType("integer");
565
566 b.Property<int>("RebootState")
567 .HasColumnType("integer");
568
569 b.Property<int?>("TopicPort")
570 .HasColumnType("integer");
571
572 b.HasKey("Id");
573
574 b.HasIndex("CompileJobId");
575
576 b.HasIndex("InitialCompileJobId");
577
578 b.ToTable("ReattachInformations");
579 });
580
581 modelBuilder.Entity("Tgstation.Server.Host.Models.RepositorySettings", b =>
582 {
583 b.Property<long>("Id")
584 .ValueGeneratedOnAdd()
585 .HasColumnType("bigint");
586
587 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
588
589 b.Property<string>("AccessToken")
590 .HasMaxLength(10000)
591 .HasColumnType("character varying(10000)");
592
593 b.Property<string>("AccessUser")
594 .HasMaxLength(10000)
595 .HasColumnType("character varying(10000)");
596
597 b.Property<bool?>("AutoUpdatesKeepTestMerges")
598 .IsRequired()
599 .HasColumnType("boolean");
600
601 b.Property<bool?>("AutoUpdatesSynchronize")
602 .IsRequired()
603 .HasColumnType("boolean");
604
605 b.Property<string>("CommitterEmail")
606 .IsRequired()
607 .HasMaxLength(10000)
608 .HasColumnType("character varying(10000)");
609
610 b.Property<string>("CommitterName")
611 .IsRequired()
612 .HasMaxLength(10000)
613 .HasColumnType("character varying(10000)");
614
615 b.Property<bool?>("CreateGitHubDeployments")
616 .IsRequired()
617 .HasColumnType("boolean");
618
619 b.Property<long>("InstanceId")
620 .HasColumnType("bigint");
621
622 b.Property<bool?>("PostTestMergeComment")
623 .IsRequired()
624 .HasColumnType("boolean");
625
626 b.Property<bool?>("PushTestMergeCommits")
627 .IsRequired()
628 .HasColumnType("boolean");
629
630 b.Property<bool?>("ShowTestMergeCommitters")
631 .IsRequired()
632 .HasColumnType("boolean");
633
634 b.Property<bool?>("UpdateSubmodules")
635 .IsRequired()
636 .HasColumnType("boolean");
637
638 b.HasKey("Id");
639
640 b.HasIndex("InstanceId")
641 .IsUnique();
642
643 b.ToTable("RepositorySettings");
644 });
645
646 modelBuilder.Entity("Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
647 {
648 b.Property<long>("Id")
649 .ValueGeneratedOnAdd()
650 .HasColumnType("bigint");
651
652 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
653
654 b.Property<long>("RevisionInformationId")
655 .HasColumnType("bigint");
656
657 b.Property<long>("TestMergeId")
658 .HasColumnType("bigint");
659
660 b.HasKey("Id");
661
662 b.HasIndex("RevisionInformationId");
663
664 b.HasIndex("TestMergeId");
665
666 b.ToTable("RevInfoTestMerges");
667 });
668
669 modelBuilder.Entity("Tgstation.Server.Host.Models.RevisionInformation", b =>
670 {
671 b.Property<long>("Id")
672 .ValueGeneratedOnAdd()
673 .HasColumnType("bigint");
674
675 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
676
677 b.Property<string>("CommitSha")
678 .IsRequired()
679 .HasMaxLength(40)
680 .HasColumnType("character varying(40)");
681
682 b.Property<long>("InstanceId")
683 .HasColumnType("bigint");
684
685 b.Property<string>("OriginCommitSha")
686 .IsRequired()
687 .HasMaxLength(40)
688 .HasColumnType("character varying(40)");
689
690 b.Property<DateTimeOffset>("Timestamp")
691 .HasColumnType("timestamp with time zone");
692
693 b.HasKey("Id");
694
695 b.HasIndex("InstanceId", "CommitSha")
696 .IsUnique();
697
698 b.ToTable("RevisionInformations");
699 });
700
701 modelBuilder.Entity("Tgstation.Server.Host.Models.TestMerge", b =>
702 {
703 b.Property<long>("Id")
704 .ValueGeneratedOnAdd()
705 .HasColumnType("bigint");
706
707 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
708
709 b.Property<string>("Author")
710 .IsRequired()
711 .HasColumnType("text");
712
713 b.Property<string>("BodyAtMerge")
714 .IsRequired()
715 .HasColumnType("text");
716
717 b.Property<string>("Comment")
718 .HasMaxLength(10000)
719 .HasColumnType("character varying(10000)");
720
721 b.Property<DateTimeOffset>("MergedAt")
722 .HasColumnType("timestamp with time zone");
723
724 b.Property<long>("MergedById")
725 .HasColumnType("bigint");
726
727 b.Property<int>("Number")
728 .HasColumnType("integer");
729
730 b.Property<long?>("PrimaryRevisionInformationId")
731 .IsRequired()
732 .HasColumnType("bigint");
733
734 b.Property<string>("TargetCommitSha")
735 .IsRequired()
736 .HasMaxLength(40)
737 .HasColumnType("character varying(40)");
738
739 b.Property<string>("TitleAtMerge")
740 .IsRequired()
741 .HasColumnType("text");
742
743 b.Property<string>("Url")
744 .IsRequired()
745 .HasColumnType("text");
746
747 b.HasKey("Id");
748
749 b.HasIndex("MergedById");
750
751 b.HasIndex("PrimaryRevisionInformationId")
752 .IsUnique();
753
754 b.ToTable("TestMerges");
755 });
756
757 modelBuilder.Entity("Tgstation.Server.Host.Models.User", b =>
758 {
759 b.Property<long?>("Id")
760 .ValueGeneratedOnAdd()
761 .HasColumnType("bigint");
762
763 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long?>("Id"));
764
765 b.Property<string>("CanonicalName")
766 .IsRequired()
767 .HasMaxLength(100)
768 .HasColumnType("character varying(100)");
769
770 b.Property<DateTimeOffset?>("CreatedAt")
771 .IsRequired()
772 .HasColumnType("timestamp with time zone");
773
774 b.Property<long?>("CreatedById")
775 .HasColumnType("bigint");
776
777 b.Property<bool?>("Enabled")
778 .IsRequired()
779 .HasColumnType("boolean");
780
781 b.Property<long?>("GroupId")
782 .HasColumnType("bigint");
783
784 b.Property<DateTimeOffset?>("LastPasswordUpdate")
785 .HasColumnType("timestamp with time zone");
786
787 b.Property<string>("Name")
788 .IsRequired()
789 .HasMaxLength(100)
790 .HasColumnType("character varying(100)");
791
792 b.Property<string>("PasswordHash")
793 .HasColumnType("text");
794
795 b.Property<string>("SystemIdentifier")
796 .HasMaxLength(100)
797 .HasColumnType("character varying(100)");
798
799 b.HasKey("Id");
800
801 b.HasIndex("CanonicalName")
802 .IsUnique();
803
804 b.HasIndex("CreatedById");
805
806 b.HasIndex("GroupId");
807
808 b.HasIndex("SystemIdentifier")
809 .IsUnique();
810
811 b.ToTable("Users");
812 });
813
814 modelBuilder.Entity("Tgstation.Server.Host.Models.UserGroup", b =>
815 {
816 b.Property<long?>("Id")
817 .ValueGeneratedOnAdd()
818 .HasColumnType("bigint");
819
820 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long?>("Id"));
821
822 b.Property<string>("Name")
823 .IsRequired()
824 .HasMaxLength(100)
825 .HasColumnType("character varying(100)");
826
827 b.HasKey("Id");
828
829 b.HasIndex("Name")
830 .IsUnique();
831
832 b.ToTable("Groups");
833 });
834
835 modelBuilder.Entity("Tgstation.Server.Host.Models.ChatBot", b =>
836 {
837 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
838 .WithMany("ChatSettings")
839 .HasForeignKey("InstanceId")
840 .OnDelete(DeleteBehavior.Cascade)
841 .IsRequired();
842
843 b.Navigation("Instance");
844 });
845
846 modelBuilder.Entity("Tgstation.Server.Host.Models.ChatChannel", b =>
847 {
848 b.HasOne("Tgstation.Server.Host.Models.ChatBot", "ChatSettings")
849 .WithMany("Channels")
850 .HasForeignKey("ChatSettingsId")
851 .OnDelete(DeleteBehavior.Cascade)
852 .IsRequired();
853
854 b.Navigation("ChatSettings");
855 });
856
857 modelBuilder.Entity("Tgstation.Server.Host.Models.CompileJob", b =>
858 {
859 b.HasOne("Tgstation.Server.Host.Models.Job", "Job")
860 .WithOne()
861 .HasForeignKey("Tgstation.Server.Host.Models.CompileJob", "JobId")
862 .OnDelete(DeleteBehavior.Cascade)
863 .IsRequired();
864
865 b.HasOne("Tgstation.Server.Host.Models.RevisionInformation", "RevisionInformation")
866 .WithMany("CompileJobs")
867 .HasForeignKey("RevisionInformationId")
868 .OnDelete(DeleteBehavior.Cascade)
869 .IsRequired();
870
871 b.Navigation("Job");
872
873 b.Navigation("RevisionInformation");
874 });
875
876 modelBuilder.Entity("Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
877 {
878 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
879 .WithOne("DreamDaemonSettings")
880 .HasForeignKey("Tgstation.Server.Host.Models.DreamDaemonSettings", "InstanceId")
881 .OnDelete(DeleteBehavior.Cascade)
882 .IsRequired();
883
884 b.Navigation("Instance");
885 });
886
887 modelBuilder.Entity("Tgstation.Server.Host.Models.DreamMakerSettings", b =>
888 {
889 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
890 .WithOne("DreamMakerSettings")
891 .HasForeignKey("Tgstation.Server.Host.Models.DreamMakerSettings", "InstanceId")
892 .OnDelete(DeleteBehavior.Cascade)
893 .IsRequired();
894
895 b.Navigation("Instance");
896 });
897
898 modelBuilder.Entity("Tgstation.Server.Host.Models.InstancePermissionSet", b =>
899 {
900 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
901 .WithMany("InstancePermissionSets")
902 .HasForeignKey("InstanceId")
903 .OnDelete(DeleteBehavior.Cascade)
904 .IsRequired();
905
906 b.HasOne("Tgstation.Server.Host.Models.PermissionSet", "PermissionSet")
907 .WithMany("InstancePermissionSets")
908 .HasForeignKey("PermissionSetId")
909 .OnDelete(DeleteBehavior.Cascade)
910 .IsRequired();
911
912 b.Navigation("Instance");
913
914 b.Navigation("PermissionSet");
915 });
916
917 modelBuilder.Entity("Tgstation.Server.Host.Models.Job", b =>
918 {
919 b.HasOne("Tgstation.Server.Host.Models.User", "CancelledBy")
920 .WithMany()
921 .HasForeignKey("CancelledById");
922
923 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
924 .WithMany("Jobs")
925 .HasForeignKey("InstanceId")
926 .OnDelete(DeleteBehavior.Cascade)
927 .IsRequired();
928
929 b.HasOne("Tgstation.Server.Host.Models.User", "StartedBy")
930 .WithMany()
931 .HasForeignKey("StartedById")
932 .OnDelete(DeleteBehavior.Cascade)
933 .IsRequired();
934
935 b.Navigation("CancelledBy");
936
937 b.Navigation("Instance");
938
939 b.Navigation("StartedBy");
940 });
941
942 modelBuilder.Entity("Tgstation.Server.Host.Models.OAuthConnection", b =>
943 {
944 b.HasOne("Tgstation.Server.Host.Models.User", "User")
945 .WithMany("OAuthConnections")
946 .HasForeignKey("UserId")
947 .OnDelete(DeleteBehavior.Cascade)
948 .IsRequired();
949
950 b.Navigation("User");
951 });
952
953 modelBuilder.Entity("Tgstation.Server.Host.Models.OidcConnection", b =>
954 {
955 b.HasOne("Tgstation.Server.Host.Models.User", "User")
956 .WithMany("OidcConnections")
957 .HasForeignKey("UserId")
958 .OnDelete(DeleteBehavior.Cascade)
959 .IsRequired();
960
961 b.Navigation("User");
962 });
963
964 modelBuilder.Entity("Tgstation.Server.Host.Models.PermissionSet", b =>
965 {
966 b.HasOne("Tgstation.Server.Host.Models.UserGroup", "Group")
967 .WithOne("PermissionSet")
968 .HasForeignKey("Tgstation.Server.Host.Models.PermissionSet", "GroupId")
969 .OnDelete(DeleteBehavior.Cascade);
970
971 b.HasOne("Tgstation.Server.Host.Models.User", "User")
972 .WithOne("PermissionSet")
973 .HasForeignKey("Tgstation.Server.Host.Models.PermissionSet", "UserId")
974 .OnDelete(DeleteBehavior.Cascade);
975
976 b.Navigation("Group");
977
978 b.Navigation("User");
979 });
980
981 modelBuilder.Entity("Tgstation.Server.Host.Models.ReattachInformation", b =>
982 {
983 b.HasOne("Tgstation.Server.Host.Models.CompileJob", "CompileJob")
984 .WithMany()
985 .HasForeignKey("CompileJobId")
986 .OnDelete(DeleteBehavior.Cascade)
987 .IsRequired();
988
989 b.HasOne("Tgstation.Server.Host.Models.CompileJob", "InitialCompileJob")
990 .WithMany()
991 .HasForeignKey("InitialCompileJobId");
992
993 b.Navigation("CompileJob");
994
995 b.Navigation("InitialCompileJob");
996 });
997
998 modelBuilder.Entity("Tgstation.Server.Host.Models.RepositorySettings", b =>
999 {
1000 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
1001 .WithOne("RepositorySettings")
1002 .HasForeignKey("Tgstation.Server.Host.Models.RepositorySettings", "InstanceId")
1003 .OnDelete(DeleteBehavior.Cascade)
1004 .IsRequired();
1005
1006 b.Navigation("Instance");
1007 });
1008
1009 modelBuilder.Entity("Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
1010 {
1011 b.HasOne("Tgstation.Server.Host.Models.RevisionInformation", "RevisionInformation")
1012 .WithMany("ActiveTestMerges")
1013 .HasForeignKey("RevisionInformationId")
1014 .OnDelete(DeleteBehavior.Cascade)
1015 .IsRequired();
1016
1017 b.HasOne("Tgstation.Server.Host.Models.TestMerge", "TestMerge")
1018 .WithMany("RevisonInformations")
1019 .HasForeignKey("TestMergeId")
1020 .OnDelete(DeleteBehavior.ClientNoAction)
1021 .IsRequired();
1022
1023 b.Navigation("RevisionInformation");
1024
1025 b.Navigation("TestMerge");
1026 });
1027
1028 modelBuilder.Entity("Tgstation.Server.Host.Models.RevisionInformation", b =>
1029 {
1030 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
1031 .WithMany("RevisionInformations")
1032 .HasForeignKey("InstanceId")
1033 .OnDelete(DeleteBehavior.Cascade)
1034 .IsRequired();
1035
1036 b.Navigation("Instance");
1037 });
1038
1039 modelBuilder.Entity("Tgstation.Server.Host.Models.TestMerge", b =>
1040 {
1041 b.HasOne("Tgstation.Server.Host.Models.User", "MergedBy")
1042 .WithMany("TestMerges")
1043 .HasForeignKey("MergedById")
1044 .OnDelete(DeleteBehavior.Restrict)
1045 .IsRequired();
1046
1047 b.HasOne("Tgstation.Server.Host.Models.RevisionInformation", "PrimaryRevisionInformation")
1048 .WithOne("PrimaryTestMerge")
1049 .HasForeignKey("Tgstation.Server.Host.Models.TestMerge", "PrimaryRevisionInformationId")
1050 .OnDelete(DeleteBehavior.Cascade)
1051 .IsRequired();
1052
1053 b.Navigation("MergedBy");
1054
1055 b.Navigation("PrimaryRevisionInformation");
1056 });
1057
1058 modelBuilder.Entity("Tgstation.Server.Host.Models.User", b =>
1059 {
1060 b.HasOne("Tgstation.Server.Host.Models.User", "CreatedBy")
1061 .WithMany("CreatedUsers")
1062 .HasForeignKey("CreatedById");
1063
1064 b.HasOne("Tgstation.Server.Host.Models.UserGroup", "Group")
1065 .WithMany("Users")
1066 .HasForeignKey("GroupId");
1067
1068 b.Navigation("CreatedBy");
1069
1070 b.Navigation("Group");
1071 });
1072
1073 modelBuilder.Entity("Tgstation.Server.Host.Models.ChatBot", b =>
1074 {
1075 b.Navigation("Channels");
1076 });
1077
1078 modelBuilder.Entity("Tgstation.Server.Host.Models.Instance", b =>
1079 {
1080 b.Navigation("ChatSettings");
1081
1082 b.Navigation("DreamDaemonSettings");
1083
1084 b.Navigation("DreamMakerSettings");
1085
1086 b.Navigation("InstancePermissionSets");
1087
1088 b.Navigation("Jobs");
1089
1090 b.Navigation("RepositorySettings");
1091
1092 b.Navigation("RevisionInformations");
1093 });
1094
1095 modelBuilder.Entity("Tgstation.Server.Host.Models.PermissionSet", b =>
1096 {
1097 b.Navigation("InstancePermissionSets");
1098 });
1099
1100 modelBuilder.Entity("Tgstation.Server.Host.Models.RevisionInformation", b =>
1101 {
1102 b.Navigation("ActiveTestMerges");
1103
1104 b.Navigation("CompileJobs");
1105
1106 b.Navigation("PrimaryTestMerge");
1107 });
1108
1109 modelBuilder.Entity("Tgstation.Server.Host.Models.TestMerge", b =>
1110 {
1111 b.Navigation("RevisonInformations");
1112 });
1113
1114 modelBuilder.Entity("Tgstation.Server.Host.Models.User", b =>
1115 {
1116 b.Navigation("CreatedUsers");
1117
1118 b.Navigation("OAuthConnections");
1119
1120 b.Navigation("OidcConnections");
1121
1122 b.Navigation("PermissionSet");
1123
1124 b.Navigation("TestMerges");
1125 });
1126
1127 modelBuilder.Entity("Tgstation.Server.Host.Models.UserGroup", b =>
1128 {
1129 b.Navigation("PermissionSet")
1130 .IsRequired();
1131
1132 b.Navigation("Users");
1133 });
1134#pragma warning restore 612, 618
1135 }
1136 }
1137}