18#pragma warning disable 612, 618
20 .HasAnnotation(
"ProductVersion",
"3.1.18")
21 .HasAnnotation(
"Relational:MaxIdentifierLength", 128)
22 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
24 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
26 b.Property<
long?>(
"Id")
27 .ValueGeneratedOnAdd()
28 .HasColumnType(
"bigint")
29 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
31 b.Property<
int>(
"ChannelLimit")
32 .HasColumnType(
"int");
34 b.Property<
string>(
"ConnectionString")
36 .HasColumnType(
"nvarchar(max)")
39 b.Property<
bool?>(
"Enabled")
40 .HasColumnType(
"bit");
42 b.Property<
long>(
"InstanceId")
43 .HasColumnType(
"bigint");
45 b.Property<
string>(
"Name")
47 .HasColumnType(
"nvarchar(100)")
50 b.Property<
int>(
"Provider")
51 .HasColumnType(
"int");
53 b.Property<
long>(
"ReconnectionInterval")
54 .HasColumnType(
"bigint");
58 b.HasIndex(
"InstanceId",
"Name")
61 b.ToTable(
"ChatBots");
64 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
66 b.Property<
long>(
"Id")
67 .ValueGeneratedOnAdd()
68 .HasColumnType(
"bigint")
69 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
71 b.Property<
long>(
"ChatSettingsId")
72 .HasColumnType(
"bigint");
74 b.Property<decimal?>(
"DiscordChannelId")
75 .HasColumnType(
"decimal(20,0)");
77 b.Property<
string>(
"IrcChannel")
78 .HasColumnType(
"nvarchar(100)")
81 b.Property<
bool?>(
"IsAdminChannel")
83 .HasColumnType(
"bit");
85 b.Property<
bool?>(
"IsUpdatesChannel")
87 .HasColumnType(
"bit");
89 b.Property<
bool?>(
"IsWatchdogChannel")
91 .HasColumnType(
"bit");
93 b.Property<
string>(
"Tag")
94 .HasColumnType(
"nvarchar(max)")
99 b.HasIndex(
"ChatSettingsId",
"DiscordChannelId")
101 .HasFilter(
"[DiscordChannelId] IS NOT NULL");
103 b.HasIndex(
"ChatSettingsId",
"IrcChannel")
105 .HasFilter(
"[IrcChannel] IS NOT NULL");
107 b.ToTable(
"ChatChannels");
110 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
112 b.Property<
long?>(
"Id")
113 .ValueGeneratedOnAdd()
114 .HasColumnType(
"bigint")
115 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
117 b.Property<
string>(
"ByondVersion")
119 .HasColumnType(
"nvarchar(max)");
121 b.Property<
int?>(
"DMApiMajorVersion")
122 .HasColumnType(
"int");
124 b.Property<
int?>(
"DMApiMinorVersion")
125 .HasColumnType(
"int");
127 b.Property<
int?>(
"DMApiPatchVersion")
128 .HasColumnType(
"int");
130 b.Property<Guid?>(
"DirectoryName")
132 .HasColumnType(
"uniqueidentifier");
134 b.Property<
string>(
"DmeName")
136 .HasColumnType(
"nvarchar(max)");
138 b.Property<
int?>(
"GitHubDeploymentId")
139 .HasColumnType(
"int");
141 b.Property<
long?>(
"GitHubRepoId")
142 .HasColumnType(
"bigint");
144 b.Property<
long>(
"JobId")
145 .HasColumnType(
"bigint");
147 b.Property<
int?>(
"MinimumSecurityLevel")
148 .HasColumnType(
"int");
150 b.Property<
string>(
"Output")
152 .HasColumnType(
"nvarchar(max)");
154 b.Property<
string>(
"RepositoryOrigin")
155 .HasColumnType(
"nvarchar(max)");
157 b.Property<
long>(
"RevisionInformationId")
158 .HasColumnType(
"bigint");
162 b.HasIndex(
"DirectoryName");
167 b.HasIndex(
"RevisionInformationId");
169 b.ToTable(
"CompileJobs");
172 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
174 b.Property<
long>(
"Id")
175 .ValueGeneratedOnAdd()
176 .HasColumnType(
"bigint")
177 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
179 b.Property<
string>(
"AdditionalParameters")
181 .HasColumnType(
"nvarchar(max)")
182 .HasMaxLength(10000);
184 b.Property<
bool?>(
"AllowWebClient")
186 .HasColumnType(
"bit");
188 b.Property<
bool?>(
"AutoStart")
190 .HasColumnType(
"bit");
192 b.Property<
long>(
"HeartbeatSeconds")
193 .HasColumnType(
"bigint");
195 b.Property<
long>(
"InstanceId")
196 .HasColumnType(
"bigint");
198 b.Property<
int>(
"Port")
199 .HasColumnType(
"int");
201 b.Property<
int>(
"SecurityLevel")
202 .HasColumnType(
"int");
204 b.Property<
long>(
"StartupTimeout")
205 .HasColumnType(
"bigint");
207 b.Property<
long>(
"TopicRequestTimeout")
208 .HasColumnType(
"bigint");
210 b.Property<
int>(
"Visibility")
211 .HasColumnType(
"int");
215 b.HasIndex(
"InstanceId")
218 b.ToTable(
"DreamDaemonSettings");
221 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
223 b.Property<
long>(
"Id")
224 .ValueGeneratedOnAdd()
225 .HasColumnType(
"bigint")
226 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
228 b.Property<
int>(
"ApiValidationPort")
229 .HasColumnType(
"int");
231 b.Property<
int>(
"ApiValidationSecurityLevel")
232 .HasColumnType(
"int");
234 b.Property<
long>(
"InstanceId")
235 .HasColumnType(
"bigint");
237 b.Property<
string>(
"ProjectName")
238 .HasColumnType(
"nvarchar(max)")
239 .HasMaxLength(10000);
241 b.Property<
bool?>(
"RequireDMApiValidation")
243 .HasColumnType(
"bit");
245 b.Property<TimeSpan?>(
"Timeout")
247 .HasColumnType(
"time");
251 b.HasIndex(
"InstanceId")
254 b.ToTable(
"DreamMakerSettings");
257 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
259 b.Property<
long?>(
"Id")
260 .ValueGeneratedOnAdd()
261 .HasColumnType(
"bigint")
262 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
264 b.Property<
long>(
"AutoUpdateInterval")
265 .HasColumnType(
"bigint");
267 b.Property<
int>(
"ChatBotLimit")
268 .HasColumnType(
"int");
270 b.Property<
int>(
"ConfigurationType")
271 .HasColumnType(
"int");
273 b.Property<
string>(
"Name")
275 .HasColumnType(
"nvarchar(100)")
278 b.Property<
bool?>(
"Online")
280 .HasColumnType(
"bit");
282 b.Property<
string>(
"Path")
284 .HasColumnType(
"nvarchar(450)");
286 b.Property<
string>(
"SwarmIdentifer")
287 .HasColumnType(
"nvarchar(450)");
291 b.HasIndex(
"Path",
"SwarmIdentifer")
293 .HasFilter(
"[SwarmIdentifer] IS NOT NULL");
295 b.ToTable(
"Instances");
298 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
300 b.Property<
long>(
"Id")
301 .ValueGeneratedOnAdd()
302 .HasColumnType(
"bigint")
303 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
305 b.Property<decimal>(
"ByondRights")
306 .HasColumnType(
"decimal(20,0)");
308 b.Property<decimal>(
"ChatBotRights")
309 .HasColumnType(
"decimal(20,0)");
311 b.Property<decimal>(
"ConfigurationRights")
312 .HasColumnType(
"decimal(20,0)");
314 b.Property<decimal>(
"DreamDaemonRights")
315 .HasColumnType(
"decimal(20,0)");
317 b.Property<decimal>(
"DreamMakerRights")
318 .HasColumnType(
"decimal(20,0)");
320 b.Property<
long>(
"InstanceId")
321 .HasColumnType(
"bigint");
323 b.Property<decimal>(
"InstancePermissionSetRights")
324 .HasColumnType(
"decimal(20,0)");
326 b.Property<
long>(
"PermissionSetId")
327 .HasColumnType(
"bigint");
329 b.Property<decimal>(
"RepositoryRights")
330 .HasColumnType(
"decimal(20,0)");
334 b.HasIndex(
"InstanceId");
336 b.HasIndex(
"PermissionSetId",
"InstanceId")
339 b.ToTable(
"InstancePermissionSets");
342 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
344 b.Property<
long?>(
"Id")
345 .ValueGeneratedOnAdd()
346 .HasColumnType(
"bigint")
347 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
349 b.Property<decimal?>(
"CancelRight")
350 .HasColumnType(
"decimal(20,0)");
352 b.Property<decimal?>(
"CancelRightsType")
353 .HasColumnType(
"decimal(20,0)");
355 b.Property<
bool?>(
"Cancelled")
357 .HasColumnType(
"bit");
359 b.Property<
long?>(
"CancelledById")
360 .HasColumnType(
"bigint");
362 b.Property<
string>(
"Description")
364 .HasColumnType(
"nvarchar(max)");
366 b.Property<
long?>(
"ErrorCode")
367 .HasColumnType(
"bigint");
369 b.Property<
string>(
"ExceptionDetails")
370 .HasColumnType(
"nvarchar(max)");
372 b.Property<
long>(
"InstanceId")
373 .HasColumnType(
"bigint");
375 b.Property<DateTimeOffset?>(
"StartedAt")
377 .HasColumnType(
"datetimeoffset");
379 b.Property<
long>(
"StartedById")
380 .HasColumnType(
"bigint");
382 b.Property<DateTimeOffset?>(
"StoppedAt")
383 .HasColumnType(
"datetimeoffset");
387 b.HasIndex(
"CancelledById");
389 b.HasIndex(
"InstanceId");
391 b.HasIndex(
"StartedById");
396 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
398 b.Property<
long>(
"Id")
399 .ValueGeneratedOnAdd()
400 .HasColumnType(
"bigint")
401 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
403 b.Property<
string>(
"ExternalUserId")
405 .HasColumnType(
"nvarchar(100)")
408 b.Property<
int>(
"Provider")
409 .HasColumnType(
"int");
411 b.Property<
long?>(
"UserId")
412 .HasColumnType(
"bigint");
416 b.HasIndex(
"UserId");
418 b.HasIndex(
"Provider",
"ExternalUserId")
421 b.ToTable(
"OAuthConnections");
424 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
426 b.Property<
long?>(
"Id")
427 .ValueGeneratedOnAdd()
428 .HasColumnType(
"bigint")
429 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
431 b.Property<decimal>(
"AdministrationRights")
432 .HasColumnType(
"decimal(20,0)");
434 b.Property<
long?>(
"GroupId")
435 .HasColumnType(
"bigint");
437 b.Property<decimal>(
"InstanceManagerRights")
438 .HasColumnType(
"decimal(20,0)");
440 b.Property<
long?>(
"UserId")
441 .HasColumnType(
"bigint");
445 b.HasIndex(
"GroupId")
447 .HasFilter(
"[GroupId] IS NOT NULL");
451 .HasFilter(
"[UserId] IS NOT NULL");
453 b.ToTable(
"PermissionSets");
456 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
458 b.Property<
long>(
"Id")
459 .ValueGeneratedOnAdd()
460 .HasColumnType(
"bigint")
461 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
463 b.Property<
string>(
"AccessIdentifier")
465 .HasColumnType(
"nvarchar(max)");
467 b.Property<
long>(
"CompileJobId")
468 .HasColumnType(
"bigint");
470 b.Property<
int>(
"LaunchSecurityLevel")
471 .HasColumnType(
"int");
473 b.Property<
int>(
"LaunchVisibility")
474 .HasColumnType(
"int");
476 b.Property<
int>(
"Port")
477 .HasColumnType(
"int");
479 b.Property<
int>(
"ProcessId")
480 .HasColumnType(
"int");
482 b.Property<
int>(
"RebootState")
483 .HasColumnType(
"int");
487 b.HasIndex(
"CompileJobId");
489 b.ToTable(
"ReattachInformations");
492 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
494 b.Property<
long>(
"Id")
495 .ValueGeneratedOnAdd()
496 .HasColumnType(
"bigint")
497 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
499 b.Property<
string>(
"AccessToken")
500 .HasColumnType(
"nvarchar(max)")
501 .HasMaxLength(10000);
503 b.Property<
string>(
"AccessUser")
504 .HasColumnType(
"nvarchar(max)")
505 .HasMaxLength(10000);
507 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
509 .HasColumnType(
"bit");
511 b.Property<
bool?>(
"AutoUpdatesSynchronize")
513 .HasColumnType(
"bit");
515 b.Property<
string>(
"CommitterEmail")
517 .HasColumnType(
"nvarchar(max)")
518 .HasMaxLength(10000);
520 b.Property<
string>(
"CommitterName")
522 .HasColumnType(
"nvarchar(max)")
523 .HasMaxLength(10000);
525 b.Property<
bool?>(
"CreateGitHubDeployments")
527 .HasColumnType(
"bit");
529 b.Property<
long>(
"InstanceId")
530 .HasColumnType(
"bigint");
532 b.Property<
bool?>(
"PostTestMergeComment")
534 .HasColumnType(
"bit");
536 b.Property<
bool?>(
"PushTestMergeCommits")
538 .HasColumnType(
"bit");
540 b.Property<
bool?>(
"ShowTestMergeCommitters")
542 .HasColumnType(
"bit");
546 b.HasIndex(
"InstanceId")
549 b.ToTable(
"RepositorySettings");
552 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
554 b.Property<
long>(
"Id")
555 .ValueGeneratedOnAdd()
556 .HasColumnType(
"bigint")
557 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
559 b.Property<
long>(
"RevisionInformationId")
560 .HasColumnType(
"bigint");
562 b.Property<
long>(
"TestMergeId")
563 .HasColumnType(
"bigint");
567 b.HasIndex(
"RevisionInformationId");
569 b.HasIndex(
"TestMergeId");
571 b.ToTable(
"RevInfoTestMerges");
574 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
576 b.Property<
long>(
"Id")
577 .ValueGeneratedOnAdd()
578 .HasColumnType(
"bigint")
579 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
581 b.Property<
string>(
"CommitSha")
583 .HasColumnType(
"nvarchar(40)")
586 b.Property<
long>(
"InstanceId")
587 .HasColumnType(
"bigint");
589 b.Property<
string>(
"OriginCommitSha")
591 .HasColumnType(
"nvarchar(40)")
594 b.Property<DateTimeOffset>(
"Timestamp")
595 .HasColumnType(
"datetimeoffset");
599 b.HasIndex(
"InstanceId",
"CommitSha")
602 b.ToTable(
"RevisionInformations");
605 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
607 b.Property<
long>(
"Id")
608 .ValueGeneratedOnAdd()
609 .HasColumnType(
"bigint")
610 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
612 b.Property<
string>(
"Author")
614 .HasColumnType(
"nvarchar(max)");
616 b.Property<
string>(
"BodyAtMerge")
618 .HasColumnType(
"nvarchar(max)");
620 b.Property<
string>(
"Comment")
621 .HasColumnType(
"nvarchar(max)")
622 .HasMaxLength(10000);
624 b.Property<DateTimeOffset>(
"MergedAt")
625 .HasColumnType(
"datetimeoffset");
627 b.Property<
long>(
"MergedById")
628 .HasColumnType(
"bigint");
630 b.Property<
int>(
"Number")
631 .HasColumnType(
"int");
633 b.Property<
long?>(
"PrimaryRevisionInformationId")
635 .HasColumnType(
"bigint");
637 b.Property<
string>(
"TargetCommitSha")
639 .HasColumnType(
"nvarchar(40)")
642 b.Property<
string>(
"TitleAtMerge")
644 .HasColumnType(
"nvarchar(max)");
646 b.Property<
string>(
"Url")
648 .HasColumnType(
"nvarchar(max)");
652 b.HasIndex(
"MergedById");
654 b.HasIndex(
"PrimaryRevisionInformationId")
657 b.ToTable(
"TestMerges");
660 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
662 b.Property<
long?>(
"Id")
663 .ValueGeneratedOnAdd()
664 .HasColumnType(
"bigint")
665 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
667 b.Property<
string>(
"CanonicalName")
669 .HasColumnType(
"nvarchar(100)")
672 b.Property<DateTimeOffset?>(
"CreatedAt")
674 .HasColumnType(
"datetimeoffset");
676 b.Property<
long?>(
"CreatedById")
677 .HasColumnType(
"bigint");
679 b.Property<
bool?>(
"Enabled")
681 .HasColumnType(
"bit");
683 b.Property<
long?>(
"GroupId")
684 .HasColumnType(
"bigint");
686 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
687 .HasColumnType(
"datetimeoffset");
689 b.Property<
string>(
"Name")
691 .HasColumnType(
"nvarchar(100)")
694 b.Property<
string>(
"PasswordHash")
695 .HasColumnType(
"nvarchar(max)");
697 b.Property<
string>(
"SystemIdentifier")
698 .HasColumnType(
"nvarchar(100)")
703 b.HasIndex(
"CanonicalName")
706 b.HasIndex(
"CreatedById");
708 b.HasIndex(
"GroupId");
710 b.HasIndex(
"SystemIdentifier")
712 .HasFilter(
"[SystemIdentifier] IS NOT NULL");
717 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
719 b.Property<
long?>(
"Id")
720 .ValueGeneratedOnAdd()
721 .HasColumnType(
"bigint")
722 .HasAnnotation(
"SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
724 b.Property<
string>(
"Name")
726 .HasColumnType(
"nvarchar(100)")
737 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
739 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
740 .WithMany(
"ChatSettings")
741 .HasForeignKey(
"InstanceId")
742 .OnDelete(DeleteBehavior.Cascade)
746 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
748 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
749 .WithMany(
"Channels")
750 .HasForeignKey(
"ChatSettingsId")
751 .OnDelete(DeleteBehavior.Cascade)
755 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
757 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
759 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
760 .OnDelete(DeleteBehavior.Cascade)
763 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
764 .WithMany(
"CompileJobs")
765 .HasForeignKey(
"RevisionInformationId")
766 .OnDelete(DeleteBehavior.ClientNoAction)
770 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
772 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
773 .WithOne(
"DreamDaemonSettings")
774 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
775 .OnDelete(DeleteBehavior.Cascade)
779 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
781 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
782 .WithOne(
"DreamMakerSettings")
783 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
784 .OnDelete(DeleteBehavior.Cascade)
788 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
790 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
791 .WithMany(
"InstancePermissionSets")
792 .HasForeignKey(
"InstanceId")
793 .OnDelete(DeleteBehavior.Cascade)
796 b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet",
"PermissionSet")
797 .WithMany(
"InstancePermissionSets")
798 .HasForeignKey(
"PermissionSetId")
799 .OnDelete(DeleteBehavior.Cascade)
803 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
805 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
807 .HasForeignKey(
"CancelledById");
809 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
811 .HasForeignKey(
"InstanceId")
812 .OnDelete(DeleteBehavior.Cascade)
815 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
817 .HasForeignKey(
"StartedById")
818 .OnDelete(DeleteBehavior.Cascade)
822 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
824 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
825 .WithMany(
"OAuthConnections")
826 .HasForeignKey(
"UserId")
827 .OnDelete(DeleteBehavior.Cascade);
830 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
832 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
833 .WithOne(
"PermissionSet")
834 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"GroupId")
835 .OnDelete(DeleteBehavior.Cascade);
837 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
838 .WithOne(
"PermissionSet")
839 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"UserId")
840 .OnDelete(DeleteBehavior.Cascade);
843 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
845 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
847 .HasForeignKey(
"CompileJobId")
848 .OnDelete(DeleteBehavior.Cascade)
852 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
854 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
855 .WithOne(
"RepositorySettings")
856 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
857 .OnDelete(DeleteBehavior.Cascade)
861 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
863 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
864 .WithMany(
"ActiveTestMerges")
865 .HasForeignKey(
"RevisionInformationId")
866 .OnDelete(DeleteBehavior.Cascade)
869 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
870 .WithMany(
"RevisonInformations")
871 .HasForeignKey(
"TestMergeId")
872 .OnDelete(DeleteBehavior.ClientNoAction)
876 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
878 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
879 .WithMany(
"RevisionInformations")
880 .HasForeignKey(
"InstanceId")
881 .OnDelete(DeleteBehavior.Cascade)
885 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
887 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
888 .WithMany(
"TestMerges")
889 .HasForeignKey(
"MergedById")
890 .OnDelete(DeleteBehavior.Restrict)
893 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
894 .WithOne(
"PrimaryTestMerge")
895 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
896 .OnDelete(DeleteBehavior.Cascade)
900 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
902 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
903 .WithMany(
"CreatedUsers")
904 .HasForeignKey(
"CreatedById");
906 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
908 .HasForeignKey(
"GroupId");
910#pragma warning restore 612, 618