17#pragma warning disable 612, 618
19 .HasAnnotation(
"ProductVersion",
"7.0.13")
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)");
128 b.Property<
int?>(
"DMApiMajorVersion")
129 .HasColumnType(
"int");
131 b.Property<
int?>(
"DMApiMinorVersion")
132 .HasColumnType(
"int");
134 b.Property<
int?>(
"DMApiPatchVersion")
135 .HasColumnType(
"int");
137 b.Property<Guid?>(
"DirectoryName")
139 .HasColumnType(
"uniqueidentifier");
141 b.Property<
string>(
"DmeName")
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<
int>(
"Port")
218 .HasColumnType(
"int");
220 b.Property<
int>(
"SecurityLevel")
221 .HasColumnType(
"int");
223 b.Property<
bool?>(
"StartProfiler")
225 .HasColumnType(
"bit");
227 b.Property<
long>(
"StartupTimeout")
228 .HasColumnType(
"bigint");
230 b.Property<
long>(
"TopicRequestTimeout")
231 .HasColumnType(
"bigint");
233 b.Property<
int>(
"Visibility")
234 .HasColumnType(
"int");
238 b.HasIndex(
"InstanceId")
241 b.ToTable(
"DreamDaemonSettings");
244 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
246 b.Property<
long>(
"Id")
247 .ValueGeneratedOnAdd()
248 .HasColumnType(
"bigint");
250 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
252 b.Property<
int>(
"ApiValidationPort")
253 .HasColumnType(
"int");
255 b.Property<
int>(
"ApiValidationSecurityLevel")
256 .HasColumnType(
"int");
258 b.Property<
long>(
"InstanceId")
259 .HasColumnType(
"bigint");
261 b.Property<
string>(
"ProjectName")
263 .HasColumnType(
"nvarchar(max)");
265 b.Property<
bool?>(
"RequireDMApiValidation")
267 .HasColumnType(
"bit");
269 b.Property<TimeSpan?>(
"Timeout")
271 .HasColumnType(
"time");
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(
"bigint");
287 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
289 b.Property<
long>(
"AutoUpdateInterval")
290 .HasColumnType(
"bigint");
292 b.Property<
int>(
"ChatBotLimit")
293 .HasColumnType(
"int");
295 b.Property<
int>(
"ConfigurationType")
296 .HasColumnType(
"int");
298 b.Property<
string>(
"Name")
301 .HasColumnType(
"nvarchar(100)");
303 b.Property<
bool?>(
"Online")
305 .HasColumnType(
"bit");
307 b.Property<
string>(
"Path")
309 .HasColumnType(
"nvarchar(450)");
311 b.Property<
string>(
"SwarmIdentifer")
312 .HasColumnType(
"nvarchar(450)");
316 b.HasIndex(
"Path",
"SwarmIdentifer")
318 .HasFilter(
"[SwarmIdentifer] IS NOT NULL");
320 b.ToTable(
"Instances");
323 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
325 b.Property<
long>(
"Id")
326 .ValueGeneratedOnAdd()
327 .HasColumnType(
"bigint");
329 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
331 b.Property<decimal>(
"ByondRights")
332 .HasColumnType(
"decimal(20,0)");
334 b.Property<decimal>(
"ChatBotRights")
335 .HasColumnType(
"decimal(20,0)");
337 b.Property<decimal>(
"ConfigurationRights")
338 .HasColumnType(
"decimal(20,0)");
340 b.Property<decimal>(
"DreamDaemonRights")
341 .HasColumnType(
"decimal(20,0)");
343 b.Property<decimal>(
"DreamMakerRights")
344 .HasColumnType(
"decimal(20,0)");
346 b.Property<
long>(
"InstanceId")
347 .HasColumnType(
"bigint");
349 b.Property<decimal>(
"InstancePermissionSetRights")
350 .HasColumnType(
"decimal(20,0)");
352 b.Property<
long>(
"PermissionSetId")
353 .HasColumnType(
"bigint");
355 b.Property<decimal>(
"RepositoryRights")
356 .HasColumnType(
"decimal(20,0)");
360 b.HasIndex(
"InstanceId");
362 b.HasIndex(
"PermissionSetId",
"InstanceId")
365 b.ToTable(
"InstancePermissionSets");
368 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
370 b.Property<
long?>(
"Id")
371 .ValueGeneratedOnAdd()
372 .HasColumnType(
"bigint");
374 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
376 b.Property<decimal?>(
"CancelRight")
377 .HasColumnType(
"decimal(20,0)");
379 b.Property<decimal?>(
"CancelRightsType")
380 .HasColumnType(
"decimal(20,0)");
382 b.Property<
bool?>(
"Cancelled")
384 .HasColumnType(
"bit");
386 b.Property<
long?>(
"CancelledById")
387 .HasColumnType(
"bigint");
389 b.Property<
string>(
"Description")
391 .HasColumnType(
"nvarchar(max)");
393 b.Property<
long?>(
"ErrorCode")
394 .HasColumnType(
"bigint");
396 b.Property<
string>(
"ExceptionDetails")
397 .HasColumnType(
"nvarchar(max)");
399 b.Property<
long>(
"InstanceId")
400 .HasColumnType(
"bigint");
402 b.Property<
byte>(
"JobCode")
403 .HasColumnType(
"tinyint");
405 b.Property<DateTimeOffset?>(
"StartedAt")
407 .HasColumnType(
"datetimeoffset");
409 b.Property<
long>(
"StartedById")
410 .HasColumnType(
"bigint");
412 b.Property<DateTimeOffset?>(
"StoppedAt")
413 .HasColumnType(
"datetimeoffset");
417 b.HasIndex(
"CancelledById");
419 b.HasIndex(
"InstanceId");
421 b.HasIndex(
"StartedById");
426 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
428 b.Property<
long>(
"Id")
429 .ValueGeneratedOnAdd()
430 .HasColumnType(
"bigint");
432 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
434 b.Property<
string>(
"ExternalUserId")
437 .HasColumnType(
"nvarchar(100)");
439 b.Property<
int>(
"Provider")
440 .HasColumnType(
"int");
442 b.Property<
long?>(
"UserId")
443 .HasColumnType(
"bigint");
447 b.HasIndex(
"UserId");
449 b.HasIndex(
"Provider",
"ExternalUserId")
452 b.ToTable(
"OAuthConnections");
455 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
457 b.Property<
long?>(
"Id")
458 .ValueGeneratedOnAdd()
459 .HasColumnType(
"bigint");
461 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
463 b.Property<decimal>(
"AdministrationRights")
464 .HasColumnType(
"decimal(20,0)");
466 b.Property<
long?>(
"GroupId")
467 .HasColumnType(
"bigint");
469 b.Property<decimal>(
"InstanceManagerRights")
470 .HasColumnType(
"decimal(20,0)");
472 b.Property<
long?>(
"UserId")
473 .HasColumnType(
"bigint");
477 b.HasIndex(
"GroupId")
479 .HasFilter(
"[GroupId] IS NOT NULL");
483 .HasFilter(
"[UserId] IS NOT NULL");
485 b.ToTable(
"PermissionSets");
488 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
490 b.Property<
long>(
"Id")
491 .ValueGeneratedOnAdd()
492 .HasColumnType(
"bigint");
494 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
496 b.Property<
string>(
"AccessIdentifier")
498 .HasColumnType(
"nvarchar(max)");
500 b.Property<
long>(
"CompileJobId")
501 .HasColumnType(
"bigint");
503 b.Property<
long?>(
"InitialCompileJobId")
504 .HasColumnType(
"bigint");
506 b.Property<
int>(
"LaunchSecurityLevel")
507 .HasColumnType(
"int");
509 b.Property<
int>(
"LaunchVisibility")
510 .HasColumnType(
"int");
512 b.Property<
int>(
"Port")
513 .HasColumnType(
"int");
515 b.Property<
int>(
"ProcessId")
516 .HasColumnType(
"int");
518 b.Property<
int>(
"RebootState")
519 .HasColumnType(
"int");
523 b.HasIndex(
"CompileJobId");
525 b.HasIndex(
"InitialCompileJobId");
527 b.ToTable(
"ReattachInformations");
530 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
532 b.Property<
long>(
"Id")
533 .ValueGeneratedOnAdd()
534 .HasColumnType(
"bigint");
536 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
538 b.Property<
string>(
"AccessToken")
540 .HasColumnType(
"nvarchar(max)");
542 b.Property<
string>(
"AccessUser")
544 .HasColumnType(
"nvarchar(max)");
546 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
548 .HasColumnType(
"bit");
550 b.Property<
bool?>(
"AutoUpdatesSynchronize")
552 .HasColumnType(
"bit");
554 b.Property<
string>(
"CommitterEmail")
557 .HasColumnType(
"nvarchar(max)");
559 b.Property<
string>(
"CommitterName")
562 .HasColumnType(
"nvarchar(max)");
564 b.Property<
bool?>(
"CreateGitHubDeployments")
566 .HasColumnType(
"bit");
568 b.Property<
long>(
"InstanceId")
569 .HasColumnType(
"bigint");
571 b.Property<
bool?>(
"PostTestMergeComment")
573 .HasColumnType(
"bit");
575 b.Property<
bool?>(
"PushTestMergeCommits")
577 .HasColumnType(
"bit");
579 b.Property<
bool?>(
"ShowTestMergeCommitters")
581 .HasColumnType(
"bit");
583 b.Property<
bool?>(
"UpdateSubmodules")
585 .HasColumnType(
"bit");
589 b.HasIndex(
"InstanceId")
592 b.ToTable(
"RepositorySettings");
595 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
597 b.Property<
long>(
"Id")
598 .ValueGeneratedOnAdd()
599 .HasColumnType(
"bigint");
601 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
603 b.Property<
long>(
"RevisionInformationId")
604 .HasColumnType(
"bigint");
606 b.Property<
long>(
"TestMergeId")
607 .HasColumnType(
"bigint");
611 b.HasIndex(
"RevisionInformationId");
613 b.HasIndex(
"TestMergeId");
615 b.ToTable(
"RevInfoTestMerges");
618 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
620 b.Property<
long>(
"Id")
621 .ValueGeneratedOnAdd()
622 .HasColumnType(
"bigint");
624 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
626 b.Property<
string>(
"CommitSha")
629 .HasColumnType(
"nvarchar(40)");
631 b.Property<
long>(
"InstanceId")
632 .HasColumnType(
"bigint");
634 b.Property<
string>(
"OriginCommitSha")
637 .HasColumnType(
"nvarchar(40)");
639 b.Property<DateTimeOffset>(
"Timestamp")
640 .HasColumnType(
"datetimeoffset");
644 b.HasIndex(
"InstanceId",
"CommitSha")
647 b.ToTable(
"RevisionInformations");
650 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
652 b.Property<
long>(
"Id")
653 .ValueGeneratedOnAdd()
654 .HasColumnType(
"bigint");
656 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
658 b.Property<
string>(
"Author")
660 .HasColumnType(
"nvarchar(max)");
662 b.Property<
string>(
"BodyAtMerge")
664 .HasColumnType(
"nvarchar(max)");
666 b.Property<
string>(
"Comment")
668 .HasColumnType(
"nvarchar(max)");
670 b.Property<DateTimeOffset>(
"MergedAt")
671 .HasColumnType(
"datetimeoffset");
673 b.Property<
long>(
"MergedById")
674 .HasColumnType(
"bigint");
676 b.Property<
int>(
"Number")
677 .HasColumnType(
"int");
679 b.Property<
long?>(
"PrimaryRevisionInformationId")
681 .HasColumnType(
"bigint");
683 b.Property<
string>(
"TargetCommitSha")
686 .HasColumnType(
"nvarchar(40)");
688 b.Property<
string>(
"TitleAtMerge")
690 .HasColumnType(
"nvarchar(max)");
692 b.Property<
string>(
"Url")
694 .HasColumnType(
"nvarchar(max)");
698 b.HasIndex(
"MergedById");
700 b.HasIndex(
"PrimaryRevisionInformationId")
703 b.ToTable(
"TestMerges");
706 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
708 b.Property<
long?>(
"Id")
709 .ValueGeneratedOnAdd()
710 .HasColumnType(
"bigint");
712 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
714 b.Property<
string>(
"CanonicalName")
717 .HasColumnType(
"nvarchar(100)");
719 b.Property<DateTimeOffset?>(
"CreatedAt")
721 .HasColumnType(
"datetimeoffset");
723 b.Property<
long?>(
"CreatedById")
724 .HasColumnType(
"bigint");
726 b.Property<
bool?>(
"Enabled")
728 .HasColumnType(
"bit");
730 b.Property<
long?>(
"GroupId")
731 .HasColumnType(
"bigint");
733 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
734 .HasColumnType(
"datetimeoffset");
736 b.Property<
string>(
"Name")
739 .HasColumnType(
"nvarchar(100)");
741 b.Property<
string>(
"PasswordHash")
742 .HasColumnType(
"nvarchar(max)");
744 b.Property<
string>(
"SystemIdentifier")
746 .HasColumnType(
"nvarchar(100)");
750 b.HasIndex(
"CanonicalName")
753 b.HasIndex(
"CreatedById");
755 b.HasIndex(
"GroupId");
757 b.HasIndex(
"SystemIdentifier")
759 .HasFilter(
"[SystemIdentifier] IS NOT NULL");
764 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
766 b.Property<
long?>(
"Id")
767 .ValueGeneratedOnAdd()
768 .HasColumnType(
"bigint");
770 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
772 b.Property<
string>(
"Name")
775 .HasColumnType(
"nvarchar(100)");
785 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
787 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
788 .WithMany(
"ChatSettings")
789 .HasForeignKey(
"InstanceId")
790 .OnDelete(DeleteBehavior.Cascade)
793 b.Navigation(
"Instance");
796 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
798 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
799 .WithMany(
"Channels")
800 .HasForeignKey(
"ChatSettingsId")
801 .OnDelete(DeleteBehavior.Cascade)
804 b.Navigation(
"ChatSettings");
807 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
809 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
811 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
812 .OnDelete(DeleteBehavior.Cascade)
815 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
816 .WithMany(
"CompileJobs")
817 .HasForeignKey(
"RevisionInformationId")
818 .OnDelete(DeleteBehavior.ClientNoAction)
823 b.Navigation(
"RevisionInformation");
826 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
828 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
829 .WithOne(
"DreamDaemonSettings")
830 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
831 .OnDelete(DeleteBehavior.Cascade)
834 b.Navigation(
"Instance");
837 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
839 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
840 .WithOne(
"DreamMakerSettings")
841 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
842 .OnDelete(DeleteBehavior.Cascade)
845 b.Navigation(
"Instance");
848 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
850 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
851 .WithMany(
"InstancePermissionSets")
852 .HasForeignKey(
"InstanceId")
853 .OnDelete(DeleteBehavior.Cascade)
856 b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet",
"PermissionSet")
857 .WithMany(
"InstancePermissionSets")
858 .HasForeignKey(
"PermissionSetId")
859 .OnDelete(DeleteBehavior.Cascade)
862 b.Navigation(
"Instance");
864 b.Navigation(
"PermissionSet");
867 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
869 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
871 .HasForeignKey(
"CancelledById");
873 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
875 .HasForeignKey(
"InstanceId")
876 .OnDelete(DeleteBehavior.Cascade)
879 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
881 .HasForeignKey(
"StartedById")
882 .OnDelete(DeleteBehavior.Cascade)
885 b.Navigation(
"CancelledBy");
887 b.Navigation(
"Instance");
889 b.Navigation(
"StartedBy");
892 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
894 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
895 .WithMany(
"OAuthConnections")
896 .HasForeignKey(
"UserId")
897 .OnDelete(DeleteBehavior.Cascade);
899 b.Navigation(
"User");
902 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
904 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
905 .WithOne(
"PermissionSet")
906 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"GroupId")
907 .OnDelete(DeleteBehavior.Cascade);
909 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
910 .WithOne(
"PermissionSet")
911 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"UserId")
912 .OnDelete(DeleteBehavior.Cascade);
914 b.Navigation(
"Group");
916 b.Navigation(
"User");
919 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
921 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
923 .HasForeignKey(
"CompileJobId")
924 .OnDelete(DeleteBehavior.Cascade)
927 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"InitialCompileJob")
929 .HasForeignKey(
"InitialCompileJobId");
931 b.Navigation(
"CompileJob");
933 b.Navigation(
"InitialCompileJob");
936 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
938 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
939 .WithOne(
"RepositorySettings")
940 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
941 .OnDelete(DeleteBehavior.Cascade)
944 b.Navigation(
"Instance");
947 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
949 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
950 .WithMany(
"ActiveTestMerges")
951 .HasForeignKey(
"RevisionInformationId")
952 .OnDelete(DeleteBehavior.Cascade)
955 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
956 .WithMany(
"RevisonInformations")
957 .HasForeignKey(
"TestMergeId")
958 .OnDelete(DeleteBehavior.ClientNoAction)
961 b.Navigation(
"RevisionInformation");
963 b.Navigation(
"TestMerge");
966 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
968 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
969 .WithMany(
"RevisionInformations")
970 .HasForeignKey(
"InstanceId")
971 .OnDelete(DeleteBehavior.Cascade)
974 b.Navigation(
"Instance");
977 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
979 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
980 .WithMany(
"TestMerges")
981 .HasForeignKey(
"MergedById")
982 .OnDelete(DeleteBehavior.Restrict)
985 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
986 .WithOne(
"PrimaryTestMerge")
987 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
988 .OnDelete(DeleteBehavior.Cascade)
991 b.Navigation(
"MergedBy");
993 b.Navigation(
"PrimaryRevisionInformation");
996 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
998 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
999 .WithMany(
"CreatedUsers")
1000 .HasForeignKey(
"CreatedById");
1002 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
1004 .HasForeignKey(
"GroupId");
1006 b.Navigation(
"CreatedBy");
1008 b.Navigation(
"Group");
1011 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
1013 b.Navigation(
"Channels");
1016 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
1018 b.Navigation(
"ChatSettings");
1020 b.Navigation(
"DreamDaemonSettings");
1022 b.Navigation(
"DreamMakerSettings");
1024 b.Navigation(
"InstancePermissionSets");
1026 b.Navigation(
"Jobs");
1028 b.Navigation(
"RepositorySettings");
1030 b.Navigation(
"RevisionInformations");
1033 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
1035 b.Navigation(
"InstancePermissionSets");
1038 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1040 b.Navigation(
"ActiveTestMerges");
1042 b.Navigation(
"CompileJobs");
1044 b.Navigation(
"PrimaryTestMerge");
1047 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1049 b.Navigation(
"RevisonInformations");
1052 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1054 b.Navigation(
"CreatedUsers");
1056 b.Navigation(
"OAuthConnections");
1058 b.Navigation(
"PermissionSet");
1060 b.Navigation(
"TestMerges");
1063 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
1065 b.Navigation(
"PermissionSet")
1068 b.Navigation(
"Users");
1070#pragma warning restore 612, 618