12 protected override void BuildModel(ModelBuilder modelBuilder)
14#pragma warning disable 612, 618
15 modelBuilder.HasAnnotation(
"ProductVersion",
"8.0.10");
17 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
19 b.Property<
long?>(
"Id")
20 .ValueGeneratedOnAdd()
21 .HasColumnType(
"INTEGER");
23 b.Property<ushort?>(
"ChannelLimit")
25 .HasColumnType(
"INTEGER");
27 b.Property<
string>(
"ConnectionString")
30 .HasColumnType(
"TEXT");
32 b.Property<
bool?>(
"Enabled")
33 .HasColumnType(
"INTEGER");
35 b.Property<
long>(
"InstanceId")
36 .HasColumnType(
"INTEGER");
38 b.Property<
string>(
"Name")
41 .HasColumnType(
"TEXT");
43 b.Property<
int>(
"Provider")
44 .HasColumnType(
"INTEGER");
46 b.Property<uint?>(
"ReconnectionInterval")
48 .HasColumnType(
"INTEGER");
52 b.HasIndex(
"InstanceId",
"Name")
55 b.ToTable(
"ChatBots");
58 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
60 b.Property<
long>(
"Id")
61 .ValueGeneratedOnAdd()
62 .HasColumnType(
"INTEGER");
64 b.Property<
long>(
"ChatSettingsId")
65 .HasColumnType(
"INTEGER");
67 b.Property<ulong?>(
"DiscordChannelId")
68 .HasColumnType(
"INTEGER");
70 b.Property<
string>(
"IrcChannel")
72 .HasColumnType(
"TEXT");
74 b.Property<
bool?>(
"IsAdminChannel")
76 .HasColumnType(
"INTEGER");
78 b.Property<
bool?>(
"IsSystemChannel")
80 .HasColumnType(
"INTEGER");
82 b.Property<
bool?>(
"IsUpdatesChannel")
84 .HasColumnType(
"INTEGER");
86 b.Property<
bool?>(
"IsWatchdogChannel")
88 .HasColumnType(
"INTEGER");
90 b.Property<
string>(
"Tag")
92 .HasColumnType(
"TEXT");
96 b.HasIndex(
"ChatSettingsId",
"DiscordChannelId")
99 b.HasIndex(
"ChatSettingsId",
"IrcChannel")
102 b.ToTable(
"ChatChannels");
105 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
107 b.Property<
long?>(
"Id")
108 .ValueGeneratedOnAdd()
109 .HasColumnType(
"INTEGER");
111 b.Property<
int?>(
"DMApiMajorVersion")
112 .HasColumnType(
"INTEGER");
114 b.Property<
int?>(
"DMApiMinorVersion")
115 .HasColumnType(
"INTEGER");
117 b.Property<
int?>(
"DMApiPatchVersion")
118 .HasColumnType(
"INTEGER");
120 b.Property<Guid?>(
"DirectoryName")
122 .HasColumnType(
"TEXT");
124 b.Property<
string>(
"DmeName")
126 .HasColumnType(
"TEXT");
128 b.Property<
string>(
"EngineVersion")
130 .HasColumnType(
"TEXT");
132 b.Property<
long?>(
"GitHubDeploymentId")
133 .HasColumnType(
"INTEGER");
135 b.Property<
long?>(
"GitHubRepoId")
136 .HasColumnType(
"INTEGER");
138 b.Property<
long>(
"JobId")
139 .HasColumnType(
"INTEGER");
141 b.Property<
int?>(
"MinimumSecurityLevel")
142 .HasColumnType(
"INTEGER");
144 b.Property<
string>(
"Output")
146 .HasColumnType(
"TEXT");
148 b.Property<
string>(
"RepositoryOrigin")
149 .HasColumnType(
"TEXT");
151 b.Property<
long>(
"RevisionInformationId")
152 .HasColumnType(
"INTEGER");
156 b.HasIndex(
"DirectoryName");
161 b.HasIndex(
"RevisionInformationId");
163 b.ToTable(
"CompileJobs");
166 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
168 b.Property<
long>(
"Id")
169 .ValueGeneratedOnAdd()
170 .HasColumnType(
"INTEGER");
172 b.Property<
string>(
"AdditionalParameters")
175 .HasColumnType(
"TEXT");
177 b.Property<
bool?>(
"AllowWebClient")
179 .HasColumnType(
"INTEGER");
181 b.Property<
bool?>(
"AutoStart")
183 .HasColumnType(
"INTEGER");
185 b.Property<
bool?>(
"DumpOnHealthCheckRestart")
187 .HasColumnType(
"INTEGER");
189 b.Property<uint?>(
"HealthCheckSeconds")
191 .HasColumnType(
"INTEGER");
193 b.Property<
long>(
"InstanceId")
194 .HasColumnType(
"INTEGER");
196 b.Property<
bool?>(
"LogOutput")
198 .HasColumnType(
"INTEGER");
200 b.Property<uint?>(
"MapThreads")
202 .HasColumnType(
"INTEGER");
204 b.Property<
bool?>(
"Minidumps")
206 .HasColumnType(
"INTEGER");
208 b.Property<ushort?>(
"OpenDreamTopicPort")
210 .HasColumnType(
"INTEGER");
212 b.Property<ushort?>(
"Port")
214 .HasColumnType(
"INTEGER");
216 b.Property<
int>(
"SecurityLevel")
217 .HasColumnType(
"INTEGER");
219 b.Property<
bool?>(
"StartProfiler")
221 .HasColumnType(
"INTEGER");
223 b.Property<uint?>(
"StartupTimeout")
225 .HasColumnType(
"INTEGER");
227 b.Property<uint?>(
"TopicRequestTimeout")
229 .HasColumnType(
"INTEGER");
231 b.Property<
int>(
"Visibility")
232 .HasColumnType(
"INTEGER");
236 b.HasIndex(
"InstanceId")
239 b.ToTable(
"DreamDaemonSettings");
242 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
244 b.Property<
long>(
"Id")
245 .ValueGeneratedOnAdd()
246 .HasColumnType(
"INTEGER");
248 b.Property<ushort?>(
"ApiValidationPort")
250 .HasColumnType(
"INTEGER");
252 b.Property<
int>(
"ApiValidationSecurityLevel")
253 .HasColumnType(
"INTEGER");
255 b.Property<
string>(
"CompilerAdditionalArguments")
257 .HasColumnType(
"TEXT");
259 b.Property<
int>(
"DMApiValidationMode")
260 .HasColumnType(
"INTEGER");
262 b.Property<
long>(
"InstanceId")
263 .HasColumnType(
"INTEGER");
265 b.Property<
string>(
"ProjectName")
267 .HasColumnType(
"TEXT");
269 b.Property<TimeSpan?>(
"Timeout")
271 .HasColumnType(
"TEXT");
275 b.HasIndex(
"InstanceId")
278 b.ToTable(
"DreamMakerSettings");
281 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
283 b.Property<
long?>(
"Id")
284 .ValueGeneratedOnAdd()
285 .HasColumnType(
"INTEGER");
287 b.Property<
string>(
"AutoStartCron")
290 .HasColumnType(
"TEXT");
292 b.Property<
string>(
"AutoStopCron")
295 .HasColumnType(
"TEXT");
297 b.Property<
string>(
"AutoUpdateCron")
300 .HasColumnType(
"TEXT");
302 b.Property<uint?>(
"AutoUpdateInterval")
304 .HasColumnType(
"INTEGER");
306 b.Property<ushort?>(
"ChatBotLimit")
308 .HasColumnType(
"INTEGER");
310 b.Property<
int>(
"ConfigurationType")
311 .HasColumnType(
"INTEGER");
313 b.Property<
string>(
"Name")
316 .HasColumnType(
"TEXT");
318 b.Property<
bool?>(
"Online")
320 .HasColumnType(
"INTEGER");
322 b.Property<
string>(
"Path")
324 .HasColumnType(
"TEXT");
326 b.Property<
string>(
"SwarmIdentifer")
327 .HasColumnType(
"TEXT");
331 b.HasIndex(
"Path",
"SwarmIdentifer")
334 b.ToTable(
"Instances");
337 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
339 b.Property<
long>(
"Id")
340 .ValueGeneratedOnAdd()
341 .HasColumnType(
"INTEGER");
343 b.Property<ulong>(
"ChatBotRights")
344 .HasColumnType(
"INTEGER");
346 b.Property<ulong>(
"ConfigurationRights")
347 .HasColumnType(
"INTEGER");
349 b.Property<ulong>(
"DreamDaemonRights")
350 .HasColumnType(
"INTEGER");
352 b.Property<ulong>(
"DreamMakerRights")
353 .HasColumnType(
"INTEGER");
355 b.Property<ulong>(
"EngineRights")
356 .HasColumnType(
"INTEGER");
358 b.Property<
long>(
"InstanceId")
359 .HasColumnType(
"INTEGER");
361 b.Property<ulong>(
"InstancePermissionSetRights")
362 .HasColumnType(
"INTEGER");
364 b.Property<
long>(
"PermissionSetId")
365 .HasColumnType(
"INTEGER");
367 b.Property<ulong>(
"RepositoryRights")
368 .HasColumnType(
"INTEGER");
372 b.HasIndex(
"InstanceId");
374 b.HasIndex(
"PermissionSetId",
"InstanceId")
377 b.ToTable(
"InstancePermissionSets");
380 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
382 b.Property<
long?>(
"Id")
383 .ValueGeneratedOnAdd()
384 .HasColumnType(
"INTEGER");
386 b.Property<ulong?>(
"CancelRight")
387 .HasColumnType(
"INTEGER");
389 b.Property<ulong?>(
"CancelRightsType")
390 .HasColumnType(
"INTEGER");
392 b.Property<
bool?>(
"Cancelled")
394 .HasColumnType(
"INTEGER");
396 b.Property<
long?>(
"CancelledById")
397 .HasColumnType(
"INTEGER");
399 b.Property<
string>(
"Description")
401 .HasColumnType(
"TEXT");
403 b.Property<uint?>(
"ErrorCode")
404 .HasColumnType(
"INTEGER");
406 b.Property<
string>(
"ExceptionDetails")
407 .HasColumnType(
"TEXT");
409 b.Property<
long>(
"InstanceId")
410 .HasColumnType(
"INTEGER");
412 b.Property<
byte>(
"JobCode")
413 .HasColumnType(
"INTEGER");
415 b.Property<DateTimeOffset?>(
"StartedAt")
417 .HasColumnType(
"TEXT");
419 b.Property<
long>(
"StartedById")
420 .HasColumnType(
"INTEGER");
422 b.Property<DateTimeOffset?>(
"StoppedAt")
423 .HasColumnType(
"TEXT");
427 b.HasIndex(
"CancelledById");
429 b.HasIndex(
"InstanceId");
431 b.HasIndex(
"StartedById");
436 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
438 b.Property<
long>(
"Id")
439 .ValueGeneratedOnAdd()
440 .HasColumnType(
"INTEGER");
442 b.Property<
string>(
"ExternalUserId")
445 .HasColumnType(
"TEXT");
447 b.Property<
int>(
"Provider")
448 .HasColumnType(
"INTEGER");
450 b.Property<
long>(
"UserId")
451 .HasColumnType(
"INTEGER");
455 b.HasIndex(
"UserId");
457 b.HasIndex(
"Provider",
"ExternalUserId")
460 b.ToTable(
"OAuthConnections");
463 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
465 b.Property<
long?>(
"Id")
466 .ValueGeneratedOnAdd()
467 .HasColumnType(
"INTEGER");
469 b.Property<ulong>(
"AdministrationRights")
470 .HasColumnType(
"INTEGER");
472 b.Property<
long?>(
"GroupId")
473 .HasColumnType(
"INTEGER");
475 b.Property<ulong>(
"InstanceManagerRights")
476 .HasColumnType(
"INTEGER");
478 b.Property<
long?>(
"UserId")
479 .HasColumnType(
"INTEGER");
483 b.HasIndex(
"GroupId")
489 b.ToTable(
"PermissionSets");
492 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
494 b.Property<
long?>(
"Id")
495 .ValueGeneratedOnAdd()
496 .HasColumnType(
"INTEGER");
498 b.Property<
string>(
"AccessIdentifier")
500 .HasColumnType(
"TEXT");
502 b.Property<
long>(
"CompileJobId")
503 .HasColumnType(
"INTEGER");
505 b.Property<
long?>(
"InitialCompileJobId")
506 .HasColumnType(
"INTEGER");
508 b.Property<
int>(
"LaunchSecurityLevel")
509 .HasColumnType(
"INTEGER");
511 b.Property<
int>(
"LaunchVisibility")
512 .HasColumnType(
"INTEGER");
514 b.Property<ushort>(
"Port")
515 .HasColumnType(
"INTEGER");
517 b.Property<
int>(
"ProcessId")
518 .HasColumnType(
"INTEGER");
520 b.Property<
int>(
"RebootState")
521 .HasColumnType(
"INTEGER");
523 b.Property<ushort?>(
"TopicPort")
524 .HasColumnType(
"INTEGER");
528 b.HasIndex(
"CompileJobId");
530 b.HasIndex(
"InitialCompileJobId");
532 b.ToTable(
"ReattachInformations");
535 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
537 b.Property<
long>(
"Id")
538 .ValueGeneratedOnAdd()
539 .HasColumnType(
"INTEGER");
541 b.Property<
string>(
"AccessToken")
543 .HasColumnType(
"TEXT");
545 b.Property<
string>(
"AccessUser")
547 .HasColumnType(
"TEXT");
549 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
551 .HasColumnType(
"INTEGER");
553 b.Property<
bool?>(
"AutoUpdatesSynchronize")
555 .HasColumnType(
"INTEGER");
557 b.Property<
string>(
"CommitterEmail")
560 .HasColumnType(
"TEXT");
562 b.Property<
string>(
"CommitterName")
565 .HasColumnType(
"TEXT");
567 b.Property<
bool?>(
"CreateGitHubDeployments")
569 .HasColumnType(
"INTEGER");
571 b.Property<
long>(
"InstanceId")
572 .HasColumnType(
"INTEGER");
574 b.Property<
bool?>(
"PostTestMergeComment")
576 .HasColumnType(
"INTEGER");
578 b.Property<
bool?>(
"PushTestMergeCommits")
580 .HasColumnType(
"INTEGER");
582 b.Property<
bool?>(
"ShowTestMergeCommitters")
584 .HasColumnType(
"INTEGER");
586 b.Property<
bool?>(
"UpdateSubmodules")
588 .HasColumnType(
"INTEGER");
592 b.HasIndex(
"InstanceId")
595 b.ToTable(
"RepositorySettings");
598 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
600 b.Property<
long>(
"Id")
601 .ValueGeneratedOnAdd()
602 .HasColumnType(
"INTEGER");
604 b.Property<
long>(
"RevisionInformationId")
605 .HasColumnType(
"INTEGER");
607 b.Property<
long>(
"TestMergeId")
608 .HasColumnType(
"INTEGER");
612 b.HasIndex(
"RevisionInformationId");
614 b.HasIndex(
"TestMergeId");
616 b.ToTable(
"RevInfoTestMerges");
619 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
621 b.Property<
long>(
"Id")
622 .ValueGeneratedOnAdd()
623 .HasColumnType(
"INTEGER");
625 b.Property<
string>(
"CommitSha")
628 .HasColumnType(
"TEXT");
630 b.Property<
long>(
"InstanceId")
631 .HasColumnType(
"INTEGER");
633 b.Property<
string>(
"OriginCommitSha")
636 .HasColumnType(
"TEXT");
638 b.Property<DateTimeOffset>(
"Timestamp")
639 .HasColumnType(
"TEXT");
643 b.HasIndex(
"InstanceId",
"CommitSha")
646 b.ToTable(
"RevisionInformations");
649 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
651 b.Property<
long>(
"Id")
652 .ValueGeneratedOnAdd()
653 .HasColumnType(
"INTEGER");
655 b.Property<
string>(
"Author")
657 .HasColumnType(
"TEXT");
659 b.Property<
string>(
"BodyAtMerge")
661 .HasColumnType(
"TEXT");
663 b.Property<
string>(
"Comment")
665 .HasColumnType(
"TEXT");
667 b.Property<DateTimeOffset>(
"MergedAt")
668 .HasColumnType(
"TEXT");
670 b.Property<
long>(
"MergedById")
671 .HasColumnType(
"INTEGER");
673 b.Property<
int>(
"Number")
674 .HasColumnType(
"INTEGER");
676 b.Property<
long?>(
"PrimaryRevisionInformationId")
678 .HasColumnType(
"INTEGER");
680 b.Property<
string>(
"TargetCommitSha")
683 .HasColumnType(
"TEXT");
685 b.Property<
string>(
"TitleAtMerge")
687 .HasColumnType(
"TEXT");
689 b.Property<
string>(
"Url")
691 .HasColumnType(
"TEXT");
695 b.HasIndex(
"MergedById");
697 b.HasIndex(
"PrimaryRevisionInformationId")
700 b.ToTable(
"TestMerges");
703 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
705 b.Property<
long?>(
"Id")
706 .ValueGeneratedOnAdd()
707 .HasColumnType(
"INTEGER");
709 b.Property<
string>(
"CanonicalName")
712 .HasColumnType(
"TEXT");
714 b.Property<DateTimeOffset?>(
"CreatedAt")
716 .HasColumnType(
"TEXT");
718 b.Property<
long?>(
"CreatedById")
719 .HasColumnType(
"INTEGER");
721 b.Property<
bool?>(
"Enabled")
723 .HasColumnType(
"INTEGER");
725 b.Property<
long?>(
"GroupId")
726 .HasColumnType(
"INTEGER");
728 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
729 .HasColumnType(
"TEXT");
731 b.Property<
string>(
"Name")
734 .HasColumnType(
"TEXT");
736 b.Property<
string>(
"PasswordHash")
737 .HasColumnType(
"TEXT");
739 b.Property<
string>(
"SystemIdentifier")
741 .HasColumnType(
"TEXT");
745 b.HasIndex(
"CanonicalName")
748 b.HasIndex(
"CreatedById");
750 b.HasIndex(
"GroupId");
752 b.HasIndex(
"SystemIdentifier")
758 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
760 b.Property<
long?>(
"Id")
761 .ValueGeneratedOnAdd()
762 .HasColumnType(
"INTEGER");
764 b.Property<
string>(
"Name")
767 .HasColumnType(
"TEXT");
777 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
779 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
780 .WithMany(
"ChatSettings")
781 .HasForeignKey(
"InstanceId")
782 .OnDelete(DeleteBehavior.Cascade)
785 b.Navigation(
"Instance");
788 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
790 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
791 .WithMany(
"Channels")
792 .HasForeignKey(
"ChatSettingsId")
793 .OnDelete(DeleteBehavior.Cascade)
796 b.Navigation(
"ChatSettings");
799 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
801 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
803 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
804 .OnDelete(DeleteBehavior.Cascade)
807 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
808 .WithMany(
"CompileJobs")
809 .HasForeignKey(
"RevisionInformationId")
810 .OnDelete(DeleteBehavior.ClientNoAction)
815 b.Navigation(
"RevisionInformation");
818 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
820 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
821 .WithOne(
"DreamDaemonSettings")
822 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
823 .OnDelete(DeleteBehavior.Cascade)
826 b.Navigation(
"Instance");
829 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
831 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
832 .WithOne(
"DreamMakerSettings")
833 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
834 .OnDelete(DeleteBehavior.Cascade)
837 b.Navigation(
"Instance");
840 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
842 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
843 .WithMany(
"InstancePermissionSets")
844 .HasForeignKey(
"InstanceId")
845 .OnDelete(DeleteBehavior.Cascade)
848 b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet",
"PermissionSet")
849 .WithMany(
"InstancePermissionSets")
850 .HasForeignKey(
"PermissionSetId")
851 .OnDelete(DeleteBehavior.Cascade)
854 b.Navigation(
"Instance");
856 b.Navigation(
"PermissionSet");
859 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
861 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
863 .HasForeignKey(
"CancelledById");
865 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
867 .HasForeignKey(
"InstanceId")
868 .OnDelete(DeleteBehavior.Cascade)
871 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
873 .HasForeignKey(
"StartedById")
874 .OnDelete(DeleteBehavior.Cascade)
877 b.Navigation(
"CancelledBy");
879 b.Navigation(
"Instance");
881 b.Navigation(
"StartedBy");
884 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
886 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
887 .WithMany(
"OAuthConnections")
888 .HasForeignKey(
"UserId")
889 .OnDelete(DeleteBehavior.Cascade)
892 b.Navigation(
"User");
895 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
897 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
898 .WithOne(
"PermissionSet")
899 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"GroupId")
900 .OnDelete(DeleteBehavior.Cascade);
902 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
903 .WithOne(
"PermissionSet")
904 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"UserId")
905 .OnDelete(DeleteBehavior.Cascade);
907 b.Navigation(
"Group");
909 b.Navigation(
"User");
912 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
914 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
916 .HasForeignKey(
"CompileJobId")
917 .OnDelete(DeleteBehavior.Cascade)
920 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"InitialCompileJob")
922 .HasForeignKey(
"InitialCompileJobId");
924 b.Navigation(
"CompileJob");
926 b.Navigation(
"InitialCompileJob");
929 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
931 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
932 .WithOne(
"RepositorySettings")
933 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
934 .OnDelete(DeleteBehavior.Cascade)
937 b.Navigation(
"Instance");
940 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
942 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
943 .WithMany(
"ActiveTestMerges")
944 .HasForeignKey(
"RevisionInformationId")
945 .OnDelete(DeleteBehavior.Cascade)
948 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
949 .WithMany(
"RevisonInformations")
950 .HasForeignKey(
"TestMergeId")
951 .OnDelete(DeleteBehavior.ClientNoAction)
954 b.Navigation(
"RevisionInformation");
956 b.Navigation(
"TestMerge");
959 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
961 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
962 .WithMany(
"RevisionInformations")
963 .HasForeignKey(
"InstanceId")
964 .OnDelete(DeleteBehavior.Cascade)
967 b.Navigation(
"Instance");
970 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
972 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
973 .WithMany(
"TestMerges")
974 .HasForeignKey(
"MergedById")
975 .OnDelete(DeleteBehavior.Restrict)
978 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
979 .WithOne(
"PrimaryTestMerge")
980 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
981 .OnDelete(DeleteBehavior.Cascade)
984 b.Navigation(
"MergedBy");
986 b.Navigation(
"PrimaryRevisionInformation");
989 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
991 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
992 .WithMany(
"CreatedUsers")
993 .HasForeignKey(
"CreatedById");
995 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
997 .HasForeignKey(
"GroupId");
999 b.Navigation(
"CreatedBy");
1001 b.Navigation(
"Group");
1004 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
1006 b.Navigation(
"Channels");
1009 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
1011 b.Navigation(
"ChatSettings");
1013 b.Navigation(
"DreamDaemonSettings");
1015 b.Navigation(
"DreamMakerSettings");
1017 b.Navigation(
"InstancePermissionSets");
1019 b.Navigation(
"Jobs");
1021 b.Navigation(
"RepositorySettings");
1023 b.Navigation(
"RevisionInformations");
1026 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
1028 b.Navigation(
"InstancePermissionSets");
1031 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1033 b.Navigation(
"ActiveTestMerges");
1035 b.Navigation(
"CompileJobs");
1037 b.Navigation(
"PrimaryTestMerge");
1040 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1042 b.Navigation(
"RevisonInformations");
1045 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1047 b.Navigation(
"CreatedUsers");
1049 b.Navigation(
"OAuthConnections");
1051 b.Navigation(
"PermissionSet");
1053 b.Navigation(
"TestMerges");
1056 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
1058 b.Navigation(
"PermissionSet")
1061 b.Navigation(
"Users");
1063#pragma warning restore 612, 618