17#pragma warning disable 612, 618
19 .HasAnnotation(
"ProductVersion",
"7.0.7")
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?>(
"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<
int>(
"Port")
216 .HasColumnType(
"integer");
218 b.Property<
int>(
"SecurityLevel")
219 .HasColumnType(
"integer");
221 b.Property<
bool?>(
"StartProfiler")
223 .HasColumnType(
"boolean");
225 b.Property<
long>(
"StartupTimeout")
226 .HasColumnType(
"bigint");
228 b.Property<
long>(
"TopicRequestTimeout")
229 .HasColumnType(
"bigint");
231 b.Property<
int>(
"Visibility")
232 .HasColumnType(
"integer");
236 b.HasIndex(
"InstanceId")
239 b.ToTable(
"DreamDaemonSettings");
242 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
244 b.Property<
long>(
"Id")
245 .ValueGeneratedOnAdd()
246 .HasColumnType(
"bigint");
248 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
250 b.Property<
int>(
"ApiValidationPort")
251 .HasColumnType(
"integer");
253 b.Property<
int>(
"ApiValidationSecurityLevel")
254 .HasColumnType(
"integer");
256 b.Property<
long>(
"InstanceId")
257 .HasColumnType(
"bigint");
259 b.Property<
string>(
"ProjectName")
261 .HasColumnType(
"character varying(10000)");
263 b.Property<
bool?>(
"RequireDMApiValidation")
265 .HasColumnType(
"boolean");
267 b.Property<TimeSpan?>(
"Timeout")
269 .HasColumnType(
"interval");
273 b.HasIndex(
"InstanceId")
276 b.ToTable(
"DreamMakerSettings");
279 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
281 b.Property<
long?>(
"Id")
282 .ValueGeneratedOnAdd()
283 .HasColumnType(
"bigint");
285 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
287 b.Property<
long>(
"AutoUpdateInterval")
288 .HasColumnType(
"bigint");
290 b.Property<
int>(
"ChatBotLimit")
291 .HasColumnType(
"integer");
293 b.Property<
int>(
"ConfigurationType")
294 .HasColumnType(
"integer");
296 b.Property<
string>(
"Name")
299 .HasColumnType(
"character varying(100)");
301 b.Property<
bool?>(
"Online")
303 .HasColumnType(
"boolean");
305 b.Property<
string>(
"Path")
307 .HasColumnType(
"text");
309 b.Property<
string>(
"SwarmIdentifer")
310 .HasColumnType(
"text");
314 b.HasIndex(
"Path",
"SwarmIdentifer")
317 b.ToTable(
"Instances");
320 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
322 b.Property<
long>(
"Id")
323 .ValueGeneratedOnAdd()
324 .HasColumnType(
"bigint");
326 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
328 b.Property<decimal>(
"ByondRights")
329 .HasColumnType(
"numeric(20,0)");
331 b.Property<decimal>(
"ChatBotRights")
332 .HasColumnType(
"numeric(20,0)");
334 b.Property<decimal>(
"ConfigurationRights")
335 .HasColumnType(
"numeric(20,0)");
337 b.Property<decimal>(
"DreamDaemonRights")
338 .HasColumnType(
"numeric(20,0)");
340 b.Property<decimal>(
"DreamMakerRights")
341 .HasColumnType(
"numeric(20,0)");
343 b.Property<
long>(
"InstanceId")
344 .HasColumnType(
"bigint");
346 b.Property<decimal>(
"InstancePermissionSetRights")
347 .HasColumnType(
"numeric(20,0)");
349 b.Property<
long>(
"PermissionSetId")
350 .HasColumnType(
"bigint");
352 b.Property<decimal>(
"RepositoryRights")
353 .HasColumnType(
"numeric(20,0)");
357 b.HasIndex(
"InstanceId");
359 b.HasIndex(
"PermissionSetId",
"InstanceId")
362 b.ToTable(
"InstancePermissionSets");
365 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
367 b.Property<
long?>(
"Id")
368 .ValueGeneratedOnAdd()
369 .HasColumnType(
"bigint");
371 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
373 b.Property<decimal?>(
"CancelRight")
374 .HasColumnType(
"numeric(20,0)");
376 b.Property<decimal?>(
"CancelRightsType")
377 .HasColumnType(
"numeric(20,0)");
379 b.Property<
bool?>(
"Cancelled")
381 .HasColumnType(
"boolean");
383 b.Property<
long?>(
"CancelledById")
384 .HasColumnType(
"bigint");
386 b.Property<
string>(
"Description")
388 .HasColumnType(
"text");
390 b.Property<
long?>(
"ErrorCode")
391 .HasColumnType(
"bigint");
393 b.Property<
string>(
"ExceptionDetails")
394 .HasColumnType(
"text");
396 b.Property<
long>(
"InstanceId")
397 .HasColumnType(
"bigint");
399 b.Property<DateTimeOffset?>(
"StartedAt")
401 .HasColumnType(
"timestamp with time zone");
403 b.Property<
long>(
"StartedById")
404 .HasColumnType(
"bigint");
406 b.Property<DateTimeOffset?>(
"StoppedAt")
407 .HasColumnType(
"timestamp with time zone");
411 b.HasIndex(
"CancelledById");
413 b.HasIndex(
"InstanceId");
415 b.HasIndex(
"StartedById");
420 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
422 b.Property<
long>(
"Id")
423 .ValueGeneratedOnAdd()
424 .HasColumnType(
"bigint");
426 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
428 b.Property<
string>(
"ExternalUserId")
431 .HasColumnType(
"character varying(100)");
433 b.Property<
int>(
"Provider")
434 .HasColumnType(
"integer");
436 b.Property<
long?>(
"UserId")
437 .HasColumnType(
"bigint");
441 b.HasIndex(
"UserId");
443 b.HasIndex(
"Provider",
"ExternalUserId")
446 b.ToTable(
"OAuthConnections");
449 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
451 b.Property<
long?>(
"Id")
452 .ValueGeneratedOnAdd()
453 .HasColumnType(
"bigint");
455 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
457 b.Property<decimal>(
"AdministrationRights")
458 .HasColumnType(
"numeric(20,0)");
460 b.Property<
long?>(
"GroupId")
461 .HasColumnType(
"bigint");
463 b.Property<decimal>(
"InstanceManagerRights")
464 .HasColumnType(
"numeric(20,0)");
466 b.Property<
long?>(
"UserId")
467 .HasColumnType(
"bigint");
471 b.HasIndex(
"GroupId")
477 b.ToTable(
"PermissionSets");
480 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
482 b.Property<
long>(
"Id")
483 .ValueGeneratedOnAdd()
484 .HasColumnType(
"bigint");
486 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
488 b.Property<
string>(
"AccessIdentifier")
490 .HasColumnType(
"text");
492 b.Property<
long>(
"CompileJobId")
493 .HasColumnType(
"bigint");
495 b.Property<
long?>(
"InitialCompileJobId")
496 .HasColumnType(
"bigint");
498 b.Property<
int>(
"LaunchSecurityLevel")
499 .HasColumnType(
"integer");
501 b.Property<
int>(
"LaunchVisibility")
502 .HasColumnType(
"integer");
504 b.Property<
int>(
"Port")
505 .HasColumnType(
"integer");
507 b.Property<
int>(
"ProcessId")
508 .HasColumnType(
"integer");
510 b.Property<
int>(
"RebootState")
511 .HasColumnType(
"integer");
515 b.HasIndex(
"CompileJobId");
517 b.HasIndex(
"InitialCompileJobId");
519 b.ToTable(
"ReattachInformations");
522 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
524 b.Property<
long>(
"Id")
525 .ValueGeneratedOnAdd()
526 .HasColumnType(
"bigint");
528 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
530 b.Property<
string>(
"AccessToken")
532 .HasColumnType(
"character varying(10000)");
534 b.Property<
string>(
"AccessUser")
536 .HasColumnType(
"character varying(10000)");
538 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
540 .HasColumnType(
"boolean");
542 b.Property<
bool?>(
"AutoUpdatesSynchronize")
544 .HasColumnType(
"boolean");
546 b.Property<
string>(
"CommitterEmail")
549 .HasColumnType(
"character varying(10000)");
551 b.Property<
string>(
"CommitterName")
554 .HasColumnType(
"character varying(10000)");
556 b.Property<
bool?>(
"CreateGitHubDeployments")
558 .HasColumnType(
"boolean");
560 b.Property<
long>(
"InstanceId")
561 .HasColumnType(
"bigint");
563 b.Property<
bool?>(
"PostTestMergeComment")
565 .HasColumnType(
"boolean");
567 b.Property<
bool?>(
"PushTestMergeCommits")
569 .HasColumnType(
"boolean");
571 b.Property<
bool?>(
"ShowTestMergeCommitters")
573 .HasColumnType(
"boolean");
575 b.Property<
bool?>(
"UpdateSubmodules")
577 .HasColumnType(
"boolean");
581 b.HasIndex(
"InstanceId")
584 b.ToTable(
"RepositorySettings");
587 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
589 b.Property<
long>(
"Id")
590 .ValueGeneratedOnAdd()
591 .HasColumnType(
"bigint");
593 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
595 b.Property<
long>(
"RevisionInformationId")
596 .HasColumnType(
"bigint");
598 b.Property<
long>(
"TestMergeId")
599 .HasColumnType(
"bigint");
603 b.HasIndex(
"RevisionInformationId");
605 b.HasIndex(
"TestMergeId");
607 b.ToTable(
"RevInfoTestMerges");
610 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
612 b.Property<
long>(
"Id")
613 .ValueGeneratedOnAdd()
614 .HasColumnType(
"bigint");
616 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
618 b.Property<
string>(
"CommitSha")
621 .HasColumnType(
"character varying(40)");
623 b.Property<
long>(
"InstanceId")
624 .HasColumnType(
"bigint");
626 b.Property<
string>(
"OriginCommitSha")
629 .HasColumnType(
"character varying(40)");
631 b.Property<DateTimeOffset>(
"Timestamp")
632 .HasColumnType(
"timestamp with time zone");
636 b.HasIndex(
"InstanceId",
"CommitSha")
639 b.ToTable(
"RevisionInformations");
642 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
644 b.Property<
long>(
"Id")
645 .ValueGeneratedOnAdd()
646 .HasColumnType(
"bigint");
648 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
650 b.Property<
string>(
"Author")
652 .HasColumnType(
"text");
654 b.Property<
string>(
"BodyAtMerge")
656 .HasColumnType(
"text");
658 b.Property<
string>(
"Comment")
660 .HasColumnType(
"character varying(10000)");
662 b.Property<DateTimeOffset>(
"MergedAt")
663 .HasColumnType(
"timestamp with time zone");
665 b.Property<
long>(
"MergedById")
666 .HasColumnType(
"bigint");
668 b.Property<
int>(
"Number")
669 .HasColumnType(
"integer");
671 b.Property<
long?>(
"PrimaryRevisionInformationId")
673 .HasColumnType(
"bigint");
675 b.Property<
string>(
"TargetCommitSha")
678 .HasColumnType(
"character varying(40)");
680 b.Property<
string>(
"TitleAtMerge")
682 .HasColumnType(
"text");
684 b.Property<
string>(
"Url")
686 .HasColumnType(
"text");
690 b.HasIndex(
"MergedById");
692 b.HasIndex(
"PrimaryRevisionInformationId")
695 b.ToTable(
"TestMerges");
698 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
700 b.Property<
long?>(
"Id")
701 .ValueGeneratedOnAdd()
702 .HasColumnType(
"bigint");
704 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
706 b.Property<
string>(
"CanonicalName")
709 .HasColumnType(
"character varying(100)");
711 b.Property<DateTimeOffset?>(
"CreatedAt")
713 .HasColumnType(
"timestamp with time zone");
715 b.Property<
long?>(
"CreatedById")
716 .HasColumnType(
"bigint");
718 b.Property<
bool?>(
"Enabled")
720 .HasColumnType(
"boolean");
722 b.Property<
long?>(
"GroupId")
723 .HasColumnType(
"bigint");
725 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
726 .HasColumnType(
"timestamp with time zone");
728 b.Property<
string>(
"Name")
731 .HasColumnType(
"character varying(100)");
733 b.Property<
string>(
"PasswordHash")
734 .HasColumnType(
"text");
736 b.Property<
string>(
"SystemIdentifier")
738 .HasColumnType(
"character varying(100)");
742 b.HasIndex(
"CanonicalName")
745 b.HasIndex(
"CreatedById");
747 b.HasIndex(
"GroupId");
749 b.HasIndex(
"SystemIdentifier")
755 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
757 b.Property<
long?>(
"Id")
758 .ValueGeneratedOnAdd()
759 .HasColumnType(
"bigint");
761 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
763 b.Property<
string>(
"Name")
766 .HasColumnType(
"character varying(100)");
776 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
778 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
779 .WithMany(
"ChatSettings")
780 .HasForeignKey(
"InstanceId")
781 .OnDelete(DeleteBehavior.Cascade)
784 b.Navigation(
"Instance");
787 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
789 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
790 .WithMany(
"Channels")
791 .HasForeignKey(
"ChatSettingsId")
792 .OnDelete(DeleteBehavior.Cascade)
795 b.Navigation(
"ChatSettings");
798 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
800 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
802 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
803 .OnDelete(DeleteBehavior.Cascade)
806 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
807 .WithMany(
"CompileJobs")
808 .HasForeignKey(
"RevisionInformationId")
809 .OnDelete(DeleteBehavior.Cascade)
814 b.Navigation(
"RevisionInformation");
817 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
819 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
820 .WithOne(
"DreamDaemonSettings")
821 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
822 .OnDelete(DeleteBehavior.Cascade)
825 b.Navigation(
"Instance");
828 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
830 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
831 .WithOne(
"DreamMakerSettings")
832 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
833 .OnDelete(DeleteBehavior.Cascade)
836 b.Navigation(
"Instance");
839 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
841 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
842 .WithMany(
"InstancePermissionSets")
843 .HasForeignKey(
"InstanceId")
844 .OnDelete(DeleteBehavior.Cascade)
847 b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet",
"PermissionSet")
848 .WithMany(
"InstancePermissionSets")
849 .HasForeignKey(
"PermissionSetId")
850 .OnDelete(DeleteBehavior.Cascade)
853 b.Navigation(
"Instance");
855 b.Navigation(
"PermissionSet");
858 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
860 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
862 .HasForeignKey(
"CancelledById");
864 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
866 .HasForeignKey(
"InstanceId")
867 .OnDelete(DeleteBehavior.Cascade)
870 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
872 .HasForeignKey(
"StartedById")
873 .OnDelete(DeleteBehavior.Cascade)
876 b.Navigation(
"CancelledBy");
878 b.Navigation(
"Instance");
880 b.Navigation(
"StartedBy");
883 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
885 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
886 .WithMany(
"OAuthConnections")
887 .HasForeignKey(
"UserId")
888 .OnDelete(DeleteBehavior.Cascade);
890 b.Navigation(
"User");
893 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
895 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
896 .WithOne(
"PermissionSet")
897 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"GroupId")
898 .OnDelete(DeleteBehavior.Cascade);
900 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
901 .WithOne(
"PermissionSet")
902 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"UserId")
903 .OnDelete(DeleteBehavior.Cascade);
905 b.Navigation(
"Group");
907 b.Navigation(
"User");
910 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
912 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
914 .HasForeignKey(
"CompileJobId")
915 .OnDelete(DeleteBehavior.Cascade)
918 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"InitialCompileJob")
920 .HasForeignKey(
"InitialCompileJobId");
922 b.Navigation(
"CompileJob");
924 b.Navigation(
"InitialCompileJob");
927 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
929 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
930 .WithOne(
"RepositorySettings")
931 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
932 .OnDelete(DeleteBehavior.Cascade)
935 b.Navigation(
"Instance");
938 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
940 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
941 .WithMany(
"ActiveTestMerges")
942 .HasForeignKey(
"RevisionInformationId")
943 .OnDelete(DeleteBehavior.Cascade)
946 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
947 .WithMany(
"RevisonInformations")
948 .HasForeignKey(
"TestMergeId")
949 .OnDelete(DeleteBehavior.ClientNoAction)
952 b.Navigation(
"RevisionInformation");
954 b.Navigation(
"TestMerge");
957 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
959 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
960 .WithMany(
"RevisionInformations")
961 .HasForeignKey(
"InstanceId")
962 .OnDelete(DeleteBehavior.Cascade)
965 b.Navigation(
"Instance");
968 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
970 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
971 .WithMany(
"TestMerges")
972 .HasForeignKey(
"MergedById")
973 .OnDelete(DeleteBehavior.Restrict)
976 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
977 .WithOne(
"PrimaryTestMerge")
978 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
979 .OnDelete(DeleteBehavior.Cascade)
982 b.Navigation(
"MergedBy");
984 b.Navigation(
"PrimaryRevisionInformation");
987 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
989 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
990 .WithMany(
"CreatedUsers")
991 .HasForeignKey(
"CreatedById");
993 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
995 .HasForeignKey(
"GroupId");
997 b.Navigation(
"CreatedBy");
999 b.Navigation(
"Group");
1002 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
1004 b.Navigation(
"Channels");
1007 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
1009 b.Navigation(
"ChatSettings");
1011 b.Navigation(
"DreamDaemonSettings");
1013 b.Navigation(
"DreamMakerSettings");
1015 b.Navigation(
"InstancePermissionSets");
1017 b.Navigation(
"Jobs");
1019 b.Navigation(
"RepositorySettings");
1021 b.Navigation(
"RevisionInformations");
1024 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
1026 b.Navigation(
"InstancePermissionSets");
1029 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1031 b.Navigation(
"ActiveTestMerges");
1033 b.Navigation(
"CompileJobs");
1035 b.Navigation(
"PrimaryTestMerge");
1038 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1040 b.Navigation(
"RevisonInformations");
1043 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1045 b.Navigation(
"CreatedUsers");
1047 b.Navigation(
"OAuthConnections");
1049 b.Navigation(
"PermissionSet");
1051 b.Navigation(
"TestMerges");
1054 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
1056 b.Navigation(
"PermissionSet")
1059 b.Navigation(
"Users");
1061#pragma warning restore 612, 618