17#pragma warning disable 612, 618
19 .HasAnnotation(
"ProductVersion",
"8.0.0")
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<
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>(
"ChatBotRights")
332 .HasColumnType(
"decimal(20,0)");
334 b.Property<decimal>(
"ConfigurationRights")
335 .HasColumnType(
"decimal(20,0)");
337 b.Property<decimal>(
"DreamDaemonRights")
338 .HasColumnType(
"decimal(20,0)");
340 b.Property<decimal>(
"DreamMakerRights")
341 .HasColumnType(
"decimal(20,0)");
343 b.Property<decimal>(
"EngineRights")
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");
521 b.Property<
int?>(
"TopicPort")
522 .HasColumnType(
"int");
526 b.HasIndex(
"CompileJobId");
528 b.HasIndex(
"InitialCompileJobId");
530 b.ToTable(
"ReattachInformations");
533 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
535 b.Property<
long>(
"Id")
536 .ValueGeneratedOnAdd()
537 .HasColumnType(
"bigint");
539 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
541 b.Property<
string>(
"AccessToken")
543 .HasColumnType(
"nvarchar(max)");
545 b.Property<
string>(
"AccessUser")
547 .HasColumnType(
"nvarchar(max)");
549 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
551 .HasColumnType(
"bit");
553 b.Property<
bool?>(
"AutoUpdatesSynchronize")
555 .HasColumnType(
"bit");
557 b.Property<
string>(
"CommitterEmail")
560 .HasColumnType(
"nvarchar(max)");
562 b.Property<
string>(
"CommitterName")
565 .HasColumnType(
"nvarchar(max)");
567 b.Property<
bool?>(
"CreateGitHubDeployments")
569 .HasColumnType(
"bit");
571 b.Property<
long>(
"InstanceId")
572 .HasColumnType(
"bigint");
574 b.Property<
bool?>(
"PostTestMergeComment")
576 .HasColumnType(
"bit");
578 b.Property<
bool?>(
"PushTestMergeCommits")
580 .HasColumnType(
"bit");
582 b.Property<
bool?>(
"ShowTestMergeCommitters")
584 .HasColumnType(
"bit");
586 b.Property<
bool?>(
"UpdateSubmodules")
588 .HasColumnType(
"bit");
592 b.HasIndex(
"InstanceId")
595 b.ToTable(
"RepositorySettings");
598 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
600 b.Property<
long>(
"Id")
601 .ValueGeneratedOnAdd()
602 .HasColumnType(
"bigint");
604 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
606 b.Property<
long>(
"RevisionInformationId")
607 .HasColumnType(
"bigint");
609 b.Property<
long>(
"TestMergeId")
610 .HasColumnType(
"bigint");
614 b.HasIndex(
"RevisionInformationId");
616 b.HasIndex(
"TestMergeId");
618 b.ToTable(
"RevInfoTestMerges");
621 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
623 b.Property<
long>(
"Id")
624 .ValueGeneratedOnAdd()
625 .HasColumnType(
"bigint");
627 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
629 b.Property<
string>(
"CommitSha")
632 .HasColumnType(
"nvarchar(40)");
634 b.Property<
long>(
"InstanceId")
635 .HasColumnType(
"bigint");
637 b.Property<
string>(
"OriginCommitSha")
640 .HasColumnType(
"nvarchar(40)");
642 b.Property<DateTimeOffset>(
"Timestamp")
643 .HasColumnType(
"datetimeoffset");
647 b.HasIndex(
"InstanceId",
"CommitSha")
650 b.ToTable(
"RevisionInformations");
653 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
655 b.Property<
long>(
"Id")
656 .ValueGeneratedOnAdd()
657 .HasColumnType(
"bigint");
659 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
661 b.Property<
string>(
"Author")
663 .HasColumnType(
"nvarchar(max)");
665 b.Property<
string>(
"BodyAtMerge")
667 .HasColumnType(
"nvarchar(max)");
669 b.Property<
string>(
"Comment")
671 .HasColumnType(
"nvarchar(max)");
673 b.Property<DateTimeOffset>(
"MergedAt")
674 .HasColumnType(
"datetimeoffset");
676 b.Property<
long>(
"MergedById")
677 .HasColumnType(
"bigint");
679 b.Property<
int>(
"Number")
680 .HasColumnType(
"int");
682 b.Property<
long?>(
"PrimaryRevisionInformationId")
684 .HasColumnType(
"bigint");
686 b.Property<
string>(
"TargetCommitSha")
689 .HasColumnType(
"nvarchar(40)");
691 b.Property<
string>(
"TitleAtMerge")
693 .HasColumnType(
"nvarchar(max)");
695 b.Property<
string>(
"Url")
697 .HasColumnType(
"nvarchar(max)");
701 b.HasIndex(
"MergedById");
703 b.HasIndex(
"PrimaryRevisionInformationId")
706 b.ToTable(
"TestMerges");
709 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
711 b.Property<
long?>(
"Id")
712 .ValueGeneratedOnAdd()
713 .HasColumnType(
"bigint");
715 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
717 b.Property<
string>(
"CanonicalName")
720 .HasColumnType(
"nvarchar(100)");
722 b.Property<DateTimeOffset?>(
"CreatedAt")
724 .HasColumnType(
"datetimeoffset");
726 b.Property<
long?>(
"CreatedById")
727 .HasColumnType(
"bigint");
729 b.Property<
bool?>(
"Enabled")
731 .HasColumnType(
"bit");
733 b.Property<
long?>(
"GroupId")
734 .HasColumnType(
"bigint");
736 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
737 .HasColumnType(
"datetimeoffset");
739 b.Property<
string>(
"Name")
742 .HasColumnType(
"nvarchar(100)");
744 b.Property<
string>(
"PasswordHash")
745 .HasColumnType(
"nvarchar(max)");
747 b.Property<
string>(
"SystemIdentifier")
749 .HasColumnType(
"nvarchar(100)");
753 b.HasIndex(
"CanonicalName")
756 b.HasIndex(
"CreatedById");
758 b.HasIndex(
"GroupId");
760 b.HasIndex(
"SystemIdentifier")
762 .HasFilter(
"[SystemIdentifier] IS NOT NULL");
767 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
769 b.Property<
long?>(
"Id")
770 .ValueGeneratedOnAdd()
771 .HasColumnType(
"bigint");
773 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
775 b.Property<
string>(
"Name")
778 .HasColumnType(
"nvarchar(100)");
788 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
790 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
791 .WithMany(
"ChatSettings")
792 .HasForeignKey(
"InstanceId")
793 .OnDelete(DeleteBehavior.Cascade)
796 b.Navigation(
"Instance");
799 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
801 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
802 .WithMany(
"Channels")
803 .HasForeignKey(
"ChatSettingsId")
804 .OnDelete(DeleteBehavior.Cascade)
807 b.Navigation(
"ChatSettings");
810 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
812 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
814 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
815 .OnDelete(DeleteBehavior.Cascade)
818 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
819 .WithMany(
"CompileJobs")
820 .HasForeignKey(
"RevisionInformationId")
821 .OnDelete(DeleteBehavior.ClientNoAction)
826 b.Navigation(
"RevisionInformation");
829 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
831 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
832 .WithOne(
"DreamDaemonSettings")
833 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
834 .OnDelete(DeleteBehavior.Cascade)
837 b.Navigation(
"Instance");
840 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
842 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
843 .WithOne(
"DreamMakerSettings")
844 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
845 .OnDelete(DeleteBehavior.Cascade)
848 b.Navigation(
"Instance");
851 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
853 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
854 .WithMany(
"InstancePermissionSets")
855 .HasForeignKey(
"InstanceId")
856 .OnDelete(DeleteBehavior.Cascade)
859 b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet",
"PermissionSet")
860 .WithMany(
"InstancePermissionSets")
861 .HasForeignKey(
"PermissionSetId")
862 .OnDelete(DeleteBehavior.Cascade)
865 b.Navigation(
"Instance");
867 b.Navigation(
"PermissionSet");
870 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
872 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
874 .HasForeignKey(
"CancelledById");
876 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
878 .HasForeignKey(
"InstanceId")
879 .OnDelete(DeleteBehavior.Cascade)
882 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
884 .HasForeignKey(
"StartedById")
885 .OnDelete(DeleteBehavior.Cascade)
888 b.Navigation(
"CancelledBy");
890 b.Navigation(
"Instance");
892 b.Navigation(
"StartedBy");
895 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
897 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
898 .WithMany(
"OAuthConnections")
899 .HasForeignKey(
"UserId")
900 .OnDelete(DeleteBehavior.Cascade);
902 b.Navigation(
"User");
905 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
907 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
908 .WithOne(
"PermissionSet")
909 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"GroupId")
910 .OnDelete(DeleteBehavior.Cascade);
912 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
913 .WithOne(
"PermissionSet")
914 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"UserId")
915 .OnDelete(DeleteBehavior.Cascade);
917 b.Navigation(
"Group");
919 b.Navigation(
"User");
922 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
924 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
926 .HasForeignKey(
"CompileJobId")
927 .OnDelete(DeleteBehavior.Cascade)
930 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"InitialCompileJob")
932 .HasForeignKey(
"InitialCompileJobId");
934 b.Navigation(
"CompileJob");
936 b.Navigation(
"InitialCompileJob");
939 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
941 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
942 .WithOne(
"RepositorySettings")
943 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
944 .OnDelete(DeleteBehavior.Cascade)
947 b.Navigation(
"Instance");
950 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
952 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
953 .WithMany(
"ActiveTestMerges")
954 .HasForeignKey(
"RevisionInformationId")
955 .OnDelete(DeleteBehavior.Cascade)
958 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
959 .WithMany(
"RevisonInformations")
960 .HasForeignKey(
"TestMergeId")
961 .OnDelete(DeleteBehavior.ClientNoAction)
964 b.Navigation(
"RevisionInformation");
966 b.Navigation(
"TestMerge");
969 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
971 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
972 .WithMany(
"RevisionInformations")
973 .HasForeignKey(
"InstanceId")
974 .OnDelete(DeleteBehavior.Cascade)
977 b.Navigation(
"Instance");
980 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
982 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
983 .WithMany(
"TestMerges")
984 .HasForeignKey(
"MergedById")
985 .OnDelete(DeleteBehavior.Restrict)
988 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
989 .WithOne(
"PrimaryTestMerge")
990 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
991 .OnDelete(DeleteBehavior.Cascade)
994 b.Navigation(
"MergedBy");
996 b.Navigation(
"PrimaryRevisionInformation");
999 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1001 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
1002 .WithMany(
"CreatedUsers")
1003 .HasForeignKey(
"CreatedById");
1005 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
1007 .HasForeignKey(
"GroupId");
1009 b.Navigation(
"CreatedBy");
1011 b.Navigation(
"Group");
1014 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
1016 b.Navigation(
"Channels");
1019 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
1021 b.Navigation(
"ChatSettings");
1023 b.Navigation(
"DreamDaemonSettings");
1025 b.Navigation(
"DreamMakerSettings");
1027 b.Navigation(
"InstancePermissionSets");
1029 b.Navigation(
"Jobs");
1031 b.Navigation(
"RepositorySettings");
1033 b.Navigation(
"RevisionInformations");
1036 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
1038 b.Navigation(
"InstancePermissionSets");
1041 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1043 b.Navigation(
"ActiveTestMerges");
1045 b.Navigation(
"CompileJobs");
1047 b.Navigation(
"PrimaryTestMerge");
1050 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1052 b.Navigation(
"RevisonInformations");
1055 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1057 b.Navigation(
"CreatedUsers");
1059 b.Navigation(
"OAuthConnections");
1061 b.Navigation(
"PermissionSet");
1063 b.Navigation(
"TestMerges");
1066 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
1068 b.Navigation(
"PermissionSet")
1071 b.Navigation(
"Users");
1073#pragma warning restore 612, 618