tgstation-server 6.16.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.13")
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.OidcConnection", b =>
478 {
479 b.Property<long>("Id")
480 .ValueGeneratedOnAdd()
481 .HasColumnType("bigint");
482
483 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
484
485 b.Property<string>("ExternalUserId")
486 .IsRequired()
487 .HasMaxLength(100)
488 .HasColumnType("nvarchar(100)");
489
490 b.Property<string>("SchemeKey")
491 .IsRequired()
492 .HasMaxLength(100)
493 .HasColumnType("nvarchar(100)");
494
495 b.Property<long>("UserId")
496 .HasColumnType("bigint");
497
498 b.HasKey("Id");
499
500 b.HasIndex("UserId");
501
502 b.HasIndex("SchemeKey", "ExternalUserId")
503 .IsUnique();
504
505 b.ToTable("OidcConnections");
506 });
507
508 modelBuilder.Entity("Tgstation.Server.Host.Models.PermissionSet", b =>
509 {
510 b.Property<long?>("Id")
511 .ValueGeneratedOnAdd()
512 .HasColumnType("bigint");
513
514 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long?>("Id"));
515
516 b.Property<decimal>("AdministrationRights")
517 .HasColumnType("decimal(20,0)");
518
519 b.Property<long?>("GroupId")
520 .HasColumnType("bigint");
521
522 b.Property<decimal>("InstanceManagerRights")
523 .HasColumnType("decimal(20,0)");
524
525 b.Property<long?>("UserId")
526 .HasColumnType("bigint");
527
528 b.HasKey("Id");
529
530 b.HasIndex("GroupId")
531 .IsUnique()
532 .HasFilter("[GroupId] IS NOT NULL");
533
534 b.HasIndex("UserId")
535 .IsUnique()
536 .HasFilter("[UserId] IS NOT NULL");
537
538 b.ToTable("PermissionSets");
539 });
540
541 modelBuilder.Entity("Tgstation.Server.Host.Models.ReattachInformation", b =>
542 {
543 b.Property<long?>("Id")
544 .ValueGeneratedOnAdd()
545 .HasColumnType("bigint");
546
547 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long?>("Id"));
548
549 b.Property<string>("AccessIdentifier")
550 .IsRequired()
551 .HasColumnType("nvarchar(max)");
552
553 b.Property<long>("CompileJobId")
554 .HasColumnType("bigint");
555
556 b.Property<long?>("InitialCompileJobId")
557 .HasColumnType("bigint");
558
559 b.Property<int>("LaunchSecurityLevel")
560 .HasColumnType("int");
561
562 b.Property<int>("LaunchVisibility")
563 .HasColumnType("int");
564
565 b.Property<int>("Port")
566 .HasColumnType("int");
567
568 b.Property<int>("ProcessId")
569 .HasColumnType("int");
570
571 b.Property<int>("RebootState")
572 .HasColumnType("int");
573
574 b.Property<int?>("TopicPort")
575 .HasColumnType("int");
576
577 b.HasKey("Id");
578
579 b.HasIndex("CompileJobId");
580
581 b.HasIndex("InitialCompileJobId");
582
583 b.ToTable("ReattachInformations");
584 });
585
586 modelBuilder.Entity("Tgstation.Server.Host.Models.RepositorySettings", b =>
587 {
588 b.Property<long>("Id")
589 .ValueGeneratedOnAdd()
590 .HasColumnType("bigint");
591
592 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
593
594 b.Property<string>("AccessToken")
595 .HasMaxLength(10000)
596 .HasColumnType("nvarchar(max)");
597
598 b.Property<string>("AccessUser")
599 .HasMaxLength(10000)
600 .HasColumnType("nvarchar(max)");
601
602 b.Property<bool?>("AutoUpdatesKeepTestMerges")
603 .IsRequired()
604 .HasColumnType("bit");
605
606 b.Property<bool?>("AutoUpdatesSynchronize")
607 .IsRequired()
608 .HasColumnType("bit");
609
610 b.Property<string>("CommitterEmail")
611 .IsRequired()
612 .HasMaxLength(10000)
613 .HasColumnType("nvarchar(max)");
614
615 b.Property<string>("CommitterName")
616 .IsRequired()
617 .HasMaxLength(10000)
618 .HasColumnType("nvarchar(max)");
619
620 b.Property<bool?>("CreateGitHubDeployments")
621 .IsRequired()
622 .HasColumnType("bit");
623
624 b.Property<long>("InstanceId")
625 .HasColumnType("bigint");
626
627 b.Property<bool?>("PostTestMergeComment")
628 .IsRequired()
629 .HasColumnType("bit");
630
631 b.Property<bool?>("PushTestMergeCommits")
632 .IsRequired()
633 .HasColumnType("bit");
634
635 b.Property<bool?>("ShowTestMergeCommitters")
636 .IsRequired()
637 .HasColumnType("bit");
638
639 b.Property<bool?>("UpdateSubmodules")
640 .IsRequired()
641 .HasColumnType("bit");
642
643 b.HasKey("Id");
644
645 b.HasIndex("InstanceId")
646 .IsUnique();
647
648 b.ToTable("RepositorySettings");
649 });
650
651 modelBuilder.Entity("Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
652 {
653 b.Property<long>("Id")
654 .ValueGeneratedOnAdd()
655 .HasColumnType("bigint");
656
657 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
658
659 b.Property<long>("RevisionInformationId")
660 .HasColumnType("bigint");
661
662 b.Property<long>("TestMergeId")
663 .HasColumnType("bigint");
664
665 b.HasKey("Id");
666
667 b.HasIndex("RevisionInformationId");
668
669 b.HasIndex("TestMergeId");
670
671 b.ToTable("RevInfoTestMerges");
672 });
673
674 modelBuilder.Entity("Tgstation.Server.Host.Models.RevisionInformation", b =>
675 {
676 b.Property<long>("Id")
677 .ValueGeneratedOnAdd()
678 .HasColumnType("bigint");
679
680 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
681
682 b.Property<string>("CommitSha")
683 .IsRequired()
684 .HasMaxLength(40)
685 .HasColumnType("nvarchar(40)");
686
687 b.Property<long>("InstanceId")
688 .HasColumnType("bigint");
689
690 b.Property<string>("OriginCommitSha")
691 .IsRequired()
692 .HasMaxLength(40)
693 .HasColumnType("nvarchar(40)");
694
695 b.Property<DateTimeOffset>("Timestamp")
696 .HasColumnType("datetimeoffset");
697
698 b.HasKey("Id");
699
700 b.HasIndex("InstanceId", "CommitSha")
701 .IsUnique();
702
703 b.ToTable("RevisionInformations");
704 });
705
706 modelBuilder.Entity("Tgstation.Server.Host.Models.TestMerge", 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>("Author")
715 .IsRequired()
716 .HasColumnType("nvarchar(max)");
717
718 b.Property<string>("BodyAtMerge")
719 .IsRequired()
720 .HasColumnType("nvarchar(max)");
721
722 b.Property<string>("Comment")
723 .HasMaxLength(10000)
724 .HasColumnType("nvarchar(max)");
725
726 b.Property<DateTimeOffset>("MergedAt")
727 .HasColumnType("datetimeoffset");
728
729 b.Property<long>("MergedById")
730 .HasColumnType("bigint");
731
732 b.Property<int>("Number")
733 .HasColumnType("int");
734
735 b.Property<long?>("PrimaryRevisionInformationId")
736 .IsRequired()
737 .HasColumnType("bigint");
738
739 b.Property<string>("TargetCommitSha")
740 .IsRequired()
741 .HasMaxLength(40)
742 .HasColumnType("nvarchar(40)");
743
744 b.Property<string>("TitleAtMerge")
745 .IsRequired()
746 .HasColumnType("nvarchar(max)");
747
748 b.Property<string>("Url")
749 .IsRequired()
750 .HasColumnType("nvarchar(max)");
751
752 b.HasKey("Id");
753
754 b.HasIndex("MergedById");
755
756 b.HasIndex("PrimaryRevisionInformationId")
757 .IsUnique();
758
759 b.ToTable("TestMerges");
760 });
761
762 modelBuilder.Entity("Tgstation.Server.Host.Models.User", b =>
763 {
764 b.Property<long?>("Id")
765 .ValueGeneratedOnAdd()
766 .HasColumnType("bigint");
767
768 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long?>("Id"));
769
770 b.Property<string>("CanonicalName")
771 .IsRequired()
772 .HasMaxLength(100)
773 .HasColumnType("nvarchar(100)");
774
775 b.Property<DateTimeOffset?>("CreatedAt")
776 .IsRequired()
777 .HasColumnType("datetimeoffset");
778
779 b.Property<long?>("CreatedById")
780 .HasColumnType("bigint");
781
782 b.Property<bool?>("Enabled")
783 .IsRequired()
784 .HasColumnType("bit");
785
786 b.Property<long?>("GroupId")
787 .HasColumnType("bigint");
788
789 b.Property<DateTimeOffset?>("LastPasswordUpdate")
790 .HasColumnType("datetimeoffset");
791
792 b.Property<string>("Name")
793 .IsRequired()
794 .HasMaxLength(100)
795 .HasColumnType("nvarchar(100)");
796
797 b.Property<string>("PasswordHash")
798 .HasColumnType("nvarchar(max)");
799
800 b.Property<string>("SystemIdentifier")
801 .HasMaxLength(100)
802 .HasColumnType("nvarchar(100)");
803
804 b.HasKey("Id");
805
806 b.HasIndex("CanonicalName")
807 .IsUnique();
808
809 b.HasIndex("CreatedById");
810
811 b.HasIndex("GroupId");
812
813 b.HasIndex("SystemIdentifier")
814 .IsUnique()
815 .HasFilter("[SystemIdentifier] IS NOT NULL");
816
817 b.ToTable("Users");
818 });
819
820 modelBuilder.Entity("Tgstation.Server.Host.Models.UserGroup", b =>
821 {
822 b.Property<long?>("Id")
823 .ValueGeneratedOnAdd()
824 .HasColumnType("bigint");
825
826 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long?>("Id"));
827
828 b.Property<string>("Name")
829 .IsRequired()
830 .HasMaxLength(100)
831 .HasColumnType("nvarchar(100)");
832
833 b.HasKey("Id");
834
835 b.HasIndex("Name")
836 .IsUnique();
837
838 b.ToTable("Groups");
839 });
840
841 modelBuilder.Entity("Tgstation.Server.Host.Models.ChatBot", b =>
842 {
843 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
844 .WithMany("ChatSettings")
845 .HasForeignKey("InstanceId")
846 .OnDelete(DeleteBehavior.Cascade)
847 .IsRequired();
848
849 b.Navigation("Instance");
850 });
851
852 modelBuilder.Entity("Tgstation.Server.Host.Models.ChatChannel", b =>
853 {
854 b.HasOne("Tgstation.Server.Host.Models.ChatBot", "ChatSettings")
855 .WithMany("Channels")
856 .HasForeignKey("ChatSettingsId")
857 .OnDelete(DeleteBehavior.Cascade)
858 .IsRequired();
859
860 b.Navigation("ChatSettings");
861 });
862
863 modelBuilder.Entity("Tgstation.Server.Host.Models.CompileJob", b =>
864 {
865 b.HasOne("Tgstation.Server.Host.Models.Job", "Job")
866 .WithOne()
867 .HasForeignKey("Tgstation.Server.Host.Models.CompileJob", "JobId")
868 .OnDelete(DeleteBehavior.Cascade)
869 .IsRequired();
870
871 b.HasOne("Tgstation.Server.Host.Models.RevisionInformation", "RevisionInformation")
872 .WithMany("CompileJobs")
873 .HasForeignKey("RevisionInformationId")
874 .OnDelete(DeleteBehavior.ClientNoAction)
875 .IsRequired();
876
877 b.Navigation("Job");
878
879 b.Navigation("RevisionInformation");
880 });
881
882 modelBuilder.Entity("Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
883 {
884 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
885 .WithOne("DreamDaemonSettings")
886 .HasForeignKey("Tgstation.Server.Host.Models.DreamDaemonSettings", "InstanceId")
887 .OnDelete(DeleteBehavior.Cascade)
888 .IsRequired();
889
890 b.Navigation("Instance");
891 });
892
893 modelBuilder.Entity("Tgstation.Server.Host.Models.DreamMakerSettings", b =>
894 {
895 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
896 .WithOne("DreamMakerSettings")
897 .HasForeignKey("Tgstation.Server.Host.Models.DreamMakerSettings", "InstanceId")
898 .OnDelete(DeleteBehavior.Cascade)
899 .IsRequired();
900
901 b.Navigation("Instance");
902 });
903
904 modelBuilder.Entity("Tgstation.Server.Host.Models.InstancePermissionSet", b =>
905 {
906 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
907 .WithMany("InstancePermissionSets")
908 .HasForeignKey("InstanceId")
909 .OnDelete(DeleteBehavior.Cascade)
910 .IsRequired();
911
912 b.HasOne("Tgstation.Server.Host.Models.PermissionSet", "PermissionSet")
913 .WithMany("InstancePermissionSets")
914 .HasForeignKey("PermissionSetId")
915 .OnDelete(DeleteBehavior.Cascade)
916 .IsRequired();
917
918 b.Navigation("Instance");
919
920 b.Navigation("PermissionSet");
921 });
922
923 modelBuilder.Entity("Tgstation.Server.Host.Models.Job", b =>
924 {
925 b.HasOne("Tgstation.Server.Host.Models.User", "CancelledBy")
926 .WithMany()
927 .HasForeignKey("CancelledById");
928
929 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
930 .WithMany("Jobs")
931 .HasForeignKey("InstanceId")
932 .OnDelete(DeleteBehavior.Cascade)
933 .IsRequired();
934
935 b.HasOne("Tgstation.Server.Host.Models.User", "StartedBy")
936 .WithMany()
937 .HasForeignKey("StartedById")
938 .OnDelete(DeleteBehavior.Cascade)
939 .IsRequired();
940
941 b.Navigation("CancelledBy");
942
943 b.Navigation("Instance");
944
945 b.Navigation("StartedBy");
946 });
947
948 modelBuilder.Entity("Tgstation.Server.Host.Models.OAuthConnection", b =>
949 {
950 b.HasOne("Tgstation.Server.Host.Models.User", "User")
951 .WithMany("OAuthConnections")
952 .HasForeignKey("UserId")
953 .OnDelete(DeleteBehavior.Cascade)
954 .IsRequired();
955
956 b.Navigation("User");
957 });
958
959 modelBuilder.Entity("Tgstation.Server.Host.Models.OidcConnection", b =>
960 {
961 b.HasOne("Tgstation.Server.Host.Models.User", "User")
962 .WithMany("OidcConnections")
963 .HasForeignKey("UserId")
964 .OnDelete(DeleteBehavior.Cascade)
965 .IsRequired();
966
967 b.Navigation("User");
968 });
969
970 modelBuilder.Entity("Tgstation.Server.Host.Models.PermissionSet", b =>
971 {
972 b.HasOne("Tgstation.Server.Host.Models.UserGroup", "Group")
973 .WithOne("PermissionSet")
974 .HasForeignKey("Tgstation.Server.Host.Models.PermissionSet", "GroupId")
975 .OnDelete(DeleteBehavior.Cascade);
976
977 b.HasOne("Tgstation.Server.Host.Models.User", "User")
978 .WithOne("PermissionSet")
979 .HasForeignKey("Tgstation.Server.Host.Models.PermissionSet", "UserId")
980 .OnDelete(DeleteBehavior.Cascade);
981
982 b.Navigation("Group");
983
984 b.Navigation("User");
985 });
986
987 modelBuilder.Entity("Tgstation.Server.Host.Models.ReattachInformation", b =>
988 {
989 b.HasOne("Tgstation.Server.Host.Models.CompileJob", "CompileJob")
990 .WithMany()
991 .HasForeignKey("CompileJobId")
992 .OnDelete(DeleteBehavior.Cascade)
993 .IsRequired();
994
995 b.HasOne("Tgstation.Server.Host.Models.CompileJob", "InitialCompileJob")
996 .WithMany()
997 .HasForeignKey("InitialCompileJobId");
998
999 b.Navigation("CompileJob");
1000
1001 b.Navigation("InitialCompileJob");
1002 });
1003
1004 modelBuilder.Entity("Tgstation.Server.Host.Models.RepositorySettings", b =>
1005 {
1006 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
1007 .WithOne("RepositorySettings")
1008 .HasForeignKey("Tgstation.Server.Host.Models.RepositorySettings", "InstanceId")
1009 .OnDelete(DeleteBehavior.Cascade)
1010 .IsRequired();
1011
1012 b.Navigation("Instance");
1013 });
1014
1015 modelBuilder.Entity("Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
1016 {
1017 b.HasOne("Tgstation.Server.Host.Models.RevisionInformation", "RevisionInformation")
1018 .WithMany("ActiveTestMerges")
1019 .HasForeignKey("RevisionInformationId")
1020 .OnDelete(DeleteBehavior.Cascade)
1021 .IsRequired();
1022
1023 b.HasOne("Tgstation.Server.Host.Models.TestMerge", "TestMerge")
1024 .WithMany("RevisonInformations")
1025 .HasForeignKey("TestMergeId")
1026 .OnDelete(DeleteBehavior.ClientNoAction)
1027 .IsRequired();
1028
1029 b.Navigation("RevisionInformation");
1030
1031 b.Navigation("TestMerge");
1032 });
1033
1034 modelBuilder.Entity("Tgstation.Server.Host.Models.RevisionInformation", b =>
1035 {
1036 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
1037 .WithMany("RevisionInformations")
1038 .HasForeignKey("InstanceId")
1039 .OnDelete(DeleteBehavior.Cascade)
1040 .IsRequired();
1041
1042 b.Navigation("Instance");
1043 });
1044
1045 modelBuilder.Entity("Tgstation.Server.Host.Models.TestMerge", b =>
1046 {
1047 b.HasOne("Tgstation.Server.Host.Models.User", "MergedBy")
1048 .WithMany("TestMerges")
1049 .HasForeignKey("MergedById")
1050 .OnDelete(DeleteBehavior.Restrict)
1051 .IsRequired();
1052
1053 b.HasOne("Tgstation.Server.Host.Models.RevisionInformation", "PrimaryRevisionInformation")
1054 .WithOne("PrimaryTestMerge")
1055 .HasForeignKey("Tgstation.Server.Host.Models.TestMerge", "PrimaryRevisionInformationId")
1056 .OnDelete(DeleteBehavior.Cascade)
1057 .IsRequired();
1058
1059 b.Navigation("MergedBy");
1060
1061 b.Navigation("PrimaryRevisionInformation");
1062 });
1063
1064 modelBuilder.Entity("Tgstation.Server.Host.Models.User", b =>
1065 {
1066 b.HasOne("Tgstation.Server.Host.Models.User", "CreatedBy")
1067 .WithMany("CreatedUsers")
1068 .HasForeignKey("CreatedById");
1069
1070 b.HasOne("Tgstation.Server.Host.Models.UserGroup", "Group")
1071 .WithMany("Users")
1072 .HasForeignKey("GroupId");
1073
1074 b.Navigation("CreatedBy");
1075
1076 b.Navigation("Group");
1077 });
1078
1079 modelBuilder.Entity("Tgstation.Server.Host.Models.ChatBot", b =>
1080 {
1081 b.Navigation("Channels");
1082 });
1083
1084 modelBuilder.Entity("Tgstation.Server.Host.Models.Instance", b =>
1085 {
1086 b.Navigation("ChatSettings");
1087
1088 b.Navigation("DreamDaemonSettings");
1089
1090 b.Navigation("DreamMakerSettings");
1091
1092 b.Navigation("InstancePermissionSets");
1093
1094 b.Navigation("Jobs");
1095
1096 b.Navigation("RepositorySettings");
1097
1098 b.Navigation("RevisionInformations");
1099 });
1100
1101 modelBuilder.Entity("Tgstation.Server.Host.Models.PermissionSet", b =>
1102 {
1103 b.Navigation("InstancePermissionSets");
1104 });
1105
1106 modelBuilder.Entity("Tgstation.Server.Host.Models.RevisionInformation", b =>
1107 {
1108 b.Navigation("ActiveTestMerges");
1109
1110 b.Navigation("CompileJobs");
1111
1112 b.Navigation("PrimaryTestMerge");
1113 });
1114
1115 modelBuilder.Entity("Tgstation.Server.Host.Models.TestMerge", b =>
1116 {
1117 b.Navigation("RevisonInformations");
1118 });
1119
1120 modelBuilder.Entity("Tgstation.Server.Host.Models.User", b =>
1121 {
1122 b.Navigation("CreatedUsers");
1123
1124 b.Navigation("OAuthConnections");
1125
1126 b.Navigation("OidcConnections");
1127
1128 b.Navigation("PermissionSet");
1129
1130 b.Navigation("TestMerges");
1131 });
1132
1133 modelBuilder.Entity("Tgstation.Server.Host.Models.UserGroup", b =>
1134 {
1135 b.Navigation("PermissionSet")
1136 .IsRequired();
1137
1138 b.Navigation("Users");
1139 });
1140#pragma warning restore 612, 618
1141 }
1142 }
1143}