17#pragma warning disable 612, 618
19 .HasAnnotation(
"ProductVersion",
"6.0.15")
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?>(
"IsUpdatesChannel")
89 .HasColumnType(
"boolean");
91 b.Property<
bool?>(
"IsWatchdogChannel")
93 .HasColumnType(
"boolean");
95 b.Property<
string>(
"Tag")
97 .HasColumnType(
"character varying(10000)");
101 b.HasIndex(
"ChatSettingsId",
"DiscordChannelId")
104 b.HasIndex(
"ChatSettingsId",
"IrcChannel")
107 b.ToTable(
"ChatChannels");
110 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
112 b.Property<
long?>(
"Id")
113 .ValueGeneratedOnAdd()
114 .HasColumnType(
"bigint");
116 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
118 b.Property<
string>(
"ByondVersion")
120 .HasColumnType(
"text");
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<
int?>(
"GitHubDeploymentId")
140 .HasColumnType(
"integer");
142 b.Property<
long?>(
"GitHubRepoId")
143 .HasColumnType(
"bigint");
145 b.Property<
long>(
"JobId")
146 .HasColumnType(
"bigint");
148 b.Property<
int?>(
"MinimumSecurityLevel")
149 .HasColumnType(
"integer");
151 b.Property<
string>(
"Output")
153 .HasColumnType(
"text");
155 b.Property<
string>(
"RepositoryOrigin")
156 .HasColumnType(
"text");
158 b.Property<
long>(
"RevisionInformationId")
159 .HasColumnType(
"bigint");
163 b.HasIndex(
"DirectoryName");
168 b.HasIndex(
"RevisionInformationId");
170 b.ToTable(
"CompileJobs");
173 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
175 b.Property<
long>(
"Id")
176 .ValueGeneratedOnAdd()
177 .HasColumnType(
"bigint");
179 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
181 b.Property<
string>(
"AdditionalParameters")
184 .HasColumnType(
"character varying(10000)");
186 b.Property<
bool?>(
"AllowWebClient")
188 .HasColumnType(
"boolean");
190 b.Property<
bool?>(
"AutoStart")
192 .HasColumnType(
"boolean");
194 b.Property<
bool?>(
"DumpOnHeartbeatRestart")
196 .HasColumnType(
"boolean");
198 b.Property<
long>(
"HeartbeatSeconds")
199 .HasColumnType(
"bigint");
201 b.Property<
long>(
"InstanceId")
202 .HasColumnType(
"bigint");
204 b.Property<
bool?>(
"LogOutput")
206 .HasColumnType(
"boolean");
208 b.Property<
int>(
"Port")
209 .HasColumnType(
"integer");
211 b.Property<
int>(
"SecurityLevel")
212 .HasColumnType(
"integer");
214 b.Property<
bool?>(
"StartProfiler")
216 .HasColumnType(
"boolean");
218 b.Property<
long>(
"StartupTimeout")
219 .HasColumnType(
"bigint");
221 b.Property<
long>(
"TopicRequestTimeout")
222 .HasColumnType(
"bigint");
224 b.Property<
int>(
"Visibility")
225 .HasColumnType(
"integer");
229 b.HasIndex(
"InstanceId")
232 b.ToTable(
"DreamDaemonSettings");
235 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
237 b.Property<
long>(
"Id")
238 .ValueGeneratedOnAdd()
239 .HasColumnType(
"bigint");
241 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
243 b.Property<
int>(
"ApiValidationPort")
244 .HasColumnType(
"integer");
246 b.Property<
int>(
"ApiValidationSecurityLevel")
247 .HasColumnType(
"integer");
249 b.Property<
long>(
"InstanceId")
250 .HasColumnType(
"bigint");
252 b.Property<
string>(
"ProjectName")
254 .HasColumnType(
"character varying(10000)");
256 b.Property<
bool?>(
"RequireDMApiValidation")
258 .HasColumnType(
"boolean");
260 b.Property<TimeSpan?>(
"Timeout")
262 .HasColumnType(
"interval");
266 b.HasIndex(
"InstanceId")
269 b.ToTable(
"DreamMakerSettings");
272 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
274 b.Property<
long?>(
"Id")
275 .ValueGeneratedOnAdd()
276 .HasColumnType(
"bigint");
278 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
280 b.Property<
long>(
"AutoUpdateInterval")
281 .HasColumnType(
"bigint");
283 b.Property<
int>(
"ChatBotLimit")
284 .HasColumnType(
"integer");
286 b.Property<
int>(
"ConfigurationType")
287 .HasColumnType(
"integer");
289 b.Property<
string>(
"Name")
292 .HasColumnType(
"character varying(100)");
294 b.Property<
bool?>(
"Online")
296 .HasColumnType(
"boolean");
298 b.Property<
string>(
"Path")
300 .HasColumnType(
"text");
302 b.Property<
string>(
"SwarmIdentifer")
303 .HasColumnType(
"text");
307 b.HasIndex(
"Path",
"SwarmIdentifer")
310 b.ToTable(
"Instances");
313 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
315 b.Property<
long>(
"Id")
316 .ValueGeneratedOnAdd()
317 .HasColumnType(
"bigint");
319 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
321 b.Property<decimal>(
"ByondRights")
322 .HasColumnType(
"numeric(20,0)");
324 b.Property<decimal>(
"ChatBotRights")
325 .HasColumnType(
"numeric(20,0)");
327 b.Property<decimal>(
"ConfigurationRights")
328 .HasColumnType(
"numeric(20,0)");
330 b.Property<decimal>(
"DreamDaemonRights")
331 .HasColumnType(
"numeric(20,0)");
333 b.Property<decimal>(
"DreamMakerRights")
334 .HasColumnType(
"numeric(20,0)");
336 b.Property<
long>(
"InstanceId")
337 .HasColumnType(
"bigint");
339 b.Property<decimal>(
"InstancePermissionSetRights")
340 .HasColumnType(
"numeric(20,0)");
342 b.Property<
long>(
"PermissionSetId")
343 .HasColumnType(
"bigint");
345 b.Property<decimal>(
"RepositoryRights")
346 .HasColumnType(
"numeric(20,0)");
350 b.HasIndex(
"InstanceId");
352 b.HasIndex(
"PermissionSetId",
"InstanceId")
355 b.ToTable(
"InstancePermissionSets");
358 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
360 b.Property<
long?>(
"Id")
361 .ValueGeneratedOnAdd()
362 .HasColumnType(
"bigint");
364 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
366 b.Property<decimal?>(
"CancelRight")
367 .HasColumnType(
"numeric(20,0)");
369 b.Property<decimal?>(
"CancelRightsType")
370 .HasColumnType(
"numeric(20,0)");
372 b.Property<
bool?>(
"Cancelled")
374 .HasColumnType(
"boolean");
376 b.Property<
long?>(
"CancelledById")
377 .HasColumnType(
"bigint");
379 b.Property<
string>(
"Description")
381 .HasColumnType(
"text");
383 b.Property<
long?>(
"ErrorCode")
384 .HasColumnType(
"bigint");
386 b.Property<
string>(
"ExceptionDetails")
387 .HasColumnType(
"text");
389 b.Property<
long>(
"InstanceId")
390 .HasColumnType(
"bigint");
392 b.Property<DateTimeOffset?>(
"StartedAt")
394 .HasColumnType(
"timestamp with time zone");
396 b.Property<
long>(
"StartedById")
397 .HasColumnType(
"bigint");
399 b.Property<DateTimeOffset?>(
"StoppedAt")
400 .HasColumnType(
"timestamp with time zone");
404 b.HasIndex(
"CancelledById");
406 b.HasIndex(
"InstanceId");
408 b.HasIndex(
"StartedById");
413 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
415 b.Property<
long>(
"Id")
416 .ValueGeneratedOnAdd()
417 .HasColumnType(
"bigint");
419 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
421 b.Property<
string>(
"ExternalUserId")
424 .HasColumnType(
"character varying(100)");
426 b.Property<
int>(
"Provider")
427 .HasColumnType(
"integer");
429 b.Property<
long?>(
"UserId")
430 .HasColumnType(
"bigint");
434 b.HasIndex(
"UserId");
436 b.HasIndex(
"Provider",
"ExternalUserId")
439 b.ToTable(
"OAuthConnections");
442 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
444 b.Property<
long?>(
"Id")
445 .ValueGeneratedOnAdd()
446 .HasColumnType(
"bigint");
448 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
450 b.Property<decimal>(
"AdministrationRights")
451 .HasColumnType(
"numeric(20,0)");
453 b.Property<
long?>(
"GroupId")
454 .HasColumnType(
"bigint");
456 b.Property<decimal>(
"InstanceManagerRights")
457 .HasColumnType(
"numeric(20,0)");
459 b.Property<
long?>(
"UserId")
460 .HasColumnType(
"bigint");
464 b.HasIndex(
"GroupId")
470 b.ToTable(
"PermissionSets");
473 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
475 b.Property<
long>(
"Id")
476 .ValueGeneratedOnAdd()
477 .HasColumnType(
"bigint");
479 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
481 b.Property<
string>(
"AccessIdentifier")
483 .HasColumnType(
"text");
485 b.Property<
long>(
"CompileJobId")
486 .HasColumnType(
"bigint");
488 b.Property<
int>(
"LaunchSecurityLevel")
489 .HasColumnType(
"integer");
491 b.Property<
int>(
"LaunchVisibility")
492 .HasColumnType(
"integer");
494 b.Property<
int>(
"Port")
495 .HasColumnType(
"integer");
497 b.Property<
int>(
"ProcessId")
498 .HasColumnType(
"integer");
500 b.Property<
int>(
"RebootState")
501 .HasColumnType(
"integer");
505 b.HasIndex(
"CompileJobId");
507 b.ToTable(
"ReattachInformations");
510 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
512 b.Property<
long>(
"Id")
513 .ValueGeneratedOnAdd()
514 .HasColumnType(
"bigint");
516 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
518 b.Property<
string>(
"AccessToken")
520 .HasColumnType(
"character varying(10000)");
522 b.Property<
string>(
"AccessUser")
524 .HasColumnType(
"character varying(10000)");
526 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
528 .HasColumnType(
"boolean");
530 b.Property<
bool?>(
"AutoUpdatesSynchronize")
532 .HasColumnType(
"boolean");
534 b.Property<
string>(
"CommitterEmail")
537 .HasColumnType(
"character varying(10000)");
539 b.Property<
string>(
"CommitterName")
542 .HasColumnType(
"character varying(10000)");
544 b.Property<
bool?>(
"CreateGitHubDeployments")
546 .HasColumnType(
"boolean");
548 b.Property<
long>(
"InstanceId")
549 .HasColumnType(
"bigint");
551 b.Property<
bool?>(
"PostTestMergeComment")
553 .HasColumnType(
"boolean");
555 b.Property<
bool?>(
"PushTestMergeCommits")
557 .HasColumnType(
"boolean");
559 b.Property<
bool?>(
"ShowTestMergeCommitters")
561 .HasColumnType(
"boolean");
563 b.Property<
bool?>(
"UpdateSubmodules")
565 .HasColumnType(
"boolean");
569 b.HasIndex(
"InstanceId")
572 b.ToTable(
"RepositorySettings");
575 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
577 b.Property<
long>(
"Id")
578 .ValueGeneratedOnAdd()
579 .HasColumnType(
"bigint");
581 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
583 b.Property<
long>(
"RevisionInformationId")
584 .HasColumnType(
"bigint");
586 b.Property<
long>(
"TestMergeId")
587 .HasColumnType(
"bigint");
591 b.HasIndex(
"RevisionInformationId");
593 b.HasIndex(
"TestMergeId");
595 b.ToTable(
"RevInfoTestMerges");
598 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
600 b.Property<
long>(
"Id")
601 .ValueGeneratedOnAdd()
602 .HasColumnType(
"bigint");
604 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
606 b.Property<
string>(
"CommitSha")
609 .HasColumnType(
"character varying(40)");
611 b.Property<
long>(
"InstanceId")
612 .HasColumnType(
"bigint");
614 b.Property<
string>(
"OriginCommitSha")
617 .HasColumnType(
"character varying(40)");
619 b.Property<DateTimeOffset>(
"Timestamp")
620 .HasColumnType(
"timestamp with time zone");
624 b.HasIndex(
"InstanceId",
"CommitSha")
627 b.ToTable(
"RevisionInformations");
630 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
632 b.Property<
long>(
"Id")
633 .ValueGeneratedOnAdd()
634 .HasColumnType(
"bigint");
636 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
638 b.Property<
string>(
"Author")
640 .HasColumnType(
"text");
642 b.Property<
string>(
"BodyAtMerge")
644 .HasColumnType(
"text");
646 b.Property<
string>(
"Comment")
648 .HasColumnType(
"character varying(10000)");
650 b.Property<DateTimeOffset>(
"MergedAt")
651 .HasColumnType(
"timestamp with time zone");
653 b.Property<
long>(
"MergedById")
654 .HasColumnType(
"bigint");
656 b.Property<
int>(
"Number")
657 .HasColumnType(
"integer");
659 b.Property<
long?>(
"PrimaryRevisionInformationId")
661 .HasColumnType(
"bigint");
663 b.Property<
string>(
"TargetCommitSha")
666 .HasColumnType(
"character varying(40)");
668 b.Property<
string>(
"TitleAtMerge")
670 .HasColumnType(
"text");
672 b.Property<
string>(
"Url")
674 .HasColumnType(
"text");
678 b.HasIndex(
"MergedById");
680 b.HasIndex(
"PrimaryRevisionInformationId")
683 b.ToTable(
"TestMerges");
686 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
688 b.Property<
long?>(
"Id")
689 .ValueGeneratedOnAdd()
690 .HasColumnType(
"bigint");
692 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
694 b.Property<
string>(
"CanonicalName")
697 .HasColumnType(
"character varying(100)");
699 b.Property<DateTimeOffset?>(
"CreatedAt")
701 .HasColumnType(
"timestamp with time zone");
703 b.Property<
long?>(
"CreatedById")
704 .HasColumnType(
"bigint");
706 b.Property<
bool?>(
"Enabled")
708 .HasColumnType(
"boolean");
710 b.Property<
long?>(
"GroupId")
711 .HasColumnType(
"bigint");
713 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
714 .HasColumnType(
"timestamp with time zone");
716 b.Property<
string>(
"Name")
719 .HasColumnType(
"character varying(100)");
721 b.Property<
string>(
"PasswordHash")
722 .HasColumnType(
"text");
724 b.Property<
string>(
"SystemIdentifier")
726 .HasColumnType(
"character varying(100)");
730 b.HasIndex(
"CanonicalName")
733 b.HasIndex(
"CreatedById");
735 b.HasIndex(
"GroupId");
737 b.HasIndex(
"SystemIdentifier")
743 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
745 b.Property<
long?>(
"Id")
746 .ValueGeneratedOnAdd()
747 .HasColumnType(
"bigint");
749 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
751 b.Property<
string>(
"Name")
754 .HasColumnType(
"character varying(100)");
764 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
766 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
767 .WithMany(
"ChatSettings")
768 .HasForeignKey(
"InstanceId")
769 .OnDelete(DeleteBehavior.Cascade)
772 b.Navigation(
"Instance");
775 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
777 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
778 .WithMany(
"Channels")
779 .HasForeignKey(
"ChatSettingsId")
780 .OnDelete(DeleteBehavior.Cascade)
783 b.Navigation(
"ChatSettings");
786 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
788 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
790 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
791 .OnDelete(DeleteBehavior.Cascade)
794 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
795 .WithMany(
"CompileJobs")
796 .HasForeignKey(
"RevisionInformationId")
797 .OnDelete(DeleteBehavior.Cascade)
802 b.Navigation(
"RevisionInformation");
805 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
807 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
808 .WithOne(
"DreamDaemonSettings")
809 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
810 .OnDelete(DeleteBehavior.Cascade)
813 b.Navigation(
"Instance");
816 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
818 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
819 .WithOne(
"DreamMakerSettings")
820 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
821 .OnDelete(DeleteBehavior.Cascade)
824 b.Navigation(
"Instance");
827 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
829 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
830 .WithMany(
"InstancePermissionSets")
831 .HasForeignKey(
"InstanceId")
832 .OnDelete(DeleteBehavior.Cascade)
835 b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet",
"PermissionSet")
836 .WithMany(
"InstancePermissionSets")
837 .HasForeignKey(
"PermissionSetId")
838 .OnDelete(DeleteBehavior.Cascade)
841 b.Navigation(
"Instance");
843 b.Navigation(
"PermissionSet");
846 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
848 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
850 .HasForeignKey(
"CancelledById");
852 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
854 .HasForeignKey(
"InstanceId")
855 .OnDelete(DeleteBehavior.Cascade)
858 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
860 .HasForeignKey(
"StartedById")
861 .OnDelete(DeleteBehavior.Cascade)
864 b.Navigation(
"CancelledBy");
866 b.Navigation(
"Instance");
868 b.Navigation(
"StartedBy");
871 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
873 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
874 .WithMany(
"OAuthConnections")
875 .HasForeignKey(
"UserId")
876 .OnDelete(DeleteBehavior.Cascade);
878 b.Navigation(
"User");
881 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
883 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
884 .WithOne(
"PermissionSet")
885 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"GroupId")
886 .OnDelete(DeleteBehavior.Cascade);
888 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
889 .WithOne(
"PermissionSet")
890 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"UserId")
891 .OnDelete(DeleteBehavior.Cascade);
893 b.Navigation(
"Group");
895 b.Navigation(
"User");
898 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
900 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
902 .HasForeignKey(
"CompileJobId")
903 .OnDelete(DeleteBehavior.Cascade)
906 b.Navigation(
"CompileJob");
909 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
911 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
912 .WithOne(
"RepositorySettings")
913 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
914 .OnDelete(DeleteBehavior.Cascade)
917 b.Navigation(
"Instance");
920 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
922 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
923 .WithMany(
"ActiveTestMerges")
924 .HasForeignKey(
"RevisionInformationId")
925 .OnDelete(DeleteBehavior.Cascade)
928 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
929 .WithMany(
"RevisonInformations")
930 .HasForeignKey(
"TestMergeId")
931 .OnDelete(DeleteBehavior.ClientNoAction)
934 b.Navigation(
"RevisionInformation");
936 b.Navigation(
"TestMerge");
939 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
941 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
942 .WithMany(
"RevisionInformations")
943 .HasForeignKey(
"InstanceId")
944 .OnDelete(DeleteBehavior.Cascade)
947 b.Navigation(
"Instance");
950 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
952 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
953 .WithMany(
"TestMerges")
954 .HasForeignKey(
"MergedById")
955 .OnDelete(DeleteBehavior.Restrict)
958 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
959 .WithOne(
"PrimaryTestMerge")
960 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
961 .OnDelete(DeleteBehavior.Cascade)
964 b.Navigation(
"MergedBy");
966 b.Navigation(
"PrimaryRevisionInformation");
969 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
971 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
972 .WithMany(
"CreatedUsers")
973 .HasForeignKey(
"CreatedById");
975 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
977 .HasForeignKey(
"GroupId");
979 b.Navigation(
"CreatedBy");
981 b.Navigation(
"Group");
984 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
986 b.Navigation(
"Channels");
989 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
991 b.Navigation(
"ChatSettings");
993 b.Navigation(
"DreamDaemonSettings");
995 b.Navigation(
"DreamMakerSettings");
997 b.Navigation(
"InstancePermissionSets");
999 b.Navigation(
"Jobs");
1001 b.Navigation(
"RepositorySettings");
1003 b.Navigation(
"RevisionInformations");
1006 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
1008 b.Navigation(
"InstancePermissionSets");
1011 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1013 b.Navigation(
"ActiveTestMerges");
1015 b.Navigation(
"CompileJobs");
1017 b.Navigation(
"PrimaryTestMerge");
1020 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1022 b.Navigation(
"RevisonInformations");
1025 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1027 b.Navigation(
"CreatedUsers");
1029 b.Navigation(
"OAuthConnections");
1031 b.Navigation(
"PermissionSet");
1033 b.Navigation(
"TestMerges");
1036 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
1038 b.Navigation(
"PermissionSet")
1041 b.Navigation(
"Users");
1043#pragma warning restore 612, 618