17#pragma warning disable 612, 618
19 .HasAnnotation(
"ProductVersion",
"8.0.1")
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<
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?>(
"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>(
"Port")
220 .HasColumnType(
"integer");
222 b.Property<
int>(
"SecurityLevel")
223 .HasColumnType(
"integer");
225 b.Property<
bool?>(
"StartProfiler")
227 .HasColumnType(
"boolean");
229 b.Property<
long>(
"StartupTimeout")
230 .HasColumnType(
"bigint");
232 b.Property<
long>(
"TopicRequestTimeout")
233 .HasColumnType(
"bigint");
235 b.Property<
int>(
"Visibility")
236 .HasColumnType(
"integer");
240 b.HasIndex(
"InstanceId")
243 b.ToTable(
"DreamDaemonSettings");
246 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
248 b.Property<
long>(
"Id")
249 .ValueGeneratedOnAdd()
250 .HasColumnType(
"bigint");
252 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
254 b.Property<
int>(
"ApiValidationPort")
255 .HasColumnType(
"integer");
257 b.Property<
int>(
"ApiValidationSecurityLevel")
258 .HasColumnType(
"integer");
260 b.Property<
long>(
"InstanceId")
261 .HasColumnType(
"bigint");
263 b.Property<
string>(
"ProjectName")
265 .HasColumnType(
"character varying(10000)");
267 b.Property<
bool?>(
"RequireDMApiValidation")
269 .HasColumnType(
"boolean");
271 b.Property<TimeSpan?>(
"Timeout")
273 .HasColumnType(
"interval");
277 b.HasIndex(
"InstanceId")
280 b.ToTable(
"DreamMakerSettings");
283 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
285 b.Property<
long?>(
"Id")
286 .ValueGeneratedOnAdd()
287 .HasColumnType(
"bigint");
289 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
291 b.Property<
long>(
"AutoUpdateInterval")
292 .HasColumnType(
"bigint");
294 b.Property<
int>(
"ChatBotLimit")
295 .HasColumnType(
"integer");
297 b.Property<
int>(
"ConfigurationType")
298 .HasColumnType(
"integer");
300 b.Property<
string>(
"Name")
303 .HasColumnType(
"character varying(100)");
305 b.Property<
bool?>(
"Online")
307 .HasColumnType(
"boolean");
309 b.Property<
string>(
"Path")
311 .HasColumnType(
"text");
313 b.Property<
string>(
"SwarmIdentifer")
314 .HasColumnType(
"text");
318 b.HasIndex(
"Path",
"SwarmIdentifer")
321 b.ToTable(
"Instances");
324 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
326 b.Property<
long>(
"Id")
327 .ValueGeneratedOnAdd()
328 .HasColumnType(
"bigint");
330 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
332 b.Property<decimal>(
"ChatBotRights")
333 .HasColumnType(
"numeric(20,0)");
335 b.Property<decimal>(
"ConfigurationRights")
336 .HasColumnType(
"numeric(20,0)");
338 b.Property<decimal>(
"DreamDaemonRights")
339 .HasColumnType(
"numeric(20,0)");
341 b.Property<decimal>(
"DreamMakerRights")
342 .HasColumnType(
"numeric(20,0)");
344 b.Property<decimal>(
"EngineRights")
345 .HasColumnType(
"numeric(20,0)");
347 b.Property<
long>(
"InstanceId")
348 .HasColumnType(
"bigint");
350 b.Property<decimal>(
"InstancePermissionSetRights")
351 .HasColumnType(
"numeric(20,0)");
353 b.Property<
long>(
"PermissionSetId")
354 .HasColumnType(
"bigint");
356 b.Property<decimal>(
"RepositoryRights")
357 .HasColumnType(
"numeric(20,0)");
361 b.HasIndex(
"InstanceId");
363 b.HasIndex(
"PermissionSetId",
"InstanceId")
366 b.ToTable(
"InstancePermissionSets");
369 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
371 b.Property<
long?>(
"Id")
372 .ValueGeneratedOnAdd()
373 .HasColumnType(
"bigint");
375 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
377 b.Property<decimal?>(
"CancelRight")
378 .HasColumnType(
"numeric(20,0)");
380 b.Property<decimal?>(
"CancelRightsType")
381 .HasColumnType(
"numeric(20,0)");
383 b.Property<
bool?>(
"Cancelled")
385 .HasColumnType(
"boolean");
387 b.Property<
long?>(
"CancelledById")
388 .HasColumnType(
"bigint");
390 b.Property<
string>(
"Description")
392 .HasColumnType(
"text");
394 b.Property<
long?>(
"ErrorCode")
395 .HasColumnType(
"bigint");
397 b.Property<
string>(
"ExceptionDetails")
398 .HasColumnType(
"text");
400 b.Property<
long>(
"InstanceId")
401 .HasColumnType(
"bigint");
403 b.Property<
byte>(
"JobCode")
404 .HasColumnType(
"smallint");
406 b.Property<DateTimeOffset?>(
"StartedAt")
408 .HasColumnType(
"timestamp with time zone");
410 b.Property<
long>(
"StartedById")
411 .HasColumnType(
"bigint");
413 b.Property<DateTimeOffset?>(
"StoppedAt")
414 .HasColumnType(
"timestamp with time zone");
418 b.HasIndex(
"CancelledById");
420 b.HasIndex(
"InstanceId");
422 b.HasIndex(
"StartedById");
427 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
429 b.Property<
long>(
"Id")
430 .ValueGeneratedOnAdd()
431 .HasColumnType(
"bigint");
433 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
435 b.Property<
string>(
"ExternalUserId")
438 .HasColumnType(
"character varying(100)");
440 b.Property<
int>(
"Provider")
441 .HasColumnType(
"integer");
443 b.Property<
long?>(
"UserId")
444 .HasColumnType(
"bigint");
448 b.HasIndex(
"UserId");
450 b.HasIndex(
"Provider",
"ExternalUserId")
453 b.ToTable(
"OAuthConnections");
456 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
458 b.Property<
long?>(
"Id")
459 .ValueGeneratedOnAdd()
460 .HasColumnType(
"bigint");
462 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
464 b.Property<decimal>(
"AdministrationRights")
465 .HasColumnType(
"numeric(20,0)");
467 b.Property<
long?>(
"GroupId")
468 .HasColumnType(
"bigint");
470 b.Property<decimal>(
"InstanceManagerRights")
471 .HasColumnType(
"numeric(20,0)");
473 b.Property<
long?>(
"UserId")
474 .HasColumnType(
"bigint");
478 b.HasIndex(
"GroupId")
484 b.ToTable(
"PermissionSets");
487 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
489 b.Property<
long?>(
"Id")
490 .ValueGeneratedOnAdd()
491 .HasColumnType(
"bigint");
493 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
495 b.Property<
string>(
"AccessIdentifier")
497 .HasColumnType(
"text");
499 b.Property<
long>(
"CompileJobId")
500 .HasColumnType(
"bigint");
502 b.Property<
long?>(
"InitialCompileJobId")
503 .HasColumnType(
"bigint");
505 b.Property<
int>(
"LaunchSecurityLevel")
506 .HasColumnType(
"integer");
508 b.Property<
int>(
"LaunchVisibility")
509 .HasColumnType(
"integer");
511 b.Property<
int>(
"Port")
512 .HasColumnType(
"integer");
514 b.Property<
int>(
"ProcessId")
515 .HasColumnType(
"integer");
517 b.Property<
int>(
"RebootState")
518 .HasColumnType(
"integer");
520 b.Property<
int?>(
"TopicPort")
521 .HasColumnType(
"integer");
525 b.HasIndex(
"CompileJobId");
527 b.HasIndex(
"InitialCompileJobId");
529 b.ToTable(
"ReattachInformations");
532 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
534 b.Property<
long>(
"Id")
535 .ValueGeneratedOnAdd()
536 .HasColumnType(
"bigint");
538 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
540 b.Property<
string>(
"AccessToken")
542 .HasColumnType(
"character varying(10000)");
544 b.Property<
string>(
"AccessUser")
546 .HasColumnType(
"character varying(10000)");
548 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
550 .HasColumnType(
"boolean");
552 b.Property<
bool?>(
"AutoUpdatesSynchronize")
554 .HasColumnType(
"boolean");
556 b.Property<
string>(
"CommitterEmail")
559 .HasColumnType(
"character varying(10000)");
561 b.Property<
string>(
"CommitterName")
564 .HasColumnType(
"character varying(10000)");
566 b.Property<
bool?>(
"CreateGitHubDeployments")
568 .HasColumnType(
"boolean");
570 b.Property<
long>(
"InstanceId")
571 .HasColumnType(
"bigint");
573 b.Property<
bool?>(
"PostTestMergeComment")
575 .HasColumnType(
"boolean");
577 b.Property<
bool?>(
"PushTestMergeCommits")
579 .HasColumnType(
"boolean");
581 b.Property<
bool?>(
"ShowTestMergeCommitters")
583 .HasColumnType(
"boolean");
585 b.Property<
bool?>(
"UpdateSubmodules")
587 .HasColumnType(
"boolean");
591 b.HasIndex(
"InstanceId")
594 b.ToTable(
"RepositorySettings");
597 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
599 b.Property<
long>(
"Id")
600 .ValueGeneratedOnAdd()
601 .HasColumnType(
"bigint");
603 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
605 b.Property<
long>(
"RevisionInformationId")
606 .HasColumnType(
"bigint");
608 b.Property<
long>(
"TestMergeId")
609 .HasColumnType(
"bigint");
613 b.HasIndex(
"RevisionInformationId");
615 b.HasIndex(
"TestMergeId");
617 b.ToTable(
"RevInfoTestMerges");
620 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
622 b.Property<
long>(
"Id")
623 .ValueGeneratedOnAdd()
624 .HasColumnType(
"bigint");
626 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
628 b.Property<
string>(
"CommitSha")
631 .HasColumnType(
"character varying(40)");
633 b.Property<
long>(
"InstanceId")
634 .HasColumnType(
"bigint");
636 b.Property<
string>(
"OriginCommitSha")
639 .HasColumnType(
"character varying(40)");
641 b.Property<DateTimeOffset>(
"Timestamp")
642 .HasColumnType(
"timestamp with time zone");
646 b.HasIndex(
"InstanceId",
"CommitSha")
649 b.ToTable(
"RevisionInformations");
652 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
654 b.Property<
long>(
"Id")
655 .ValueGeneratedOnAdd()
656 .HasColumnType(
"bigint");
658 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
660 b.Property<
string>(
"Author")
662 .HasColumnType(
"text");
664 b.Property<
string>(
"BodyAtMerge")
666 .HasColumnType(
"text");
668 b.Property<
string>(
"Comment")
670 .HasColumnType(
"character varying(10000)");
672 b.Property<DateTimeOffset>(
"MergedAt")
673 .HasColumnType(
"timestamp with time zone");
675 b.Property<
long>(
"MergedById")
676 .HasColumnType(
"bigint");
678 b.Property<
int>(
"Number")
679 .HasColumnType(
"integer");
681 b.Property<
long?>(
"PrimaryRevisionInformationId")
683 .HasColumnType(
"bigint");
685 b.Property<
string>(
"TargetCommitSha")
688 .HasColumnType(
"character varying(40)");
690 b.Property<
string>(
"TitleAtMerge")
692 .HasColumnType(
"text");
694 b.Property<
string>(
"Url")
696 .HasColumnType(
"text");
700 b.HasIndex(
"MergedById");
702 b.HasIndex(
"PrimaryRevisionInformationId")
705 b.ToTable(
"TestMerges");
708 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
710 b.Property<
long?>(
"Id")
711 .ValueGeneratedOnAdd()
712 .HasColumnType(
"bigint");
714 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
716 b.Property<
string>(
"CanonicalName")
719 .HasColumnType(
"character varying(100)");
721 b.Property<DateTimeOffset?>(
"CreatedAt")
723 .HasColumnType(
"timestamp with time zone");
725 b.Property<
long?>(
"CreatedById")
726 .HasColumnType(
"bigint");
728 b.Property<
bool?>(
"Enabled")
730 .HasColumnType(
"boolean");
732 b.Property<
long?>(
"GroupId")
733 .HasColumnType(
"bigint");
735 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
736 .HasColumnType(
"timestamp with time zone");
738 b.Property<
string>(
"Name")
741 .HasColumnType(
"character varying(100)");
743 b.Property<
string>(
"PasswordHash")
744 .HasColumnType(
"text");
746 b.Property<
string>(
"SystemIdentifier")
748 .HasColumnType(
"character varying(100)");
752 b.HasIndex(
"CanonicalName")
755 b.HasIndex(
"CreatedById");
757 b.HasIndex(
"GroupId");
759 b.HasIndex(
"SystemIdentifier")
765 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
767 b.Property<
long?>(
"Id")
768 .ValueGeneratedOnAdd()
769 .HasColumnType(
"bigint");
771 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
773 b.Property<
string>(
"Name")
776 .HasColumnType(
"character varying(100)");
786 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
788 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
789 .WithMany(
"ChatSettings")
790 .HasForeignKey(
"InstanceId")
791 .OnDelete(DeleteBehavior.Cascade)
794 b.Navigation(
"Instance");
797 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
799 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
800 .WithMany(
"Channels")
801 .HasForeignKey(
"ChatSettingsId")
802 .OnDelete(DeleteBehavior.Cascade)
805 b.Navigation(
"ChatSettings");
808 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
810 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
812 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
813 .OnDelete(DeleteBehavior.Cascade)
816 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
817 .WithMany(
"CompileJobs")
818 .HasForeignKey(
"RevisionInformationId")
819 .OnDelete(DeleteBehavior.Cascade)
824 b.Navigation(
"RevisionInformation");
827 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
829 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
830 .WithOne(
"DreamDaemonSettings")
831 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
832 .OnDelete(DeleteBehavior.Cascade)
835 b.Navigation(
"Instance");
838 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
840 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
841 .WithOne(
"DreamMakerSettings")
842 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
843 .OnDelete(DeleteBehavior.Cascade)
846 b.Navigation(
"Instance");
849 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
851 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
852 .WithMany(
"InstancePermissionSets")
853 .HasForeignKey(
"InstanceId")
854 .OnDelete(DeleteBehavior.Cascade)
857 b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet",
"PermissionSet")
858 .WithMany(
"InstancePermissionSets")
859 .HasForeignKey(
"PermissionSetId")
860 .OnDelete(DeleteBehavior.Cascade)
863 b.Navigation(
"Instance");
865 b.Navigation(
"PermissionSet");
868 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
870 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
872 .HasForeignKey(
"CancelledById");
874 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
876 .HasForeignKey(
"InstanceId")
877 .OnDelete(DeleteBehavior.Cascade)
880 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
882 .HasForeignKey(
"StartedById")
883 .OnDelete(DeleteBehavior.Cascade)
886 b.Navigation(
"CancelledBy");
888 b.Navigation(
"Instance");
890 b.Navigation(
"StartedBy");
893 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
895 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
896 .WithMany(
"OAuthConnections")
897 .HasForeignKey(
"UserId")
898 .OnDelete(DeleteBehavior.Cascade);
900 b.Navigation(
"User");
903 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
905 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
906 .WithOne(
"PermissionSet")
907 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"GroupId")
908 .OnDelete(DeleteBehavior.Cascade);
910 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
911 .WithOne(
"PermissionSet")
912 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"UserId")
913 .OnDelete(DeleteBehavior.Cascade);
915 b.Navigation(
"Group");
917 b.Navigation(
"User");
920 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
922 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
924 .HasForeignKey(
"CompileJobId")
925 .OnDelete(DeleteBehavior.Cascade)
928 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"InitialCompileJob")
930 .HasForeignKey(
"InitialCompileJobId");
932 b.Navigation(
"CompileJob");
934 b.Navigation(
"InitialCompileJob");
937 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
939 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
940 .WithOne(
"RepositorySettings")
941 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
942 .OnDelete(DeleteBehavior.Cascade)
945 b.Navigation(
"Instance");
948 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
950 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
951 .WithMany(
"ActiveTestMerges")
952 .HasForeignKey(
"RevisionInformationId")
953 .OnDelete(DeleteBehavior.Cascade)
956 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
957 .WithMany(
"RevisonInformations")
958 .HasForeignKey(
"TestMergeId")
959 .OnDelete(DeleteBehavior.ClientNoAction)
962 b.Navigation(
"RevisionInformation");
964 b.Navigation(
"TestMerge");
967 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
969 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
970 .WithMany(
"RevisionInformations")
971 .HasForeignKey(
"InstanceId")
972 .OnDelete(DeleteBehavior.Cascade)
975 b.Navigation(
"Instance");
978 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
980 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
981 .WithMany(
"TestMerges")
982 .HasForeignKey(
"MergedById")
983 .OnDelete(DeleteBehavior.Restrict)
986 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
987 .WithOne(
"PrimaryTestMerge")
988 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
989 .OnDelete(DeleteBehavior.Cascade)
992 b.Navigation(
"MergedBy");
994 b.Navigation(
"PrimaryRevisionInformation");
997 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
999 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
1000 .WithMany(
"CreatedUsers")
1001 .HasForeignKey(
"CreatedById");
1003 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
1005 .HasForeignKey(
"GroupId");
1007 b.Navigation(
"CreatedBy");
1009 b.Navigation(
"Group");
1012 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
1014 b.Navigation(
"Channels");
1017 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
1019 b.Navigation(
"ChatSettings");
1021 b.Navigation(
"DreamDaemonSettings");
1023 b.Navigation(
"DreamMakerSettings");
1025 b.Navigation(
"InstancePermissionSets");
1027 b.Navigation(
"Jobs");
1029 b.Navigation(
"RepositorySettings");
1031 b.Navigation(
"RevisionInformations");
1034 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
1036 b.Navigation(
"InstancePermissionSets");
1039 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1041 b.Navigation(
"ActiveTestMerges");
1043 b.Navigation(
"CompileJobs");
1045 b.Navigation(
"PrimaryTestMerge");
1048 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1050 b.Navigation(
"RevisonInformations");
1053 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1055 b.Navigation(
"CreatedUsers");
1057 b.Navigation(
"OAuthConnections");
1059 b.Navigation(
"PermissionSet");
1061 b.Navigation(
"TestMerges");
1064 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
1066 b.Navigation(
"PermissionSet")
1069 b.Navigation(
"Users");
1071#pragma warning restore 612, 618