17#pragma warning disable 612, 618
19 .HasAnnotation(
"ProductVersion",
"8.0.1")
20 .HasAnnotation(
"Relational:MaxIdentifierLength", 128);
22 SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
24 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
26 b.Property<
long?>(
"Id")
27 .ValueGeneratedOnAdd()
28 .HasColumnType(
"bigint");
30 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
32 b.Property<
int>(
"ChannelLimit")
33 .HasColumnType(
"int");
35 b.Property<
string>(
"ConnectionString")
38 .HasColumnType(
"nvarchar(max)");
40 b.Property<
bool?>(
"Enabled")
41 .HasColumnType(
"bit");
43 b.Property<
long>(
"InstanceId")
44 .HasColumnType(
"bigint");
46 b.Property<
string>(
"Name")
49 .HasColumnType(
"nvarchar(100)");
51 b.Property<
int>(
"Provider")
52 .HasColumnType(
"int");
54 b.Property<
long>(
"ReconnectionInterval")
55 .HasColumnType(
"bigint");
59 b.HasIndex(
"InstanceId",
"Name")
62 b.ToTable(
"ChatBots");
65 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
67 b.Property<
long>(
"Id")
68 .ValueGeneratedOnAdd()
69 .HasColumnType(
"bigint");
71 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
73 b.Property<
long>(
"ChatSettingsId")
74 .HasColumnType(
"bigint");
76 b.Property<decimal?>(
"DiscordChannelId")
77 .HasColumnType(
"decimal(20,0)");
79 b.Property<
string>(
"IrcChannel")
81 .HasColumnType(
"nvarchar(100)");
83 b.Property<
bool?>(
"IsAdminChannel")
85 .HasColumnType(
"bit");
87 b.Property<
bool?>(
"IsSystemChannel")
89 .HasColumnType(
"bit");
91 b.Property<
bool?>(
"IsUpdatesChannel")
93 .HasColumnType(
"bit");
95 b.Property<
bool?>(
"IsWatchdogChannel")
97 .HasColumnType(
"bit");
99 b.Property<
string>(
"Tag")
101 .HasColumnType(
"nvarchar(max)");
105 b.HasIndex(
"ChatSettingsId",
"DiscordChannelId")
107 .HasFilter(
"[DiscordChannelId] IS NOT NULL");
109 b.HasIndex(
"ChatSettingsId",
"IrcChannel")
111 .HasFilter(
"[IrcChannel] IS NOT NULL");
113 b.ToTable(
"ChatChannels");
116 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
118 b.Property<
long?>(
"Id")
119 .ValueGeneratedOnAdd()
120 .HasColumnType(
"bigint");
122 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
124 b.Property<
int?>(
"DMApiMajorVersion")
125 .HasColumnType(
"int");
127 b.Property<
int?>(
"DMApiMinorVersion")
128 .HasColumnType(
"int");
130 b.Property<
int?>(
"DMApiPatchVersion")
131 .HasColumnType(
"int");
133 b.Property<Guid?>(
"DirectoryName")
135 .HasColumnType(
"uniqueidentifier");
137 b.Property<
string>(
"DmeName")
139 .HasColumnType(
"nvarchar(max)");
141 b.Property<
string>(
"EngineVersion")
143 .HasColumnType(
"nvarchar(max)");
145 b.Property<
int?>(
"GitHubDeploymentId")
146 .HasColumnType(
"int");
148 b.Property<
long?>(
"GitHubRepoId")
149 .HasColumnType(
"bigint");
151 b.Property<
long>(
"JobId")
152 .HasColumnType(
"bigint");
154 b.Property<
int?>(
"MinimumSecurityLevel")
155 .HasColumnType(
"int");
157 b.Property<
string>(
"Output")
159 .HasColumnType(
"nvarchar(max)");
161 b.Property<
string>(
"RepositoryOrigin")
162 .HasColumnType(
"nvarchar(max)");
164 b.Property<
long>(
"RevisionInformationId")
165 .HasColumnType(
"bigint");
169 b.HasIndex(
"DirectoryName");
174 b.HasIndex(
"RevisionInformationId");
176 b.ToTable(
"CompileJobs");
179 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
181 b.Property<
long>(
"Id")
182 .ValueGeneratedOnAdd()
183 .HasColumnType(
"bigint");
185 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
187 b.Property<
string>(
"AdditionalParameters")
190 .HasColumnType(
"nvarchar(max)");
192 b.Property<
bool?>(
"AllowWebClient")
194 .HasColumnType(
"bit");
196 b.Property<
bool?>(
"AutoStart")
198 .HasColumnType(
"bit");
200 b.Property<
bool?>(
"DumpOnHealthCheckRestart")
202 .HasColumnType(
"bit");
204 b.Property<
long>(
"HealthCheckSeconds")
205 .HasColumnType(
"bigint");
207 b.Property<
long>(
"InstanceId")
208 .HasColumnType(
"bigint");
210 b.Property<
bool?>(
"LogOutput")
212 .HasColumnType(
"bit");
214 b.Property<
long>(
"MapThreads")
215 .HasColumnType(
"bigint");
217 b.Property<
bool?>(
"Minidumps")
219 .HasColumnType(
"bit");
221 b.Property<
int>(
"Port")
222 .HasColumnType(
"int");
224 b.Property<
int>(
"SecurityLevel")
225 .HasColumnType(
"int");
227 b.Property<
bool?>(
"StartProfiler")
229 .HasColumnType(
"bit");
231 b.Property<
long>(
"StartupTimeout")
232 .HasColumnType(
"bigint");
234 b.Property<
long>(
"TopicRequestTimeout")
235 .HasColumnType(
"bigint");
237 b.Property<
int>(
"Visibility")
238 .HasColumnType(
"int");
242 b.HasIndex(
"InstanceId")
245 b.ToTable(
"DreamDaemonSettings");
248 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
250 b.Property<
long>(
"Id")
251 .ValueGeneratedOnAdd()
252 .HasColumnType(
"bigint");
254 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
256 b.Property<
int>(
"ApiValidationPort")
257 .HasColumnType(
"int");
259 b.Property<
int>(
"ApiValidationSecurityLevel")
260 .HasColumnType(
"int");
262 b.Property<
long>(
"InstanceId")
263 .HasColumnType(
"bigint");
265 b.Property<
string>(
"ProjectName")
267 .HasColumnType(
"nvarchar(max)");
269 b.Property<
bool?>(
"RequireDMApiValidation")
271 .HasColumnType(
"bit");
273 b.Property<TimeSpan?>(
"Timeout")
275 .HasColumnType(
"time");
279 b.HasIndex(
"InstanceId")
282 b.ToTable(
"DreamMakerSettings");
285 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
287 b.Property<
long?>(
"Id")
288 .ValueGeneratedOnAdd()
289 .HasColumnType(
"bigint");
291 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
293 b.Property<
long>(
"AutoUpdateInterval")
294 .HasColumnType(
"bigint");
296 b.Property<
int>(
"ChatBotLimit")
297 .HasColumnType(
"int");
299 b.Property<
int>(
"ConfigurationType")
300 .HasColumnType(
"int");
302 b.Property<
string>(
"Name")
305 .HasColumnType(
"nvarchar(100)");
307 b.Property<
bool?>(
"Online")
309 .HasColumnType(
"bit");
311 b.Property<
string>(
"Path")
313 .HasColumnType(
"nvarchar(450)");
315 b.Property<
string>(
"SwarmIdentifer")
316 .HasColumnType(
"nvarchar(450)");
320 b.HasIndex(
"Path",
"SwarmIdentifer")
322 .HasFilter(
"[SwarmIdentifer] IS NOT NULL");
324 b.ToTable(
"Instances");
327 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
329 b.Property<
long>(
"Id")
330 .ValueGeneratedOnAdd()
331 .HasColumnType(
"bigint");
333 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
335 b.Property<decimal>(
"ChatBotRights")
336 .HasColumnType(
"decimal(20,0)");
338 b.Property<decimal>(
"ConfigurationRights")
339 .HasColumnType(
"decimal(20,0)");
341 b.Property<decimal>(
"DreamDaemonRights")
342 .HasColumnType(
"decimal(20,0)");
344 b.Property<decimal>(
"DreamMakerRights")
345 .HasColumnType(
"decimal(20,0)");
347 b.Property<decimal>(
"EngineRights")
348 .HasColumnType(
"decimal(20,0)");
350 b.Property<
long>(
"InstanceId")
351 .HasColumnType(
"bigint");
353 b.Property<decimal>(
"InstancePermissionSetRights")
354 .HasColumnType(
"decimal(20,0)");
356 b.Property<
long>(
"PermissionSetId")
357 .HasColumnType(
"bigint");
359 b.Property<decimal>(
"RepositoryRights")
360 .HasColumnType(
"decimal(20,0)");
364 b.HasIndex(
"InstanceId");
366 b.HasIndex(
"PermissionSetId",
"InstanceId")
369 b.ToTable(
"InstancePermissionSets");
372 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
374 b.Property<
long?>(
"Id")
375 .ValueGeneratedOnAdd()
376 .HasColumnType(
"bigint");
378 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
380 b.Property<decimal?>(
"CancelRight")
381 .HasColumnType(
"decimal(20,0)");
383 b.Property<decimal?>(
"CancelRightsType")
384 .HasColumnType(
"decimal(20,0)");
386 b.Property<
bool?>(
"Cancelled")
388 .HasColumnType(
"bit");
390 b.Property<
long?>(
"CancelledById")
391 .HasColumnType(
"bigint");
393 b.Property<
string>(
"Description")
395 .HasColumnType(
"nvarchar(max)");
397 b.Property<
long?>(
"ErrorCode")
398 .HasColumnType(
"bigint");
400 b.Property<
string>(
"ExceptionDetails")
401 .HasColumnType(
"nvarchar(max)");
403 b.Property<
long>(
"InstanceId")
404 .HasColumnType(
"bigint");
406 b.Property<
byte>(
"JobCode")
407 .HasColumnType(
"tinyint");
409 b.Property<DateTimeOffset?>(
"StartedAt")
411 .HasColumnType(
"datetimeoffset");
413 b.Property<
long>(
"StartedById")
414 .HasColumnType(
"bigint");
416 b.Property<DateTimeOffset?>(
"StoppedAt")
417 .HasColumnType(
"datetimeoffset");
421 b.HasIndex(
"CancelledById");
423 b.HasIndex(
"InstanceId");
425 b.HasIndex(
"StartedById");
430 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
432 b.Property<
long>(
"Id")
433 .ValueGeneratedOnAdd()
434 .HasColumnType(
"bigint");
436 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
438 b.Property<
string>(
"ExternalUserId")
441 .HasColumnType(
"nvarchar(100)");
443 b.Property<
int>(
"Provider")
444 .HasColumnType(
"int");
446 b.Property<
long?>(
"UserId")
447 .HasColumnType(
"bigint");
451 b.HasIndex(
"UserId");
453 b.HasIndex(
"Provider",
"ExternalUserId")
456 b.ToTable(
"OAuthConnections");
459 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
461 b.Property<
long?>(
"Id")
462 .ValueGeneratedOnAdd()
463 .HasColumnType(
"bigint");
465 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
467 b.Property<decimal>(
"AdministrationRights")
468 .HasColumnType(
"decimal(20,0)");
470 b.Property<
long?>(
"GroupId")
471 .HasColumnType(
"bigint");
473 b.Property<decimal>(
"InstanceManagerRights")
474 .HasColumnType(
"decimal(20,0)");
476 b.Property<
long?>(
"UserId")
477 .HasColumnType(
"bigint");
481 b.HasIndex(
"GroupId")
483 .HasFilter(
"[GroupId] IS NOT NULL");
487 .HasFilter(
"[UserId] IS NOT NULL");
489 b.ToTable(
"PermissionSets");
492 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
494 b.Property<
long?>(
"Id")
495 .ValueGeneratedOnAdd()
496 .HasColumnType(
"bigint");
498 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
500 b.Property<
string>(
"AccessIdentifier")
502 .HasColumnType(
"nvarchar(max)");
504 b.Property<
long>(
"CompileJobId")
505 .HasColumnType(
"bigint");
507 b.Property<
long?>(
"InitialCompileJobId")
508 .HasColumnType(
"bigint");
510 b.Property<
int>(
"LaunchSecurityLevel")
511 .HasColumnType(
"int");
513 b.Property<
int>(
"LaunchVisibility")
514 .HasColumnType(
"int");
516 b.Property<
int>(
"Port")
517 .HasColumnType(
"int");
519 b.Property<
int>(
"ProcessId")
520 .HasColumnType(
"int");
522 b.Property<
int>(
"RebootState")
523 .HasColumnType(
"int");
525 b.Property<
int?>(
"TopicPort")
526 .HasColumnType(
"int");
530 b.HasIndex(
"CompileJobId");
532 b.HasIndex(
"InitialCompileJobId");
534 b.ToTable(
"ReattachInformations");
537 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
539 b.Property<
long>(
"Id")
540 .ValueGeneratedOnAdd()
541 .HasColumnType(
"bigint");
543 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
545 b.Property<
string>(
"AccessToken")
547 .HasColumnType(
"nvarchar(max)");
549 b.Property<
string>(
"AccessUser")
551 .HasColumnType(
"nvarchar(max)");
553 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
555 .HasColumnType(
"bit");
557 b.Property<
bool?>(
"AutoUpdatesSynchronize")
559 .HasColumnType(
"bit");
561 b.Property<
string>(
"CommitterEmail")
564 .HasColumnType(
"nvarchar(max)");
566 b.Property<
string>(
"CommitterName")
569 .HasColumnType(
"nvarchar(max)");
571 b.Property<
bool?>(
"CreateGitHubDeployments")
573 .HasColumnType(
"bit");
575 b.Property<
long>(
"InstanceId")
576 .HasColumnType(
"bigint");
578 b.Property<
bool?>(
"PostTestMergeComment")
580 .HasColumnType(
"bit");
582 b.Property<
bool?>(
"PushTestMergeCommits")
584 .HasColumnType(
"bit");
586 b.Property<
bool?>(
"ShowTestMergeCommitters")
588 .HasColumnType(
"bit");
590 b.Property<
bool?>(
"UpdateSubmodules")
592 .HasColumnType(
"bit");
596 b.HasIndex(
"InstanceId")
599 b.ToTable(
"RepositorySettings");
602 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
604 b.Property<
long>(
"Id")
605 .ValueGeneratedOnAdd()
606 .HasColumnType(
"bigint");
608 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
610 b.Property<
long>(
"RevisionInformationId")
611 .HasColumnType(
"bigint");
613 b.Property<
long>(
"TestMergeId")
614 .HasColumnType(
"bigint");
618 b.HasIndex(
"RevisionInformationId");
620 b.HasIndex(
"TestMergeId");
622 b.ToTable(
"RevInfoTestMerges");
625 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
627 b.Property<
long>(
"Id")
628 .ValueGeneratedOnAdd()
629 .HasColumnType(
"bigint");
631 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
633 b.Property<
string>(
"CommitSha")
636 .HasColumnType(
"nvarchar(40)");
638 b.Property<
long>(
"InstanceId")
639 .HasColumnType(
"bigint");
641 b.Property<
string>(
"OriginCommitSha")
644 .HasColumnType(
"nvarchar(40)");
646 b.Property<DateTimeOffset>(
"Timestamp")
647 .HasColumnType(
"datetimeoffset");
651 b.HasIndex(
"InstanceId",
"CommitSha")
654 b.ToTable(
"RevisionInformations");
657 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
659 b.Property<
long>(
"Id")
660 .ValueGeneratedOnAdd()
661 .HasColumnType(
"bigint");
663 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
665 b.Property<
string>(
"Author")
667 .HasColumnType(
"nvarchar(max)");
669 b.Property<
string>(
"BodyAtMerge")
671 .HasColumnType(
"nvarchar(max)");
673 b.Property<
string>(
"Comment")
675 .HasColumnType(
"nvarchar(max)");
677 b.Property<DateTimeOffset>(
"MergedAt")
678 .HasColumnType(
"datetimeoffset");
680 b.Property<
long>(
"MergedById")
681 .HasColumnType(
"bigint");
683 b.Property<
int>(
"Number")
684 .HasColumnType(
"int");
686 b.Property<
long?>(
"PrimaryRevisionInformationId")
688 .HasColumnType(
"bigint");
690 b.Property<
string>(
"TargetCommitSha")
693 .HasColumnType(
"nvarchar(40)");
695 b.Property<
string>(
"TitleAtMerge")
697 .HasColumnType(
"nvarchar(max)");
699 b.Property<
string>(
"Url")
701 .HasColumnType(
"nvarchar(max)");
705 b.HasIndex(
"MergedById");
707 b.HasIndex(
"PrimaryRevisionInformationId")
710 b.ToTable(
"TestMerges");
713 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
715 b.Property<
long?>(
"Id")
716 .ValueGeneratedOnAdd()
717 .HasColumnType(
"bigint");
719 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
721 b.Property<
string>(
"CanonicalName")
724 .HasColumnType(
"nvarchar(100)");
726 b.Property<DateTimeOffset?>(
"CreatedAt")
728 .HasColumnType(
"datetimeoffset");
730 b.Property<
long?>(
"CreatedById")
731 .HasColumnType(
"bigint");
733 b.Property<
bool?>(
"Enabled")
735 .HasColumnType(
"bit");
737 b.Property<
long?>(
"GroupId")
738 .HasColumnType(
"bigint");
740 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
741 .HasColumnType(
"datetimeoffset");
743 b.Property<
string>(
"Name")
746 .HasColumnType(
"nvarchar(100)");
748 b.Property<
string>(
"PasswordHash")
749 .HasColumnType(
"nvarchar(max)");
751 b.Property<
string>(
"SystemIdentifier")
753 .HasColumnType(
"nvarchar(100)");
757 b.HasIndex(
"CanonicalName")
760 b.HasIndex(
"CreatedById");
762 b.HasIndex(
"GroupId");
764 b.HasIndex(
"SystemIdentifier")
766 .HasFilter(
"[SystemIdentifier] IS NOT NULL");
771 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
773 b.Property<
long?>(
"Id")
774 .ValueGeneratedOnAdd()
775 .HasColumnType(
"bigint");
777 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
779 b.Property<
string>(
"Name")
782 .HasColumnType(
"nvarchar(100)");
792 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
794 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
795 .WithMany(
"ChatSettings")
796 .HasForeignKey(
"InstanceId")
797 .OnDelete(DeleteBehavior.Cascade)
800 b.Navigation(
"Instance");
803 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
805 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
806 .WithMany(
"Channels")
807 .HasForeignKey(
"ChatSettingsId")
808 .OnDelete(DeleteBehavior.Cascade)
811 b.Navigation(
"ChatSettings");
814 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
816 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
818 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
819 .OnDelete(DeleteBehavior.Cascade)
822 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
823 .WithMany(
"CompileJobs")
824 .HasForeignKey(
"RevisionInformationId")
825 .OnDelete(DeleteBehavior.ClientNoAction)
830 b.Navigation(
"RevisionInformation");
833 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
835 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
836 .WithOne(
"DreamDaemonSettings")
837 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
838 .OnDelete(DeleteBehavior.Cascade)
841 b.Navigation(
"Instance");
844 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
846 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
847 .WithOne(
"DreamMakerSettings")
848 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
849 .OnDelete(DeleteBehavior.Cascade)
852 b.Navigation(
"Instance");
855 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
857 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
858 .WithMany(
"InstancePermissionSets")
859 .HasForeignKey(
"InstanceId")
860 .OnDelete(DeleteBehavior.Cascade)
863 b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet",
"PermissionSet")
864 .WithMany(
"InstancePermissionSets")
865 .HasForeignKey(
"PermissionSetId")
866 .OnDelete(DeleteBehavior.Cascade)
869 b.Navigation(
"Instance");
871 b.Navigation(
"PermissionSet");
874 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
876 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
878 .HasForeignKey(
"CancelledById");
880 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
882 .HasForeignKey(
"InstanceId")
883 .OnDelete(DeleteBehavior.Cascade)
886 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
888 .HasForeignKey(
"StartedById")
889 .OnDelete(DeleteBehavior.Cascade)
892 b.Navigation(
"CancelledBy");
894 b.Navigation(
"Instance");
896 b.Navigation(
"StartedBy");
899 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
901 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
902 .WithMany(
"OAuthConnections")
903 .HasForeignKey(
"UserId")
904 .OnDelete(DeleteBehavior.Cascade);
906 b.Navigation(
"User");
909 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
911 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
912 .WithOne(
"PermissionSet")
913 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"GroupId")
914 .OnDelete(DeleteBehavior.Cascade);
916 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
917 .WithOne(
"PermissionSet")
918 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"UserId")
919 .OnDelete(DeleteBehavior.Cascade);
921 b.Navigation(
"Group");
923 b.Navigation(
"User");
926 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
928 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
930 .HasForeignKey(
"CompileJobId")
931 .OnDelete(DeleteBehavior.Cascade)
934 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"InitialCompileJob")
936 .HasForeignKey(
"InitialCompileJobId");
938 b.Navigation(
"CompileJob");
940 b.Navigation(
"InitialCompileJob");
943 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
945 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
946 .WithOne(
"RepositorySettings")
947 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
948 .OnDelete(DeleteBehavior.Cascade)
951 b.Navigation(
"Instance");
954 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
956 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
957 .WithMany(
"ActiveTestMerges")
958 .HasForeignKey(
"RevisionInformationId")
959 .OnDelete(DeleteBehavior.Cascade)
962 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
963 .WithMany(
"RevisonInformations")
964 .HasForeignKey(
"TestMergeId")
965 .OnDelete(DeleteBehavior.ClientNoAction)
968 b.Navigation(
"RevisionInformation");
970 b.Navigation(
"TestMerge");
973 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
975 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
976 .WithMany(
"RevisionInformations")
977 .HasForeignKey(
"InstanceId")
978 .OnDelete(DeleteBehavior.Cascade)
981 b.Navigation(
"Instance");
984 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
986 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
987 .WithMany(
"TestMerges")
988 .HasForeignKey(
"MergedById")
989 .OnDelete(DeleteBehavior.Restrict)
992 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
993 .WithOne(
"PrimaryTestMerge")
994 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
995 .OnDelete(DeleteBehavior.Cascade)
998 b.Navigation(
"MergedBy");
1000 b.Navigation(
"PrimaryRevisionInformation");
1003 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1005 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
1006 .WithMany(
"CreatedUsers")
1007 .HasForeignKey(
"CreatedById");
1009 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
1011 .HasForeignKey(
"GroupId");
1013 b.Navigation(
"CreatedBy");
1015 b.Navigation(
"Group");
1018 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
1020 b.Navigation(
"Channels");
1023 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
1025 b.Navigation(
"ChatSettings");
1027 b.Navigation(
"DreamDaemonSettings");
1029 b.Navigation(
"DreamMakerSettings");
1031 b.Navigation(
"InstancePermissionSets");
1033 b.Navigation(
"Jobs");
1035 b.Navigation(
"RepositorySettings");
1037 b.Navigation(
"RevisionInformations");
1040 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
1042 b.Navigation(
"InstancePermissionSets");
1045 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1047 b.Navigation(
"ActiveTestMerges");
1049 b.Navigation(
"CompileJobs");
1051 b.Navigation(
"PrimaryTestMerge");
1054 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1056 b.Navigation(
"RevisonInformations");
1059 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1061 b.Navigation(
"CreatedUsers");
1063 b.Navigation(
"OAuthConnections");
1065 b.Navigation(
"PermissionSet");
1067 b.Navigation(
"TestMerges");
1070 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
1072 b.Navigation(
"PermissionSet")
1075 b.Navigation(
"Users");
1077#pragma warning restore 612, 618