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