17#pragma warning disable 612, 618
19 .HasAnnotation(
"ProductVersion",
"8.0.0-rc.1.23419.6")
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<
string>(
"ByondVersion")
126 .HasColumnType(
"nvarchar(max)")
127 .HasColumnName(
"EngineVersion");
129 b.Property<
int?>(
"DMApiMajorVersion")
130 .HasColumnType(
"int");
132 b.Property<
int?>(
"DMApiMinorVersion")
133 .HasColumnType(
"int");
135 b.Property<
int?>(
"DMApiPatchVersion")
136 .HasColumnType(
"int");
138 b.Property<Guid?>(
"DirectoryName")
140 .HasColumnType(
"uniqueidentifier");
142 b.Property<
string>(
"DmeName")
144 .HasColumnType(
"nvarchar(max)");
146 b.Property<
int?>(
"GitHubDeploymentId")
147 .HasColumnType(
"int");
149 b.Property<
long?>(
"GitHubRepoId")
150 .HasColumnType(
"bigint");
152 b.Property<
long>(
"JobId")
153 .HasColumnType(
"bigint");
155 b.Property<
int?>(
"MinimumSecurityLevel")
156 .HasColumnType(
"int");
158 b.Property<
string>(
"Output")
160 .HasColumnType(
"nvarchar(max)");
162 b.Property<
string>(
"RepositoryOrigin")
163 .HasColumnType(
"nvarchar(max)");
165 b.Property<
long>(
"RevisionInformationId")
166 .HasColumnType(
"bigint");
170 b.HasIndex(
"DirectoryName");
175 b.HasIndex(
"RevisionInformationId");
177 b.ToTable(
"CompileJobs");
180 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
182 b.Property<
long>(
"Id")
183 .ValueGeneratedOnAdd()
184 .HasColumnType(
"bigint");
186 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
188 b.Property<
string>(
"AdditionalParameters")
191 .HasColumnType(
"nvarchar(max)");
193 b.Property<
bool?>(
"AllowWebClient")
195 .HasColumnType(
"bit");
197 b.Property<
bool?>(
"AutoStart")
199 .HasColumnType(
"bit");
201 b.Property<
bool?>(
"DumpOnHealthCheckRestart")
203 .HasColumnType(
"bit");
205 b.Property<
long>(
"HealthCheckSeconds")
206 .HasColumnType(
"bigint");
208 b.Property<
long>(
"InstanceId")
209 .HasColumnType(
"bigint");
211 b.Property<
bool?>(
"LogOutput")
213 .HasColumnType(
"bit");
215 b.Property<
long>(
"MapThreads")
216 .HasColumnType(
"bigint");
218 b.Property<
int>(
"Port")
219 .HasColumnType(
"int");
221 b.Property<
int>(
"SecurityLevel")
222 .HasColumnType(
"int");
224 b.Property<
bool?>(
"StartProfiler")
226 .HasColumnType(
"bit");
228 b.Property<
long>(
"StartupTimeout")
229 .HasColumnType(
"bigint");
231 b.Property<
long>(
"TopicRequestTimeout")
232 .HasColumnType(
"bigint");
234 b.Property<
int>(
"Visibility")
235 .HasColumnType(
"int");
239 b.HasIndex(
"InstanceId")
242 b.ToTable(
"DreamDaemonSettings");
245 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
247 b.Property<
long>(
"Id")
248 .ValueGeneratedOnAdd()
249 .HasColumnType(
"bigint");
251 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
253 b.Property<
int>(
"ApiValidationPort")
254 .HasColumnType(
"int");
256 b.Property<
int>(
"ApiValidationSecurityLevel")
257 .HasColumnType(
"int");
259 b.Property<
long>(
"InstanceId")
260 .HasColumnType(
"bigint");
262 b.Property<
string>(
"ProjectName")
264 .HasColumnType(
"nvarchar(max)");
266 b.Property<
bool?>(
"RequireDMApiValidation")
268 .HasColumnType(
"bit");
270 b.Property<TimeSpan?>(
"Timeout")
272 .HasColumnType(
"time");
276 b.HasIndex(
"InstanceId")
279 b.ToTable(
"DreamMakerSettings");
282 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
284 b.Property<
long?>(
"Id")
285 .ValueGeneratedOnAdd()
286 .HasColumnType(
"bigint");
288 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
290 b.Property<
long>(
"AutoUpdateInterval")
291 .HasColumnType(
"bigint");
293 b.Property<
int>(
"ChatBotLimit")
294 .HasColumnType(
"int");
296 b.Property<
int>(
"ConfigurationType")
297 .HasColumnType(
"int");
299 b.Property<
string>(
"Name")
302 .HasColumnType(
"nvarchar(100)");
304 b.Property<
bool?>(
"Online")
306 .HasColumnType(
"bit");
308 b.Property<
string>(
"Path")
310 .HasColumnType(
"nvarchar(450)");
312 b.Property<
string>(
"SwarmIdentifer")
313 .HasColumnType(
"nvarchar(450)");
317 b.HasIndex(
"Path",
"SwarmIdentifer")
319 .HasFilter(
"[SwarmIdentifer] IS NOT NULL");
321 b.ToTable(
"Instances");
324 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
326 b.Property<
long>(
"Id")
327 .ValueGeneratedOnAdd()
328 .HasColumnType(
"bigint");
330 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
332 b.Property<decimal>(
"ChatBotRights")
333 .HasColumnType(
"decimal(20,0)");
335 b.Property<decimal>(
"ConfigurationRights")
336 .HasColumnType(
"decimal(20,0)");
338 b.Property<decimal>(
"DreamDaemonRights")
339 .HasColumnType(
"decimal(20,0)");
341 b.Property<decimal>(
"DreamMakerRights")
342 .HasColumnType(
"decimal(20,0)");
344 b.Property<decimal>(
"EngineRights")
345 .HasColumnType(
"decimal(20,0)");
347 b.Property<
long>(
"InstanceId")
348 .HasColumnType(
"bigint");
350 b.Property<decimal>(
"InstancePermissionSetRights")
351 .HasColumnType(
"decimal(20,0)");
353 b.Property<
long>(
"PermissionSetId")
354 .HasColumnType(
"bigint");
356 b.Property<decimal>(
"RepositoryRights")
357 .HasColumnType(
"decimal(20,0)");
361 b.HasIndex(
"InstanceId");
363 b.HasIndex(
"PermissionSetId",
"InstanceId")
366 b.ToTable(
"InstancePermissionSets");
369 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
371 b.Property<
long?>(
"Id")
372 .ValueGeneratedOnAdd()
373 .HasColumnType(
"bigint");
375 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
377 b.Property<decimal?>(
"CancelRight")
378 .HasColumnType(
"decimal(20,0)");
380 b.Property<decimal?>(
"CancelRightsType")
381 .HasColumnType(
"decimal(20,0)");
383 b.Property<
bool?>(
"Cancelled")
385 .HasColumnType(
"bit");
387 b.Property<
long?>(
"CancelledById")
388 .HasColumnType(
"bigint");
390 b.Property<
string>(
"Description")
392 .HasColumnType(
"nvarchar(max)");
394 b.Property<
long?>(
"ErrorCode")
395 .HasColumnType(
"bigint");
397 b.Property<
string>(
"ExceptionDetails")
398 .HasColumnType(
"nvarchar(max)");
400 b.Property<
long>(
"InstanceId")
401 .HasColumnType(
"bigint");
403 b.Property<
byte>(
"JobCode")
404 .HasColumnType(
"tinyint");
406 b.Property<DateTimeOffset?>(
"StartedAt")
408 .HasColumnType(
"datetimeoffset");
410 b.Property<
long>(
"StartedById")
411 .HasColumnType(
"bigint");
413 b.Property<DateTimeOffset?>(
"StoppedAt")
414 .HasColumnType(
"datetimeoffset");
418 b.HasIndex(
"CancelledById");
420 b.HasIndex(
"InstanceId");
422 b.HasIndex(
"StartedById");
427 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
429 b.Property<
long>(
"Id")
430 .ValueGeneratedOnAdd()
431 .HasColumnType(
"bigint");
433 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
435 b.Property<
string>(
"ExternalUserId")
438 .HasColumnType(
"nvarchar(100)");
440 b.Property<
int>(
"Provider")
441 .HasColumnType(
"int");
443 b.Property<
long?>(
"UserId")
444 .HasColumnType(
"bigint");
448 b.HasIndex(
"UserId");
450 b.HasIndex(
"Provider",
"ExternalUserId")
453 b.ToTable(
"OAuthConnections");
456 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
458 b.Property<
long?>(
"Id")
459 .ValueGeneratedOnAdd()
460 .HasColumnType(
"bigint");
462 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
464 b.Property<decimal>(
"AdministrationRights")
465 .HasColumnType(
"decimal(20,0)");
467 b.Property<
long?>(
"GroupId")
468 .HasColumnType(
"bigint");
470 b.Property<decimal>(
"InstanceManagerRights")
471 .HasColumnType(
"decimal(20,0)");
473 b.Property<
long?>(
"UserId")
474 .HasColumnType(
"bigint");
478 b.HasIndex(
"GroupId")
480 .HasFilter(
"[GroupId] IS NOT NULL");
484 .HasFilter(
"[UserId] IS NOT NULL");
486 b.ToTable(
"PermissionSets");
489 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
491 b.Property<
long>(
"Id")
492 .ValueGeneratedOnAdd()
493 .HasColumnType(
"bigint");
495 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
497 b.Property<
string>(
"AccessIdentifier")
499 .HasColumnType(
"nvarchar(max)");
501 b.Property<
long>(
"CompileJobId")
502 .HasColumnType(
"bigint");
504 b.Property<
long?>(
"InitialCompileJobId")
505 .HasColumnType(
"bigint");
507 b.Property<
int>(
"LaunchSecurityLevel")
508 .HasColumnType(
"int");
510 b.Property<
int>(
"LaunchVisibility")
511 .HasColumnType(
"int");
513 b.Property<
int>(
"Port")
514 .HasColumnType(
"int");
516 b.Property<
int>(
"ProcessId")
517 .HasColumnType(
"int");
519 b.Property<
int>(
"RebootState")
520 .HasColumnType(
"int");
524 b.HasIndex(
"CompileJobId");
526 b.HasIndex(
"InitialCompileJobId");
528 b.ToTable(
"ReattachInformations");
531 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
533 b.Property<
long>(
"Id")
534 .ValueGeneratedOnAdd()
535 .HasColumnType(
"bigint");
537 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
539 b.Property<
string>(
"AccessToken")
541 .HasColumnType(
"nvarchar(max)");
543 b.Property<
string>(
"AccessUser")
545 .HasColumnType(
"nvarchar(max)");
547 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
549 .HasColumnType(
"bit");
551 b.Property<
bool?>(
"AutoUpdatesSynchronize")
553 .HasColumnType(
"bit");
555 b.Property<
string>(
"CommitterEmail")
558 .HasColumnType(
"nvarchar(max)");
560 b.Property<
string>(
"CommitterName")
563 .HasColumnType(
"nvarchar(max)");
565 b.Property<
bool?>(
"CreateGitHubDeployments")
567 .HasColumnType(
"bit");
569 b.Property<
long>(
"InstanceId")
570 .HasColumnType(
"bigint");
572 b.Property<
bool?>(
"PostTestMergeComment")
574 .HasColumnType(
"bit");
576 b.Property<
bool?>(
"PushTestMergeCommits")
578 .HasColumnType(
"bit");
580 b.Property<
bool?>(
"ShowTestMergeCommitters")
582 .HasColumnType(
"bit");
584 b.Property<
bool?>(
"UpdateSubmodules")
586 .HasColumnType(
"bit");
590 b.HasIndex(
"InstanceId")
593 b.ToTable(
"RepositorySettings");
596 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
598 b.Property<
long>(
"Id")
599 .ValueGeneratedOnAdd()
600 .HasColumnType(
"bigint");
602 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
604 b.Property<
long>(
"RevisionInformationId")
605 .HasColumnType(
"bigint");
607 b.Property<
long>(
"TestMergeId")
608 .HasColumnType(
"bigint");
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(
"bigint");
625 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
627 b.Property<
string>(
"CommitSha")
630 .HasColumnType(
"nvarchar(40)");
632 b.Property<
long>(
"InstanceId")
633 .HasColumnType(
"bigint");
635 b.Property<
string>(
"OriginCommitSha")
638 .HasColumnType(
"nvarchar(40)");
640 b.Property<DateTimeOffset>(
"Timestamp")
641 .HasColumnType(
"datetimeoffset");
645 b.HasIndex(
"InstanceId",
"CommitSha")
648 b.ToTable(
"RevisionInformations");
651 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
653 b.Property<
long>(
"Id")
654 .ValueGeneratedOnAdd()
655 .HasColumnType(
"bigint");
657 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
659 b.Property<
string>(
"Author")
661 .HasColumnType(
"nvarchar(max)");
663 b.Property<
string>(
"BodyAtMerge")
665 .HasColumnType(
"nvarchar(max)");
667 b.Property<
string>(
"Comment")
669 .HasColumnType(
"nvarchar(max)");
671 b.Property<DateTimeOffset>(
"MergedAt")
672 .HasColumnType(
"datetimeoffset");
674 b.Property<
long>(
"MergedById")
675 .HasColumnType(
"bigint");
677 b.Property<
int>(
"Number")
678 .HasColumnType(
"int");
680 b.Property<
long?>(
"PrimaryRevisionInformationId")
682 .HasColumnType(
"bigint");
684 b.Property<
string>(
"TargetCommitSha")
687 .HasColumnType(
"nvarchar(40)");
689 b.Property<
string>(
"TitleAtMerge")
691 .HasColumnType(
"nvarchar(max)");
693 b.Property<
string>(
"Url")
695 .HasColumnType(
"nvarchar(max)");
699 b.HasIndex(
"MergedById");
701 b.HasIndex(
"PrimaryRevisionInformationId")
704 b.ToTable(
"TestMerges");
707 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
709 b.Property<
long?>(
"Id")
710 .ValueGeneratedOnAdd()
711 .HasColumnType(
"bigint");
713 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
715 b.Property<
string>(
"CanonicalName")
718 .HasColumnType(
"nvarchar(100)");
720 b.Property<DateTimeOffset?>(
"CreatedAt")
722 .HasColumnType(
"datetimeoffset");
724 b.Property<
long?>(
"CreatedById")
725 .HasColumnType(
"bigint");
727 b.Property<
bool?>(
"Enabled")
729 .HasColumnType(
"bit");
731 b.Property<
long?>(
"GroupId")
732 .HasColumnType(
"bigint");
734 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
735 .HasColumnType(
"datetimeoffset");
737 b.Property<
string>(
"Name")
740 .HasColumnType(
"nvarchar(100)");
742 b.Property<
string>(
"PasswordHash")
743 .HasColumnType(
"nvarchar(max)");
745 b.Property<
string>(
"SystemIdentifier")
747 .HasColumnType(
"nvarchar(100)");
751 b.HasIndex(
"CanonicalName")
754 b.HasIndex(
"CreatedById");
756 b.HasIndex(
"GroupId");
758 b.HasIndex(
"SystemIdentifier")
760 .HasFilter(
"[SystemIdentifier] IS NOT NULL");
765 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
767 b.Property<
long?>(
"Id")
768 .ValueGeneratedOnAdd()
769 .HasColumnType(
"bigint");
771 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
773 b.Property<
string>(
"Name")
776 .HasColumnType(
"nvarchar(100)");
786 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
788 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
789 .WithMany(
"ChatSettings")
790 .HasForeignKey(
"InstanceId")
791 .OnDelete(DeleteBehavior.Cascade)
794 b.Navigation(
"Instance");
797 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
799 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
800 .WithMany(
"Channels")
801 .HasForeignKey(
"ChatSettingsId")
802 .OnDelete(DeleteBehavior.Cascade)
805 b.Navigation(
"ChatSettings");
808 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
810 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
812 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
813 .OnDelete(DeleteBehavior.Cascade)
816 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
817 .WithMany(
"CompileJobs")
818 .HasForeignKey(
"RevisionInformationId")
819 .OnDelete(DeleteBehavior.ClientNoAction)
824 b.Navigation(
"RevisionInformation");
827 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
829 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
830 .WithOne(
"DreamDaemonSettings")
831 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
832 .OnDelete(DeleteBehavior.Cascade)
835 b.Navigation(
"Instance");
838 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
840 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
841 .WithOne(
"DreamMakerSettings")
842 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
843 .OnDelete(DeleteBehavior.Cascade)
846 b.Navigation(
"Instance");
849 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
851 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
852 .WithMany(
"InstancePermissionSets")
853 .HasForeignKey(
"InstanceId")
854 .OnDelete(DeleteBehavior.Cascade)
857 b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet",
"PermissionSet")
858 .WithMany(
"InstancePermissionSets")
859 .HasForeignKey(
"PermissionSetId")
860 .OnDelete(DeleteBehavior.Cascade)
863 b.Navigation(
"Instance");
865 b.Navigation(
"PermissionSet");
868 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
870 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
872 .HasForeignKey(
"CancelledById");
874 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
876 .HasForeignKey(
"InstanceId")
877 .OnDelete(DeleteBehavior.Cascade)
880 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
882 .HasForeignKey(
"StartedById")
883 .OnDelete(DeleteBehavior.Cascade)
886 b.Navigation(
"CancelledBy");
888 b.Navigation(
"Instance");
890 b.Navigation(
"StartedBy");
893 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
895 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
896 .WithMany(
"OAuthConnections")
897 .HasForeignKey(
"UserId")
898 .OnDelete(DeleteBehavior.Cascade);
900 b.Navigation(
"User");
903 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
905 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
906 .WithOne(
"PermissionSet")
907 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"GroupId")
908 .OnDelete(DeleteBehavior.Cascade);
910 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
911 .WithOne(
"PermissionSet")
912 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"UserId")
913 .OnDelete(DeleteBehavior.Cascade);
915 b.Navigation(
"Group");
917 b.Navigation(
"User");
920 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
922 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
924 .HasForeignKey(
"CompileJobId")
925 .OnDelete(DeleteBehavior.Cascade)
928 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"InitialCompileJob")
930 .HasForeignKey(
"InitialCompileJobId");
932 b.Navigation(
"CompileJob");
934 b.Navigation(
"InitialCompileJob");
937 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
939 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
940 .WithOne(
"RepositorySettings")
941 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
942 .OnDelete(DeleteBehavior.Cascade)
945 b.Navigation(
"Instance");
948 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
950 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
951 .WithMany(
"ActiveTestMerges")
952 .HasForeignKey(
"RevisionInformationId")
953 .OnDelete(DeleteBehavior.Cascade)
956 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
957 .WithMany(
"RevisonInformations")
958 .HasForeignKey(
"TestMergeId")
959 .OnDelete(DeleteBehavior.ClientNoAction)
962 b.Navigation(
"RevisionInformation");
964 b.Navigation(
"TestMerge");
967 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
969 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
970 .WithMany(
"RevisionInformations")
971 .HasForeignKey(
"InstanceId")
972 .OnDelete(DeleteBehavior.Cascade)
975 b.Navigation(
"Instance");
978 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
980 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
981 .WithMany(
"TestMerges")
982 .HasForeignKey(
"MergedById")
983 .OnDelete(DeleteBehavior.Restrict)
986 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
987 .WithOne(
"PrimaryTestMerge")
988 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
989 .OnDelete(DeleteBehavior.Cascade)
992 b.Navigation(
"MergedBy");
994 b.Navigation(
"PrimaryRevisionInformation");
997 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
999 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
1000 .WithMany(
"CreatedUsers")
1001 .HasForeignKey(
"CreatedById");
1003 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
1005 .HasForeignKey(
"GroupId");
1007 b.Navigation(
"CreatedBy");
1009 b.Navigation(
"Group");
1012 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
1014 b.Navigation(
"Channels");
1017 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
1019 b.Navigation(
"ChatSettings");
1021 b.Navigation(
"DreamDaemonSettings");
1023 b.Navigation(
"DreamMakerSettings");
1025 b.Navigation(
"InstancePermissionSets");
1027 b.Navigation(
"Jobs");
1029 b.Navigation(
"RepositorySettings");
1031 b.Navigation(
"RevisionInformations");
1034 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
1036 b.Navigation(
"InstancePermissionSets");
1039 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1041 b.Navigation(
"ActiveTestMerges");
1043 b.Navigation(
"CompileJobs");
1045 b.Navigation(
"PrimaryTestMerge");
1048 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1050 b.Navigation(
"RevisonInformations");
1053 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1055 b.Navigation(
"CreatedUsers");
1057 b.Navigation(
"OAuthConnections");
1059 b.Navigation(
"PermissionSet");
1061 b.Navigation(
"TestMerges");
1064 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
1066 b.Navigation(
"PermissionSet")
1069 b.Navigation(
"Users");
1071#pragma warning restore 612, 618