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