17#pragma warning disable 612, 618
19 .HasAnnotation(
"ProductVersion",
"6.0.15")
20 .HasAnnotation(
"Relational:MaxIdentifierLength", 128);
22 SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
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"), 1L, 1);
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"), 1L, 1);
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?>(
"IsUpdatesChannel")
89 .HasColumnType(
"bit");
91 b.Property<
bool?>(
"IsWatchdogChannel")
93 .HasColumnType(
"bit");
95 b.Property<
string>(
"Tag")
97 .HasColumnType(
"nvarchar(max)");
101 b.HasIndex(
"ChatSettingsId",
"DiscordChannelId")
103 .HasFilter(
"[DiscordChannelId] IS NOT NULL");
105 b.HasIndex(
"ChatSettingsId",
"IrcChannel")
107 .HasFilter(
"[IrcChannel] IS NOT NULL");
109 b.ToTable(
"ChatChannels");
112 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
114 b.Property<
long?>(
"Id")
115 .ValueGeneratedOnAdd()
116 .HasColumnType(
"bigint");
118 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"), 1L, 1);
120 b.Property<
string>(
"ByondVersion")
122 .HasColumnType(
"nvarchar(max)");
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<
int?>(
"GitHubDeploymentId")
142 .HasColumnType(
"int");
144 b.Property<
long?>(
"GitHubRepoId")
145 .HasColumnType(
"bigint");
147 b.Property<
long>(
"JobId")
148 .HasColumnType(
"bigint");
150 b.Property<
int?>(
"MinimumSecurityLevel")
151 .HasColumnType(
"int");
153 b.Property<
string>(
"Output")
155 .HasColumnType(
"nvarchar(max)");
157 b.Property<
string>(
"RepositoryOrigin")
158 .HasColumnType(
"nvarchar(max)");
160 b.Property<
long>(
"RevisionInformationId")
161 .HasColumnType(
"bigint");
165 b.HasIndex(
"DirectoryName");
170 b.HasIndex(
"RevisionInformationId");
172 b.ToTable(
"CompileJobs");
175 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
177 b.Property<
long>(
"Id")
178 .ValueGeneratedOnAdd()
179 .HasColumnType(
"bigint");
181 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"), 1L, 1);
183 b.Property<
string>(
"AdditionalParameters")
186 .HasColumnType(
"nvarchar(max)");
188 b.Property<
bool?>(
"AllowWebClient")
190 .HasColumnType(
"bit");
192 b.Property<
bool?>(
"AutoStart")
194 .HasColumnType(
"bit");
196 b.Property<
bool?>(
"DumpOnHeartbeatRestart")
198 .HasColumnType(
"bit");
200 b.Property<
long>(
"HeartbeatSeconds")
201 .HasColumnType(
"bigint");
203 b.Property<
long>(
"InstanceId")
204 .HasColumnType(
"bigint");
206 b.Property<
bool?>(
"LogOutput")
208 .HasColumnType(
"bit");
210 b.Property<
int>(
"Port")
211 .HasColumnType(
"int");
213 b.Property<
int>(
"SecurityLevel")
214 .HasColumnType(
"int");
216 b.Property<
bool?>(
"StartProfiler")
218 .HasColumnType(
"bit");
220 b.Property<
long>(
"StartupTimeout")
221 .HasColumnType(
"bigint");
223 b.Property<
long>(
"TopicRequestTimeout")
224 .HasColumnType(
"bigint");
226 b.Property<
int>(
"Visibility")
227 .HasColumnType(
"int");
231 b.HasIndex(
"InstanceId")
234 b.ToTable(
"DreamDaemonSettings");
237 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
239 b.Property<
long>(
"Id")
240 .ValueGeneratedOnAdd()
241 .HasColumnType(
"bigint");
243 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"), 1L, 1);
245 b.Property<
int>(
"ApiValidationPort")
246 .HasColumnType(
"int");
248 b.Property<
int>(
"ApiValidationSecurityLevel")
249 .HasColumnType(
"int");
251 b.Property<
long>(
"InstanceId")
252 .HasColumnType(
"bigint");
254 b.Property<
string>(
"ProjectName")
256 .HasColumnType(
"nvarchar(max)");
258 b.Property<
bool?>(
"RequireDMApiValidation")
260 .HasColumnType(
"bit");
262 b.Property<TimeSpan?>(
"Timeout")
264 .HasColumnType(
"time");
268 b.HasIndex(
"InstanceId")
271 b.ToTable(
"DreamMakerSettings");
274 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
276 b.Property<
long?>(
"Id")
277 .ValueGeneratedOnAdd()
278 .HasColumnType(
"bigint");
280 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"), 1L, 1);
282 b.Property<
long>(
"AutoUpdateInterval")
283 .HasColumnType(
"bigint");
285 b.Property<
int>(
"ChatBotLimit")
286 .HasColumnType(
"int");
288 b.Property<
int>(
"ConfigurationType")
289 .HasColumnType(
"int");
291 b.Property<
string>(
"Name")
294 .HasColumnType(
"nvarchar(100)");
296 b.Property<
bool?>(
"Online")
298 .HasColumnType(
"bit");
300 b.Property<
string>(
"Path")
302 .HasColumnType(
"nvarchar(450)");
304 b.Property<
string>(
"SwarmIdentifer")
305 .HasColumnType(
"nvarchar(450)");
309 b.HasIndex(
"Path",
"SwarmIdentifer")
311 .HasFilter(
"[SwarmIdentifer] IS NOT NULL");
313 b.ToTable(
"Instances");
316 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
318 b.Property<
long>(
"Id")
319 .ValueGeneratedOnAdd()
320 .HasColumnType(
"bigint");
322 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"), 1L, 1);
324 b.Property<decimal>(
"ByondRights")
325 .HasColumnType(
"decimal(20,0)");
327 b.Property<decimal>(
"ChatBotRights")
328 .HasColumnType(
"decimal(20,0)");
330 b.Property<decimal>(
"ConfigurationRights")
331 .HasColumnType(
"decimal(20,0)");
333 b.Property<decimal>(
"DreamDaemonRights")
334 .HasColumnType(
"decimal(20,0)");
336 b.Property<decimal>(
"DreamMakerRights")
337 .HasColumnType(
"decimal(20,0)");
339 b.Property<
long>(
"InstanceId")
340 .HasColumnType(
"bigint");
342 b.Property<decimal>(
"InstancePermissionSetRights")
343 .HasColumnType(
"decimal(20,0)");
345 b.Property<
long>(
"PermissionSetId")
346 .HasColumnType(
"bigint");
348 b.Property<decimal>(
"RepositoryRights")
349 .HasColumnType(
"decimal(20,0)");
353 b.HasIndex(
"InstanceId");
355 b.HasIndex(
"PermissionSetId",
"InstanceId")
358 b.ToTable(
"InstancePermissionSets");
361 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
363 b.Property<
long?>(
"Id")
364 .ValueGeneratedOnAdd()
365 .HasColumnType(
"bigint");
367 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"), 1L, 1);
369 b.Property<decimal?>(
"CancelRight")
370 .HasColumnType(
"decimal(20,0)");
372 b.Property<decimal?>(
"CancelRightsType")
373 .HasColumnType(
"decimal(20,0)");
375 b.Property<
bool?>(
"Cancelled")
377 .HasColumnType(
"bit");
379 b.Property<
long?>(
"CancelledById")
380 .HasColumnType(
"bigint");
382 b.Property<
string>(
"Description")
384 .HasColumnType(
"nvarchar(max)");
386 b.Property<
long?>(
"ErrorCode")
387 .HasColumnType(
"bigint");
389 b.Property<
string>(
"ExceptionDetails")
390 .HasColumnType(
"nvarchar(max)");
392 b.Property<
long>(
"InstanceId")
393 .HasColumnType(
"bigint");
395 b.Property<DateTimeOffset?>(
"StartedAt")
397 .HasColumnType(
"datetimeoffset");
399 b.Property<
long>(
"StartedById")
400 .HasColumnType(
"bigint");
402 b.Property<DateTimeOffset?>(
"StoppedAt")
403 .HasColumnType(
"datetimeoffset");
407 b.HasIndex(
"CancelledById");
409 b.HasIndex(
"InstanceId");
411 b.HasIndex(
"StartedById");
416 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
418 b.Property<
long>(
"Id")
419 .ValueGeneratedOnAdd()
420 .HasColumnType(
"bigint");
422 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"), 1L, 1);
424 b.Property<
string>(
"ExternalUserId")
427 .HasColumnType(
"nvarchar(100)");
429 b.Property<
int>(
"Provider")
430 .HasColumnType(
"int");
432 b.Property<
long?>(
"UserId")
433 .HasColumnType(
"bigint");
437 b.HasIndex(
"UserId");
439 b.HasIndex(
"Provider",
"ExternalUserId")
442 b.ToTable(
"OAuthConnections");
445 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
447 b.Property<
long?>(
"Id")
448 .ValueGeneratedOnAdd()
449 .HasColumnType(
"bigint");
451 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"), 1L, 1);
453 b.Property<decimal>(
"AdministrationRights")
454 .HasColumnType(
"decimal(20,0)");
456 b.Property<
long?>(
"GroupId")
457 .HasColumnType(
"bigint");
459 b.Property<decimal>(
"InstanceManagerRights")
460 .HasColumnType(
"decimal(20,0)");
462 b.Property<
long?>(
"UserId")
463 .HasColumnType(
"bigint");
467 b.HasIndex(
"GroupId")
469 .HasFilter(
"[GroupId] IS NOT NULL");
473 .HasFilter(
"[UserId] IS NOT NULL");
475 b.ToTable(
"PermissionSets");
478 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
480 b.Property<
long>(
"Id")
481 .ValueGeneratedOnAdd()
482 .HasColumnType(
"bigint");
484 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"), 1L, 1);
486 b.Property<
string>(
"AccessIdentifier")
488 .HasColumnType(
"nvarchar(max)");
490 b.Property<
long>(
"CompileJobId")
491 .HasColumnType(
"bigint");
493 b.Property<
int>(
"LaunchSecurityLevel")
494 .HasColumnType(
"int");
496 b.Property<
int>(
"LaunchVisibility")
497 .HasColumnType(
"int");
499 b.Property<
int>(
"Port")
500 .HasColumnType(
"int");
502 b.Property<
int>(
"ProcessId")
503 .HasColumnType(
"int");
505 b.Property<
int>(
"RebootState")
506 .HasColumnType(
"int");
510 b.HasIndex(
"CompileJobId");
512 b.ToTable(
"ReattachInformations");
515 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
517 b.Property<
long>(
"Id")
518 .ValueGeneratedOnAdd()
519 .HasColumnType(
"bigint");
521 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"), 1L, 1);
523 b.Property<
string>(
"AccessToken")
525 .HasColumnType(
"nvarchar(max)");
527 b.Property<
string>(
"AccessUser")
529 .HasColumnType(
"nvarchar(max)");
531 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
533 .HasColumnType(
"bit");
535 b.Property<
bool?>(
"AutoUpdatesSynchronize")
537 .HasColumnType(
"bit");
539 b.Property<
string>(
"CommitterEmail")
542 .HasColumnType(
"nvarchar(max)");
544 b.Property<
string>(
"CommitterName")
547 .HasColumnType(
"nvarchar(max)");
549 b.Property<
bool?>(
"CreateGitHubDeployments")
551 .HasColumnType(
"bit");
553 b.Property<
long>(
"InstanceId")
554 .HasColumnType(
"bigint");
556 b.Property<
bool?>(
"PostTestMergeComment")
558 .HasColumnType(
"bit");
560 b.Property<
bool?>(
"PushTestMergeCommits")
562 .HasColumnType(
"bit");
564 b.Property<
bool?>(
"ShowTestMergeCommitters")
566 .HasColumnType(
"bit");
568 b.Property<
bool?>(
"UpdateSubmodules")
570 .HasColumnType(
"bit");
574 b.HasIndex(
"InstanceId")
577 b.ToTable(
"RepositorySettings");
580 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
582 b.Property<
long>(
"Id")
583 .ValueGeneratedOnAdd()
584 .HasColumnType(
"bigint");
586 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"), 1L, 1);
588 b.Property<
long>(
"RevisionInformationId")
589 .HasColumnType(
"bigint");
591 b.Property<
long>(
"TestMergeId")
592 .HasColumnType(
"bigint");
596 b.HasIndex(
"RevisionInformationId");
598 b.HasIndex(
"TestMergeId");
600 b.ToTable(
"RevInfoTestMerges");
603 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
605 b.Property<
long>(
"Id")
606 .ValueGeneratedOnAdd()
607 .HasColumnType(
"bigint");
609 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"), 1L, 1);
611 b.Property<
string>(
"CommitSha")
614 .HasColumnType(
"nvarchar(40)");
616 b.Property<
long>(
"InstanceId")
617 .HasColumnType(
"bigint");
619 b.Property<
string>(
"OriginCommitSha")
622 .HasColumnType(
"nvarchar(40)");
624 b.Property<DateTimeOffset>(
"Timestamp")
625 .HasColumnType(
"datetimeoffset");
629 b.HasIndex(
"InstanceId",
"CommitSha")
632 b.ToTable(
"RevisionInformations");
635 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
637 b.Property<
long>(
"Id")
638 .ValueGeneratedOnAdd()
639 .HasColumnType(
"bigint");
641 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"), 1L, 1);
643 b.Property<
string>(
"Author")
645 .HasColumnType(
"nvarchar(max)");
647 b.Property<
string>(
"BodyAtMerge")
649 .HasColumnType(
"nvarchar(max)");
651 b.Property<
string>(
"Comment")
653 .HasColumnType(
"nvarchar(max)");
655 b.Property<DateTimeOffset>(
"MergedAt")
656 .HasColumnType(
"datetimeoffset");
658 b.Property<
long>(
"MergedById")
659 .HasColumnType(
"bigint");
661 b.Property<
int>(
"Number")
662 .HasColumnType(
"int");
664 b.Property<
long?>(
"PrimaryRevisionInformationId")
666 .HasColumnType(
"bigint");
668 b.Property<
string>(
"TargetCommitSha")
671 .HasColumnType(
"nvarchar(40)");
673 b.Property<
string>(
"TitleAtMerge")
675 .HasColumnType(
"nvarchar(max)");
677 b.Property<
string>(
"Url")
679 .HasColumnType(
"nvarchar(max)");
683 b.HasIndex(
"MergedById");
685 b.HasIndex(
"PrimaryRevisionInformationId")
688 b.ToTable(
"TestMerges");
691 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
693 b.Property<
long?>(
"Id")
694 .ValueGeneratedOnAdd()
695 .HasColumnType(
"bigint");
697 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"), 1L, 1);
699 b.Property<
string>(
"CanonicalName")
702 .HasColumnType(
"nvarchar(100)");
704 b.Property<DateTimeOffset?>(
"CreatedAt")
706 .HasColumnType(
"datetimeoffset");
708 b.Property<
long?>(
"CreatedById")
709 .HasColumnType(
"bigint");
711 b.Property<
bool?>(
"Enabled")
713 .HasColumnType(
"bit");
715 b.Property<
long?>(
"GroupId")
716 .HasColumnType(
"bigint");
718 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
719 .HasColumnType(
"datetimeoffset");
721 b.Property<
string>(
"Name")
724 .HasColumnType(
"nvarchar(100)");
726 b.Property<
string>(
"PasswordHash")
727 .HasColumnType(
"nvarchar(max)");
729 b.Property<
string>(
"SystemIdentifier")
731 .HasColumnType(
"nvarchar(100)");
735 b.HasIndex(
"CanonicalName")
738 b.HasIndex(
"CreatedById");
740 b.HasIndex(
"GroupId");
742 b.HasIndex(
"SystemIdentifier")
744 .HasFilter(
"[SystemIdentifier] IS NOT NULL");
749 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
751 b.Property<
long?>(
"Id")
752 .ValueGeneratedOnAdd()
753 .HasColumnType(
"bigint");
755 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"), 1L, 1);
757 b.Property<
string>(
"Name")
760 .HasColumnType(
"nvarchar(100)");
770 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
772 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
773 .WithMany(
"ChatSettings")
774 .HasForeignKey(
"InstanceId")
775 .OnDelete(DeleteBehavior.Cascade)
778 b.Navigation(
"Instance");
781 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
783 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
784 .WithMany(
"Channels")
785 .HasForeignKey(
"ChatSettingsId")
786 .OnDelete(DeleteBehavior.Cascade)
789 b.Navigation(
"ChatSettings");
792 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
794 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
796 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
797 .OnDelete(DeleteBehavior.Cascade)
800 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
801 .WithMany(
"CompileJobs")
802 .HasForeignKey(
"RevisionInformationId")
803 .OnDelete(DeleteBehavior.ClientNoAction)
808 b.Navigation(
"RevisionInformation");
811 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
813 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
814 .WithOne(
"DreamDaemonSettings")
815 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
816 .OnDelete(DeleteBehavior.Cascade)
819 b.Navigation(
"Instance");
822 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
824 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
825 .WithOne(
"DreamMakerSettings")
826 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
827 .OnDelete(DeleteBehavior.Cascade)
830 b.Navigation(
"Instance");
833 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
835 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
836 .WithMany(
"InstancePermissionSets")
837 .HasForeignKey(
"InstanceId")
838 .OnDelete(DeleteBehavior.Cascade)
841 b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet",
"PermissionSet")
842 .WithMany(
"InstancePermissionSets")
843 .HasForeignKey(
"PermissionSetId")
844 .OnDelete(DeleteBehavior.Cascade)
847 b.Navigation(
"Instance");
849 b.Navigation(
"PermissionSet");
852 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
854 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
856 .HasForeignKey(
"CancelledById");
858 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
860 .HasForeignKey(
"InstanceId")
861 .OnDelete(DeleteBehavior.Cascade)
864 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
866 .HasForeignKey(
"StartedById")
867 .OnDelete(DeleteBehavior.Cascade)
870 b.Navigation(
"CancelledBy");
872 b.Navigation(
"Instance");
874 b.Navigation(
"StartedBy");
877 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
879 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
880 .WithMany(
"OAuthConnections")
881 .HasForeignKey(
"UserId")
882 .OnDelete(DeleteBehavior.Cascade);
884 b.Navigation(
"User");
887 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
889 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
890 .WithOne(
"PermissionSet")
891 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"GroupId")
892 .OnDelete(DeleteBehavior.Cascade);
894 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
895 .WithOne(
"PermissionSet")
896 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"UserId")
897 .OnDelete(DeleteBehavior.Cascade);
899 b.Navigation(
"Group");
901 b.Navigation(
"User");
904 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
906 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
908 .HasForeignKey(
"CompileJobId")
909 .OnDelete(DeleteBehavior.Cascade)
912 b.Navigation(
"CompileJob");
915 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
917 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
918 .WithOne(
"RepositorySettings")
919 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
920 .OnDelete(DeleteBehavior.Cascade)
923 b.Navigation(
"Instance");
926 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
928 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
929 .WithMany(
"ActiveTestMerges")
930 .HasForeignKey(
"RevisionInformationId")
931 .OnDelete(DeleteBehavior.Cascade)
934 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
935 .WithMany(
"RevisonInformations")
936 .HasForeignKey(
"TestMergeId")
937 .OnDelete(DeleteBehavior.ClientNoAction)
940 b.Navigation(
"RevisionInformation");
942 b.Navigation(
"TestMerge");
945 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
947 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
948 .WithMany(
"RevisionInformations")
949 .HasForeignKey(
"InstanceId")
950 .OnDelete(DeleteBehavior.Cascade)
953 b.Navigation(
"Instance");
956 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
958 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
959 .WithMany(
"TestMerges")
960 .HasForeignKey(
"MergedById")
961 .OnDelete(DeleteBehavior.Restrict)
964 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
965 .WithOne(
"PrimaryTestMerge")
966 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
967 .OnDelete(DeleteBehavior.Cascade)
970 b.Navigation(
"MergedBy");
972 b.Navigation(
"PrimaryRevisionInformation");
975 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
977 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
978 .WithMany(
"CreatedUsers")
979 .HasForeignKey(
"CreatedById");
981 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
983 .HasForeignKey(
"GroupId");
985 b.Navigation(
"CreatedBy");
987 b.Navigation(
"Group");
990 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
992 b.Navigation(
"Channels");
995 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
997 b.Navigation(
"ChatSettings");
999 b.Navigation(
"DreamDaemonSettings");
1001 b.Navigation(
"DreamMakerSettings");
1003 b.Navigation(
"InstancePermissionSets");
1005 b.Navigation(
"Jobs");
1007 b.Navigation(
"RepositorySettings");
1009 b.Navigation(
"RevisionInformations");
1012 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
1014 b.Navigation(
"InstancePermissionSets");
1017 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1019 b.Navigation(
"ActiveTestMerges");
1021 b.Navigation(
"CompileJobs");
1023 b.Navigation(
"PrimaryTestMerge");
1026 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1028 b.Navigation(
"RevisonInformations");
1031 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1033 b.Navigation(
"CreatedUsers");
1035 b.Navigation(
"OAuthConnections");
1037 b.Navigation(
"PermissionSet");
1039 b.Navigation(
"TestMerges");
1042 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
1044 b.Navigation(
"PermissionSet")
1047 b.Navigation(
"Users");
1049#pragma warning restore 612, 618