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