17#pragma warning disable 612, 618
19 .HasAnnotation(
"ProductVersion",
"6.0.16")
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<
string>(
"ByondVersion")
124 .HasColumnType(
"text");
126 b.Property<
int?>(
"DMApiMajorVersion")
127 .HasColumnType(
"integer");
129 b.Property<
int?>(
"DMApiMinorVersion")
130 .HasColumnType(
"integer");
132 b.Property<
int?>(
"DMApiPatchVersion")
133 .HasColumnType(
"integer");
135 b.Property<Guid?>(
"DirectoryName")
137 .HasColumnType(
"uuid");
139 b.Property<
string>(
"DmeName")
141 .HasColumnType(
"text");
143 b.Property<
int?>(
"GitHubDeploymentId")
144 .HasColumnType(
"integer");
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?>(
"DumpOnHeartbeatRestart")
200 .HasColumnType(
"boolean");
202 b.Property<
long>(
"HeartbeatSeconds")
203 .HasColumnType(
"bigint");
205 b.Property<
long>(
"InstanceId")
206 .HasColumnType(
"bigint");
208 b.Property<
bool?>(
"LogOutput")
210 .HasColumnType(
"boolean");
212 b.Property<
int>(
"Port")
213 .HasColumnType(
"integer");
215 b.Property<
int>(
"SecurityLevel")
216 .HasColumnType(
"integer");
218 b.Property<
bool?>(
"StartProfiler")
220 .HasColumnType(
"boolean");
222 b.Property<
long>(
"StartupTimeout")
223 .HasColumnType(
"bigint");
225 b.Property<
long>(
"TopicRequestTimeout")
226 .HasColumnType(
"bigint");
228 b.Property<
int>(
"Visibility")
229 .HasColumnType(
"integer");
233 b.HasIndex(
"InstanceId")
236 b.ToTable(
"DreamDaemonSettings");
239 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
241 b.Property<
long>(
"Id")
242 .ValueGeneratedOnAdd()
243 .HasColumnType(
"bigint");
245 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
247 b.Property<
int>(
"ApiValidationPort")
248 .HasColumnType(
"integer");
250 b.Property<
int>(
"ApiValidationSecurityLevel")
251 .HasColumnType(
"integer");
253 b.Property<
long>(
"InstanceId")
254 .HasColumnType(
"bigint");
256 b.Property<
string>(
"ProjectName")
258 .HasColumnType(
"character varying(10000)");
260 b.Property<
bool?>(
"RequireDMApiValidation")
262 .HasColumnType(
"boolean");
264 b.Property<TimeSpan?>(
"Timeout")
266 .HasColumnType(
"interval");
270 b.HasIndex(
"InstanceId")
273 b.ToTable(
"DreamMakerSettings");
276 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
278 b.Property<
long?>(
"Id")
279 .ValueGeneratedOnAdd()
280 .HasColumnType(
"bigint");
282 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
284 b.Property<
long>(
"AutoUpdateInterval")
285 .HasColumnType(
"bigint");
287 b.Property<
int>(
"ChatBotLimit")
288 .HasColumnType(
"integer");
290 b.Property<
int>(
"ConfigurationType")
291 .HasColumnType(
"integer");
293 b.Property<
string>(
"Name")
296 .HasColumnType(
"character varying(100)");
298 b.Property<
bool?>(
"Online")
300 .HasColumnType(
"boolean");
302 b.Property<
string>(
"Path")
304 .HasColumnType(
"text");
306 b.Property<
string>(
"SwarmIdentifer")
307 .HasColumnType(
"text");
311 b.HasIndex(
"Path",
"SwarmIdentifer")
314 b.ToTable(
"Instances");
317 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
319 b.Property<
long>(
"Id")
320 .ValueGeneratedOnAdd()
321 .HasColumnType(
"bigint");
323 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
325 b.Property<decimal>(
"ByondRights")
326 .HasColumnType(
"numeric(20,0)");
328 b.Property<decimal>(
"ChatBotRights")
329 .HasColumnType(
"numeric(20,0)");
331 b.Property<decimal>(
"ConfigurationRights")
332 .HasColumnType(
"numeric(20,0)");
334 b.Property<decimal>(
"DreamDaemonRights")
335 .HasColumnType(
"numeric(20,0)");
337 b.Property<decimal>(
"DreamMakerRights")
338 .HasColumnType(
"numeric(20,0)");
340 b.Property<
long>(
"InstanceId")
341 .HasColumnType(
"bigint");
343 b.Property<decimal>(
"InstancePermissionSetRights")
344 .HasColumnType(
"numeric(20,0)");
346 b.Property<
long>(
"PermissionSetId")
347 .HasColumnType(
"bigint");
349 b.Property<decimal>(
"RepositoryRights")
350 .HasColumnType(
"numeric(20,0)");
354 b.HasIndex(
"InstanceId");
356 b.HasIndex(
"PermissionSetId",
"InstanceId")
359 b.ToTable(
"InstancePermissionSets");
362 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
364 b.Property<
long?>(
"Id")
365 .ValueGeneratedOnAdd()
366 .HasColumnType(
"bigint");
368 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
370 b.Property<decimal?>(
"CancelRight")
371 .HasColumnType(
"numeric(20,0)");
373 b.Property<decimal?>(
"CancelRightsType")
374 .HasColumnType(
"numeric(20,0)");
376 b.Property<
bool?>(
"Cancelled")
378 .HasColumnType(
"boolean");
380 b.Property<
long?>(
"CancelledById")
381 .HasColumnType(
"bigint");
383 b.Property<
string>(
"Description")
385 .HasColumnType(
"text");
387 b.Property<
long?>(
"ErrorCode")
388 .HasColumnType(
"bigint");
390 b.Property<
string>(
"ExceptionDetails")
391 .HasColumnType(
"text");
393 b.Property<
long>(
"InstanceId")
394 .HasColumnType(
"bigint");
396 b.Property<DateTimeOffset?>(
"StartedAt")
398 .HasColumnType(
"timestamp with time zone");
400 b.Property<
long>(
"StartedById")
401 .HasColumnType(
"bigint");
403 b.Property<DateTimeOffset?>(
"StoppedAt")
404 .HasColumnType(
"timestamp with time zone");
408 b.HasIndex(
"CancelledById");
410 b.HasIndex(
"InstanceId");
412 b.HasIndex(
"StartedById");
417 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
419 b.Property<
long>(
"Id")
420 .ValueGeneratedOnAdd()
421 .HasColumnType(
"bigint");
423 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
425 b.Property<
string>(
"ExternalUserId")
428 .HasColumnType(
"character varying(100)");
430 b.Property<
int>(
"Provider")
431 .HasColumnType(
"integer");
433 b.Property<
long?>(
"UserId")
434 .HasColumnType(
"bigint");
438 b.HasIndex(
"UserId");
440 b.HasIndex(
"Provider",
"ExternalUserId")
443 b.ToTable(
"OAuthConnections");
446 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
448 b.Property<
long?>(
"Id")
449 .ValueGeneratedOnAdd()
450 .HasColumnType(
"bigint");
452 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
454 b.Property<decimal>(
"AdministrationRights")
455 .HasColumnType(
"numeric(20,0)");
457 b.Property<
long?>(
"GroupId")
458 .HasColumnType(
"bigint");
460 b.Property<decimal>(
"InstanceManagerRights")
461 .HasColumnType(
"numeric(20,0)");
463 b.Property<
long?>(
"UserId")
464 .HasColumnType(
"bigint");
468 b.HasIndex(
"GroupId")
474 b.ToTable(
"PermissionSets");
477 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
479 b.Property<
long>(
"Id")
480 .ValueGeneratedOnAdd()
481 .HasColumnType(
"bigint");
483 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
485 b.Property<
string>(
"AccessIdentifier")
487 .HasColumnType(
"text");
489 b.Property<
long>(
"CompileJobId")
490 .HasColumnType(
"bigint");
492 b.Property<
long?>(
"InitialCompileJobId")
493 .HasColumnType(
"bigint");
495 b.Property<
int>(
"LaunchSecurityLevel")
496 .HasColumnType(
"integer");
498 b.Property<
int>(
"LaunchVisibility")
499 .HasColumnType(
"integer");
501 b.Property<
int>(
"Port")
502 .HasColumnType(
"integer");
504 b.Property<
int>(
"ProcessId")
505 .HasColumnType(
"integer");
507 b.Property<
int>(
"RebootState")
508 .HasColumnType(
"integer");
512 b.HasIndex(
"CompileJobId");
514 b.HasIndex(
"InitialCompileJobId");
516 b.ToTable(
"ReattachInformations");
519 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
521 b.Property<
long>(
"Id")
522 .ValueGeneratedOnAdd()
523 .HasColumnType(
"bigint");
525 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
527 b.Property<
string>(
"AccessToken")
529 .HasColumnType(
"character varying(10000)");
531 b.Property<
string>(
"AccessUser")
533 .HasColumnType(
"character varying(10000)");
535 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
537 .HasColumnType(
"boolean");
539 b.Property<
bool?>(
"AutoUpdatesSynchronize")
541 .HasColumnType(
"boolean");
543 b.Property<
string>(
"CommitterEmail")
546 .HasColumnType(
"character varying(10000)");
548 b.Property<
string>(
"CommitterName")
551 .HasColumnType(
"character varying(10000)");
553 b.Property<
bool?>(
"CreateGitHubDeployments")
555 .HasColumnType(
"boolean");
557 b.Property<
long>(
"InstanceId")
558 .HasColumnType(
"bigint");
560 b.Property<
bool?>(
"PostTestMergeComment")
562 .HasColumnType(
"boolean");
564 b.Property<
bool?>(
"PushTestMergeCommits")
566 .HasColumnType(
"boolean");
568 b.Property<
bool?>(
"ShowTestMergeCommitters")
570 .HasColumnType(
"boolean");
572 b.Property<
bool?>(
"UpdateSubmodules")
574 .HasColumnType(
"boolean");
578 b.HasIndex(
"InstanceId")
581 b.ToTable(
"RepositorySettings");
584 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
586 b.Property<
long>(
"Id")
587 .ValueGeneratedOnAdd()
588 .HasColumnType(
"bigint");
590 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
592 b.Property<
long>(
"RevisionInformationId")
593 .HasColumnType(
"bigint");
595 b.Property<
long>(
"TestMergeId")
596 .HasColumnType(
"bigint");
600 b.HasIndex(
"RevisionInformationId");
602 b.HasIndex(
"TestMergeId");
604 b.ToTable(
"RevInfoTestMerges");
607 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
609 b.Property<
long>(
"Id")
610 .ValueGeneratedOnAdd()
611 .HasColumnType(
"bigint");
613 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
615 b.Property<
string>(
"CommitSha")
618 .HasColumnType(
"character varying(40)");
620 b.Property<
long>(
"InstanceId")
621 .HasColumnType(
"bigint");
623 b.Property<
string>(
"OriginCommitSha")
626 .HasColumnType(
"character varying(40)");
628 b.Property<DateTimeOffset>(
"Timestamp")
629 .HasColumnType(
"timestamp with time zone");
633 b.HasIndex(
"InstanceId",
"CommitSha")
636 b.ToTable(
"RevisionInformations");
639 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
641 b.Property<
long>(
"Id")
642 .ValueGeneratedOnAdd()
643 .HasColumnType(
"bigint");
645 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
647 b.Property<
string>(
"Author")
649 .HasColumnType(
"text");
651 b.Property<
string>(
"BodyAtMerge")
653 .HasColumnType(
"text");
655 b.Property<
string>(
"Comment")
657 .HasColumnType(
"character varying(10000)");
659 b.Property<DateTimeOffset>(
"MergedAt")
660 .HasColumnType(
"timestamp with time zone");
662 b.Property<
long>(
"MergedById")
663 .HasColumnType(
"bigint");
665 b.Property<
int>(
"Number")
666 .HasColumnType(
"integer");
668 b.Property<
long?>(
"PrimaryRevisionInformationId")
670 .HasColumnType(
"bigint");
672 b.Property<
string>(
"TargetCommitSha")
675 .HasColumnType(
"character varying(40)");
677 b.Property<
string>(
"TitleAtMerge")
679 .HasColumnType(
"text");
681 b.Property<
string>(
"Url")
683 .HasColumnType(
"text");
687 b.HasIndex(
"MergedById");
689 b.HasIndex(
"PrimaryRevisionInformationId")
692 b.ToTable(
"TestMerges");
695 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
697 b.Property<
long?>(
"Id")
698 .ValueGeneratedOnAdd()
699 .HasColumnType(
"bigint");
701 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
703 b.Property<
string>(
"CanonicalName")
706 .HasColumnType(
"character varying(100)");
708 b.Property<DateTimeOffset?>(
"CreatedAt")
710 .HasColumnType(
"timestamp with time zone");
712 b.Property<
long?>(
"CreatedById")
713 .HasColumnType(
"bigint");
715 b.Property<
bool?>(
"Enabled")
717 .HasColumnType(
"boolean");
719 b.Property<
long?>(
"GroupId")
720 .HasColumnType(
"bigint");
722 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
723 .HasColumnType(
"timestamp with time zone");
725 b.Property<
string>(
"Name")
728 .HasColumnType(
"character varying(100)");
730 b.Property<
string>(
"PasswordHash")
731 .HasColumnType(
"text");
733 b.Property<
string>(
"SystemIdentifier")
735 .HasColumnType(
"character varying(100)");
739 b.HasIndex(
"CanonicalName")
742 b.HasIndex(
"CreatedById");
744 b.HasIndex(
"GroupId");
746 b.HasIndex(
"SystemIdentifier")
752 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
754 b.Property<
long?>(
"Id")
755 .ValueGeneratedOnAdd()
756 .HasColumnType(
"bigint");
758 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
760 b.Property<
string>(
"Name")
763 .HasColumnType(
"character varying(100)");
773 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
775 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
776 .WithMany(
"ChatSettings")
777 .HasForeignKey(
"InstanceId")
778 .OnDelete(DeleteBehavior.Cascade)
781 b.Navigation(
"Instance");
784 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
786 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
787 .WithMany(
"Channels")
788 .HasForeignKey(
"ChatSettingsId")
789 .OnDelete(DeleteBehavior.Cascade)
792 b.Navigation(
"ChatSettings");
795 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
797 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
799 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
800 .OnDelete(DeleteBehavior.Cascade)
803 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
804 .WithMany(
"CompileJobs")
805 .HasForeignKey(
"RevisionInformationId")
806 .OnDelete(DeleteBehavior.Cascade)
811 b.Navigation(
"RevisionInformation");
814 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
816 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
817 .WithOne(
"DreamDaemonSettings")
818 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
819 .OnDelete(DeleteBehavior.Cascade)
822 b.Navigation(
"Instance");
825 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
827 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
828 .WithOne(
"DreamMakerSettings")
829 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
830 .OnDelete(DeleteBehavior.Cascade)
833 b.Navigation(
"Instance");
836 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
838 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
839 .WithMany(
"InstancePermissionSets")
840 .HasForeignKey(
"InstanceId")
841 .OnDelete(DeleteBehavior.Cascade)
844 b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet",
"PermissionSet")
845 .WithMany(
"InstancePermissionSets")
846 .HasForeignKey(
"PermissionSetId")
847 .OnDelete(DeleteBehavior.Cascade)
850 b.Navigation(
"Instance");
852 b.Navigation(
"PermissionSet");
855 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
857 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
859 .HasForeignKey(
"CancelledById");
861 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
863 .HasForeignKey(
"InstanceId")
864 .OnDelete(DeleteBehavior.Cascade)
867 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
869 .HasForeignKey(
"StartedById")
870 .OnDelete(DeleteBehavior.Cascade)
873 b.Navigation(
"CancelledBy");
875 b.Navigation(
"Instance");
877 b.Navigation(
"StartedBy");
880 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
882 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
883 .WithMany(
"OAuthConnections")
884 .HasForeignKey(
"UserId")
885 .OnDelete(DeleteBehavior.Cascade);
887 b.Navigation(
"User");
890 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
892 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
893 .WithOne(
"PermissionSet")
894 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"GroupId")
895 .OnDelete(DeleteBehavior.Cascade);
897 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
898 .WithOne(
"PermissionSet")
899 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"UserId")
900 .OnDelete(DeleteBehavior.Cascade);
902 b.Navigation(
"Group");
904 b.Navigation(
"User");
907 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
909 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
911 .HasForeignKey(
"CompileJobId")
912 .OnDelete(DeleteBehavior.Cascade)
915 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"InitialCompileJob")
917 .HasForeignKey(
"InitialCompileJobId");
919 b.Navigation(
"CompileJob");
921 b.Navigation(
"InitialCompileJob");
924 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
926 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
927 .WithOne(
"RepositorySettings")
928 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
929 .OnDelete(DeleteBehavior.Cascade)
932 b.Navigation(
"Instance");
935 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
937 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
938 .WithMany(
"ActiveTestMerges")
939 .HasForeignKey(
"RevisionInformationId")
940 .OnDelete(DeleteBehavior.Cascade)
943 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
944 .WithMany(
"RevisonInformations")
945 .HasForeignKey(
"TestMergeId")
946 .OnDelete(DeleteBehavior.ClientNoAction)
949 b.Navigation(
"RevisionInformation");
951 b.Navigation(
"TestMerge");
954 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
956 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
957 .WithMany(
"RevisionInformations")
958 .HasForeignKey(
"InstanceId")
959 .OnDelete(DeleteBehavior.Cascade)
962 b.Navigation(
"Instance");
965 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
967 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
968 .WithMany(
"TestMerges")
969 .HasForeignKey(
"MergedById")
970 .OnDelete(DeleteBehavior.Restrict)
973 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
974 .WithOne(
"PrimaryTestMerge")
975 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
976 .OnDelete(DeleteBehavior.Cascade)
979 b.Navigation(
"MergedBy");
981 b.Navigation(
"PrimaryRevisionInformation");
984 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
986 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
987 .WithMany(
"CreatedUsers")
988 .HasForeignKey(
"CreatedById");
990 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
992 .HasForeignKey(
"GroupId");
994 b.Navigation(
"CreatedBy");
996 b.Navigation(
"Group");
999 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
1001 b.Navigation(
"Channels");
1004 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
1006 b.Navigation(
"ChatSettings");
1008 b.Navigation(
"DreamDaemonSettings");
1010 b.Navigation(
"DreamMakerSettings");
1012 b.Navigation(
"InstancePermissionSets");
1014 b.Navigation(
"Jobs");
1016 b.Navigation(
"RepositorySettings");
1018 b.Navigation(
"RevisionInformations");
1021 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
1023 b.Navigation(
"InstancePermissionSets");
1026 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1028 b.Navigation(
"ActiveTestMerges");
1030 b.Navigation(
"CompileJobs");
1032 b.Navigation(
"PrimaryTestMerge");
1035 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1037 b.Navigation(
"RevisonInformations");
1040 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1042 b.Navigation(
"CreatedUsers");
1044 b.Navigation(
"OAuthConnections");
1046 b.Navigation(
"PermissionSet");
1048 b.Navigation(
"TestMerges");
1051 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
1053 b.Navigation(
"PermissionSet")
1056 b.Navigation(
"Users");
1058#pragma warning restore 612, 618