tgstation-server 6.12.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
20201214182101_SLAddUserGroups.Designer.cs
Go to the documentation of this file.
1// <auto-generated />
2using System;
3using Microsoft.EntityFrameworkCore;
4using Microsoft.EntityFrameworkCore.Infrastructure;
5using Microsoft.EntityFrameworkCore.Migrations;
6
8{
9 [DbContext(typeof(SqliteDatabaseContext))]
10 [Migration("20201214182101_SLAddUserGroups")]
11 partial class SLAddUserGroups
12 {
14 protected override void BuildTargetModel(ModelBuilder modelBuilder)
15 {
16#pragma warning disable 612, 618
17 modelBuilder
18 .HasAnnotation("ProductVersion", "3.1.10");
19
20 modelBuilder.Entity("Tgstation.Server.Host.Models.ChatBot", b =>
21 {
22 b.Property<long>("Id")
23 .ValueGeneratedOnAdd()
24 .HasColumnType("INTEGER");
25
26 b.Property<ushort?>("ChannelLimit")
27 .IsRequired()
28 .HasColumnType("INTEGER");
29
30 b.Property<string>("ConnectionString")
31 .IsRequired()
32 .HasColumnType("TEXT")
33 .HasMaxLength(10000);
34
35 b.Property<bool?>("Enabled")
36 .HasColumnType("INTEGER");
37
38 b.Property<long>("InstanceId")
39 .HasColumnType("INTEGER");
40
41 b.Property<string>("Name")
42 .IsRequired()
43 .HasColumnType("TEXT")
44 .HasMaxLength(100);
45
46 b.Property<int>("Provider")
47 .HasColumnType("INTEGER");
48
49 b.Property<uint?>("ReconnectionInterval")
50 .IsRequired()
51 .HasColumnType("INTEGER");
52
53 b.HasKey("Id");
54
55 b.HasIndex("InstanceId", "Name")
56 .IsUnique();
57
58 b.ToTable("ChatBots");
59 });
60
61 modelBuilder.Entity("Tgstation.Server.Host.Models.ChatChannel", b =>
62 {
63 b.Property<long>("Id")
64 .ValueGeneratedOnAdd()
65 .HasColumnType("INTEGER");
66
67 b.Property<long>("ChatSettingsId")
68 .HasColumnType("INTEGER");
69
70 b.Property<ulong?>("DiscordChannelId")
71 .HasColumnType("INTEGER");
72
73 b.Property<string>("IrcChannel")
74 .HasColumnType("TEXT")
75 .HasMaxLength(100);
76
77 b.Property<bool?>("IsAdminChannel")
78 .IsRequired()
79 .HasColumnType("INTEGER");
80
81 b.Property<bool?>("IsUpdatesChannel")
82 .IsRequired()
83 .HasColumnType("INTEGER");
84
85 b.Property<bool?>("IsWatchdogChannel")
86 .IsRequired()
87 .HasColumnType("INTEGER");
88
89 b.Property<string>("Tag")
90 .HasColumnType("TEXT")
91 .HasMaxLength(10000);
92
93 b.HasKey("Id");
94
95 b.HasIndex("ChatSettingsId", "DiscordChannelId")
96 .IsUnique();
97
98 b.HasIndex("ChatSettingsId", "IrcChannel")
99 .IsUnique();
100
101 b.ToTable("ChatChannels");
102 });
103
104 modelBuilder.Entity("Tgstation.Server.Host.Models.CompileJob", b =>
105 {
106 b.Property<long>("Id")
107 .ValueGeneratedOnAdd()
108 .HasColumnType("INTEGER");
109
110 b.Property<string>("ByondVersion")
111 .IsRequired()
112 .HasColumnType("TEXT");
113
114 b.Property<int?>("DMApiMajorVersion")
115 .HasColumnType("INTEGER");
116
117 b.Property<int?>("DMApiMinorVersion")
118 .HasColumnType("INTEGER");
119
120 b.Property<int?>("DMApiPatchVersion")
121 .HasColumnType("INTEGER");
122
123 b.Property<Guid?>("DirectoryName")
124 .IsRequired()
125 .HasColumnType("TEXT");
126
127 b.Property<string>("DmeName")
128 .IsRequired()
129 .HasColumnType("TEXT");
130
131 b.Property<int?>("GitHubDeploymentId")
132 .HasColumnType("INTEGER");
133
134 b.Property<long?>("GitHubRepoId")
135 .HasColumnType("INTEGER");
136
137 b.Property<long>("JobId")
138 .HasColumnType("INTEGER");
139
140 b.Property<int?>("MinimumSecurityLevel")
141 .HasColumnType("INTEGER");
142
143 b.Property<string>("Output")
144 .IsRequired()
145 .HasColumnType("TEXT");
146
147 b.Property<string>("RepositoryOrigin")
148 .HasColumnType("TEXT");
149
150 b.Property<long>("RevisionInformationId")
151 .HasColumnType("INTEGER");
152
153 b.HasKey("Id");
154
155 b.HasIndex("DirectoryName");
156
157 b.HasIndex("JobId")
158 .IsUnique();
159
160 b.HasIndex("RevisionInformationId");
161
162 b.ToTable("CompileJobs");
163 });
164
165 modelBuilder.Entity("Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
166 {
167 b.Property<long>("Id")
168 .ValueGeneratedOnAdd()
169 .HasColumnType("INTEGER");
170
171 b.Property<string>("AdditionalParameters")
172 .IsRequired()
173 .HasColumnType("TEXT")
174 .HasMaxLength(10000);
175
176 b.Property<bool?>("AllowWebClient")
177 .IsRequired()
178 .HasColumnType("INTEGER");
179
180 b.Property<bool?>("AutoStart")
181 .IsRequired()
182 .HasColumnType("INTEGER");
183
184 b.Property<uint?>("HeartbeatSeconds")
185 .IsRequired()
186 .HasColumnType("INTEGER");
187
188 b.Property<long>("InstanceId")
189 .HasColumnType("INTEGER");
190
191 b.Property<ushort?>("Port")
192 .IsRequired()
193 .HasColumnType("INTEGER");
194
195 b.Property<int>("SecurityLevel")
196 .HasColumnType("INTEGER");
197
198 b.Property<uint?>("StartupTimeout")
199 .IsRequired()
200 .HasColumnType("INTEGER");
201
202 b.Property<uint?>("TopicRequestTimeout")
203 .IsRequired()
204 .HasColumnType("INTEGER");
205
206 b.HasKey("Id");
207
208 b.HasIndex("InstanceId")
209 .IsUnique();
210
211 b.ToTable("DreamDaemonSettings");
212 });
213
214 modelBuilder.Entity("Tgstation.Server.Host.Models.DreamMakerSettings", b =>
215 {
216 b.Property<long>("Id")
217 .ValueGeneratedOnAdd()
218 .HasColumnType("INTEGER");
219
220 b.Property<ushort?>("ApiValidationPort")
221 .IsRequired()
222 .HasColumnType("INTEGER");
223
224 b.Property<int>("ApiValidationSecurityLevel")
225 .HasColumnType("INTEGER");
226
227 b.Property<long>("InstanceId")
228 .HasColumnType("INTEGER");
229
230 b.Property<string>("ProjectName")
231 .HasColumnType("TEXT")
232 .HasMaxLength(10000);
233
234 b.Property<bool?>("RequireDMApiValidation")
235 .IsRequired()
236 .HasColumnType("INTEGER");
237
238 b.HasKey("Id");
239
240 b.HasIndex("InstanceId")
241 .IsUnique();
242
243 b.ToTable("DreamMakerSettings");
244 });
245
246 modelBuilder.Entity("Tgstation.Server.Host.Models.Instance", b =>
247 {
248 b.Property<long>("Id")
249 .ValueGeneratedOnAdd()
250 .HasColumnType("INTEGER");
251
252 b.Property<uint?>("AutoUpdateInterval")
253 .IsRequired()
254 .HasColumnType("INTEGER");
255
256 b.Property<ushort?>("ChatBotLimit")
257 .IsRequired()
258 .HasColumnType("INTEGER");
259
260 b.Property<int>("ConfigurationType")
261 .HasColumnType("INTEGER");
262
263 b.Property<string>("Name")
264 .IsRequired()
265 .HasColumnType("TEXT")
266 .HasMaxLength(10000);
267
268 b.Property<bool?>("Online")
269 .IsRequired()
270 .HasColumnType("INTEGER");
271
272 b.Property<string>("Path")
273 .IsRequired()
274 .HasColumnType("TEXT");
275
276 b.HasKey("Id");
277
278 b.HasIndex("Path")
279 .IsUnique();
280
281 b.ToTable("Instances");
282 });
283
284 modelBuilder.Entity("Tgstation.Server.Host.Models.InstancePermissionSet", b =>
285 {
286 b.Property<long>("Id")
287 .ValueGeneratedOnAdd()
288 .HasColumnType("INTEGER");
289
290 b.Property<ulong>("ByondRights")
291 .HasColumnType("INTEGER");
292
293 b.Property<ulong>("ChatBotRights")
294 .HasColumnType("INTEGER");
295
296 b.Property<ulong>("ConfigurationRights")
297 .HasColumnType("INTEGER");
298
299 b.Property<ulong>("DreamDaemonRights")
300 .HasColumnType("INTEGER");
301
302 b.Property<ulong>("DreamMakerRights")
303 .HasColumnType("INTEGER");
304
305 b.Property<long>("InstanceId")
306 .HasColumnType("INTEGER");
307
308 b.Property<ulong>("InstancePermissionSetRights")
309 .HasColumnType("INTEGER");
310
311 b.Property<long>("PermissionSetId")
312 .HasColumnType("INTEGER");
313
314 b.Property<ulong>("RepositoryRights")
315 .HasColumnType("INTEGER");
316
317 b.HasKey("Id");
318
319 b.HasIndex("InstanceId");
320
321 b.HasIndex("PermissionSetId", "InstanceId")
322 .IsUnique();
323
324 b.ToTable("InstancePermissionSets");
325 });
326
327 modelBuilder.Entity("Tgstation.Server.Host.Models.Job", b =>
328 {
329 b.Property<long>("Id")
330 .ValueGeneratedOnAdd()
331 .HasColumnType("INTEGER");
332
333 b.Property<ulong?>("CancelRight")
334 .HasColumnType("INTEGER");
335
336 b.Property<ulong?>("CancelRightsType")
337 .HasColumnType("INTEGER");
338
339 b.Property<bool?>("Cancelled")
340 .IsRequired()
341 .HasColumnType("INTEGER");
342
343 b.Property<long?>("CancelledById")
344 .HasColumnType("INTEGER");
345
346 b.Property<string>("Description")
347 .IsRequired()
348 .HasColumnType("TEXT");
349
350 b.Property<uint?>("ErrorCode")
351 .HasColumnType("INTEGER");
352
353 b.Property<string>("ExceptionDetails")
354 .HasColumnType("TEXT");
355
356 b.Property<long>("InstanceId")
357 .HasColumnType("INTEGER");
358
359 b.Property<DateTimeOffset?>("StartedAt")
360 .IsRequired()
361 .HasColumnType("TEXT");
362
363 b.Property<long>("StartedById")
364 .HasColumnType("INTEGER");
365
366 b.Property<DateTimeOffset?>("StoppedAt")
367 .HasColumnType("TEXT");
368
369 b.HasKey("Id");
370
371 b.HasIndex("CancelledById");
372
373 b.HasIndex("InstanceId");
374
375 b.HasIndex("StartedById");
376
377 b.ToTable("Jobs");
378 });
379
380 modelBuilder.Entity("Tgstation.Server.Host.Models.OAuthConnection", b =>
381 {
382 b.Property<long>("Id")
383 .ValueGeneratedOnAdd()
384 .HasColumnType("INTEGER");
385
386 b.Property<string>("ExternalUserId")
387 .IsRequired()
388 .HasColumnType("TEXT")
389 .HasMaxLength(100);
390
391 b.Property<int>("Provider")
392 .HasColumnType("INTEGER");
393
394 b.Property<long?>("UserId")
395 .HasColumnType("INTEGER");
396
397 b.HasKey("Id");
398
399 b.HasIndex("UserId");
400
401 b.HasIndex("Provider", "ExternalUserId")
402 .IsUnique();
403
404 b.ToTable("OAuthConnections");
405 });
406
407 modelBuilder.Entity("Tgstation.Server.Host.Models.PermissionSet", b =>
408 {
409 b.Property<long?>("Id")
410 .ValueGeneratedOnAdd()
411 .HasColumnType("INTEGER");
412
413 b.Property<ulong>("AdministrationRights")
414 .HasColumnType("INTEGER");
415
416 b.Property<long?>("GroupId")
417 .HasColumnType("INTEGER");
418
419 b.Property<ulong>("InstanceManagerRights")
420 .HasColumnType("INTEGER");
421
422 b.Property<long?>("UserId")
423 .HasColumnType("INTEGER");
424
425 b.HasKey("Id");
426
427 b.HasIndex("GroupId")
428 .IsUnique();
429
430 b.HasIndex("UserId")
431 .IsUnique();
432
433 b.ToTable("PermissionSets");
434 });
435
436 modelBuilder.Entity("Tgstation.Server.Host.Models.ReattachInformation", b =>
437 {
438 b.Property<long>("Id")
439 .ValueGeneratedOnAdd()
440 .HasColumnType("INTEGER");
441
442 b.Property<string>("AccessIdentifier")
443 .IsRequired()
444 .HasColumnType("TEXT");
445
446 b.Property<long>("CompileJobId")
447 .HasColumnType("INTEGER");
448
449 b.Property<int>("LaunchSecurityLevel")
450 .HasColumnType("INTEGER");
451
452 b.Property<ushort>("Port")
453 .HasColumnType("INTEGER");
454
455 b.Property<int>("ProcessId")
456 .HasColumnType("INTEGER");
457
458 b.Property<int>("RebootState")
459 .HasColumnType("INTEGER");
460
461 b.HasKey("Id");
462
463 b.HasIndex("CompileJobId");
464
465 b.ToTable("ReattachInformations");
466 });
467
468 modelBuilder.Entity("Tgstation.Server.Host.Models.RepositorySettings", b =>
469 {
470 b.Property<long>("Id")
471 .ValueGeneratedOnAdd()
472 .HasColumnType("INTEGER");
473
474 b.Property<string>("AccessToken")
475 .HasColumnType("TEXT")
476 .HasMaxLength(10000);
477
478 b.Property<string>("AccessUser")
479 .HasColumnType("TEXT")
480 .HasMaxLength(10000);
481
482 b.Property<bool?>("AutoUpdatesKeepTestMerges")
483 .IsRequired()
484 .HasColumnType("INTEGER");
485
486 b.Property<bool?>("AutoUpdatesSynchronize")
487 .IsRequired()
488 .HasColumnType("INTEGER");
489
490 b.Property<string>("CommitterEmail")
491 .IsRequired()
492 .HasColumnType("TEXT")
493 .HasMaxLength(10000);
494
495 b.Property<string>("CommitterName")
496 .IsRequired()
497 .HasColumnType("TEXT")
498 .HasMaxLength(10000);
499
500 b.Property<bool?>("CreateGitHubDeployments")
501 .IsRequired()
502 .HasColumnType("INTEGER");
503
504 b.Property<long>("InstanceId")
505 .HasColumnType("INTEGER");
506
507 b.Property<bool?>("PostTestMergeComment")
508 .IsRequired()
509 .HasColumnType("INTEGER");
510
511 b.Property<bool?>("PushTestMergeCommits")
512 .IsRequired()
513 .HasColumnType("INTEGER");
514
515 b.Property<bool?>("ShowTestMergeCommitters")
516 .IsRequired()
517 .HasColumnType("INTEGER");
518
519 b.HasKey("Id");
520
521 b.HasIndex("InstanceId")
522 .IsUnique();
523
524 b.ToTable("RepositorySettings");
525 });
526
527 modelBuilder.Entity("Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
528 {
529 b.Property<long>("Id")
530 .ValueGeneratedOnAdd()
531 .HasColumnType("INTEGER");
532
533 b.Property<long>("RevisionInformationId")
534 .HasColumnType("INTEGER");
535
536 b.Property<long>("TestMergeId")
537 .HasColumnType("INTEGER");
538
539 b.HasKey("Id");
540
541 b.HasIndex("RevisionInformationId");
542
543 b.HasIndex("TestMergeId");
544
545 b.ToTable("RevInfoTestMerges");
546 });
547
548 modelBuilder.Entity("Tgstation.Server.Host.Models.RevisionInformation", b =>
549 {
550 b.Property<long>("Id")
551 .ValueGeneratedOnAdd()
552 .HasColumnType("INTEGER");
553
554 b.Property<string>("CommitSha")
555 .IsRequired()
556 .HasColumnType("TEXT")
557 .HasMaxLength(40);
558
559 b.Property<long>("InstanceId")
560 .HasColumnType("INTEGER");
561
562 b.Property<string>("OriginCommitSha")
563 .IsRequired()
564 .HasColumnType("TEXT")
565 .HasMaxLength(40);
566
567 b.HasKey("Id");
568
569 b.HasIndex("InstanceId", "CommitSha")
570 .IsUnique();
571
572 b.ToTable("RevisionInformations");
573 });
574
575 modelBuilder.Entity("Tgstation.Server.Host.Models.TestMerge", b =>
576 {
577 b.Property<long>("Id")
578 .ValueGeneratedOnAdd()
579 .HasColumnType("INTEGER");
580
581 b.Property<string>("Author")
582 .IsRequired()
583 .HasColumnType("TEXT");
584
585 b.Property<string>("BodyAtMerge")
586 .IsRequired()
587 .HasColumnType("TEXT");
588
589 b.Property<string>("Comment")
590 .HasColumnType("TEXT")
591 .HasMaxLength(10000);
592
593 b.Property<DateTimeOffset>("MergedAt")
594 .HasColumnType("TEXT");
595
596 b.Property<long>("MergedById")
597 .HasColumnType("INTEGER");
598
599 b.Property<int>("Number")
600 .HasColumnType("INTEGER");
601
602 b.Property<long?>("PrimaryRevisionInformationId")
603 .IsRequired()
604 .HasColumnType("INTEGER");
605
606 b.Property<string>("TargetCommitSha")
607 .IsRequired()
608 .HasColumnType("TEXT")
609 .HasMaxLength(40);
610
611 b.Property<string>("TitleAtMerge")
612 .IsRequired()
613 .HasColumnType("TEXT");
614
615 b.Property<string>("Url")
616 .IsRequired()
617 .HasColumnType("TEXT");
618
619 b.HasKey("Id");
620
621 b.HasIndex("MergedById");
622
623 b.HasIndex("PrimaryRevisionInformationId")
624 .IsUnique();
625
626 b.ToTable("TestMerges");
627 });
628
629 modelBuilder.Entity("Tgstation.Server.Host.Models.User", b =>
630 {
631 b.Property<long?>("Id")
632 .ValueGeneratedOnAdd()
633 .HasColumnType("INTEGER");
634
635 b.Property<string>("CanonicalName")
636 .IsRequired()
637 .HasColumnType("TEXT")
638 .HasMaxLength(100);
639
640 b.Property<DateTimeOffset?>("CreatedAt")
641 .IsRequired()
642 .HasColumnType("TEXT");
643
644 b.Property<long?>("CreatedById")
645 .HasColumnType("INTEGER");
646
647 b.Property<bool?>("Enabled")
648 .IsRequired()
649 .HasColumnType("INTEGER");
650
651 b.Property<long?>("GroupId")
652 .HasColumnType("INTEGER");
653
654 b.Property<DateTimeOffset?>("LastPasswordUpdate")
655 .HasColumnType("TEXT");
656
657 b.Property<string>("Name")
658 .IsRequired()
659 .HasColumnType("TEXT")
660 .HasMaxLength(100);
661
662 b.Property<string>("PasswordHash")
663 .HasColumnType("TEXT");
664
665 b.Property<string>("SystemIdentifier")
666 .HasColumnType("TEXT")
667 .HasMaxLength(100);
668
669 b.HasKey("Id");
670
671 b.HasIndex("CanonicalName")
672 .IsUnique();
673
674 b.HasIndex("CreatedById");
675
676 b.HasIndex("GroupId");
677
678 b.HasIndex("SystemIdentifier")
679 .IsUnique();
680
681 b.ToTable("Users");
682 });
683
684 modelBuilder.Entity("Tgstation.Server.Host.Models.UserGroup", b =>
685 {
686 b.Property<long>("Id")
687 .ValueGeneratedOnAdd()
688 .HasColumnType("INTEGER");
689
690 b.Property<string>("Name")
691 .IsRequired()
692 .HasColumnType("TEXT")
693 .HasMaxLength(100);
694
695 b.HasKey("Id");
696
697 b.HasIndex("Name")
698 .IsUnique();
699
700 b.ToTable("Groups");
701 });
702
703 modelBuilder.Entity("Tgstation.Server.Host.Models.ChatBot", b =>
704 {
705 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
706 .WithMany("ChatSettings")
707 .HasForeignKey("InstanceId")
708 .OnDelete(DeleteBehavior.Cascade)
709 .IsRequired();
710 });
711
712 modelBuilder.Entity("Tgstation.Server.Host.Models.ChatChannel", b =>
713 {
714 b.HasOne("Tgstation.Server.Host.Models.ChatBot", "ChatSettings")
715 .WithMany("Channels")
716 .HasForeignKey("ChatSettingsId")
717 .OnDelete(DeleteBehavior.Cascade)
718 .IsRequired();
719 });
720
721 modelBuilder.Entity("Tgstation.Server.Host.Models.CompileJob", b =>
722 {
723 b.HasOne("Tgstation.Server.Host.Models.Job", "Job")
724 .WithOne()
725 .HasForeignKey("Tgstation.Server.Host.Models.CompileJob", "JobId")
726 .OnDelete(DeleteBehavior.Cascade)
727 .IsRequired();
728
729 b.HasOne("Tgstation.Server.Host.Models.RevisionInformation", "RevisionInformation")
730 .WithMany("CompileJobs")
731 .HasForeignKey("RevisionInformationId")
732 .OnDelete(DeleteBehavior.ClientNoAction)
733 .IsRequired();
734 });
735
736 modelBuilder.Entity("Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
737 {
738 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
739 .WithOne("DreamDaemonSettings")
740 .HasForeignKey("Tgstation.Server.Host.Models.DreamDaemonSettings", "InstanceId")
741 .OnDelete(DeleteBehavior.Cascade)
742 .IsRequired();
743 });
744
745 modelBuilder.Entity("Tgstation.Server.Host.Models.DreamMakerSettings", b =>
746 {
747 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
748 .WithOne("DreamMakerSettings")
749 .HasForeignKey("Tgstation.Server.Host.Models.DreamMakerSettings", "InstanceId")
750 .OnDelete(DeleteBehavior.Cascade)
751 .IsRequired();
752 });
753
754 modelBuilder.Entity("Tgstation.Server.Host.Models.InstancePermissionSet", b =>
755 {
756 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
757 .WithMany("InstancePermissionSets")
758 .HasForeignKey("InstanceId")
759 .OnDelete(DeleteBehavior.Cascade)
760 .IsRequired();
761
762 b.HasOne("Tgstation.Server.Host.Models.PermissionSet", "PermissionSet")
763 .WithMany("InstancePermissionSets")
764 .HasForeignKey("PermissionSetId")
765 .OnDelete(DeleteBehavior.Cascade)
766 .IsRequired();
767 });
768
769 modelBuilder.Entity("Tgstation.Server.Host.Models.Job", b =>
770 {
771 b.HasOne("Tgstation.Server.Host.Models.User", "CancelledBy")
772 .WithMany()
773 .HasForeignKey("CancelledById");
774
775 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
776 .WithMany("Jobs")
777 .HasForeignKey("InstanceId")
778 .OnDelete(DeleteBehavior.Cascade)
779 .IsRequired();
780
781 b.HasOne("Tgstation.Server.Host.Models.User", "StartedBy")
782 .WithMany()
783 .HasForeignKey("StartedById")
784 .OnDelete(DeleteBehavior.Cascade)
785 .IsRequired();
786 });
787
788 modelBuilder.Entity("Tgstation.Server.Host.Models.OAuthConnection", b =>
789 {
790 b.HasOne("Tgstation.Server.Host.Models.User", "User")
791 .WithMany("OAuthConnections")
792 .HasForeignKey("UserId")
793 .OnDelete(DeleteBehavior.Cascade);
794 });
795
796 modelBuilder.Entity("Tgstation.Server.Host.Models.PermissionSet", b =>
797 {
798 b.HasOne("Tgstation.Server.Host.Models.UserGroup", "Group")
799 .WithOne("PermissionSet")
800 .HasForeignKey("Tgstation.Server.Host.Models.PermissionSet", "GroupId")
801 .OnDelete(DeleteBehavior.Cascade);
802
803 b.HasOne("Tgstation.Server.Host.Models.User", "User")
804 .WithOne("PermissionSet")
805 .HasForeignKey("Tgstation.Server.Host.Models.PermissionSet", "UserId")
806 .OnDelete(DeleteBehavior.Cascade);
807 });
808
809 modelBuilder.Entity("Tgstation.Server.Host.Models.ReattachInformation", b =>
810 {
811 b.HasOne("Tgstation.Server.Host.Models.CompileJob", "CompileJob")
812 .WithMany()
813 .HasForeignKey("CompileJobId")
814 .OnDelete(DeleteBehavior.Cascade)
815 .IsRequired();
816 });
817
818 modelBuilder.Entity("Tgstation.Server.Host.Models.RepositorySettings", b =>
819 {
820 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
821 .WithOne("RepositorySettings")
822 .HasForeignKey("Tgstation.Server.Host.Models.RepositorySettings", "InstanceId")
823 .OnDelete(DeleteBehavior.Cascade)
824 .IsRequired();
825 });
826
827 modelBuilder.Entity("Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
828 {
829 b.HasOne("Tgstation.Server.Host.Models.RevisionInformation", "RevisionInformation")
830 .WithMany("ActiveTestMerges")
831 .HasForeignKey("RevisionInformationId")
832 .OnDelete(DeleteBehavior.Cascade)
833 .IsRequired();
834
835 b.HasOne("Tgstation.Server.Host.Models.TestMerge", "TestMerge")
836 .WithMany("RevisonInformations")
837 .HasForeignKey("TestMergeId")
838 .OnDelete(DeleteBehavior.ClientNoAction)
839 .IsRequired();
840 });
841
842 modelBuilder.Entity("Tgstation.Server.Host.Models.RevisionInformation", b =>
843 {
844 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
845 .WithMany("RevisionInformations")
846 .HasForeignKey("InstanceId")
847 .OnDelete(DeleteBehavior.Cascade)
848 .IsRequired();
849 });
850
851 modelBuilder.Entity("Tgstation.Server.Host.Models.TestMerge", b =>
852 {
853 b.HasOne("Tgstation.Server.Host.Models.User", "MergedBy")
854 .WithMany("TestMerges")
855 .HasForeignKey("MergedById")
856 .OnDelete(DeleteBehavior.Restrict)
857 .IsRequired();
858
859 b.HasOne("Tgstation.Server.Host.Models.RevisionInformation", "PrimaryRevisionInformation")
860 .WithOne("PrimaryTestMerge")
861 .HasForeignKey("Tgstation.Server.Host.Models.TestMerge", "PrimaryRevisionInformationId")
862 .OnDelete(DeleteBehavior.Cascade)
863 .IsRequired();
864 });
865
866 modelBuilder.Entity("Tgstation.Server.Host.Models.User", b =>
867 {
868 b.HasOne("Tgstation.Server.Host.Models.User", "CreatedBy")
869 .WithMany("CreatedUsers")
870 .HasForeignKey("CreatedById");
871
872 b.HasOne("Tgstation.Server.Host.Models.UserGroup", "Group")
873 .WithMany("Users")
874 .HasForeignKey("GroupId");
875 });
876#pragma warning restore 612, 618
877 }
878 }
879}