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