17#pragma warning disable 612, 618
19 .HasAnnotation(
"ProductVersion",
"8.0.10")
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>(
"AutoStartCron")
300 .HasColumnType(
"character varying(1000)");
302 b.Property<
string>(
"AutoStopCron")
305 .HasColumnType(
"character varying(1000)");
307 b.Property<
string>(
"AutoUpdateCron")
310 .HasColumnType(
"character varying(1000)");
312 b.Property<
long>(
"AutoUpdateInterval")
313 .HasColumnType(
"bigint");
315 b.Property<
int>(
"ChatBotLimit")
316 .HasColumnType(
"integer");
318 b.Property<
int>(
"ConfigurationType")
319 .HasColumnType(
"integer");
321 b.Property<
string>(
"Name")
324 .HasColumnType(
"character varying(100)");
326 b.Property<
bool?>(
"Online")
328 .HasColumnType(
"boolean");
330 b.Property<
string>(
"Path")
332 .HasColumnType(
"text");
334 b.Property<
string>(
"SwarmIdentifer")
335 .HasColumnType(
"text");
339 b.HasIndex(
"Path",
"SwarmIdentifer")
342 b.ToTable(
"Instances");
345 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
347 b.Property<
long>(
"Id")
348 .ValueGeneratedOnAdd()
349 .HasColumnType(
"bigint");
351 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
353 b.Property<decimal>(
"ChatBotRights")
354 .HasColumnType(
"numeric(20,0)");
356 b.Property<decimal>(
"ConfigurationRights")
357 .HasColumnType(
"numeric(20,0)");
359 b.Property<decimal>(
"DreamDaemonRights")
360 .HasColumnType(
"numeric(20,0)");
362 b.Property<decimal>(
"DreamMakerRights")
363 .HasColumnType(
"numeric(20,0)");
365 b.Property<decimal>(
"EngineRights")
366 .HasColumnType(
"numeric(20,0)");
368 b.Property<
long>(
"InstanceId")
369 .HasColumnType(
"bigint");
371 b.Property<decimal>(
"InstancePermissionSetRights")
372 .HasColumnType(
"numeric(20,0)");
374 b.Property<
long>(
"PermissionSetId")
375 .HasColumnType(
"bigint");
377 b.Property<decimal>(
"RepositoryRights")
378 .HasColumnType(
"numeric(20,0)");
382 b.HasIndex(
"InstanceId");
384 b.HasIndex(
"PermissionSetId",
"InstanceId")
387 b.ToTable(
"InstancePermissionSets");
390 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
392 b.Property<
long?>(
"Id")
393 .ValueGeneratedOnAdd()
394 .HasColumnType(
"bigint");
396 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
398 b.Property<decimal?>(
"CancelRight")
399 .HasColumnType(
"numeric(20,0)");
401 b.Property<decimal?>(
"CancelRightsType")
402 .HasColumnType(
"numeric(20,0)");
404 b.Property<
bool?>(
"Cancelled")
406 .HasColumnType(
"boolean");
408 b.Property<
long?>(
"CancelledById")
409 .HasColumnType(
"bigint");
411 b.Property<
string>(
"Description")
413 .HasColumnType(
"text");
415 b.Property<
long?>(
"ErrorCode")
416 .HasColumnType(
"bigint");
418 b.Property<
string>(
"ExceptionDetails")
419 .HasColumnType(
"text");
421 b.Property<
long>(
"InstanceId")
422 .HasColumnType(
"bigint");
424 b.Property<
byte>(
"JobCode")
425 .HasColumnType(
"smallint");
427 b.Property<DateTimeOffset?>(
"StartedAt")
429 .HasColumnType(
"timestamp with time zone");
431 b.Property<
long>(
"StartedById")
432 .HasColumnType(
"bigint");
434 b.Property<DateTimeOffset?>(
"StoppedAt")
435 .HasColumnType(
"timestamp with time zone");
439 b.HasIndex(
"CancelledById");
441 b.HasIndex(
"InstanceId");
443 b.HasIndex(
"StartedById");
448 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
450 b.Property<
long>(
"Id")
451 .ValueGeneratedOnAdd()
452 .HasColumnType(
"bigint");
454 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
456 b.Property<
string>(
"ExternalUserId")
459 .HasColumnType(
"character varying(100)");
461 b.Property<
int>(
"Provider")
462 .HasColumnType(
"integer");
464 b.Property<
long>(
"UserId")
465 .HasColumnType(
"bigint");
469 b.HasIndex(
"UserId");
471 b.HasIndex(
"Provider",
"ExternalUserId")
474 b.ToTable(
"OAuthConnections");
477 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
479 b.Property<
long?>(
"Id")
480 .ValueGeneratedOnAdd()
481 .HasColumnType(
"bigint");
483 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
485 b.Property<decimal>(
"AdministrationRights")
486 .HasColumnType(
"numeric(20,0)");
488 b.Property<
long?>(
"GroupId")
489 .HasColumnType(
"bigint");
491 b.Property<decimal>(
"InstanceManagerRights")
492 .HasColumnType(
"numeric(20,0)");
494 b.Property<
long?>(
"UserId")
495 .HasColumnType(
"bigint");
499 b.HasIndex(
"GroupId")
505 b.ToTable(
"PermissionSets");
508 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
510 b.Property<
long?>(
"Id")
511 .ValueGeneratedOnAdd()
512 .HasColumnType(
"bigint");
514 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
516 b.Property<
string>(
"AccessIdentifier")
518 .HasColumnType(
"text");
520 b.Property<
long>(
"CompileJobId")
521 .HasColumnType(
"bigint");
523 b.Property<
long?>(
"InitialCompileJobId")
524 .HasColumnType(
"bigint");
526 b.Property<
int>(
"LaunchSecurityLevel")
527 .HasColumnType(
"integer");
529 b.Property<
int>(
"LaunchVisibility")
530 .HasColumnType(
"integer");
532 b.Property<
int>(
"Port")
533 .HasColumnType(
"integer");
535 b.Property<
int>(
"ProcessId")
536 .HasColumnType(
"integer");
538 b.Property<
int>(
"RebootState")
539 .HasColumnType(
"integer");
541 b.Property<
int?>(
"TopicPort")
542 .HasColumnType(
"integer");
546 b.HasIndex(
"CompileJobId");
548 b.HasIndex(
"InitialCompileJobId");
550 b.ToTable(
"ReattachInformations");
553 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
555 b.Property<
long>(
"Id")
556 .ValueGeneratedOnAdd()
557 .HasColumnType(
"bigint");
559 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
561 b.Property<
string>(
"AccessToken")
563 .HasColumnType(
"character varying(10000)");
565 b.Property<
string>(
"AccessUser")
567 .HasColumnType(
"character varying(10000)");
569 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
571 .HasColumnType(
"boolean");
573 b.Property<
bool?>(
"AutoUpdatesSynchronize")
575 .HasColumnType(
"boolean");
577 b.Property<
string>(
"CommitterEmail")
580 .HasColumnType(
"character varying(10000)");
582 b.Property<
string>(
"CommitterName")
585 .HasColumnType(
"character varying(10000)");
587 b.Property<
bool?>(
"CreateGitHubDeployments")
589 .HasColumnType(
"boolean");
591 b.Property<
long>(
"InstanceId")
592 .HasColumnType(
"bigint");
594 b.Property<
bool?>(
"PostTestMergeComment")
596 .HasColumnType(
"boolean");
598 b.Property<
bool?>(
"PushTestMergeCommits")
600 .HasColumnType(
"boolean");
602 b.Property<
bool?>(
"ShowTestMergeCommitters")
604 .HasColumnType(
"boolean");
606 b.Property<
bool?>(
"UpdateSubmodules")
608 .HasColumnType(
"boolean");
612 b.HasIndex(
"InstanceId")
615 b.ToTable(
"RepositorySettings");
618 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
620 b.Property<
long>(
"Id")
621 .ValueGeneratedOnAdd()
622 .HasColumnType(
"bigint");
624 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
626 b.Property<
long>(
"RevisionInformationId")
627 .HasColumnType(
"bigint");
629 b.Property<
long>(
"TestMergeId")
630 .HasColumnType(
"bigint");
634 b.HasIndex(
"RevisionInformationId");
636 b.HasIndex(
"TestMergeId");
638 b.ToTable(
"RevInfoTestMerges");
641 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
643 b.Property<
long>(
"Id")
644 .ValueGeneratedOnAdd()
645 .HasColumnType(
"bigint");
647 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
649 b.Property<
string>(
"CommitSha")
652 .HasColumnType(
"character varying(40)");
654 b.Property<
long>(
"InstanceId")
655 .HasColumnType(
"bigint");
657 b.Property<
string>(
"OriginCommitSha")
660 .HasColumnType(
"character varying(40)");
662 b.Property<DateTimeOffset>(
"Timestamp")
663 .HasColumnType(
"timestamp with time zone");
667 b.HasIndex(
"InstanceId",
"CommitSha")
670 b.ToTable(
"RevisionInformations");
673 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
675 b.Property<
long>(
"Id")
676 .ValueGeneratedOnAdd()
677 .HasColumnType(
"bigint");
679 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
681 b.Property<
string>(
"Author")
683 .HasColumnType(
"text");
685 b.Property<
string>(
"BodyAtMerge")
687 .HasColumnType(
"text");
689 b.Property<
string>(
"Comment")
691 .HasColumnType(
"character varying(10000)");
693 b.Property<DateTimeOffset>(
"MergedAt")
694 .HasColumnType(
"timestamp with time zone");
696 b.Property<
long>(
"MergedById")
697 .HasColumnType(
"bigint");
699 b.Property<
int>(
"Number")
700 .HasColumnType(
"integer");
702 b.Property<
long?>(
"PrimaryRevisionInformationId")
704 .HasColumnType(
"bigint");
706 b.Property<
string>(
"TargetCommitSha")
709 .HasColumnType(
"character varying(40)");
711 b.Property<
string>(
"TitleAtMerge")
713 .HasColumnType(
"text");
715 b.Property<
string>(
"Url")
717 .HasColumnType(
"text");
721 b.HasIndex(
"MergedById");
723 b.HasIndex(
"PrimaryRevisionInformationId")
726 b.ToTable(
"TestMerges");
729 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
731 b.Property<
long?>(
"Id")
732 .ValueGeneratedOnAdd()
733 .HasColumnType(
"bigint");
735 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
737 b.Property<
string>(
"CanonicalName")
740 .HasColumnType(
"character varying(100)");
742 b.Property<DateTimeOffset?>(
"CreatedAt")
744 .HasColumnType(
"timestamp with time zone");
746 b.Property<
long?>(
"CreatedById")
747 .HasColumnType(
"bigint");
749 b.Property<
bool?>(
"Enabled")
751 .HasColumnType(
"boolean");
753 b.Property<
long?>(
"GroupId")
754 .HasColumnType(
"bigint");
756 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
757 .HasColumnType(
"timestamp with time zone");
759 b.Property<
string>(
"Name")
762 .HasColumnType(
"character varying(100)");
764 b.Property<
string>(
"PasswordHash")
765 .HasColumnType(
"text");
767 b.Property<
string>(
"SystemIdentifier")
769 .HasColumnType(
"character varying(100)");
773 b.HasIndex(
"CanonicalName")
776 b.HasIndex(
"CreatedById");
778 b.HasIndex(
"GroupId");
780 b.HasIndex(
"SystemIdentifier")
786 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
788 b.Property<
long?>(
"Id")
789 .ValueGeneratedOnAdd()
790 .HasColumnType(
"bigint");
792 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
794 b.Property<
string>(
"Name")
797 .HasColumnType(
"character varying(100)");
807 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
809 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
810 .WithMany(
"ChatSettings")
811 .HasForeignKey(
"InstanceId")
812 .OnDelete(DeleteBehavior.Cascade)
815 b.Navigation(
"Instance");
818 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
820 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
821 .WithMany(
"Channels")
822 .HasForeignKey(
"ChatSettingsId")
823 .OnDelete(DeleteBehavior.Cascade)
826 b.Navigation(
"ChatSettings");
829 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
831 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
833 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
834 .OnDelete(DeleteBehavior.Cascade)
837 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
838 .WithMany(
"CompileJobs")
839 .HasForeignKey(
"RevisionInformationId")
840 .OnDelete(DeleteBehavior.Cascade)
845 b.Navigation(
"RevisionInformation");
848 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
850 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
851 .WithOne(
"DreamDaemonSettings")
852 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
853 .OnDelete(DeleteBehavior.Cascade)
856 b.Navigation(
"Instance");
859 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
861 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
862 .WithOne(
"DreamMakerSettings")
863 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
864 .OnDelete(DeleteBehavior.Cascade)
867 b.Navigation(
"Instance");
870 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
872 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
873 .WithMany(
"InstancePermissionSets")
874 .HasForeignKey(
"InstanceId")
875 .OnDelete(DeleteBehavior.Cascade)
878 b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet",
"PermissionSet")
879 .WithMany(
"InstancePermissionSets")
880 .HasForeignKey(
"PermissionSetId")
881 .OnDelete(DeleteBehavior.Cascade)
884 b.Navigation(
"Instance");
886 b.Navigation(
"PermissionSet");
889 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
891 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
893 .HasForeignKey(
"CancelledById");
895 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
897 .HasForeignKey(
"InstanceId")
898 .OnDelete(DeleteBehavior.Cascade)
901 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
903 .HasForeignKey(
"StartedById")
904 .OnDelete(DeleteBehavior.Cascade)
907 b.Navigation(
"CancelledBy");
909 b.Navigation(
"Instance");
911 b.Navigation(
"StartedBy");
914 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
916 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
917 .WithMany(
"OAuthConnections")
918 .HasForeignKey(
"UserId")
919 .OnDelete(DeleteBehavior.Cascade)
922 b.Navigation(
"User");
925 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
927 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
928 .WithOne(
"PermissionSet")
929 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"GroupId")
930 .OnDelete(DeleteBehavior.Cascade);
932 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
933 .WithOne(
"PermissionSet")
934 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"UserId")
935 .OnDelete(DeleteBehavior.Cascade);
937 b.Navigation(
"Group");
939 b.Navigation(
"User");
942 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
944 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
946 .HasForeignKey(
"CompileJobId")
947 .OnDelete(DeleteBehavior.Cascade)
950 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"InitialCompileJob")
952 .HasForeignKey(
"InitialCompileJobId");
954 b.Navigation(
"CompileJob");
956 b.Navigation(
"InitialCompileJob");
959 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
961 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
962 .WithOne(
"RepositorySettings")
963 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
964 .OnDelete(DeleteBehavior.Cascade)
967 b.Navigation(
"Instance");
970 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
972 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
973 .WithMany(
"ActiveTestMerges")
974 .HasForeignKey(
"RevisionInformationId")
975 .OnDelete(DeleteBehavior.Cascade)
978 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
979 .WithMany(
"RevisonInformations")
980 .HasForeignKey(
"TestMergeId")
981 .OnDelete(DeleteBehavior.ClientNoAction)
984 b.Navigation(
"RevisionInformation");
986 b.Navigation(
"TestMerge");
989 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
991 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
992 .WithMany(
"RevisionInformations")
993 .HasForeignKey(
"InstanceId")
994 .OnDelete(DeleteBehavior.Cascade)
997 b.Navigation(
"Instance");
1000 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1002 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
1003 .WithMany(
"TestMerges")
1004 .HasForeignKey(
"MergedById")
1005 .OnDelete(DeleteBehavior.Restrict)
1008 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
1009 .WithOne(
"PrimaryTestMerge")
1010 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
1011 .OnDelete(DeleteBehavior.Cascade)
1014 b.Navigation(
"MergedBy");
1016 b.Navigation(
"PrimaryRevisionInformation");
1019 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1021 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
1022 .WithMany(
"CreatedUsers")
1023 .HasForeignKey(
"CreatedById");
1025 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
1027 .HasForeignKey(
"GroupId");
1029 b.Navigation(
"CreatedBy");
1031 b.Navigation(
"Group");
1034 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
1036 b.Navigation(
"Channels");
1039 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
1041 b.Navigation(
"ChatSettings");
1043 b.Navigation(
"DreamDaemonSettings");
1045 b.Navigation(
"DreamMakerSettings");
1047 b.Navigation(
"InstancePermissionSets");
1049 b.Navigation(
"Jobs");
1051 b.Navigation(
"RepositorySettings");
1053 b.Navigation(
"RevisionInformations");
1056 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
1058 b.Navigation(
"InstancePermissionSets");
1061 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1063 b.Navigation(
"ActiveTestMerges");
1065 b.Navigation(
"CompileJobs");
1067 b.Navigation(
"PrimaryTestMerge");
1070 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1072 b.Navigation(
"RevisonInformations");
1075 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1077 b.Navigation(
"CreatedUsers");
1079 b.Navigation(
"OAuthConnections");
1081 b.Navigation(
"PermissionSet");
1083 b.Navigation(
"TestMerges");
1086 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
1088 b.Navigation(
"PermissionSet")
1091 b.Navigation(
"Users");
1093#pragma warning restore 612, 618