17#pragma warning disable 612, 618
19 .HasAnnotation(
"ProductVersion",
"8.0.7")
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<
long>(
"InstanceId")
270 .HasColumnType(
"bigint");
272 b.Property<
string>(
"ProjectName")
274 .HasColumnType(
"nvarchar(max)");
276 b.Property<
bool?>(
"RequireDMApiValidation")
278 .HasColumnType(
"bit");
280 b.Property<TimeSpan?>(
"Timeout")
282 .HasColumnType(
"time");
286 b.HasIndex(
"InstanceId")
289 b.ToTable(
"DreamMakerSettings");
292 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
294 b.Property<
long?>(
"Id")
295 .ValueGeneratedOnAdd()
296 .HasColumnType(
"bigint");
298 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
300 b.Property<
string>(
"AutoUpdateCron")
303 .HasColumnType(
"nvarchar(max)");
305 b.Property<
long>(
"AutoUpdateInterval")
306 .HasColumnType(
"bigint");
308 b.Property<
int>(
"ChatBotLimit")
309 .HasColumnType(
"int");
311 b.Property<
int>(
"ConfigurationType")
312 .HasColumnType(
"int");
314 b.Property<
string>(
"Name")
317 .HasColumnType(
"nvarchar(100)");
319 b.Property<
bool?>(
"Online")
321 .HasColumnType(
"bit");
323 b.Property<
string>(
"Path")
325 .HasColumnType(
"nvarchar(450)");
327 b.Property<
string>(
"SwarmIdentifer")
328 .HasColumnType(
"nvarchar(450)");
332 b.HasIndex(
"Path",
"SwarmIdentifer")
334 .HasFilter(
"[SwarmIdentifer] IS NOT NULL");
336 b.ToTable(
"Instances");
339 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
341 b.Property<
long>(
"Id")
342 .ValueGeneratedOnAdd()
343 .HasColumnType(
"bigint");
345 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
347 b.Property<decimal>(
"ChatBotRights")
348 .HasColumnType(
"decimal(20,0)");
350 b.Property<decimal>(
"ConfigurationRights")
351 .HasColumnType(
"decimal(20,0)");
353 b.Property<decimal>(
"DreamDaemonRights")
354 .HasColumnType(
"decimal(20,0)");
356 b.Property<decimal>(
"DreamMakerRights")
357 .HasColumnType(
"decimal(20,0)");
359 b.Property<decimal>(
"EngineRights")
360 .HasColumnType(
"decimal(20,0)");
362 b.Property<
long>(
"InstanceId")
363 .HasColumnType(
"bigint");
365 b.Property<decimal>(
"InstancePermissionSetRights")
366 .HasColumnType(
"decimal(20,0)");
368 b.Property<
long>(
"PermissionSetId")
369 .HasColumnType(
"bigint");
371 b.Property<decimal>(
"RepositoryRights")
372 .HasColumnType(
"decimal(20,0)");
376 b.HasIndex(
"InstanceId");
378 b.HasIndex(
"PermissionSetId",
"InstanceId")
381 b.ToTable(
"InstancePermissionSets");
384 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
386 b.Property<
long?>(
"Id")
387 .ValueGeneratedOnAdd()
388 .HasColumnType(
"bigint");
390 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
392 b.Property<decimal?>(
"CancelRight")
393 .HasColumnType(
"decimal(20,0)");
395 b.Property<decimal?>(
"CancelRightsType")
396 .HasColumnType(
"decimal(20,0)");
398 b.Property<
bool?>(
"Cancelled")
400 .HasColumnType(
"bit");
402 b.Property<
long?>(
"CancelledById")
403 .HasColumnType(
"bigint");
405 b.Property<
string>(
"Description")
407 .HasColumnType(
"nvarchar(max)");
409 b.Property<
long?>(
"ErrorCode")
410 .HasColumnType(
"bigint");
412 b.Property<
string>(
"ExceptionDetails")
413 .HasColumnType(
"nvarchar(max)");
415 b.Property<
long>(
"InstanceId")
416 .HasColumnType(
"bigint");
418 b.Property<
byte>(
"JobCode")
419 .HasColumnType(
"tinyint");
421 b.Property<DateTimeOffset?>(
"StartedAt")
423 .HasColumnType(
"datetimeoffset");
425 b.Property<
long>(
"StartedById")
426 .HasColumnType(
"bigint");
428 b.Property<DateTimeOffset?>(
"StoppedAt")
429 .HasColumnType(
"datetimeoffset");
433 b.HasIndex(
"CancelledById");
435 b.HasIndex(
"InstanceId");
437 b.HasIndex(
"StartedById");
442 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
444 b.Property<
long>(
"Id")
445 .ValueGeneratedOnAdd()
446 .HasColumnType(
"bigint");
448 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
450 b.Property<
string>(
"ExternalUserId")
453 .HasColumnType(
"nvarchar(100)");
455 b.Property<
int>(
"Provider")
456 .HasColumnType(
"int");
458 b.Property<
long?>(
"UserId")
459 .HasColumnType(
"bigint");
463 b.HasIndex(
"UserId");
465 b.HasIndex(
"Provider",
"ExternalUserId")
468 b.ToTable(
"OAuthConnections");
471 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
473 b.Property<
long?>(
"Id")
474 .ValueGeneratedOnAdd()
475 .HasColumnType(
"bigint");
477 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
479 b.Property<decimal>(
"AdministrationRights")
480 .HasColumnType(
"decimal(20,0)");
482 b.Property<
long?>(
"GroupId")
483 .HasColumnType(
"bigint");
485 b.Property<decimal>(
"InstanceManagerRights")
486 .HasColumnType(
"decimal(20,0)");
488 b.Property<
long?>(
"UserId")
489 .HasColumnType(
"bigint");
493 b.HasIndex(
"GroupId")
495 .HasFilter(
"[GroupId] IS NOT NULL");
499 .HasFilter(
"[UserId] IS NOT NULL");
501 b.ToTable(
"PermissionSets");
504 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
506 b.Property<
long?>(
"Id")
507 .ValueGeneratedOnAdd()
508 .HasColumnType(
"bigint");
510 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
512 b.Property<
string>(
"AccessIdentifier")
514 .HasColumnType(
"nvarchar(max)");
516 b.Property<
long>(
"CompileJobId")
517 .HasColumnType(
"bigint");
519 b.Property<
long?>(
"InitialCompileJobId")
520 .HasColumnType(
"bigint");
522 b.Property<
int>(
"LaunchSecurityLevel")
523 .HasColumnType(
"int");
525 b.Property<
int>(
"LaunchVisibility")
526 .HasColumnType(
"int");
528 b.Property<
int>(
"Port")
529 .HasColumnType(
"int");
531 b.Property<
int>(
"ProcessId")
532 .HasColumnType(
"int");
534 b.Property<
int>(
"RebootState")
535 .HasColumnType(
"int");
537 b.Property<
int?>(
"TopicPort")
538 .HasColumnType(
"int");
542 b.HasIndex(
"CompileJobId");
544 b.HasIndex(
"InitialCompileJobId");
546 b.ToTable(
"ReattachInformations");
549 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
551 b.Property<
long>(
"Id")
552 .ValueGeneratedOnAdd()
553 .HasColumnType(
"bigint");
555 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
557 b.Property<
string>(
"AccessToken")
559 .HasColumnType(
"nvarchar(max)");
561 b.Property<
string>(
"AccessUser")
563 .HasColumnType(
"nvarchar(max)");
565 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
567 .HasColumnType(
"bit");
569 b.Property<
bool?>(
"AutoUpdatesSynchronize")
571 .HasColumnType(
"bit");
573 b.Property<
string>(
"CommitterEmail")
576 .HasColumnType(
"nvarchar(max)");
578 b.Property<
string>(
"CommitterName")
581 .HasColumnType(
"nvarchar(max)");
583 b.Property<
bool?>(
"CreateGitHubDeployments")
585 .HasColumnType(
"bit");
587 b.Property<
long>(
"InstanceId")
588 .HasColumnType(
"bigint");
590 b.Property<
bool?>(
"PostTestMergeComment")
592 .HasColumnType(
"bit");
594 b.Property<
bool?>(
"PushTestMergeCommits")
596 .HasColumnType(
"bit");
598 b.Property<
bool?>(
"ShowTestMergeCommitters")
600 .HasColumnType(
"bit");
602 b.Property<
bool?>(
"UpdateSubmodules")
604 .HasColumnType(
"bit");
608 b.HasIndex(
"InstanceId")
611 b.ToTable(
"RepositorySettings");
614 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
616 b.Property<
long>(
"Id")
617 .ValueGeneratedOnAdd()
618 .HasColumnType(
"bigint");
620 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
622 b.Property<
long>(
"RevisionInformationId")
623 .HasColumnType(
"bigint");
625 b.Property<
long>(
"TestMergeId")
626 .HasColumnType(
"bigint");
630 b.HasIndex(
"RevisionInformationId");
632 b.HasIndex(
"TestMergeId");
634 b.ToTable(
"RevInfoTestMerges");
637 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
639 b.Property<
long>(
"Id")
640 .ValueGeneratedOnAdd()
641 .HasColumnType(
"bigint");
643 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
645 b.Property<
string>(
"CommitSha")
648 .HasColumnType(
"nvarchar(40)");
650 b.Property<
long>(
"InstanceId")
651 .HasColumnType(
"bigint");
653 b.Property<
string>(
"OriginCommitSha")
656 .HasColumnType(
"nvarchar(40)");
658 b.Property<DateTimeOffset>(
"Timestamp")
659 .HasColumnType(
"datetimeoffset");
663 b.HasIndex(
"InstanceId",
"CommitSha")
666 b.ToTable(
"RevisionInformations");
669 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
671 b.Property<
long>(
"Id")
672 .ValueGeneratedOnAdd()
673 .HasColumnType(
"bigint");
675 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
677 b.Property<
string>(
"Author")
679 .HasColumnType(
"nvarchar(max)");
681 b.Property<
string>(
"BodyAtMerge")
683 .HasColumnType(
"nvarchar(max)");
685 b.Property<
string>(
"Comment")
687 .HasColumnType(
"nvarchar(max)");
689 b.Property<DateTimeOffset>(
"MergedAt")
690 .HasColumnType(
"datetimeoffset");
692 b.Property<
long>(
"MergedById")
693 .HasColumnType(
"bigint");
695 b.Property<
int>(
"Number")
696 .HasColumnType(
"int");
698 b.Property<
long?>(
"PrimaryRevisionInformationId")
700 .HasColumnType(
"bigint");
702 b.Property<
string>(
"TargetCommitSha")
705 .HasColumnType(
"nvarchar(40)");
707 b.Property<
string>(
"TitleAtMerge")
709 .HasColumnType(
"nvarchar(max)");
711 b.Property<
string>(
"Url")
713 .HasColumnType(
"nvarchar(max)");
717 b.HasIndex(
"MergedById");
719 b.HasIndex(
"PrimaryRevisionInformationId")
722 b.ToTable(
"TestMerges");
725 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
727 b.Property<
long?>(
"Id")
728 .ValueGeneratedOnAdd()
729 .HasColumnType(
"bigint");
731 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
733 b.Property<
string>(
"CanonicalName")
736 .HasColumnType(
"nvarchar(100)");
738 b.Property<DateTimeOffset?>(
"CreatedAt")
740 .HasColumnType(
"datetimeoffset");
742 b.Property<
long?>(
"CreatedById")
743 .HasColumnType(
"bigint");
745 b.Property<
bool?>(
"Enabled")
747 .HasColumnType(
"bit");
749 b.Property<
long?>(
"GroupId")
750 .HasColumnType(
"bigint");
752 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
753 .HasColumnType(
"datetimeoffset");
755 b.Property<
string>(
"Name")
758 .HasColumnType(
"nvarchar(100)");
760 b.Property<
string>(
"PasswordHash")
761 .HasColumnType(
"nvarchar(max)");
763 b.Property<
string>(
"SystemIdentifier")
765 .HasColumnType(
"nvarchar(100)");
769 b.HasIndex(
"CanonicalName")
772 b.HasIndex(
"CreatedById");
774 b.HasIndex(
"GroupId");
776 b.HasIndex(
"SystemIdentifier")
778 .HasFilter(
"[SystemIdentifier] IS NOT NULL");
783 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
785 b.Property<
long?>(
"Id")
786 .ValueGeneratedOnAdd()
787 .HasColumnType(
"bigint");
789 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
791 b.Property<
string>(
"Name")
794 .HasColumnType(
"nvarchar(100)");
804 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
806 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
807 .WithMany(
"ChatSettings")
808 .HasForeignKey(
"InstanceId")
809 .OnDelete(DeleteBehavior.Cascade)
812 b.Navigation(
"Instance");
815 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
817 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
818 .WithMany(
"Channels")
819 .HasForeignKey(
"ChatSettingsId")
820 .OnDelete(DeleteBehavior.Cascade)
823 b.Navigation(
"ChatSettings");
826 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
828 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
830 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
831 .OnDelete(DeleteBehavior.Cascade)
834 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
835 .WithMany(
"CompileJobs")
836 .HasForeignKey(
"RevisionInformationId")
837 .OnDelete(DeleteBehavior.ClientNoAction)
842 b.Navigation(
"RevisionInformation");
845 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
847 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
848 .WithOne(
"DreamDaemonSettings")
849 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
850 .OnDelete(DeleteBehavior.Cascade)
853 b.Navigation(
"Instance");
856 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
858 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
859 .WithOne(
"DreamMakerSettings")
860 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
861 .OnDelete(DeleteBehavior.Cascade)
864 b.Navigation(
"Instance");
867 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
869 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
870 .WithMany(
"InstancePermissionSets")
871 .HasForeignKey(
"InstanceId")
872 .OnDelete(DeleteBehavior.Cascade)
875 b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet",
"PermissionSet")
876 .WithMany(
"InstancePermissionSets")
877 .HasForeignKey(
"PermissionSetId")
878 .OnDelete(DeleteBehavior.Cascade)
881 b.Navigation(
"Instance");
883 b.Navigation(
"PermissionSet");
886 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
888 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
890 .HasForeignKey(
"CancelledById");
892 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
894 .HasForeignKey(
"InstanceId")
895 .OnDelete(DeleteBehavior.Cascade)
898 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
900 .HasForeignKey(
"StartedById")
901 .OnDelete(DeleteBehavior.Cascade)
904 b.Navigation(
"CancelledBy");
906 b.Navigation(
"Instance");
908 b.Navigation(
"StartedBy");
911 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
913 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
914 .WithMany(
"OAuthConnections")
915 .HasForeignKey(
"UserId")
916 .OnDelete(DeleteBehavior.Cascade);
918 b.Navigation(
"User");
921 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
923 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
924 .WithOne(
"PermissionSet")
925 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"GroupId")
926 .OnDelete(DeleteBehavior.Cascade);
928 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
929 .WithOne(
"PermissionSet")
930 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"UserId")
931 .OnDelete(DeleteBehavior.Cascade);
933 b.Navigation(
"Group");
935 b.Navigation(
"User");
938 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
940 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
942 .HasForeignKey(
"CompileJobId")
943 .OnDelete(DeleteBehavior.Cascade)
946 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"InitialCompileJob")
948 .HasForeignKey(
"InitialCompileJobId");
950 b.Navigation(
"CompileJob");
952 b.Navigation(
"InitialCompileJob");
955 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
957 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
958 .WithOne(
"RepositorySettings")
959 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
960 .OnDelete(DeleteBehavior.Cascade)
963 b.Navigation(
"Instance");
966 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
968 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
969 .WithMany(
"ActiveTestMerges")
970 .HasForeignKey(
"RevisionInformationId")
971 .OnDelete(DeleteBehavior.Cascade)
974 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
975 .WithMany(
"RevisonInformations")
976 .HasForeignKey(
"TestMergeId")
977 .OnDelete(DeleteBehavior.ClientNoAction)
980 b.Navigation(
"RevisionInformation");
982 b.Navigation(
"TestMerge");
985 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
987 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
988 .WithMany(
"RevisionInformations")
989 .HasForeignKey(
"InstanceId")
990 .OnDelete(DeleteBehavior.Cascade)
993 b.Navigation(
"Instance");
996 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
998 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
999 .WithMany(
"TestMerges")
1000 .HasForeignKey(
"MergedById")
1001 .OnDelete(DeleteBehavior.Restrict)
1004 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
1005 .WithOne(
"PrimaryTestMerge")
1006 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
1007 .OnDelete(DeleteBehavior.Cascade)
1010 b.Navigation(
"MergedBy");
1012 b.Navigation(
"PrimaryRevisionInformation");
1015 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1017 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
1018 .WithMany(
"CreatedUsers")
1019 .HasForeignKey(
"CreatedById");
1021 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
1023 .HasForeignKey(
"GroupId");
1025 b.Navigation(
"CreatedBy");
1027 b.Navigation(
"Group");
1030 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
1032 b.Navigation(
"Channels");
1035 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
1037 b.Navigation(
"ChatSettings");
1039 b.Navigation(
"DreamDaemonSettings");
1041 b.Navigation(
"DreamMakerSettings");
1043 b.Navigation(
"InstancePermissionSets");
1045 b.Navigation(
"Jobs");
1047 b.Navigation(
"RepositorySettings");
1049 b.Navigation(
"RevisionInformations");
1052 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
1054 b.Navigation(
"InstancePermissionSets");
1057 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1059 b.Navigation(
"ActiveTestMerges");
1061 b.Navigation(
"CompileJobs");
1063 b.Navigation(
"PrimaryTestMerge");
1066 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1068 b.Navigation(
"RevisonInformations");
1071 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1073 b.Navigation(
"CreatedUsers");
1075 b.Navigation(
"OAuthConnections");
1077 b.Navigation(
"PermissionSet");
1079 b.Navigation(
"TestMerges");
1082 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
1084 b.Navigation(
"PermissionSet")
1087 b.Navigation(
"Users");
1089#pragma warning restore 612, 618