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