12 protected override void BuildModel(ModelBuilder modelBuilder)
14#pragma warning disable 612, 618
16 .HasAnnotation(
"ProductVersion",
"8.0.10")
17 .HasAnnotation(
"Relational:MaxIdentifierLength", 128);
19 SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
21 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
23 b.Property<
long?>(
"Id")
24 .ValueGeneratedOnAdd()
25 .HasColumnType(
"bigint");
27 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
29 b.Property<
int>(
"ChannelLimit")
30 .HasColumnType(
"int");
32 b.Property<
string>(
"ConnectionString")
35 .HasColumnType(
"nvarchar(max)");
37 b.Property<
bool?>(
"Enabled")
38 .HasColumnType(
"bit");
40 b.Property<
long>(
"InstanceId")
41 .HasColumnType(
"bigint");
43 b.Property<
string>(
"Name")
46 .HasColumnType(
"nvarchar(100)");
48 b.Property<
int>(
"Provider")
49 .HasColumnType(
"int");
51 b.Property<
long>(
"ReconnectionInterval")
52 .HasColumnType(
"bigint");
56 b.HasIndex(
"InstanceId",
"Name")
59 b.ToTable(
"ChatBots");
62 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
64 b.Property<
long>(
"Id")
65 .ValueGeneratedOnAdd()
66 .HasColumnType(
"bigint");
68 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
70 b.Property<
long>(
"ChatSettingsId")
71 .HasColumnType(
"bigint");
73 b.Property<decimal?>(
"DiscordChannelId")
74 .HasColumnType(
"decimal(20,0)");
76 b.Property<
string>(
"IrcChannel")
78 .HasColumnType(
"nvarchar(100)");
80 b.Property<
bool?>(
"IsAdminChannel")
82 .HasColumnType(
"bit");
84 b.Property<
bool?>(
"IsSystemChannel")
86 .HasColumnType(
"bit");
88 b.Property<
bool?>(
"IsUpdatesChannel")
90 .HasColumnType(
"bit");
92 b.Property<
bool?>(
"IsWatchdogChannel")
94 .HasColumnType(
"bit");
96 b.Property<
string>(
"Tag")
98 .HasColumnType(
"nvarchar(max)");
102 b.HasIndex(
"ChatSettingsId",
"DiscordChannelId")
104 .HasFilter(
"[DiscordChannelId] IS NOT NULL");
106 b.HasIndex(
"ChatSettingsId",
"IrcChannel")
108 .HasFilter(
"[IrcChannel] IS NOT NULL");
110 b.ToTable(
"ChatChannels");
113 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
115 b.Property<
long?>(
"Id")
116 .ValueGeneratedOnAdd()
117 .HasColumnType(
"bigint");
119 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
121 b.Property<
int?>(
"DMApiMajorVersion")
122 .HasColumnType(
"int");
124 b.Property<
int?>(
"DMApiMinorVersion")
125 .HasColumnType(
"int");
127 b.Property<
int?>(
"DMApiPatchVersion")
128 .HasColumnType(
"int");
130 b.Property<Guid?>(
"DirectoryName")
132 .HasColumnType(
"uniqueidentifier");
134 b.Property<
string>(
"DmeName")
136 .HasColumnType(
"nvarchar(max)");
138 b.Property<
string>(
"EngineVersion")
140 .HasColumnType(
"nvarchar(max)");
142 b.Property<
long?>(
"GitHubDeploymentId")
143 .HasColumnType(
"bigint");
145 b.Property<
long?>(
"GitHubRepoId")
146 .HasColumnType(
"bigint");
148 b.Property<
long>(
"JobId")
149 .HasColumnType(
"bigint");
151 b.Property<
int?>(
"MinimumSecurityLevel")
152 .HasColumnType(
"int");
154 b.Property<
string>(
"Output")
156 .HasColumnType(
"nvarchar(max)");
158 b.Property<
string>(
"RepositoryOrigin")
159 .HasColumnType(
"nvarchar(max)");
161 b.Property<
long>(
"RevisionInformationId")
162 .HasColumnType(
"bigint");
166 b.HasIndex(
"DirectoryName");
171 b.HasIndex(
"RevisionInformationId");
173 b.ToTable(
"CompileJobs");
176 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
178 b.Property<
long>(
"Id")
179 .ValueGeneratedOnAdd()
180 .HasColumnType(
"bigint");
182 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
184 b.Property<
string>(
"AdditionalParameters")
187 .HasColumnType(
"nvarchar(max)");
189 b.Property<
bool?>(
"AllowWebClient")
191 .HasColumnType(
"bit");
193 b.Property<
bool?>(
"AutoStart")
195 .HasColumnType(
"bit");
197 b.Property<
bool?>(
"DumpOnHealthCheckRestart")
199 .HasColumnType(
"bit");
201 b.Property<
long>(
"HealthCheckSeconds")
202 .HasColumnType(
"bigint");
204 b.Property<
long>(
"InstanceId")
205 .HasColumnType(
"bigint");
207 b.Property<
bool?>(
"LogOutput")
209 .HasColumnType(
"bit");
211 b.Property<
long>(
"MapThreads")
212 .HasColumnType(
"bigint");
214 b.Property<
bool?>(
"Minidumps")
216 .HasColumnType(
"bit");
218 b.Property<
int>(
"OpenDreamTopicPort")
219 .HasColumnType(
"int");
221 b.Property<
int>(
"Port")
222 .HasColumnType(
"int");
224 b.Property<
int>(
"SecurityLevel")
225 .HasColumnType(
"int");
227 b.Property<
bool?>(
"StartProfiler")
229 .HasColumnType(
"bit");
231 b.Property<
long>(
"StartupTimeout")
232 .HasColumnType(
"bigint");
234 b.Property<
long>(
"TopicRequestTimeout")
235 .HasColumnType(
"bigint");
237 b.Property<
int>(
"Visibility")
238 .HasColumnType(
"int");
242 b.HasIndex(
"InstanceId")
245 b.ToTable(
"DreamDaemonSettings");
248 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
250 b.Property<
long>(
"Id")
251 .ValueGeneratedOnAdd()
252 .HasColumnType(
"bigint");
254 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
256 b.Property<
int>(
"ApiValidationPort")
257 .HasColumnType(
"int");
259 b.Property<
int>(
"ApiValidationSecurityLevel")
260 .HasColumnType(
"int");
262 b.Property<
string>(
"CompilerAdditionalArguments")
264 .HasColumnType(
"nvarchar(max)");
266 b.Property<
int>(
"DMApiValidationMode")
267 .HasColumnType(
"int");
269 b.Property<
long>(
"InstanceId")
270 .HasColumnType(
"bigint");
272 b.Property<
string>(
"ProjectName")
274 .HasColumnType(
"nvarchar(max)");
276 b.Property<TimeSpan?>(
"Timeout")
278 .HasColumnType(
"time");
282 b.HasIndex(
"InstanceId")
285 b.ToTable(
"DreamMakerSettings");
288 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
290 b.Property<
long?>(
"Id")
291 .ValueGeneratedOnAdd()
292 .HasColumnType(
"bigint");
294 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
296 b.Property<
string>(
"AutoStartCron")
299 .HasColumnType(
"nvarchar(1000)");
301 b.Property<
string>(
"AutoStopCron")
304 .HasColumnType(
"nvarchar(1000)");
306 b.Property<
string>(
"AutoUpdateCron")
309 .HasColumnType(
"nvarchar(1000)");
311 b.Property<
long>(
"AutoUpdateInterval")
312 .HasColumnType(
"bigint");
314 b.Property<
int>(
"ChatBotLimit")
315 .HasColumnType(
"int");
317 b.Property<
int>(
"ConfigurationType")
318 .HasColumnType(
"int");
320 b.Property<
string>(
"Name")
323 .HasColumnType(
"nvarchar(100)");
325 b.Property<
bool?>(
"Online")
327 .HasColumnType(
"bit");
329 b.Property<
string>(
"Path")
331 .HasColumnType(
"nvarchar(450)");
333 b.Property<
string>(
"SwarmIdentifer")
334 .HasColumnType(
"nvarchar(450)");
338 b.HasIndex(
"Path",
"SwarmIdentifer")
340 .HasFilter(
"[SwarmIdentifer] IS NOT NULL");
342 b.ToTable(
"Instances");
345 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
347 b.Property<
long>(
"Id")
348 .ValueGeneratedOnAdd()
349 .HasColumnType(
"bigint");
351 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
353 b.Property<decimal>(
"ChatBotRights")
354 .HasColumnType(
"decimal(20,0)");
356 b.Property<decimal>(
"ConfigurationRights")
357 .HasColumnType(
"decimal(20,0)");
359 b.Property<decimal>(
"DreamDaemonRights")
360 .HasColumnType(
"decimal(20,0)");
362 b.Property<decimal>(
"DreamMakerRights")
363 .HasColumnType(
"decimal(20,0)");
365 b.Property<decimal>(
"EngineRights")
366 .HasColumnType(
"decimal(20,0)");
368 b.Property<
long>(
"InstanceId")
369 .HasColumnType(
"bigint");
371 b.Property<decimal>(
"InstancePermissionSetRights")
372 .HasColumnType(
"decimal(20,0)");
374 b.Property<
long>(
"PermissionSetId")
375 .HasColumnType(
"bigint");
377 b.Property<decimal>(
"RepositoryRights")
378 .HasColumnType(
"decimal(20,0)");
382 b.HasIndex(
"InstanceId");
384 b.HasIndex(
"PermissionSetId",
"InstanceId")
387 b.ToTable(
"InstancePermissionSets");
390 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
392 b.Property<
long?>(
"Id")
393 .ValueGeneratedOnAdd()
394 .HasColumnType(
"bigint");
396 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
398 b.Property<decimal?>(
"CancelRight")
399 .HasColumnType(
"decimal(20,0)");
401 b.Property<decimal?>(
"CancelRightsType")
402 .HasColumnType(
"decimal(20,0)");
404 b.Property<
bool?>(
"Cancelled")
406 .HasColumnType(
"bit");
408 b.Property<
long?>(
"CancelledById")
409 .HasColumnType(
"bigint");
411 b.Property<
string>(
"Description")
413 .HasColumnType(
"nvarchar(max)");
415 b.Property<
long?>(
"ErrorCode")
416 .HasColumnType(
"bigint");
418 b.Property<
string>(
"ExceptionDetails")
419 .HasColumnType(
"nvarchar(max)");
421 b.Property<
long>(
"InstanceId")
422 .HasColumnType(
"bigint");
424 b.Property<
byte>(
"JobCode")
425 .HasColumnType(
"tinyint");
427 b.Property<DateTimeOffset?>(
"StartedAt")
429 .HasColumnType(
"datetimeoffset");
431 b.Property<
long>(
"StartedById")
432 .HasColumnType(
"bigint");
434 b.Property<DateTimeOffset?>(
"StoppedAt")
435 .HasColumnType(
"datetimeoffset");
439 b.HasIndex(
"CancelledById");
441 b.HasIndex(
"InstanceId");
443 b.HasIndex(
"StartedById");
448 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
450 b.Property<
long>(
"Id")
451 .ValueGeneratedOnAdd()
452 .HasColumnType(
"bigint");
454 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
456 b.Property<
string>(
"ExternalUserId")
459 .HasColumnType(
"nvarchar(100)");
461 b.Property<
int>(
"Provider")
462 .HasColumnType(
"int");
464 b.Property<
long>(
"UserId")
465 .HasColumnType(
"bigint");
469 b.HasIndex(
"UserId");
471 b.HasIndex(
"Provider",
"ExternalUserId")
474 b.ToTable(
"OAuthConnections");
477 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
479 b.Property<
long?>(
"Id")
480 .ValueGeneratedOnAdd()
481 .HasColumnType(
"bigint");
483 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
485 b.Property<decimal>(
"AdministrationRights")
486 .HasColumnType(
"decimal(20,0)");
488 b.Property<
long?>(
"GroupId")
489 .HasColumnType(
"bigint");
491 b.Property<decimal>(
"InstanceManagerRights")
492 .HasColumnType(
"decimal(20,0)");
494 b.Property<
long?>(
"UserId")
495 .HasColumnType(
"bigint");
499 b.HasIndex(
"GroupId")
501 .HasFilter(
"[GroupId] IS NOT NULL");
505 .HasFilter(
"[UserId] IS NOT NULL");
507 b.ToTable(
"PermissionSets");
510 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
512 b.Property<
long?>(
"Id")
513 .ValueGeneratedOnAdd()
514 .HasColumnType(
"bigint");
516 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
518 b.Property<
string>(
"AccessIdentifier")
520 .HasColumnType(
"nvarchar(max)");
522 b.Property<
long>(
"CompileJobId")
523 .HasColumnType(
"bigint");
525 b.Property<
long?>(
"InitialCompileJobId")
526 .HasColumnType(
"bigint");
528 b.Property<
int>(
"LaunchSecurityLevel")
529 .HasColumnType(
"int");
531 b.Property<
int>(
"LaunchVisibility")
532 .HasColumnType(
"int");
534 b.Property<
int>(
"Port")
535 .HasColumnType(
"int");
537 b.Property<
int>(
"ProcessId")
538 .HasColumnType(
"int");
540 b.Property<
int>(
"RebootState")
541 .HasColumnType(
"int");
543 b.Property<
int?>(
"TopicPort")
544 .HasColumnType(
"int");
548 b.HasIndex(
"CompileJobId");
550 b.HasIndex(
"InitialCompileJobId");
552 b.ToTable(
"ReattachInformations");
555 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
557 b.Property<
long>(
"Id")
558 .ValueGeneratedOnAdd()
559 .HasColumnType(
"bigint");
561 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
563 b.Property<
string>(
"AccessToken")
565 .HasColumnType(
"nvarchar(max)");
567 b.Property<
string>(
"AccessUser")
569 .HasColumnType(
"nvarchar(max)");
571 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
573 .HasColumnType(
"bit");
575 b.Property<
bool?>(
"AutoUpdatesSynchronize")
577 .HasColumnType(
"bit");
579 b.Property<
string>(
"CommitterEmail")
582 .HasColumnType(
"nvarchar(max)");
584 b.Property<
string>(
"CommitterName")
587 .HasColumnType(
"nvarchar(max)");
589 b.Property<
bool?>(
"CreateGitHubDeployments")
591 .HasColumnType(
"bit");
593 b.Property<
long>(
"InstanceId")
594 .HasColumnType(
"bigint");
596 b.Property<
bool?>(
"PostTestMergeComment")
598 .HasColumnType(
"bit");
600 b.Property<
bool?>(
"PushTestMergeCommits")
602 .HasColumnType(
"bit");
604 b.Property<
bool?>(
"ShowTestMergeCommitters")
606 .HasColumnType(
"bit");
608 b.Property<
bool?>(
"UpdateSubmodules")
610 .HasColumnType(
"bit");
614 b.HasIndex(
"InstanceId")
617 b.ToTable(
"RepositorySettings");
620 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
622 b.Property<
long>(
"Id")
623 .ValueGeneratedOnAdd()
624 .HasColumnType(
"bigint");
626 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
628 b.Property<
long>(
"RevisionInformationId")
629 .HasColumnType(
"bigint");
631 b.Property<
long>(
"TestMergeId")
632 .HasColumnType(
"bigint");
636 b.HasIndex(
"RevisionInformationId");
638 b.HasIndex(
"TestMergeId");
640 b.ToTable(
"RevInfoTestMerges");
643 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
645 b.Property<
long>(
"Id")
646 .ValueGeneratedOnAdd()
647 .HasColumnType(
"bigint");
649 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
651 b.Property<
string>(
"CommitSha")
654 .HasColumnType(
"nvarchar(40)");
656 b.Property<
long>(
"InstanceId")
657 .HasColumnType(
"bigint");
659 b.Property<
string>(
"OriginCommitSha")
662 .HasColumnType(
"nvarchar(40)");
664 b.Property<DateTimeOffset>(
"Timestamp")
665 .HasColumnType(
"datetimeoffset");
669 b.HasIndex(
"InstanceId",
"CommitSha")
672 b.ToTable(
"RevisionInformations");
675 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
677 b.Property<
long>(
"Id")
678 .ValueGeneratedOnAdd()
679 .HasColumnType(
"bigint");
681 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
683 b.Property<
string>(
"Author")
685 .HasColumnType(
"nvarchar(max)");
687 b.Property<
string>(
"BodyAtMerge")
689 .HasColumnType(
"nvarchar(max)");
691 b.Property<
string>(
"Comment")
693 .HasColumnType(
"nvarchar(max)");
695 b.Property<DateTimeOffset>(
"MergedAt")
696 .HasColumnType(
"datetimeoffset");
698 b.Property<
long>(
"MergedById")
699 .HasColumnType(
"bigint");
701 b.Property<
int>(
"Number")
702 .HasColumnType(
"int");
704 b.Property<
long?>(
"PrimaryRevisionInformationId")
706 .HasColumnType(
"bigint");
708 b.Property<
string>(
"TargetCommitSha")
711 .HasColumnType(
"nvarchar(40)");
713 b.Property<
string>(
"TitleAtMerge")
715 .HasColumnType(
"nvarchar(max)");
717 b.Property<
string>(
"Url")
719 .HasColumnType(
"nvarchar(max)");
723 b.HasIndex(
"MergedById");
725 b.HasIndex(
"PrimaryRevisionInformationId")
728 b.ToTable(
"TestMerges");
731 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
733 b.Property<
long?>(
"Id")
734 .ValueGeneratedOnAdd()
735 .HasColumnType(
"bigint");
737 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
739 b.Property<
string>(
"CanonicalName")
742 .HasColumnType(
"nvarchar(100)");
744 b.Property<DateTimeOffset?>(
"CreatedAt")
746 .HasColumnType(
"datetimeoffset");
748 b.Property<
long?>(
"CreatedById")
749 .HasColumnType(
"bigint");
751 b.Property<
bool?>(
"Enabled")
753 .HasColumnType(
"bit");
755 b.Property<
long?>(
"GroupId")
756 .HasColumnType(
"bigint");
758 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
759 .HasColumnType(
"datetimeoffset");
761 b.Property<
string>(
"Name")
764 .HasColumnType(
"nvarchar(100)");
766 b.Property<
string>(
"PasswordHash")
767 .HasColumnType(
"nvarchar(max)");
769 b.Property<
string>(
"SystemIdentifier")
771 .HasColumnType(
"nvarchar(100)");
775 b.HasIndex(
"CanonicalName")
778 b.HasIndex(
"CreatedById");
780 b.HasIndex(
"GroupId");
782 b.HasIndex(
"SystemIdentifier")
784 .HasFilter(
"[SystemIdentifier] IS NOT NULL");
789 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
791 b.Property<
long?>(
"Id")
792 .ValueGeneratedOnAdd()
793 .HasColumnType(
"bigint");
795 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
797 b.Property<
string>(
"Name")
800 .HasColumnType(
"nvarchar(100)");
810 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
812 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
813 .WithMany(
"ChatSettings")
814 .HasForeignKey(
"InstanceId")
815 .OnDelete(DeleteBehavior.Cascade)
818 b.Navigation(
"Instance");
821 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
823 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
824 .WithMany(
"Channels")
825 .HasForeignKey(
"ChatSettingsId")
826 .OnDelete(DeleteBehavior.Cascade)
829 b.Navigation(
"ChatSettings");
832 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
834 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
836 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
837 .OnDelete(DeleteBehavior.Cascade)
840 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
841 .WithMany(
"CompileJobs")
842 .HasForeignKey(
"RevisionInformationId")
843 .OnDelete(DeleteBehavior.ClientNoAction)
848 b.Navigation(
"RevisionInformation");
851 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
853 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
854 .WithOne(
"DreamDaemonSettings")
855 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
856 .OnDelete(DeleteBehavior.Cascade)
859 b.Navigation(
"Instance");
862 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
864 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
865 .WithOne(
"DreamMakerSettings")
866 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
867 .OnDelete(DeleteBehavior.Cascade)
870 b.Navigation(
"Instance");
873 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
875 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
876 .WithMany(
"InstancePermissionSets")
877 .HasForeignKey(
"InstanceId")
878 .OnDelete(DeleteBehavior.Cascade)
881 b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet",
"PermissionSet")
882 .WithMany(
"InstancePermissionSets")
883 .HasForeignKey(
"PermissionSetId")
884 .OnDelete(DeleteBehavior.Cascade)
887 b.Navigation(
"Instance");
889 b.Navigation(
"PermissionSet");
892 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
894 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
896 .HasForeignKey(
"CancelledById");
898 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
900 .HasForeignKey(
"InstanceId")
901 .OnDelete(DeleteBehavior.Cascade)
904 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
906 .HasForeignKey(
"StartedById")
907 .OnDelete(DeleteBehavior.Cascade)
910 b.Navigation(
"CancelledBy");
912 b.Navigation(
"Instance");
914 b.Navigation(
"StartedBy");
917 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
919 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
920 .WithMany(
"OAuthConnections")
921 .HasForeignKey(
"UserId")
922 .OnDelete(DeleteBehavior.Cascade)
925 b.Navigation(
"User");
928 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
930 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
931 .WithOne(
"PermissionSet")
932 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"GroupId")
933 .OnDelete(DeleteBehavior.Cascade);
935 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
936 .WithOne(
"PermissionSet")
937 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"UserId")
938 .OnDelete(DeleteBehavior.Cascade);
940 b.Navigation(
"Group");
942 b.Navigation(
"User");
945 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
947 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
949 .HasForeignKey(
"CompileJobId")
950 .OnDelete(DeleteBehavior.Cascade)
953 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"InitialCompileJob")
955 .HasForeignKey(
"InitialCompileJobId");
957 b.Navigation(
"CompileJob");
959 b.Navigation(
"InitialCompileJob");
962 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
964 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
965 .WithOne(
"RepositorySettings")
966 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
967 .OnDelete(DeleteBehavior.Cascade)
970 b.Navigation(
"Instance");
973 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
975 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
976 .WithMany(
"ActiveTestMerges")
977 .HasForeignKey(
"RevisionInformationId")
978 .OnDelete(DeleteBehavior.Cascade)
981 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
982 .WithMany(
"RevisonInformations")
983 .HasForeignKey(
"TestMergeId")
984 .OnDelete(DeleteBehavior.ClientNoAction)
987 b.Navigation(
"RevisionInformation");
989 b.Navigation(
"TestMerge");
992 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
994 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
995 .WithMany(
"RevisionInformations")
996 .HasForeignKey(
"InstanceId")
997 .OnDelete(DeleteBehavior.Cascade)
1000 b.Navigation(
"Instance");
1003 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1005 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
1006 .WithMany(
"TestMerges")
1007 .HasForeignKey(
"MergedById")
1008 .OnDelete(DeleteBehavior.Restrict)
1011 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
1012 .WithOne(
"PrimaryTestMerge")
1013 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
1014 .OnDelete(DeleteBehavior.Cascade)
1017 b.Navigation(
"MergedBy");
1019 b.Navigation(
"PrimaryRevisionInformation");
1022 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1024 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
1025 .WithMany(
"CreatedUsers")
1026 .HasForeignKey(
"CreatedById");
1028 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
1030 .HasForeignKey(
"GroupId");
1032 b.Navigation(
"CreatedBy");
1034 b.Navigation(
"Group");
1037 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
1039 b.Navigation(
"Channels");
1042 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
1044 b.Navigation(
"ChatSettings");
1046 b.Navigation(
"DreamDaemonSettings");
1048 b.Navigation(
"DreamMakerSettings");
1050 b.Navigation(
"InstancePermissionSets");
1052 b.Navigation(
"Jobs");
1054 b.Navigation(
"RepositorySettings");
1056 b.Navigation(
"RevisionInformations");
1059 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
1061 b.Navigation(
"InstancePermissionSets");
1064 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1066 b.Navigation(
"ActiveTestMerges");
1068 b.Navigation(
"CompileJobs");
1070 b.Navigation(
"PrimaryTestMerge");
1073 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1075 b.Navigation(
"RevisonInformations");
1078 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1080 b.Navigation(
"CreatedUsers");
1082 b.Navigation(
"OAuthConnections");
1084 b.Navigation(
"PermissionSet");
1086 b.Navigation(
"TestMerges");
1089 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
1091 b.Navigation(
"PermissionSet")
1094 b.Navigation(
"Users");
1096#pragma warning restore 612, 618