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