17#pragma warning disable 612, 618
19 .HasAnnotation(
"ProductVersion",
"8.0.13")
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.OidcConnection", b =>
479 b.Property<
long>(
"Id")
480 .ValueGeneratedOnAdd()
481 .HasColumnType(
"bigint");
483 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
485 b.Property<
string>(
"ExternalUserId")
488 .HasColumnType(
"character varying(100)");
490 b.Property<
string>(
"SchemeKey")
493 .HasColumnType(
"character varying(100)");
495 b.Property<
long>(
"UserId")
496 .HasColumnType(
"bigint");
500 b.HasIndex(
"UserId");
502 b.HasIndex(
"SchemeKey",
"ExternalUserId")
505 b.ToTable(
"OidcConnections");
508 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
510 b.Property<
long?>(
"Id")
511 .ValueGeneratedOnAdd()
512 .HasColumnType(
"bigint");
514 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
516 b.Property<decimal>(
"AdministrationRights")
517 .HasColumnType(
"numeric(20,0)");
519 b.Property<
long?>(
"GroupId")
520 .HasColumnType(
"bigint");
522 b.Property<decimal>(
"InstanceManagerRights")
523 .HasColumnType(
"numeric(20,0)");
525 b.Property<
long?>(
"UserId")
526 .HasColumnType(
"bigint");
530 b.HasIndex(
"GroupId")
536 b.ToTable(
"PermissionSets");
539 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
541 b.Property<
long?>(
"Id")
542 .ValueGeneratedOnAdd()
543 .HasColumnType(
"bigint");
545 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
547 b.Property<
string>(
"AccessIdentifier")
549 .HasColumnType(
"text");
551 b.Property<
long>(
"CompileJobId")
552 .HasColumnType(
"bigint");
554 b.Property<
long?>(
"InitialCompileJobId")
555 .HasColumnType(
"bigint");
557 b.Property<
int>(
"LaunchSecurityLevel")
558 .HasColumnType(
"integer");
560 b.Property<
int>(
"LaunchVisibility")
561 .HasColumnType(
"integer");
563 b.Property<
int>(
"Port")
564 .HasColumnType(
"integer");
566 b.Property<
int>(
"ProcessId")
567 .HasColumnType(
"integer");
569 b.Property<
int>(
"RebootState")
570 .HasColumnType(
"integer");
572 b.Property<
int?>(
"TopicPort")
573 .HasColumnType(
"integer");
577 b.HasIndex(
"CompileJobId");
579 b.HasIndex(
"InitialCompileJobId");
581 b.ToTable(
"ReattachInformations");
584 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
586 b.Property<
long>(
"Id")
587 .ValueGeneratedOnAdd()
588 .HasColumnType(
"bigint");
590 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
592 b.Property<
string>(
"AccessToken")
594 .HasColumnType(
"character varying(10000)");
596 b.Property<
string>(
"AccessUser")
598 .HasColumnType(
"character varying(10000)");
600 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
602 .HasColumnType(
"boolean");
604 b.Property<
bool?>(
"AutoUpdatesSynchronize")
606 .HasColumnType(
"boolean");
608 b.Property<
string>(
"CommitterEmail")
611 .HasColumnType(
"character varying(10000)");
613 b.Property<
string>(
"CommitterName")
616 .HasColumnType(
"character varying(10000)");
618 b.Property<
bool?>(
"CreateGitHubDeployments")
620 .HasColumnType(
"boolean");
622 b.Property<
long>(
"InstanceId")
623 .HasColumnType(
"bigint");
625 b.Property<
bool?>(
"PostTestMergeComment")
627 .HasColumnType(
"boolean");
629 b.Property<
bool?>(
"PushTestMergeCommits")
631 .HasColumnType(
"boolean");
633 b.Property<
bool?>(
"ShowTestMergeCommitters")
635 .HasColumnType(
"boolean");
637 b.Property<
bool?>(
"UpdateSubmodules")
639 .HasColumnType(
"boolean");
643 b.HasIndex(
"InstanceId")
646 b.ToTable(
"RepositorySettings");
649 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
651 b.Property<
long>(
"Id")
652 .ValueGeneratedOnAdd()
653 .HasColumnType(
"bigint");
655 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
657 b.Property<
long>(
"RevisionInformationId")
658 .HasColumnType(
"bigint");
660 b.Property<
long>(
"TestMergeId")
661 .HasColumnType(
"bigint");
665 b.HasIndex(
"RevisionInformationId");
667 b.HasIndex(
"TestMergeId");
669 b.ToTable(
"RevInfoTestMerges");
672 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
674 b.Property<
long>(
"Id")
675 .ValueGeneratedOnAdd()
676 .HasColumnType(
"bigint");
678 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
680 b.Property<
string>(
"CommitSha")
683 .HasColumnType(
"character varying(40)");
685 b.Property<
long>(
"InstanceId")
686 .HasColumnType(
"bigint");
688 b.Property<
string>(
"OriginCommitSha")
691 .HasColumnType(
"character varying(40)");
693 b.Property<DateTimeOffset>(
"Timestamp")
694 .HasColumnType(
"timestamp with time zone");
698 b.HasIndex(
"InstanceId",
"CommitSha")
701 b.ToTable(
"RevisionInformations");
704 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
706 b.Property<
long>(
"Id")
707 .ValueGeneratedOnAdd()
708 .HasColumnType(
"bigint");
710 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
712 b.Property<
string>(
"Author")
714 .HasColumnType(
"text");
716 b.Property<
string>(
"BodyAtMerge")
718 .HasColumnType(
"text");
720 b.Property<
string>(
"Comment")
722 .HasColumnType(
"character varying(10000)");
724 b.Property<DateTimeOffset>(
"MergedAt")
725 .HasColumnType(
"timestamp with time zone");
727 b.Property<
long>(
"MergedById")
728 .HasColumnType(
"bigint");
730 b.Property<
int>(
"Number")
731 .HasColumnType(
"integer");
733 b.Property<
long?>(
"PrimaryRevisionInformationId")
735 .HasColumnType(
"bigint");
737 b.Property<
string>(
"TargetCommitSha")
740 .HasColumnType(
"character varying(40)");
742 b.Property<
string>(
"TitleAtMerge")
744 .HasColumnType(
"text");
746 b.Property<
string>(
"Url")
748 .HasColumnType(
"text");
752 b.HasIndex(
"MergedById");
754 b.HasIndex(
"PrimaryRevisionInformationId")
757 b.ToTable(
"TestMerges");
760 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
762 b.Property<
long?>(
"Id")
763 .ValueGeneratedOnAdd()
764 .HasColumnType(
"bigint");
766 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
768 b.Property<
string>(
"CanonicalName")
771 .HasColumnType(
"character varying(100)");
773 b.Property<DateTimeOffset?>(
"CreatedAt")
775 .HasColumnType(
"timestamp with time zone");
777 b.Property<
long?>(
"CreatedById")
778 .HasColumnType(
"bigint");
780 b.Property<
bool?>(
"Enabled")
782 .HasColumnType(
"boolean");
784 b.Property<
long?>(
"GroupId")
785 .HasColumnType(
"bigint");
787 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
788 .HasColumnType(
"timestamp with time zone");
790 b.Property<
string>(
"Name")
793 .HasColumnType(
"character varying(100)");
795 b.Property<
string>(
"PasswordHash")
796 .HasColumnType(
"text");
798 b.Property<
string>(
"SystemIdentifier")
800 .HasColumnType(
"character varying(100)");
804 b.HasIndex(
"CanonicalName")
807 b.HasIndex(
"CreatedById");
809 b.HasIndex(
"GroupId");
811 b.HasIndex(
"SystemIdentifier")
817 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
819 b.Property<
long?>(
"Id")
820 .ValueGeneratedOnAdd()
821 .HasColumnType(
"bigint");
823 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
825 b.Property<
string>(
"Name")
828 .HasColumnType(
"character varying(100)");
838 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
840 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
841 .WithMany(
"ChatSettings")
842 .HasForeignKey(
"InstanceId")
843 .OnDelete(DeleteBehavior.Cascade)
846 b.Navigation(
"Instance");
849 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
851 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
852 .WithMany(
"Channels")
853 .HasForeignKey(
"ChatSettingsId")
854 .OnDelete(DeleteBehavior.Cascade)
857 b.Navigation(
"ChatSettings");
860 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
862 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
864 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
865 .OnDelete(DeleteBehavior.Cascade)
868 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
869 .WithMany(
"CompileJobs")
870 .HasForeignKey(
"RevisionInformationId")
871 .OnDelete(DeleteBehavior.Cascade)
876 b.Navigation(
"RevisionInformation");
879 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
881 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
882 .WithOne(
"DreamDaemonSettings")
883 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
884 .OnDelete(DeleteBehavior.Cascade)
887 b.Navigation(
"Instance");
890 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
892 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
893 .WithOne(
"DreamMakerSettings")
894 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
895 .OnDelete(DeleteBehavior.Cascade)
898 b.Navigation(
"Instance");
901 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
903 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
904 .WithMany(
"InstancePermissionSets")
905 .HasForeignKey(
"InstanceId")
906 .OnDelete(DeleteBehavior.Cascade)
909 b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet",
"PermissionSet")
910 .WithMany(
"InstancePermissionSets")
911 .HasForeignKey(
"PermissionSetId")
912 .OnDelete(DeleteBehavior.Cascade)
915 b.Navigation(
"Instance");
917 b.Navigation(
"PermissionSet");
920 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
922 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
924 .HasForeignKey(
"CancelledById");
926 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
928 .HasForeignKey(
"InstanceId")
929 .OnDelete(DeleteBehavior.Cascade)
932 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
934 .HasForeignKey(
"StartedById")
935 .OnDelete(DeleteBehavior.Cascade)
938 b.Navigation(
"CancelledBy");
940 b.Navigation(
"Instance");
942 b.Navigation(
"StartedBy");
945 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
947 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
948 .WithMany(
"OAuthConnections")
949 .HasForeignKey(
"UserId")
950 .OnDelete(DeleteBehavior.Cascade)
953 b.Navigation(
"User");
956 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OidcConnection", b =>
958 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
959 .WithMany(
"OidcConnections")
960 .HasForeignKey(
"UserId")
961 .OnDelete(DeleteBehavior.Cascade)
964 b.Navigation(
"User");
967 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
969 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
970 .WithOne(
"PermissionSet")
971 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"GroupId")
972 .OnDelete(DeleteBehavior.Cascade);
974 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
975 .WithOne(
"PermissionSet")
976 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"UserId")
977 .OnDelete(DeleteBehavior.Cascade);
979 b.Navigation(
"Group");
981 b.Navigation(
"User");
984 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
986 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
988 .HasForeignKey(
"CompileJobId")
989 .OnDelete(DeleteBehavior.Cascade)
992 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"InitialCompileJob")
994 .HasForeignKey(
"InitialCompileJobId");
996 b.Navigation(
"CompileJob");
998 b.Navigation(
"InitialCompileJob");
1001 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
1003 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
1004 .WithOne(
"RepositorySettings")
1005 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
1006 .OnDelete(DeleteBehavior.Cascade)
1009 b.Navigation(
"Instance");
1012 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
1014 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
1015 .WithMany(
"ActiveTestMerges")
1016 .HasForeignKey(
"RevisionInformationId")
1017 .OnDelete(DeleteBehavior.Cascade)
1020 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
1021 .WithMany(
"RevisonInformations")
1022 .HasForeignKey(
"TestMergeId")
1023 .OnDelete(DeleteBehavior.ClientNoAction)
1026 b.Navigation(
"RevisionInformation");
1028 b.Navigation(
"TestMerge");
1031 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1033 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
1034 .WithMany(
"RevisionInformations")
1035 .HasForeignKey(
"InstanceId")
1036 .OnDelete(DeleteBehavior.Cascade)
1039 b.Navigation(
"Instance");
1042 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1044 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
1045 .WithMany(
"TestMerges")
1046 .HasForeignKey(
"MergedById")
1047 .OnDelete(DeleteBehavior.Restrict)
1050 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
1051 .WithOne(
"PrimaryTestMerge")
1052 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
1053 .OnDelete(DeleteBehavior.Cascade)
1056 b.Navigation(
"MergedBy");
1058 b.Navigation(
"PrimaryRevisionInformation");
1061 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1063 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
1064 .WithMany(
"CreatedUsers")
1065 .HasForeignKey(
"CreatedById");
1067 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
1069 .HasForeignKey(
"GroupId");
1071 b.Navigation(
"CreatedBy");
1073 b.Navigation(
"Group");
1076 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
1078 b.Navigation(
"Channels");
1081 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
1083 b.Navigation(
"ChatSettings");
1085 b.Navigation(
"DreamDaemonSettings");
1087 b.Navigation(
"DreamMakerSettings");
1089 b.Navigation(
"InstancePermissionSets");
1091 b.Navigation(
"Jobs");
1093 b.Navigation(
"RepositorySettings");
1095 b.Navigation(
"RevisionInformations");
1098 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
1100 b.Navigation(
"InstancePermissionSets");
1103 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1105 b.Navigation(
"ActiveTestMerges");
1107 b.Navigation(
"CompileJobs");
1109 b.Navigation(
"PrimaryTestMerge");
1112 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1114 b.Navigation(
"RevisonInformations");
1117 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1119 b.Navigation(
"CreatedUsers");
1121 b.Navigation(
"OAuthConnections");
1123 b.Navigation(
"OidcConnections");
1125 b.Navigation(
"PermissionSet");
1127 b.Navigation(
"TestMerges");
1130 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
1132 b.Navigation(
"PermissionSet")
1135 b.Navigation(
"Users");
1137#pragma warning restore 612, 618