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