17#pragma warning disable 612, 618
19 .HasAnnotation(
"ProductVersion",
"8.0.8")
20 .HasAnnotation(
"Relational:MaxIdentifierLength", 63);
22 NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
24 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
26 b.Property<
long?>(
"Id")
27 .ValueGeneratedOnAdd()
28 .HasColumnType(
"bigint");
30 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
32 b.Property<
int>(
"ChannelLimit")
33 .HasColumnType(
"integer");
35 b.Property<
string>(
"ConnectionString")
38 .HasColumnType(
"character varying(10000)");
40 b.Property<
bool?>(
"Enabled")
41 .HasColumnType(
"boolean");
43 b.Property<
long>(
"InstanceId")
44 .HasColumnType(
"bigint");
46 b.Property<
string>(
"Name")
49 .HasColumnType(
"character varying(100)");
51 b.Property<
int>(
"Provider")
52 .HasColumnType(
"integer");
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 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
73 b.Property<
long>(
"ChatSettingsId")
74 .HasColumnType(
"bigint");
76 b.Property<decimal?>(
"DiscordChannelId")
77 .HasColumnType(
"numeric(20,0)");
79 b.Property<
string>(
"IrcChannel")
81 .HasColumnType(
"character varying(100)");
83 b.Property<
bool?>(
"IsAdminChannel")
85 .HasColumnType(
"boolean");
87 b.Property<
bool?>(
"IsSystemChannel")
89 .HasColumnType(
"boolean");
91 b.Property<
bool?>(
"IsUpdatesChannel")
93 .HasColumnType(
"boolean");
95 b.Property<
bool?>(
"IsWatchdogChannel")
97 .HasColumnType(
"boolean");
99 b.Property<
string>(
"Tag")
101 .HasColumnType(
"character varying(10000)");
105 b.HasIndex(
"ChatSettingsId",
"DiscordChannelId")
108 b.HasIndex(
"ChatSettingsId",
"IrcChannel")
111 b.ToTable(
"ChatChannels");
114 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
116 b.Property<
long?>(
"Id")
117 .ValueGeneratedOnAdd()
118 .HasColumnType(
"bigint");
120 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
122 b.Property<
int?>(
"DMApiMajorVersion")
123 .HasColumnType(
"integer");
125 b.Property<
int?>(
"DMApiMinorVersion")
126 .HasColumnType(
"integer");
128 b.Property<
int?>(
"DMApiPatchVersion")
129 .HasColumnType(
"integer");
131 b.Property<Guid?>(
"DirectoryName")
133 .HasColumnType(
"uuid");
135 b.Property<
string>(
"DmeName")
137 .HasColumnType(
"text");
139 b.Property<
string>(
"EngineVersion")
141 .HasColumnType(
"text");
143 b.Property<
long?>(
"GitHubDeploymentId")
144 .HasColumnType(
"bigint");
146 b.Property<
long?>(
"GitHubRepoId")
147 .HasColumnType(
"bigint");
149 b.Property<
long>(
"JobId")
150 .HasColumnType(
"bigint");
152 b.Property<
int?>(
"MinimumSecurityLevel")
153 .HasColumnType(
"integer");
155 b.Property<
string>(
"Output")
157 .HasColumnType(
"text");
159 b.Property<
string>(
"RepositoryOrigin")
160 .HasColumnType(
"text");
162 b.Property<
long>(
"RevisionInformationId")
163 .HasColumnType(
"bigint");
167 b.HasIndex(
"DirectoryName");
172 b.HasIndex(
"RevisionInformationId");
174 b.ToTable(
"CompileJobs");
177 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
179 b.Property<
long>(
"Id")
180 .ValueGeneratedOnAdd()
181 .HasColumnType(
"bigint");
183 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
185 b.Property<
string>(
"AdditionalParameters")
188 .HasColumnType(
"character varying(10000)");
190 b.Property<
bool?>(
"AllowWebClient")
192 .HasColumnType(
"boolean");
194 b.Property<
bool?>(
"AutoStart")
196 .HasColumnType(
"boolean");
198 b.Property<
bool?>(
"DumpOnHealthCheckRestart")
200 .HasColumnType(
"boolean");
202 b.Property<
long>(
"HealthCheckSeconds")
203 .HasColumnType(
"bigint");
205 b.Property<
long>(
"InstanceId")
206 .HasColumnType(
"bigint");
208 b.Property<
bool?>(
"LogOutput")
210 .HasColumnType(
"boolean");
212 b.Property<
long>(
"MapThreads")
213 .HasColumnType(
"bigint");
215 b.Property<
bool?>(
"Minidumps")
217 .HasColumnType(
"boolean");
219 b.Property<
int>(
"OpenDreamTopicPort")
220 .HasColumnType(
"integer");
222 b.Property<
int>(
"Port")
223 .HasColumnType(
"integer");
225 b.Property<
int>(
"SecurityLevel")
226 .HasColumnType(
"integer");
228 b.Property<
bool?>(
"StartProfiler")
230 .HasColumnType(
"boolean");
232 b.Property<
long>(
"StartupTimeout")
233 .HasColumnType(
"bigint");
235 b.Property<
long>(
"TopicRequestTimeout")
236 .HasColumnType(
"bigint");
238 b.Property<
int>(
"Visibility")
239 .HasColumnType(
"integer");
243 b.HasIndex(
"InstanceId")
246 b.ToTable(
"DreamDaemonSettings");
249 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
251 b.Property<
long>(
"Id")
252 .ValueGeneratedOnAdd()
253 .HasColumnType(
"bigint");
255 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
257 b.Property<
int>(
"ApiValidationPort")
258 .HasColumnType(
"integer");
260 b.Property<
int>(
"ApiValidationSecurityLevel")
261 .HasColumnType(
"integer");
263 b.Property<
string>(
"CompilerAdditionalArguments")
265 .HasColumnType(
"character varying(10000)");
267 b.Property<
int>(
"DMApiValidationMode")
268 .HasColumnType(
"integer");
270 b.Property<
long>(
"InstanceId")
271 .HasColumnType(
"bigint");
273 b.Property<
string>(
"ProjectName")
275 .HasColumnType(
"character varying(10000)");
277 b.Property<TimeSpan?>(
"Timeout")
279 .HasColumnType(
"interval");
283 b.HasIndex(
"InstanceId")
286 b.ToTable(
"DreamMakerSettings");
289 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
291 b.Property<
long?>(
"Id")
292 .ValueGeneratedOnAdd()
293 .HasColumnType(
"bigint");
295 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
297 b.Property<
string>(
"AutoUpdateCron")
300 .HasColumnType(
"character varying(10000)");
302 b.Property<
long>(
"AutoUpdateInterval")
303 .HasColumnType(
"bigint");
305 b.Property<
int>(
"ChatBotLimit")
306 .HasColumnType(
"integer");
308 b.Property<
int>(
"ConfigurationType")
309 .HasColumnType(
"integer");
311 b.Property<
string>(
"Name")
314 .HasColumnType(
"character varying(100)");
316 b.Property<
bool?>(
"Online")
318 .HasColumnType(
"boolean");
320 b.Property<
string>(
"Path")
322 .HasColumnType(
"text");
324 b.Property<
string>(
"SwarmIdentifer")
325 .HasColumnType(
"text");
329 b.HasIndex(
"Path",
"SwarmIdentifer")
332 b.ToTable(
"Instances");
335 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
337 b.Property<
long>(
"Id")
338 .ValueGeneratedOnAdd()
339 .HasColumnType(
"bigint");
341 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
343 b.Property<decimal>(
"ChatBotRights")
344 .HasColumnType(
"numeric(20,0)");
346 b.Property<decimal>(
"ConfigurationRights")
347 .HasColumnType(
"numeric(20,0)");
349 b.Property<decimal>(
"DreamDaemonRights")
350 .HasColumnType(
"numeric(20,0)");
352 b.Property<decimal>(
"DreamMakerRights")
353 .HasColumnType(
"numeric(20,0)");
355 b.Property<decimal>(
"EngineRights")
356 .HasColumnType(
"numeric(20,0)");
358 b.Property<
long>(
"InstanceId")
359 .HasColumnType(
"bigint");
361 b.Property<decimal>(
"InstancePermissionSetRights")
362 .HasColumnType(
"numeric(20,0)");
364 b.Property<
long>(
"PermissionSetId")
365 .HasColumnType(
"bigint");
367 b.Property<decimal>(
"RepositoryRights")
368 .HasColumnType(
"numeric(20,0)");
372 b.HasIndex(
"InstanceId");
374 b.HasIndex(
"PermissionSetId",
"InstanceId")
377 b.ToTable(
"InstancePermissionSets");
380 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
382 b.Property<
long?>(
"Id")
383 .ValueGeneratedOnAdd()
384 .HasColumnType(
"bigint");
386 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
388 b.Property<decimal?>(
"CancelRight")
389 .HasColumnType(
"numeric(20,0)");
391 b.Property<decimal?>(
"CancelRightsType")
392 .HasColumnType(
"numeric(20,0)");
394 b.Property<
bool?>(
"Cancelled")
396 .HasColumnType(
"boolean");
398 b.Property<
long?>(
"CancelledById")
399 .HasColumnType(
"bigint");
401 b.Property<
string>(
"Description")
403 .HasColumnType(
"text");
405 b.Property<
long?>(
"ErrorCode")
406 .HasColumnType(
"bigint");
408 b.Property<
string>(
"ExceptionDetails")
409 .HasColumnType(
"text");
411 b.Property<
long>(
"InstanceId")
412 .HasColumnType(
"bigint");
414 b.Property<
byte>(
"JobCode")
415 .HasColumnType(
"smallint");
417 b.Property<DateTimeOffset?>(
"StartedAt")
419 .HasColumnType(
"timestamp with time zone");
421 b.Property<
long>(
"StartedById")
422 .HasColumnType(
"bigint");
424 b.Property<DateTimeOffset?>(
"StoppedAt")
425 .HasColumnType(
"timestamp with time zone");
429 b.HasIndex(
"CancelledById");
431 b.HasIndex(
"InstanceId");
433 b.HasIndex(
"StartedById");
438 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
440 b.Property<
long>(
"Id")
441 .ValueGeneratedOnAdd()
442 .HasColumnType(
"bigint");
444 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
446 b.Property<
string>(
"ExternalUserId")
449 .HasColumnType(
"character varying(100)");
451 b.Property<
int>(
"Provider")
452 .HasColumnType(
"integer");
454 b.Property<
long?>(
"UserId")
455 .HasColumnType(
"bigint");
459 b.HasIndex(
"UserId");
461 b.HasIndex(
"Provider",
"ExternalUserId")
464 b.ToTable(
"OAuthConnections");
467 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
469 b.Property<
long?>(
"Id")
470 .ValueGeneratedOnAdd()
471 .HasColumnType(
"bigint");
473 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
475 b.Property<decimal>(
"AdministrationRights")
476 .HasColumnType(
"numeric(20,0)");
478 b.Property<
long?>(
"GroupId")
479 .HasColumnType(
"bigint");
481 b.Property<decimal>(
"InstanceManagerRights")
482 .HasColumnType(
"numeric(20,0)");
484 b.Property<
long?>(
"UserId")
485 .HasColumnType(
"bigint");
489 b.HasIndex(
"GroupId")
495 b.ToTable(
"PermissionSets");
498 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
500 b.Property<
long?>(
"Id")
501 .ValueGeneratedOnAdd()
502 .HasColumnType(
"bigint");
504 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
506 b.Property<
string>(
"AccessIdentifier")
508 .HasColumnType(
"text");
510 b.Property<
long>(
"CompileJobId")
511 .HasColumnType(
"bigint");
513 b.Property<
long?>(
"InitialCompileJobId")
514 .HasColumnType(
"bigint");
516 b.Property<
int>(
"LaunchSecurityLevel")
517 .HasColumnType(
"integer");
519 b.Property<
int>(
"LaunchVisibility")
520 .HasColumnType(
"integer");
522 b.Property<
int>(
"Port")
523 .HasColumnType(
"integer");
525 b.Property<
int>(
"ProcessId")
526 .HasColumnType(
"integer");
528 b.Property<
int>(
"RebootState")
529 .HasColumnType(
"integer");
531 b.Property<
int?>(
"TopicPort")
532 .HasColumnType(
"integer");
536 b.HasIndex(
"CompileJobId");
538 b.HasIndex(
"InitialCompileJobId");
540 b.ToTable(
"ReattachInformations");
543 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
545 b.Property<
long>(
"Id")
546 .ValueGeneratedOnAdd()
547 .HasColumnType(
"bigint");
549 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
551 b.Property<
string>(
"AccessToken")
553 .HasColumnType(
"character varying(10000)");
555 b.Property<
string>(
"AccessUser")
557 .HasColumnType(
"character varying(10000)");
559 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
561 .HasColumnType(
"boolean");
563 b.Property<
bool?>(
"AutoUpdatesSynchronize")
565 .HasColumnType(
"boolean");
567 b.Property<
string>(
"CommitterEmail")
570 .HasColumnType(
"character varying(10000)");
572 b.Property<
string>(
"CommitterName")
575 .HasColumnType(
"character varying(10000)");
577 b.Property<
bool?>(
"CreateGitHubDeployments")
579 .HasColumnType(
"boolean");
581 b.Property<
long>(
"InstanceId")
582 .HasColumnType(
"bigint");
584 b.Property<
bool?>(
"PostTestMergeComment")
586 .HasColumnType(
"boolean");
588 b.Property<
bool?>(
"PushTestMergeCommits")
590 .HasColumnType(
"boolean");
592 b.Property<
bool?>(
"ShowTestMergeCommitters")
594 .HasColumnType(
"boolean");
596 b.Property<
bool?>(
"UpdateSubmodules")
598 .HasColumnType(
"boolean");
602 b.HasIndex(
"InstanceId")
605 b.ToTable(
"RepositorySettings");
608 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
610 b.Property<
long>(
"Id")
611 .ValueGeneratedOnAdd()
612 .HasColumnType(
"bigint");
614 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
616 b.Property<
long>(
"RevisionInformationId")
617 .HasColumnType(
"bigint");
619 b.Property<
long>(
"TestMergeId")
620 .HasColumnType(
"bigint");
624 b.HasIndex(
"RevisionInformationId");
626 b.HasIndex(
"TestMergeId");
628 b.ToTable(
"RevInfoTestMerges");
631 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
633 b.Property<
long>(
"Id")
634 .ValueGeneratedOnAdd()
635 .HasColumnType(
"bigint");
637 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
639 b.Property<
string>(
"CommitSha")
642 .HasColumnType(
"character varying(40)");
644 b.Property<
long>(
"InstanceId")
645 .HasColumnType(
"bigint");
647 b.Property<
string>(
"OriginCommitSha")
650 .HasColumnType(
"character varying(40)");
652 b.Property<DateTimeOffset>(
"Timestamp")
653 .HasColumnType(
"timestamp with time zone");
657 b.HasIndex(
"InstanceId",
"CommitSha")
660 b.ToTable(
"RevisionInformations");
663 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
665 b.Property<
long>(
"Id")
666 .ValueGeneratedOnAdd()
667 .HasColumnType(
"bigint");
669 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
671 b.Property<
string>(
"Author")
673 .HasColumnType(
"text");
675 b.Property<
string>(
"BodyAtMerge")
677 .HasColumnType(
"text");
679 b.Property<
string>(
"Comment")
681 .HasColumnType(
"character varying(10000)");
683 b.Property<DateTimeOffset>(
"MergedAt")
684 .HasColumnType(
"timestamp with time zone");
686 b.Property<
long>(
"MergedById")
687 .HasColumnType(
"bigint");
689 b.Property<
int>(
"Number")
690 .HasColumnType(
"integer");
692 b.Property<
long?>(
"PrimaryRevisionInformationId")
694 .HasColumnType(
"bigint");
696 b.Property<
string>(
"TargetCommitSha")
699 .HasColumnType(
"character varying(40)");
701 b.Property<
string>(
"TitleAtMerge")
703 .HasColumnType(
"text");
705 b.Property<
string>(
"Url")
707 .HasColumnType(
"text");
711 b.HasIndex(
"MergedById");
713 b.HasIndex(
"PrimaryRevisionInformationId")
716 b.ToTable(
"TestMerges");
719 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
721 b.Property<
long?>(
"Id")
722 .ValueGeneratedOnAdd()
723 .HasColumnType(
"bigint");
725 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
727 b.Property<
string>(
"CanonicalName")
730 .HasColumnType(
"character varying(100)");
732 b.Property<DateTimeOffset?>(
"CreatedAt")
734 .HasColumnType(
"timestamp with time zone");
736 b.Property<
long?>(
"CreatedById")
737 .HasColumnType(
"bigint");
739 b.Property<
bool?>(
"Enabled")
741 .HasColumnType(
"boolean");
743 b.Property<
long?>(
"GroupId")
744 .HasColumnType(
"bigint");
746 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
747 .HasColumnType(
"timestamp with time zone");
749 b.Property<
string>(
"Name")
752 .HasColumnType(
"character varying(100)");
754 b.Property<
string>(
"PasswordHash")
755 .HasColumnType(
"text");
757 b.Property<
string>(
"SystemIdentifier")
759 .HasColumnType(
"character varying(100)");
763 b.HasIndex(
"CanonicalName")
766 b.HasIndex(
"CreatedById");
768 b.HasIndex(
"GroupId");
770 b.HasIndex(
"SystemIdentifier")
776 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
778 b.Property<
long?>(
"Id")
779 .ValueGeneratedOnAdd()
780 .HasColumnType(
"bigint");
782 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
784 b.Property<
string>(
"Name")
787 .HasColumnType(
"character varying(100)");
797 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
799 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
800 .WithMany(
"ChatSettings")
801 .HasForeignKey(
"InstanceId")
802 .OnDelete(DeleteBehavior.Cascade)
805 b.Navigation(
"Instance");
808 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
810 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
811 .WithMany(
"Channels")
812 .HasForeignKey(
"ChatSettingsId")
813 .OnDelete(DeleteBehavior.Cascade)
816 b.Navigation(
"ChatSettings");
819 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
821 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
823 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
824 .OnDelete(DeleteBehavior.Cascade)
827 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
828 .WithMany(
"CompileJobs")
829 .HasForeignKey(
"RevisionInformationId")
830 .OnDelete(DeleteBehavior.Cascade)
835 b.Navigation(
"RevisionInformation");
838 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
840 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
841 .WithOne(
"DreamDaemonSettings")
842 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
843 .OnDelete(DeleteBehavior.Cascade)
846 b.Navigation(
"Instance");
849 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
851 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
852 .WithOne(
"DreamMakerSettings")
853 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
854 .OnDelete(DeleteBehavior.Cascade)
857 b.Navigation(
"Instance");
860 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
862 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
863 .WithMany(
"InstancePermissionSets")
864 .HasForeignKey(
"InstanceId")
865 .OnDelete(DeleteBehavior.Cascade)
868 b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet",
"PermissionSet")
869 .WithMany(
"InstancePermissionSets")
870 .HasForeignKey(
"PermissionSetId")
871 .OnDelete(DeleteBehavior.Cascade)
874 b.Navigation(
"Instance");
876 b.Navigation(
"PermissionSet");
879 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
881 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
883 .HasForeignKey(
"CancelledById");
885 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
887 .HasForeignKey(
"InstanceId")
888 .OnDelete(DeleteBehavior.Cascade)
891 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
893 .HasForeignKey(
"StartedById")
894 .OnDelete(DeleteBehavior.Cascade)
897 b.Navigation(
"CancelledBy");
899 b.Navigation(
"Instance");
901 b.Navigation(
"StartedBy");
904 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
906 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
907 .WithMany(
"OAuthConnections")
908 .HasForeignKey(
"UserId")
909 .OnDelete(DeleteBehavior.Cascade);
911 b.Navigation(
"User");
914 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
916 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
917 .WithOne(
"PermissionSet")
918 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"GroupId")
919 .OnDelete(DeleteBehavior.Cascade);
921 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
922 .WithOne(
"PermissionSet")
923 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"UserId")
924 .OnDelete(DeleteBehavior.Cascade);
926 b.Navigation(
"Group");
928 b.Navigation(
"User");
931 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
933 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
935 .HasForeignKey(
"CompileJobId")
936 .OnDelete(DeleteBehavior.Cascade)
939 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"InitialCompileJob")
941 .HasForeignKey(
"InitialCompileJobId");
943 b.Navigation(
"CompileJob");
945 b.Navigation(
"InitialCompileJob");
948 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
950 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
951 .WithOne(
"RepositorySettings")
952 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
953 .OnDelete(DeleteBehavior.Cascade)
956 b.Navigation(
"Instance");
959 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
961 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
962 .WithMany(
"ActiveTestMerges")
963 .HasForeignKey(
"RevisionInformationId")
964 .OnDelete(DeleteBehavior.Cascade)
967 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
968 .WithMany(
"RevisonInformations")
969 .HasForeignKey(
"TestMergeId")
970 .OnDelete(DeleteBehavior.ClientNoAction)
973 b.Navigation(
"RevisionInformation");
975 b.Navigation(
"TestMerge");
978 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
980 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
981 .WithMany(
"RevisionInformations")
982 .HasForeignKey(
"InstanceId")
983 .OnDelete(DeleteBehavior.Cascade)
986 b.Navigation(
"Instance");
989 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
991 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
992 .WithMany(
"TestMerges")
993 .HasForeignKey(
"MergedById")
994 .OnDelete(DeleteBehavior.Restrict)
997 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
998 .WithOne(
"PrimaryTestMerge")
999 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
1000 .OnDelete(DeleteBehavior.Cascade)
1003 b.Navigation(
"MergedBy");
1005 b.Navigation(
"PrimaryRevisionInformation");
1008 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1010 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
1011 .WithMany(
"CreatedUsers")
1012 .HasForeignKey(
"CreatedById");
1014 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
1016 .HasForeignKey(
"GroupId");
1018 b.Navigation(
"CreatedBy");
1020 b.Navigation(
"Group");
1023 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
1025 b.Navigation(
"Channels");
1028 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
1030 b.Navigation(
"ChatSettings");
1032 b.Navigation(
"DreamDaemonSettings");
1034 b.Navigation(
"DreamMakerSettings");
1036 b.Navigation(
"InstancePermissionSets");
1038 b.Navigation(
"Jobs");
1040 b.Navigation(
"RepositorySettings");
1042 b.Navigation(
"RevisionInformations");
1045 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
1047 b.Navigation(
"InstancePermissionSets");
1050 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1052 b.Navigation(
"ActiveTestMerges");
1054 b.Navigation(
"CompileJobs");
1056 b.Navigation(
"PrimaryTestMerge");
1059 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1061 b.Navigation(
"RevisonInformations");
1064 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1066 b.Navigation(
"CreatedUsers");
1068 b.Navigation(
"OAuthConnections");
1070 b.Navigation(
"PermissionSet");
1072 b.Navigation(
"TestMerges");
1075 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
1077 b.Navigation(
"PermissionSet")
1080 b.Navigation(
"Users");
1082#pragma warning restore 612, 618