17#pragma warning disable 612, 618
19 .HasAnnotation(
"ProductVersion",
"8.0.10")
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<
long?>(
"GitHubDeploymentId")
146 .HasColumnType(
"bigint");
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>(
"OpenDreamTopicPort")
222 .HasColumnType(
"int");
224 b.Property<
int>(
"Port")
225 .HasColumnType(
"int");
227 b.Property<
int>(
"SecurityLevel")
228 .HasColumnType(
"int");
230 b.Property<
bool?>(
"StartProfiler")
232 .HasColumnType(
"bit");
234 b.Property<
long>(
"StartupTimeout")
235 .HasColumnType(
"bigint");
237 b.Property<
long>(
"TopicRequestTimeout")
238 .HasColumnType(
"bigint");
240 b.Property<
int>(
"Visibility")
241 .HasColumnType(
"int");
245 b.HasIndex(
"InstanceId")
248 b.ToTable(
"DreamDaemonSettings");
251 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
253 b.Property<
long>(
"Id")
254 .ValueGeneratedOnAdd()
255 .HasColumnType(
"bigint");
257 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
259 b.Property<
int>(
"ApiValidationPort")
260 .HasColumnType(
"int");
262 b.Property<
int>(
"ApiValidationSecurityLevel")
263 .HasColumnType(
"int");
265 b.Property<
string>(
"CompilerAdditionalArguments")
267 .HasColumnType(
"nvarchar(max)");
269 b.Property<
int>(
"DMApiValidationMode")
270 .HasColumnType(
"int");
272 b.Property<
long>(
"InstanceId")
273 .HasColumnType(
"bigint");
275 b.Property<
string>(
"ProjectName")
277 .HasColumnType(
"nvarchar(max)");
279 b.Property<TimeSpan?>(
"Timeout")
281 .HasColumnType(
"time");
285 b.HasIndex(
"InstanceId")
288 b.ToTable(
"DreamMakerSettings");
291 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
293 b.Property<
long?>(
"Id")
294 .ValueGeneratedOnAdd()
295 .HasColumnType(
"bigint");
297 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
299 b.Property<
string>(
"AutoStartCron")
302 .HasColumnType(
"nvarchar(1000)");
304 b.Property<
string>(
"AutoStopCron")
307 .HasColumnType(
"nvarchar(1000)");
309 b.Property<
string>(
"AutoUpdateCron")
312 .HasColumnType(
"nvarchar(1000)");
314 b.Property<
long>(
"AutoUpdateInterval")
315 .HasColumnType(
"bigint");
317 b.Property<
int>(
"ChatBotLimit")
318 .HasColumnType(
"int");
320 b.Property<
int>(
"ConfigurationType")
321 .HasColumnType(
"int");
323 b.Property<
string>(
"Name")
326 .HasColumnType(
"nvarchar(100)");
328 b.Property<
bool?>(
"Online")
330 .HasColumnType(
"bit");
332 b.Property<
string>(
"Path")
334 .HasColumnType(
"nvarchar(450)");
336 b.Property<
string>(
"SwarmIdentifer")
337 .HasColumnType(
"nvarchar(450)");
341 b.HasIndex(
"Path",
"SwarmIdentifer")
343 .HasFilter(
"[SwarmIdentifer] IS NOT NULL");
345 b.ToTable(
"Instances");
348 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
350 b.Property<
long>(
"Id")
351 .ValueGeneratedOnAdd()
352 .HasColumnType(
"bigint");
354 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
356 b.Property<decimal>(
"ChatBotRights")
357 .HasColumnType(
"decimal(20,0)");
359 b.Property<decimal>(
"ConfigurationRights")
360 .HasColumnType(
"decimal(20,0)");
362 b.Property<decimal>(
"DreamDaemonRights")
363 .HasColumnType(
"decimal(20,0)");
365 b.Property<decimal>(
"DreamMakerRights")
366 .HasColumnType(
"decimal(20,0)");
368 b.Property<decimal>(
"EngineRights")
369 .HasColumnType(
"decimal(20,0)");
371 b.Property<
long>(
"InstanceId")
372 .HasColumnType(
"bigint");
374 b.Property<decimal>(
"InstancePermissionSetRights")
375 .HasColumnType(
"decimal(20,0)");
377 b.Property<
long>(
"PermissionSetId")
378 .HasColumnType(
"bigint");
380 b.Property<decimal>(
"RepositoryRights")
381 .HasColumnType(
"decimal(20,0)");
385 b.HasIndex(
"InstanceId");
387 b.HasIndex(
"PermissionSetId",
"InstanceId")
390 b.ToTable(
"InstancePermissionSets");
393 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
395 b.Property<
long?>(
"Id")
396 .ValueGeneratedOnAdd()
397 .HasColumnType(
"bigint");
399 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
401 b.Property<decimal?>(
"CancelRight")
402 .HasColumnType(
"decimal(20,0)");
404 b.Property<decimal?>(
"CancelRightsType")
405 .HasColumnType(
"decimal(20,0)");
407 b.Property<
bool?>(
"Cancelled")
409 .HasColumnType(
"bit");
411 b.Property<
long?>(
"CancelledById")
412 .HasColumnType(
"bigint");
414 b.Property<
string>(
"Description")
416 .HasColumnType(
"nvarchar(max)");
418 b.Property<
long?>(
"ErrorCode")
419 .HasColumnType(
"bigint");
421 b.Property<
string>(
"ExceptionDetails")
422 .HasColumnType(
"nvarchar(max)");
424 b.Property<
long>(
"InstanceId")
425 .HasColumnType(
"bigint");
427 b.Property<
byte>(
"JobCode")
428 .HasColumnType(
"tinyint");
430 b.Property<DateTimeOffset?>(
"StartedAt")
432 .HasColumnType(
"datetimeoffset");
434 b.Property<
long>(
"StartedById")
435 .HasColumnType(
"bigint");
437 b.Property<DateTimeOffset?>(
"StoppedAt")
438 .HasColumnType(
"datetimeoffset");
442 b.HasIndex(
"CancelledById");
444 b.HasIndex(
"InstanceId");
446 b.HasIndex(
"StartedById");
451 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
453 b.Property<
long>(
"Id")
454 .ValueGeneratedOnAdd()
455 .HasColumnType(
"bigint");
457 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
459 b.Property<
string>(
"ExternalUserId")
462 .HasColumnType(
"nvarchar(100)");
464 b.Property<
int>(
"Provider")
465 .HasColumnType(
"int");
467 b.Property<
long>(
"UserId")
468 .HasColumnType(
"bigint");
472 b.HasIndex(
"UserId");
474 b.HasIndex(
"Provider",
"ExternalUserId")
477 b.ToTable(
"OAuthConnections");
480 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
482 b.Property<
long?>(
"Id")
483 .ValueGeneratedOnAdd()
484 .HasColumnType(
"bigint");
486 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
488 b.Property<decimal>(
"AdministrationRights")
489 .HasColumnType(
"decimal(20,0)");
491 b.Property<
long?>(
"GroupId")
492 .HasColumnType(
"bigint");
494 b.Property<decimal>(
"InstanceManagerRights")
495 .HasColumnType(
"decimal(20,0)");
497 b.Property<
long?>(
"UserId")
498 .HasColumnType(
"bigint");
502 b.HasIndex(
"GroupId")
504 .HasFilter(
"[GroupId] IS NOT NULL");
508 .HasFilter(
"[UserId] IS NOT NULL");
510 b.ToTable(
"PermissionSets");
513 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
515 b.Property<
long?>(
"Id")
516 .ValueGeneratedOnAdd()
517 .HasColumnType(
"bigint");
519 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
521 b.Property<
string>(
"AccessIdentifier")
523 .HasColumnType(
"nvarchar(max)");
525 b.Property<
long>(
"CompileJobId")
526 .HasColumnType(
"bigint");
528 b.Property<
long?>(
"InitialCompileJobId")
529 .HasColumnType(
"bigint");
531 b.Property<
int>(
"LaunchSecurityLevel")
532 .HasColumnType(
"int");
534 b.Property<
int>(
"LaunchVisibility")
535 .HasColumnType(
"int");
537 b.Property<
int>(
"Port")
538 .HasColumnType(
"int");
540 b.Property<
int>(
"ProcessId")
541 .HasColumnType(
"int");
543 b.Property<
int>(
"RebootState")
544 .HasColumnType(
"int");
546 b.Property<
int?>(
"TopicPort")
547 .HasColumnType(
"int");
551 b.HasIndex(
"CompileJobId");
553 b.HasIndex(
"InitialCompileJobId");
555 b.ToTable(
"ReattachInformations");
558 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
560 b.Property<
long>(
"Id")
561 .ValueGeneratedOnAdd()
562 .HasColumnType(
"bigint");
564 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
566 b.Property<
string>(
"AccessToken")
568 .HasColumnType(
"nvarchar(max)");
570 b.Property<
string>(
"AccessUser")
572 .HasColumnType(
"nvarchar(max)");
574 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
576 .HasColumnType(
"bit");
578 b.Property<
bool?>(
"AutoUpdatesSynchronize")
580 .HasColumnType(
"bit");
582 b.Property<
string>(
"CommitterEmail")
585 .HasColumnType(
"nvarchar(max)");
587 b.Property<
string>(
"CommitterName")
590 .HasColumnType(
"nvarchar(max)");
592 b.Property<
bool?>(
"CreateGitHubDeployments")
594 .HasColumnType(
"bit");
596 b.Property<
long>(
"InstanceId")
597 .HasColumnType(
"bigint");
599 b.Property<
bool?>(
"PostTestMergeComment")
601 .HasColumnType(
"bit");
603 b.Property<
bool?>(
"PushTestMergeCommits")
605 .HasColumnType(
"bit");
607 b.Property<
bool?>(
"ShowTestMergeCommitters")
609 .HasColumnType(
"bit");
611 b.Property<
bool?>(
"UpdateSubmodules")
613 .HasColumnType(
"bit");
617 b.HasIndex(
"InstanceId")
620 b.ToTable(
"RepositorySettings");
623 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
625 b.Property<
long>(
"Id")
626 .ValueGeneratedOnAdd()
627 .HasColumnType(
"bigint");
629 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
631 b.Property<
long>(
"RevisionInformationId")
632 .HasColumnType(
"bigint");
634 b.Property<
long>(
"TestMergeId")
635 .HasColumnType(
"bigint");
639 b.HasIndex(
"RevisionInformationId");
641 b.HasIndex(
"TestMergeId");
643 b.ToTable(
"RevInfoTestMerges");
646 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
648 b.Property<
long>(
"Id")
649 .ValueGeneratedOnAdd()
650 .HasColumnType(
"bigint");
652 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
654 b.Property<
string>(
"CommitSha")
657 .HasColumnType(
"nvarchar(40)");
659 b.Property<
long>(
"InstanceId")
660 .HasColumnType(
"bigint");
662 b.Property<
string>(
"OriginCommitSha")
665 .HasColumnType(
"nvarchar(40)");
667 b.Property<DateTimeOffset>(
"Timestamp")
668 .HasColumnType(
"datetimeoffset");
672 b.HasIndex(
"InstanceId",
"CommitSha")
675 b.ToTable(
"RevisionInformations");
678 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
680 b.Property<
long>(
"Id")
681 .ValueGeneratedOnAdd()
682 .HasColumnType(
"bigint");
684 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
686 b.Property<
string>(
"Author")
688 .HasColumnType(
"nvarchar(max)");
690 b.Property<
string>(
"BodyAtMerge")
692 .HasColumnType(
"nvarchar(max)");
694 b.Property<
string>(
"Comment")
696 .HasColumnType(
"nvarchar(max)");
698 b.Property<DateTimeOffset>(
"MergedAt")
699 .HasColumnType(
"datetimeoffset");
701 b.Property<
long>(
"MergedById")
702 .HasColumnType(
"bigint");
704 b.Property<
int>(
"Number")
705 .HasColumnType(
"int");
707 b.Property<
long?>(
"PrimaryRevisionInformationId")
709 .HasColumnType(
"bigint");
711 b.Property<
string>(
"TargetCommitSha")
714 .HasColumnType(
"nvarchar(40)");
716 b.Property<
string>(
"TitleAtMerge")
718 .HasColumnType(
"nvarchar(max)");
720 b.Property<
string>(
"Url")
722 .HasColumnType(
"nvarchar(max)");
726 b.HasIndex(
"MergedById");
728 b.HasIndex(
"PrimaryRevisionInformationId")
731 b.ToTable(
"TestMerges");
734 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
736 b.Property<
long?>(
"Id")
737 .ValueGeneratedOnAdd()
738 .HasColumnType(
"bigint");
740 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
742 b.Property<
string>(
"CanonicalName")
745 .HasColumnType(
"nvarchar(100)");
747 b.Property<DateTimeOffset?>(
"CreatedAt")
749 .HasColumnType(
"datetimeoffset");
751 b.Property<
long?>(
"CreatedById")
752 .HasColumnType(
"bigint");
754 b.Property<
bool?>(
"Enabled")
756 .HasColumnType(
"bit");
758 b.Property<
long?>(
"GroupId")
759 .HasColumnType(
"bigint");
761 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
762 .HasColumnType(
"datetimeoffset");
764 b.Property<
string>(
"Name")
767 .HasColumnType(
"nvarchar(100)");
769 b.Property<
string>(
"PasswordHash")
770 .HasColumnType(
"nvarchar(max)");
772 b.Property<
string>(
"SystemIdentifier")
774 .HasColumnType(
"nvarchar(100)");
778 b.HasIndex(
"CanonicalName")
781 b.HasIndex(
"CreatedById");
783 b.HasIndex(
"GroupId");
785 b.HasIndex(
"SystemIdentifier")
787 .HasFilter(
"[SystemIdentifier] IS NOT NULL");
792 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
794 b.Property<
long?>(
"Id")
795 .ValueGeneratedOnAdd()
796 .HasColumnType(
"bigint");
798 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
800 b.Property<
string>(
"Name")
803 .HasColumnType(
"nvarchar(100)");
813 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
815 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
816 .WithMany(
"ChatSettings")
817 .HasForeignKey(
"InstanceId")
818 .OnDelete(DeleteBehavior.Cascade)
821 b.Navigation(
"Instance");
824 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
826 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
827 .WithMany(
"Channels")
828 .HasForeignKey(
"ChatSettingsId")
829 .OnDelete(DeleteBehavior.Cascade)
832 b.Navigation(
"ChatSettings");
835 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
837 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
839 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
840 .OnDelete(DeleteBehavior.Cascade)
843 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
844 .WithMany(
"CompileJobs")
845 .HasForeignKey(
"RevisionInformationId")
846 .OnDelete(DeleteBehavior.ClientNoAction)
851 b.Navigation(
"RevisionInformation");
854 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
856 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
857 .WithOne(
"DreamDaemonSettings")
858 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
859 .OnDelete(DeleteBehavior.Cascade)
862 b.Navigation(
"Instance");
865 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
867 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
868 .WithOne(
"DreamMakerSettings")
869 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
870 .OnDelete(DeleteBehavior.Cascade)
873 b.Navigation(
"Instance");
876 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
878 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
879 .WithMany(
"InstancePermissionSets")
880 .HasForeignKey(
"InstanceId")
881 .OnDelete(DeleteBehavior.Cascade)
884 b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet",
"PermissionSet")
885 .WithMany(
"InstancePermissionSets")
886 .HasForeignKey(
"PermissionSetId")
887 .OnDelete(DeleteBehavior.Cascade)
890 b.Navigation(
"Instance");
892 b.Navigation(
"PermissionSet");
895 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
897 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
899 .HasForeignKey(
"CancelledById");
901 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
903 .HasForeignKey(
"InstanceId")
904 .OnDelete(DeleteBehavior.Cascade)
907 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
909 .HasForeignKey(
"StartedById")
910 .OnDelete(DeleteBehavior.Cascade)
913 b.Navigation(
"CancelledBy");
915 b.Navigation(
"Instance");
917 b.Navigation(
"StartedBy");
920 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
922 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
923 .WithMany(
"OAuthConnections")
924 .HasForeignKey(
"UserId")
925 .OnDelete(DeleteBehavior.Cascade)
928 b.Navigation(
"User");
931 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
933 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
934 .WithOne(
"PermissionSet")
935 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"GroupId")
936 .OnDelete(DeleteBehavior.Cascade);
938 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
939 .WithOne(
"PermissionSet")
940 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"UserId")
941 .OnDelete(DeleteBehavior.Cascade);
943 b.Navigation(
"Group");
945 b.Navigation(
"User");
948 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
950 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
952 .HasForeignKey(
"CompileJobId")
953 .OnDelete(DeleteBehavior.Cascade)
956 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"InitialCompileJob")
958 .HasForeignKey(
"InitialCompileJobId");
960 b.Navigation(
"CompileJob");
962 b.Navigation(
"InitialCompileJob");
965 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
967 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
968 .WithOne(
"RepositorySettings")
969 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
970 .OnDelete(DeleteBehavior.Cascade)
973 b.Navigation(
"Instance");
976 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
978 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
979 .WithMany(
"ActiveTestMerges")
980 .HasForeignKey(
"RevisionInformationId")
981 .OnDelete(DeleteBehavior.Cascade)
984 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
985 .WithMany(
"RevisonInformations")
986 .HasForeignKey(
"TestMergeId")
987 .OnDelete(DeleteBehavior.ClientNoAction)
990 b.Navigation(
"RevisionInformation");
992 b.Navigation(
"TestMerge");
995 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
997 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
998 .WithMany(
"RevisionInformations")
999 .HasForeignKey(
"InstanceId")
1000 .OnDelete(DeleteBehavior.Cascade)
1003 b.Navigation(
"Instance");
1006 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1008 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
1009 .WithMany(
"TestMerges")
1010 .HasForeignKey(
"MergedById")
1011 .OnDelete(DeleteBehavior.Restrict)
1014 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
1015 .WithOne(
"PrimaryTestMerge")
1016 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
1017 .OnDelete(DeleteBehavior.Cascade)
1020 b.Navigation(
"MergedBy");
1022 b.Navigation(
"PrimaryRevisionInformation");
1025 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1027 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
1028 .WithMany(
"CreatedUsers")
1029 .HasForeignKey(
"CreatedById");
1031 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
1033 .HasForeignKey(
"GroupId");
1035 b.Navigation(
"CreatedBy");
1037 b.Navigation(
"Group");
1040 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
1042 b.Navigation(
"Channels");
1045 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
1047 b.Navigation(
"ChatSettings");
1049 b.Navigation(
"DreamDaemonSettings");
1051 b.Navigation(
"DreamMakerSettings");
1053 b.Navigation(
"InstancePermissionSets");
1055 b.Navigation(
"Jobs");
1057 b.Navigation(
"RepositorySettings");
1059 b.Navigation(
"RevisionInformations");
1062 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
1064 b.Navigation(
"InstancePermissionSets");
1067 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1069 b.Navigation(
"ActiveTestMerges");
1071 b.Navigation(
"CompileJobs");
1073 b.Navigation(
"PrimaryTestMerge");
1076 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1078 b.Navigation(
"RevisonInformations");
1081 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1083 b.Navigation(
"CreatedUsers");
1085 b.Navigation(
"OAuthConnections");
1087 b.Navigation(
"PermissionSet");
1089 b.Navigation(
"TestMerges");
1092 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
1094 b.Navigation(
"PermissionSet")
1097 b.Navigation(
"Users");
1099#pragma warning restore 612, 618