17#pragma warning disable 612, 618
19 .HasAnnotation(
"ProductVersion",
"7.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<
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<
byte>(
"JobCode")
400 .HasColumnType(
"smallint");
402 b.Property<DateTimeOffset?>(
"StartedAt")
404 .HasColumnType(
"timestamp with time zone");
406 b.Property<
long>(
"StartedById")
407 .HasColumnType(
"bigint");
409 b.Property<DateTimeOffset?>(
"StoppedAt")
410 .HasColumnType(
"timestamp with time zone");
414 b.HasIndex(
"CancelledById");
416 b.HasIndex(
"InstanceId");
418 b.HasIndex(
"StartedById");
423 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
425 b.Property<
long>(
"Id")
426 .ValueGeneratedOnAdd()
427 .HasColumnType(
"bigint");
429 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
431 b.Property<
string>(
"ExternalUserId")
434 .HasColumnType(
"character varying(100)");
436 b.Property<
int>(
"Provider")
437 .HasColumnType(
"integer");
439 b.Property<
long?>(
"UserId")
440 .HasColumnType(
"bigint");
444 b.HasIndex(
"UserId");
446 b.HasIndex(
"Provider",
"ExternalUserId")
449 b.ToTable(
"OAuthConnections");
452 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
454 b.Property<
long?>(
"Id")
455 .ValueGeneratedOnAdd()
456 .HasColumnType(
"bigint");
458 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
460 b.Property<decimal>(
"AdministrationRights")
461 .HasColumnType(
"numeric(20,0)");
463 b.Property<
long?>(
"GroupId")
464 .HasColumnType(
"bigint");
466 b.Property<decimal>(
"InstanceManagerRights")
467 .HasColumnType(
"numeric(20,0)");
469 b.Property<
long?>(
"UserId")
470 .HasColumnType(
"bigint");
474 b.HasIndex(
"GroupId")
480 b.ToTable(
"PermissionSets");
483 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
485 b.Property<
long>(
"Id")
486 .ValueGeneratedOnAdd()
487 .HasColumnType(
"bigint");
489 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
491 b.Property<
string>(
"AccessIdentifier")
493 .HasColumnType(
"text");
495 b.Property<
long>(
"CompileJobId")
496 .HasColumnType(
"bigint");
498 b.Property<
long?>(
"InitialCompileJobId")
499 .HasColumnType(
"bigint");
501 b.Property<
int>(
"LaunchSecurityLevel")
502 .HasColumnType(
"integer");
504 b.Property<
int>(
"LaunchVisibility")
505 .HasColumnType(
"integer");
507 b.Property<
int>(
"Port")
508 .HasColumnType(
"integer");
510 b.Property<
int>(
"ProcessId")
511 .HasColumnType(
"integer");
513 b.Property<
int>(
"RebootState")
514 .HasColumnType(
"integer");
518 b.HasIndex(
"CompileJobId");
520 b.HasIndex(
"InitialCompileJobId");
522 b.ToTable(
"ReattachInformations");
525 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
527 b.Property<
long>(
"Id")
528 .ValueGeneratedOnAdd()
529 .HasColumnType(
"bigint");
531 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
533 b.Property<
string>(
"AccessToken")
535 .HasColumnType(
"character varying(10000)");
537 b.Property<
string>(
"AccessUser")
539 .HasColumnType(
"character varying(10000)");
541 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
543 .HasColumnType(
"boolean");
545 b.Property<
bool?>(
"AutoUpdatesSynchronize")
547 .HasColumnType(
"boolean");
549 b.Property<
string>(
"CommitterEmail")
552 .HasColumnType(
"character varying(10000)");
554 b.Property<
string>(
"CommitterName")
557 .HasColumnType(
"character varying(10000)");
559 b.Property<
bool?>(
"CreateGitHubDeployments")
561 .HasColumnType(
"boolean");
563 b.Property<
long>(
"InstanceId")
564 .HasColumnType(
"bigint");
566 b.Property<
bool?>(
"PostTestMergeComment")
568 .HasColumnType(
"boolean");
570 b.Property<
bool?>(
"PushTestMergeCommits")
572 .HasColumnType(
"boolean");
574 b.Property<
bool?>(
"ShowTestMergeCommitters")
576 .HasColumnType(
"boolean");
578 b.Property<
bool?>(
"UpdateSubmodules")
580 .HasColumnType(
"boolean");
584 b.HasIndex(
"InstanceId")
587 b.ToTable(
"RepositorySettings");
590 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
592 b.Property<
long>(
"Id")
593 .ValueGeneratedOnAdd()
594 .HasColumnType(
"bigint");
596 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
598 b.Property<
long>(
"RevisionInformationId")
599 .HasColumnType(
"bigint");
601 b.Property<
long>(
"TestMergeId")
602 .HasColumnType(
"bigint");
606 b.HasIndex(
"RevisionInformationId");
608 b.HasIndex(
"TestMergeId");
610 b.ToTable(
"RevInfoTestMerges");
613 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
615 b.Property<
long>(
"Id")
616 .ValueGeneratedOnAdd()
617 .HasColumnType(
"bigint");
619 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
621 b.Property<
string>(
"CommitSha")
624 .HasColumnType(
"character varying(40)");
626 b.Property<
long>(
"InstanceId")
627 .HasColumnType(
"bigint");
629 b.Property<
string>(
"OriginCommitSha")
632 .HasColumnType(
"character varying(40)");
634 b.Property<DateTimeOffset>(
"Timestamp")
635 .HasColumnType(
"timestamp with time zone");
639 b.HasIndex(
"InstanceId",
"CommitSha")
642 b.ToTable(
"RevisionInformations");
645 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
647 b.Property<
long>(
"Id")
648 .ValueGeneratedOnAdd()
649 .HasColumnType(
"bigint");
651 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
653 b.Property<
string>(
"Author")
655 .HasColumnType(
"text");
657 b.Property<
string>(
"BodyAtMerge")
659 .HasColumnType(
"text");
661 b.Property<
string>(
"Comment")
663 .HasColumnType(
"character varying(10000)");
665 b.Property<DateTimeOffset>(
"MergedAt")
666 .HasColumnType(
"timestamp with time zone");
668 b.Property<
long>(
"MergedById")
669 .HasColumnType(
"bigint");
671 b.Property<
int>(
"Number")
672 .HasColumnType(
"integer");
674 b.Property<
long?>(
"PrimaryRevisionInformationId")
676 .HasColumnType(
"bigint");
678 b.Property<
string>(
"TargetCommitSha")
681 .HasColumnType(
"character varying(40)");
683 b.Property<
string>(
"TitleAtMerge")
685 .HasColumnType(
"text");
687 b.Property<
string>(
"Url")
689 .HasColumnType(
"text");
693 b.HasIndex(
"MergedById");
695 b.HasIndex(
"PrimaryRevisionInformationId")
698 b.ToTable(
"TestMerges");
701 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
703 b.Property<
long?>(
"Id")
704 .ValueGeneratedOnAdd()
705 .HasColumnType(
"bigint");
707 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
709 b.Property<
string>(
"CanonicalName")
712 .HasColumnType(
"character varying(100)");
714 b.Property<DateTimeOffset?>(
"CreatedAt")
716 .HasColumnType(
"timestamp with time zone");
718 b.Property<
long?>(
"CreatedById")
719 .HasColumnType(
"bigint");
721 b.Property<
bool?>(
"Enabled")
723 .HasColumnType(
"boolean");
725 b.Property<
long?>(
"GroupId")
726 .HasColumnType(
"bigint");
728 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
729 .HasColumnType(
"timestamp with time zone");
731 b.Property<
string>(
"Name")
734 .HasColumnType(
"character varying(100)");
736 b.Property<
string>(
"PasswordHash")
737 .HasColumnType(
"text");
739 b.Property<
string>(
"SystemIdentifier")
741 .HasColumnType(
"character varying(100)");
745 b.HasIndex(
"CanonicalName")
748 b.HasIndex(
"CreatedById");
750 b.HasIndex(
"GroupId");
752 b.HasIndex(
"SystemIdentifier")
758 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
760 b.Property<
long?>(
"Id")
761 .ValueGeneratedOnAdd()
762 .HasColumnType(
"bigint");
764 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
766 b.Property<
string>(
"Name")
769 .HasColumnType(
"character varying(100)");
779 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
781 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
782 .WithMany(
"ChatSettings")
783 .HasForeignKey(
"InstanceId")
784 .OnDelete(DeleteBehavior.Cascade)
787 b.Navigation(
"Instance");
790 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
792 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
793 .WithMany(
"Channels")
794 .HasForeignKey(
"ChatSettingsId")
795 .OnDelete(DeleteBehavior.Cascade)
798 b.Navigation(
"ChatSettings");
801 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
803 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
805 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
806 .OnDelete(DeleteBehavior.Cascade)
809 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
810 .WithMany(
"CompileJobs")
811 .HasForeignKey(
"RevisionInformationId")
812 .OnDelete(DeleteBehavior.Cascade)
817 b.Navigation(
"RevisionInformation");
820 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
822 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
823 .WithOne(
"DreamDaemonSettings")
824 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
825 .OnDelete(DeleteBehavior.Cascade)
828 b.Navigation(
"Instance");
831 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
833 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
834 .WithOne(
"DreamMakerSettings")
835 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
836 .OnDelete(DeleteBehavior.Cascade)
839 b.Navigation(
"Instance");
842 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
844 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
845 .WithMany(
"InstancePermissionSets")
846 .HasForeignKey(
"InstanceId")
847 .OnDelete(DeleteBehavior.Cascade)
850 b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet",
"PermissionSet")
851 .WithMany(
"InstancePermissionSets")
852 .HasForeignKey(
"PermissionSetId")
853 .OnDelete(DeleteBehavior.Cascade)
856 b.Navigation(
"Instance");
858 b.Navigation(
"PermissionSet");
861 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
863 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
865 .HasForeignKey(
"CancelledById");
867 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
869 .HasForeignKey(
"InstanceId")
870 .OnDelete(DeleteBehavior.Cascade)
873 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
875 .HasForeignKey(
"StartedById")
876 .OnDelete(DeleteBehavior.Cascade)
879 b.Navigation(
"CancelledBy");
881 b.Navigation(
"Instance");
883 b.Navigation(
"StartedBy");
886 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
888 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
889 .WithMany(
"OAuthConnections")
890 .HasForeignKey(
"UserId")
891 .OnDelete(DeleteBehavior.Cascade);
893 b.Navigation(
"User");
896 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
898 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
899 .WithOne(
"PermissionSet")
900 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"GroupId")
901 .OnDelete(DeleteBehavior.Cascade);
903 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
904 .WithOne(
"PermissionSet")
905 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"UserId")
906 .OnDelete(DeleteBehavior.Cascade);
908 b.Navigation(
"Group");
910 b.Navigation(
"User");
913 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
915 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
917 .HasForeignKey(
"CompileJobId")
918 .OnDelete(DeleteBehavior.Cascade)
921 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"InitialCompileJob")
923 .HasForeignKey(
"InitialCompileJobId");
925 b.Navigation(
"CompileJob");
927 b.Navigation(
"InitialCompileJob");
930 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
932 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
933 .WithOne(
"RepositorySettings")
934 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
935 .OnDelete(DeleteBehavior.Cascade)
938 b.Navigation(
"Instance");
941 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
943 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
944 .WithMany(
"ActiveTestMerges")
945 .HasForeignKey(
"RevisionInformationId")
946 .OnDelete(DeleteBehavior.Cascade)
949 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
950 .WithMany(
"RevisonInformations")
951 .HasForeignKey(
"TestMergeId")
952 .OnDelete(DeleteBehavior.ClientNoAction)
955 b.Navigation(
"RevisionInformation");
957 b.Navigation(
"TestMerge");
960 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
962 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
963 .WithMany(
"RevisionInformations")
964 .HasForeignKey(
"InstanceId")
965 .OnDelete(DeleteBehavior.Cascade)
968 b.Navigation(
"Instance");
971 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
973 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
974 .WithMany(
"TestMerges")
975 .HasForeignKey(
"MergedById")
976 .OnDelete(DeleteBehavior.Restrict)
979 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
980 .WithOne(
"PrimaryTestMerge")
981 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
982 .OnDelete(DeleteBehavior.Cascade)
985 b.Navigation(
"MergedBy");
987 b.Navigation(
"PrimaryRevisionInformation");
990 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
992 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
993 .WithMany(
"CreatedUsers")
994 .HasForeignKey(
"CreatedById");
996 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
998 .HasForeignKey(
"GroupId");
1000 b.Navigation(
"CreatedBy");
1002 b.Navigation(
"Group");
1005 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
1007 b.Navigation(
"Channels");
1010 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
1012 b.Navigation(
"ChatSettings");
1014 b.Navigation(
"DreamDaemonSettings");
1016 b.Navigation(
"DreamMakerSettings");
1018 b.Navigation(
"InstancePermissionSets");
1020 b.Navigation(
"Jobs");
1022 b.Navigation(
"RepositorySettings");
1024 b.Navigation(
"RevisionInformations");
1027 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
1029 b.Navigation(
"InstancePermissionSets");
1032 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1034 b.Navigation(
"ActiveTestMerges");
1036 b.Navigation(
"CompileJobs");
1038 b.Navigation(
"PrimaryTestMerge");
1041 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1043 b.Navigation(
"RevisonInformations");
1046 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1048 b.Navigation(
"CreatedUsers");
1050 b.Navigation(
"OAuthConnections");
1052 b.Navigation(
"PermissionSet");
1054 b.Navigation(
"TestMerges");
1057 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
1059 b.Navigation(
"PermissionSet")
1062 b.Navigation(
"Users");
1064#pragma warning restore 612, 618