17#pragma warning disable 612, 618
19 .HasAnnotation(
"ProductVersion",
"8.0.8")
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<
int>(
"DMApiValidationMode")
270 .HasColumnType(
"int");
272 b.Property<
long>(
"InstanceId")
273 .HasColumnType(
"bigint");
275 b.Property<
string>(
"ProjectName")
277 .HasColumnType(
"nvarchar(max)");
279 b.Property<TimeSpan?>(
"Timeout")
281 .HasColumnType(
"time");
285 b.HasIndex(
"InstanceId")
288 b.ToTable(
"DreamMakerSettings");
291 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
293 b.Property<
long?>(
"Id")
294 .ValueGeneratedOnAdd()
295 .HasColumnType(
"bigint");
297 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
299 b.Property<
string>(
"AutoUpdateCron")
302 .HasColumnType(
"nvarchar(max)");
304 b.Property<
long>(
"AutoUpdateInterval")
305 .HasColumnType(
"bigint");
307 b.Property<
int>(
"ChatBotLimit")
308 .HasColumnType(
"int");
310 b.Property<
int>(
"ConfigurationType")
311 .HasColumnType(
"int");
313 b.Property<
string>(
"Name")
316 .HasColumnType(
"nvarchar(100)");
318 b.Property<
bool?>(
"Online")
320 .HasColumnType(
"bit");
322 b.Property<
string>(
"Path")
324 .HasColumnType(
"nvarchar(450)");
326 b.Property<
string>(
"SwarmIdentifer")
327 .HasColumnType(
"nvarchar(450)");
331 b.HasIndex(
"Path",
"SwarmIdentifer")
333 .HasFilter(
"[SwarmIdentifer] IS NOT NULL");
335 b.ToTable(
"Instances");
338 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
340 b.Property<
long>(
"Id")
341 .ValueGeneratedOnAdd()
342 .HasColumnType(
"bigint");
344 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
346 b.Property<decimal>(
"ChatBotRights")
347 .HasColumnType(
"decimal(20,0)");
349 b.Property<decimal>(
"ConfigurationRights")
350 .HasColumnType(
"decimal(20,0)");
352 b.Property<decimal>(
"DreamDaemonRights")
353 .HasColumnType(
"decimal(20,0)");
355 b.Property<decimal>(
"DreamMakerRights")
356 .HasColumnType(
"decimal(20,0)");
358 b.Property<decimal>(
"EngineRights")
359 .HasColumnType(
"decimal(20,0)");
361 b.Property<
long>(
"InstanceId")
362 .HasColumnType(
"bigint");
364 b.Property<decimal>(
"InstancePermissionSetRights")
365 .HasColumnType(
"decimal(20,0)");
367 b.Property<
long>(
"PermissionSetId")
368 .HasColumnType(
"bigint");
370 b.Property<decimal>(
"RepositoryRights")
371 .HasColumnType(
"decimal(20,0)");
375 b.HasIndex(
"InstanceId");
377 b.HasIndex(
"PermissionSetId",
"InstanceId")
380 b.ToTable(
"InstancePermissionSets");
383 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
385 b.Property<
long?>(
"Id")
386 .ValueGeneratedOnAdd()
387 .HasColumnType(
"bigint");
389 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
391 b.Property<decimal?>(
"CancelRight")
392 .HasColumnType(
"decimal(20,0)");
394 b.Property<decimal?>(
"CancelRightsType")
395 .HasColumnType(
"decimal(20,0)");
397 b.Property<
bool?>(
"Cancelled")
399 .HasColumnType(
"bit");
401 b.Property<
long?>(
"CancelledById")
402 .HasColumnType(
"bigint");
404 b.Property<
string>(
"Description")
406 .HasColumnType(
"nvarchar(max)");
408 b.Property<
long?>(
"ErrorCode")
409 .HasColumnType(
"bigint");
411 b.Property<
string>(
"ExceptionDetails")
412 .HasColumnType(
"nvarchar(max)");
414 b.Property<
long>(
"InstanceId")
415 .HasColumnType(
"bigint");
417 b.Property<
byte>(
"JobCode")
418 .HasColumnType(
"tinyint");
420 b.Property<DateTimeOffset?>(
"StartedAt")
422 .HasColumnType(
"datetimeoffset");
424 b.Property<
long>(
"StartedById")
425 .HasColumnType(
"bigint");
427 b.Property<DateTimeOffset?>(
"StoppedAt")
428 .HasColumnType(
"datetimeoffset");
432 b.HasIndex(
"CancelledById");
434 b.HasIndex(
"InstanceId");
436 b.HasIndex(
"StartedById");
441 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
443 b.Property<
long>(
"Id")
444 .ValueGeneratedOnAdd()
445 .HasColumnType(
"bigint");
447 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
449 b.Property<
string>(
"ExternalUserId")
452 .HasColumnType(
"nvarchar(100)");
454 b.Property<
int>(
"Provider")
455 .HasColumnType(
"int");
457 b.Property<
long?>(
"UserId")
458 .HasColumnType(
"bigint");
462 b.HasIndex(
"UserId");
464 b.HasIndex(
"Provider",
"ExternalUserId")
467 b.ToTable(
"OAuthConnections");
470 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
472 b.Property<
long?>(
"Id")
473 .ValueGeneratedOnAdd()
474 .HasColumnType(
"bigint");
476 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
478 b.Property<decimal>(
"AdministrationRights")
479 .HasColumnType(
"decimal(20,0)");
481 b.Property<
long?>(
"GroupId")
482 .HasColumnType(
"bigint");
484 b.Property<decimal>(
"InstanceManagerRights")
485 .HasColumnType(
"decimal(20,0)");
487 b.Property<
long?>(
"UserId")
488 .HasColumnType(
"bigint");
492 b.HasIndex(
"GroupId")
494 .HasFilter(
"[GroupId] IS NOT NULL");
498 .HasFilter(
"[UserId] IS NOT NULL");
500 b.ToTable(
"PermissionSets");
503 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
505 b.Property<
long?>(
"Id")
506 .ValueGeneratedOnAdd()
507 .HasColumnType(
"bigint");
509 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
511 b.Property<
string>(
"AccessIdentifier")
513 .HasColumnType(
"nvarchar(max)");
515 b.Property<
long>(
"CompileJobId")
516 .HasColumnType(
"bigint");
518 b.Property<
long?>(
"InitialCompileJobId")
519 .HasColumnType(
"bigint");
521 b.Property<
int>(
"LaunchSecurityLevel")
522 .HasColumnType(
"int");
524 b.Property<
int>(
"LaunchVisibility")
525 .HasColumnType(
"int");
527 b.Property<
int>(
"Port")
528 .HasColumnType(
"int");
530 b.Property<
int>(
"ProcessId")
531 .HasColumnType(
"int");
533 b.Property<
int>(
"RebootState")
534 .HasColumnType(
"int");
536 b.Property<
int?>(
"TopicPort")
537 .HasColumnType(
"int");
541 b.HasIndex(
"CompileJobId");
543 b.HasIndex(
"InitialCompileJobId");
545 b.ToTable(
"ReattachInformations");
548 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
550 b.Property<
long>(
"Id")
551 .ValueGeneratedOnAdd()
552 .HasColumnType(
"bigint");
554 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
556 b.Property<
string>(
"AccessToken")
558 .HasColumnType(
"nvarchar(max)");
560 b.Property<
string>(
"AccessUser")
562 .HasColumnType(
"nvarchar(max)");
564 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
566 .HasColumnType(
"bit");
568 b.Property<
bool?>(
"AutoUpdatesSynchronize")
570 .HasColumnType(
"bit");
572 b.Property<
string>(
"CommitterEmail")
575 .HasColumnType(
"nvarchar(max)");
577 b.Property<
string>(
"CommitterName")
580 .HasColumnType(
"nvarchar(max)");
582 b.Property<
bool?>(
"CreateGitHubDeployments")
584 .HasColumnType(
"bit");
586 b.Property<
long>(
"InstanceId")
587 .HasColumnType(
"bigint");
589 b.Property<
bool?>(
"PostTestMergeComment")
591 .HasColumnType(
"bit");
593 b.Property<
bool?>(
"PushTestMergeCommits")
595 .HasColumnType(
"bit");
597 b.Property<
bool?>(
"ShowTestMergeCommitters")
599 .HasColumnType(
"bit");
601 b.Property<
bool?>(
"UpdateSubmodules")
603 .HasColumnType(
"bit");
607 b.HasIndex(
"InstanceId")
610 b.ToTable(
"RepositorySettings");
613 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
615 b.Property<
long>(
"Id")
616 .ValueGeneratedOnAdd()
617 .HasColumnType(
"bigint");
619 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
621 b.Property<
long>(
"RevisionInformationId")
622 .HasColumnType(
"bigint");
624 b.Property<
long>(
"TestMergeId")
625 .HasColumnType(
"bigint");
629 b.HasIndex(
"RevisionInformationId");
631 b.HasIndex(
"TestMergeId");
633 b.ToTable(
"RevInfoTestMerges");
636 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
638 b.Property<
long>(
"Id")
639 .ValueGeneratedOnAdd()
640 .HasColumnType(
"bigint");
642 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
644 b.Property<
string>(
"CommitSha")
647 .HasColumnType(
"nvarchar(40)");
649 b.Property<
long>(
"InstanceId")
650 .HasColumnType(
"bigint");
652 b.Property<
string>(
"OriginCommitSha")
655 .HasColumnType(
"nvarchar(40)");
657 b.Property<DateTimeOffset>(
"Timestamp")
658 .HasColumnType(
"datetimeoffset");
662 b.HasIndex(
"InstanceId",
"CommitSha")
665 b.ToTable(
"RevisionInformations");
668 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
670 b.Property<
long>(
"Id")
671 .ValueGeneratedOnAdd()
672 .HasColumnType(
"bigint");
674 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"));
676 b.Property<
string>(
"Author")
678 .HasColumnType(
"nvarchar(max)");
680 b.Property<
string>(
"BodyAtMerge")
682 .HasColumnType(
"nvarchar(max)");
684 b.Property<
string>(
"Comment")
686 .HasColumnType(
"nvarchar(max)");
688 b.Property<DateTimeOffset>(
"MergedAt")
689 .HasColumnType(
"datetimeoffset");
691 b.Property<
long>(
"MergedById")
692 .HasColumnType(
"bigint");
694 b.Property<
int>(
"Number")
695 .HasColumnType(
"int");
697 b.Property<
long?>(
"PrimaryRevisionInformationId")
699 .HasColumnType(
"bigint");
701 b.Property<
string>(
"TargetCommitSha")
704 .HasColumnType(
"nvarchar(40)");
706 b.Property<
string>(
"TitleAtMerge")
708 .HasColumnType(
"nvarchar(max)");
710 b.Property<
string>(
"Url")
712 .HasColumnType(
"nvarchar(max)");
716 b.HasIndex(
"MergedById");
718 b.HasIndex(
"PrimaryRevisionInformationId")
721 b.ToTable(
"TestMerges");
724 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
726 b.Property<
long?>(
"Id")
727 .ValueGeneratedOnAdd()
728 .HasColumnType(
"bigint");
730 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
732 b.Property<
string>(
"CanonicalName")
735 .HasColumnType(
"nvarchar(100)");
737 b.Property<DateTimeOffset?>(
"CreatedAt")
739 .HasColumnType(
"datetimeoffset");
741 b.Property<
long?>(
"CreatedById")
742 .HasColumnType(
"bigint");
744 b.Property<
bool?>(
"Enabled")
746 .HasColumnType(
"bit");
748 b.Property<
long?>(
"GroupId")
749 .HasColumnType(
"bigint");
751 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
752 .HasColumnType(
"datetimeoffset");
754 b.Property<
string>(
"Name")
757 .HasColumnType(
"nvarchar(100)");
759 b.Property<
string>(
"PasswordHash")
760 .HasColumnType(
"nvarchar(max)");
762 b.Property<
string>(
"SystemIdentifier")
764 .HasColumnType(
"nvarchar(100)");
768 b.HasIndex(
"CanonicalName")
771 b.HasIndex(
"CreatedById");
773 b.HasIndex(
"GroupId");
775 b.HasIndex(
"SystemIdentifier")
777 .HasFilter(
"[SystemIdentifier] IS NOT NULL");
782 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
784 b.Property<
long?>(
"Id")
785 .ValueGeneratedOnAdd()
786 .HasColumnType(
"bigint");
788 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"));
790 b.Property<
string>(
"Name")
793 .HasColumnType(
"nvarchar(100)");
803 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
805 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
806 .WithMany(
"ChatSettings")
807 .HasForeignKey(
"InstanceId")
808 .OnDelete(DeleteBehavior.Cascade)
811 b.Navigation(
"Instance");
814 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
816 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
817 .WithMany(
"Channels")
818 .HasForeignKey(
"ChatSettingsId")
819 .OnDelete(DeleteBehavior.Cascade)
822 b.Navigation(
"ChatSettings");
825 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
827 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
829 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
830 .OnDelete(DeleteBehavior.Cascade)
833 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
834 .WithMany(
"CompileJobs")
835 .HasForeignKey(
"RevisionInformationId")
836 .OnDelete(DeleteBehavior.ClientNoAction)
841 b.Navigation(
"RevisionInformation");
844 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
846 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
847 .WithOne(
"DreamDaemonSettings")
848 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
849 .OnDelete(DeleteBehavior.Cascade)
852 b.Navigation(
"Instance");
855 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
857 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
858 .WithOne(
"DreamMakerSettings")
859 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
860 .OnDelete(DeleteBehavior.Cascade)
863 b.Navigation(
"Instance");
866 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
868 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
869 .WithMany(
"InstancePermissionSets")
870 .HasForeignKey(
"InstanceId")
871 .OnDelete(DeleteBehavior.Cascade)
874 b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet",
"PermissionSet")
875 .WithMany(
"InstancePermissionSets")
876 .HasForeignKey(
"PermissionSetId")
877 .OnDelete(DeleteBehavior.Cascade)
880 b.Navigation(
"Instance");
882 b.Navigation(
"PermissionSet");
885 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
887 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
889 .HasForeignKey(
"CancelledById");
891 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
893 .HasForeignKey(
"InstanceId")
894 .OnDelete(DeleteBehavior.Cascade)
897 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
899 .HasForeignKey(
"StartedById")
900 .OnDelete(DeleteBehavior.Cascade)
903 b.Navigation(
"CancelledBy");
905 b.Navigation(
"Instance");
907 b.Navigation(
"StartedBy");
910 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
912 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
913 .WithMany(
"OAuthConnections")
914 .HasForeignKey(
"UserId")
915 .OnDelete(DeleteBehavior.Cascade);
917 b.Navigation(
"User");
920 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
922 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
923 .WithOne(
"PermissionSet")
924 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"GroupId")
925 .OnDelete(DeleteBehavior.Cascade);
927 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
928 .WithOne(
"PermissionSet")
929 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"UserId")
930 .OnDelete(DeleteBehavior.Cascade);
932 b.Navigation(
"Group");
934 b.Navigation(
"User");
937 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
939 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
941 .HasForeignKey(
"CompileJobId")
942 .OnDelete(DeleteBehavior.Cascade)
945 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"InitialCompileJob")
947 .HasForeignKey(
"InitialCompileJobId");
949 b.Navigation(
"CompileJob");
951 b.Navigation(
"InitialCompileJob");
954 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
956 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
957 .WithOne(
"RepositorySettings")
958 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
959 .OnDelete(DeleteBehavior.Cascade)
962 b.Navigation(
"Instance");
965 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
967 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
968 .WithMany(
"ActiveTestMerges")
969 .HasForeignKey(
"RevisionInformationId")
970 .OnDelete(DeleteBehavior.Cascade)
973 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
974 .WithMany(
"RevisonInformations")
975 .HasForeignKey(
"TestMergeId")
976 .OnDelete(DeleteBehavior.ClientNoAction)
979 b.Navigation(
"RevisionInformation");
981 b.Navigation(
"TestMerge");
984 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
986 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
987 .WithMany(
"RevisionInformations")
988 .HasForeignKey(
"InstanceId")
989 .OnDelete(DeleteBehavior.Cascade)
992 b.Navigation(
"Instance");
995 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
997 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
998 .WithMany(
"TestMerges")
999 .HasForeignKey(
"MergedById")
1000 .OnDelete(DeleteBehavior.Restrict)
1003 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
1004 .WithOne(
"PrimaryTestMerge")
1005 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
1006 .OnDelete(DeleteBehavior.Cascade)
1009 b.Navigation(
"MergedBy");
1011 b.Navigation(
"PrimaryRevisionInformation");
1014 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1016 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
1017 .WithMany(
"CreatedUsers")
1018 .HasForeignKey(
"CreatedById");
1020 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
1022 .HasForeignKey(
"GroupId");
1024 b.Navigation(
"CreatedBy");
1026 b.Navigation(
"Group");
1029 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
1031 b.Navigation(
"Channels");
1034 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
1036 b.Navigation(
"ChatSettings");
1038 b.Navigation(
"DreamDaemonSettings");
1040 b.Navigation(
"DreamMakerSettings");
1042 b.Navigation(
"InstancePermissionSets");
1044 b.Navigation(
"Jobs");
1046 b.Navigation(
"RepositorySettings");
1048 b.Navigation(
"RevisionInformations");
1051 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
1053 b.Navigation(
"InstancePermissionSets");
1056 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1058 b.Navigation(
"ActiveTestMerges");
1060 b.Navigation(
"CompileJobs");
1062 b.Navigation(
"PrimaryTestMerge");
1065 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1067 b.Navigation(
"RevisonInformations");
1070 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1072 b.Navigation(
"CreatedUsers");
1074 b.Navigation(
"OAuthConnections");
1076 b.Navigation(
"PermissionSet");
1078 b.Navigation(
"TestMerges");
1081 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
1083 b.Navigation(
"PermissionSet")
1086 b.Navigation(
"Users");
1088#pragma warning restore 612, 618