tgstation-server 6.16.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
20250302232550_MSAddOidcConnections.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("20250302232550_MSAddOidcConnections")]
12 partial class MSAddOidcConnections
13 {
15 protected override void BuildTargetModel(ModelBuilder modelBuilder)
16 {
17#pragma warning disable 612, 618
18 modelBuilder
19 .HasAnnotation("ProductVersion", "8.0.13")
20 .HasAnnotation("Relational:MaxIdentifierLength", 128);
21
22 SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
23
24 modelBuilder.Entity("Tgstation.Server.Host.Models.ChatBot", b =>
25 {
26 b.Property<long?>("Id")
27 .ValueGeneratedOnAdd()
28 .HasColumnType("bigint");
29
30 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long?>("Id"));
31
32 b.Property<int>("ChannelLimit")
33 .HasColumnType("int");
34
35 b.Property<string>("ConnectionString")
36 .IsRequired()
37 .HasMaxLength(10000)
38 .HasColumnType("nvarchar(max)");
39
40 b.Property<bool?>("Enabled")
41 .HasColumnType("bit");
42
43 b.Property<long>("InstanceId")
44 .HasColumnType("bigint");
45
46 b.Property<string>("Name")
47 .IsRequired()
48 .HasMaxLength(100)
49 .HasColumnType("nvarchar(100)");
50
51 b.Property<int>("Provider")
52 .HasColumnType("int");
53
54 b.Property<long>("ReconnectionInterval")
55 .HasColumnType("bigint");
56
57 b.HasKey("Id");
58
59 b.HasIndex("InstanceId", "Name")
60 .IsUnique();
61
62 b.ToTable("ChatBots");
63 });
64
65 modelBuilder.Entity("Tgstation.Server.Host.Models.ChatChannel", b =>
66 {
67 b.Property<long>("Id")
68 .ValueGeneratedOnAdd()
69 .HasColumnType("bigint");
70
71 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
72
73 b.Property<long>("ChatSettingsId")
74 .HasColumnType("bigint");
75
76 b.Property<decimal?>("DiscordChannelId")
77 .HasColumnType("decimal(20,0)");
78
79 b.Property<string>("IrcChannel")
80 .HasMaxLength(100)
81 .HasColumnType("nvarchar(100)");
82
83 b.Property<bool?>("IsAdminChannel")
84 .IsRequired()
85 .HasColumnType("bit");
86
87 b.Property<bool?>("IsSystemChannel")
88 .IsRequired()
89 .HasColumnType("bit");
90
91 b.Property<bool?>("IsUpdatesChannel")
92 .IsRequired()
93 .HasColumnType("bit");
94
95 b.Property<bool?>("IsWatchdogChannel")
96 .IsRequired()
97 .HasColumnType("bit");
98
99 b.Property<string>("Tag")
100 .HasMaxLength(10000)
101 .HasColumnType("nvarchar(max)");
102
103 b.HasKey("Id");
104
105 b.HasIndex("ChatSettingsId", "DiscordChannelId")
106 .IsUnique()
107 .HasFilter("[DiscordChannelId] IS NOT NULL");
108
109 b.HasIndex("ChatSettingsId", "IrcChannel")
110 .IsUnique()
111 .HasFilter("[IrcChannel] IS NOT NULL");
112
113 b.ToTable("ChatChannels");
114 });
115
116 modelBuilder.Entity("Tgstation.Server.Host.Models.CompileJob", b =>
117 {
118 b.Property<long?>("Id")
119 .ValueGeneratedOnAdd()
120 .HasColumnType("bigint");
121
122 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long?>("Id"));
123
124 b.Property<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>("AutoStartCron")
300 .IsRequired()
301 .HasMaxLength(1000)
302 .HasColumnType("nvarchar(1000)");
303
304 b.Property<string>("AutoStopCron")
305 .IsRequired()
306 .HasMaxLength(1000)
307 .HasColumnType("nvarchar(1000)");
308
309 b.Property<string>("AutoUpdateCron")
310 .IsRequired()
311 .HasMaxLength(1000)
312 .HasColumnType("nvarchar(1000)");
313
314 b.Property<long>("AutoUpdateInterval")
315 .HasColumnType("bigint");
316
317 b.Property<int>("ChatBotLimit")
318 .HasColumnType("int");
319
320 b.Property<int>("ConfigurationType")
321 .HasColumnType("int");
322
323 b.Property<string>("Name")
324 .IsRequired()
325 .HasMaxLength(100)
326 .HasColumnType("nvarchar(100)");
327
328 b.Property<bool?>("Online")
329 .IsRequired()
330 .HasColumnType("bit");
331
332 b.Property<string>("Path")
333 .IsRequired()
334 .HasColumnType("nvarchar(450)");
335
336 b.Property<string>("SwarmIdentifer")
337 .HasColumnType("nvarchar(450)");
338
339 b.HasKey("Id");
340
341 b.HasIndex("Path", "SwarmIdentifer")
342 .IsUnique()
343 .HasFilter("[SwarmIdentifer] IS NOT NULL");
344
345 b.ToTable("Instances");
346 });
347
348 modelBuilder.Entity("Tgstation.Server.Host.Models.InstancePermissionSet", b =>
349 {
350 b.Property<long>("Id")
351 .ValueGeneratedOnAdd()
352 .HasColumnType("bigint");
353
354 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
355
356 b.Property<decimal>("ChatBotRights")
357 .HasColumnType("decimal(20,0)");
358
359 b.Property<decimal>("ConfigurationRights")
360 .HasColumnType("decimal(20,0)");
361
362 b.Property<decimal>("DreamDaemonRights")
363 .HasColumnType("decimal(20,0)");
364
365 b.Property<decimal>("DreamMakerRights")
366 .HasColumnType("decimal(20,0)");
367
368 b.Property<decimal>("EngineRights")
369 .HasColumnType("decimal(20,0)");
370
371 b.Property<long>("InstanceId")
372 .HasColumnType("bigint");
373
374 b.Property<decimal>("InstancePermissionSetRights")
375 .HasColumnType("decimal(20,0)");
376
377 b.Property<long>("PermissionSetId")
378 .HasColumnType("bigint");
379
380 b.Property<decimal>("RepositoryRights")
381 .HasColumnType("decimal(20,0)");
382
383 b.HasKey("Id");
384
385 b.HasIndex("InstanceId");
386
387 b.HasIndex("PermissionSetId", "InstanceId")
388 .IsUnique();
389
390 b.ToTable("InstancePermissionSets");
391 });
392
393 modelBuilder.Entity("Tgstation.Server.Host.Models.Job", b =>
394 {
395 b.Property<long?>("Id")
396 .ValueGeneratedOnAdd()
397 .HasColumnType("bigint");
398
399 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long?>("Id"));
400
401 b.Property<decimal?>("CancelRight")
402 .HasColumnType("decimal(20,0)");
403
404 b.Property<decimal?>("CancelRightsType")
405 .HasColumnType("decimal(20,0)");
406
407 b.Property<bool?>("Cancelled")
408 .IsRequired()
409 .HasColumnType("bit");
410
411 b.Property<long?>("CancelledById")
412 .HasColumnType("bigint");
413
414 b.Property<string>("Description")
415 .IsRequired()
416 .HasColumnType("nvarchar(max)");
417
418 b.Property<long?>("ErrorCode")
419 .HasColumnType("bigint");
420
421 b.Property<string>("ExceptionDetails")
422 .HasColumnType("nvarchar(max)");
423
424 b.Property<long>("InstanceId")
425 .HasColumnType("bigint");
426
427 b.Property<byte>("JobCode")
428 .HasColumnType("tinyint");
429
430 b.Property<DateTimeOffset?>("StartedAt")
431 .IsRequired()
432 .HasColumnType("datetimeoffset");
433
434 b.Property<long>("StartedById")
435 .HasColumnType("bigint");
436
437 b.Property<DateTimeOffset?>("StoppedAt")
438 .HasColumnType("datetimeoffset");
439
440 b.HasKey("Id");
441
442 b.HasIndex("CancelledById");
443
444 b.HasIndex("InstanceId");
445
446 b.HasIndex("StartedById");
447
448 b.ToTable("Jobs");
449 });
450
451 modelBuilder.Entity("Tgstation.Server.Host.Models.OAuthConnection", b =>
452 {
453 b.Property<long>("Id")
454 .ValueGeneratedOnAdd()
455 .HasColumnType("bigint");
456
457 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
458
459 b.Property<string>("ExternalUserId")
460 .IsRequired()
461 .HasMaxLength(100)
462 .HasColumnType("nvarchar(100)");
463
464 b.Property<int>("Provider")
465 .HasColumnType("int");
466
467 b.Property<long>("UserId")
468 .HasColumnType("bigint");
469
470 b.HasKey("Id");
471
472 b.HasIndex("UserId");
473
474 b.HasIndex("Provider", "ExternalUserId")
475 .IsUnique();
476
477 b.ToTable("OAuthConnections");
478 });
479
480 modelBuilder.Entity("Tgstation.Server.Host.Models.OidcConnection", b =>
481 {
482 b.Property<long>("Id")
483 .ValueGeneratedOnAdd()
484 .HasColumnType("bigint");
485
486 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
487
488 b.Property<string>("ExternalUserId")
489 .IsRequired()
490 .HasMaxLength(100)
491 .HasColumnType("nvarchar(100)");
492
493 b.Property<string>("SchemeKey")
494 .IsRequired()
495 .HasMaxLength(100)
496 .HasColumnType("nvarchar(100)");
497
498 b.Property<long>("UserId")
499 .HasColumnType("bigint");
500
501 b.HasKey("Id");
502
503 b.HasIndex("UserId");
504
505 b.HasIndex("SchemeKey", "ExternalUserId")
506 .IsUnique();
507
508 b.ToTable("OidcConnections");
509 });
510
511 modelBuilder.Entity("Tgstation.Server.Host.Models.PermissionSet", b =>
512 {
513 b.Property<long?>("Id")
514 .ValueGeneratedOnAdd()
515 .HasColumnType("bigint");
516
517 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long?>("Id"));
518
519 b.Property<decimal>("AdministrationRights")
520 .HasColumnType("decimal(20,0)");
521
522 b.Property<long?>("GroupId")
523 .HasColumnType("bigint");
524
525 b.Property<decimal>("InstanceManagerRights")
526 .HasColumnType("decimal(20,0)");
527
528 b.Property<long?>("UserId")
529 .HasColumnType("bigint");
530
531 b.HasKey("Id");
532
533 b.HasIndex("GroupId")
534 .IsUnique()
535 .HasFilter("[GroupId] IS NOT NULL");
536
537 b.HasIndex("UserId")
538 .IsUnique()
539 .HasFilter("[UserId] IS NOT NULL");
540
541 b.ToTable("PermissionSets");
542 });
543
544 modelBuilder.Entity("Tgstation.Server.Host.Models.ReattachInformation", b =>
545 {
546 b.Property<long?>("Id")
547 .ValueGeneratedOnAdd()
548 .HasColumnType("bigint");
549
550 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long?>("Id"));
551
552 b.Property<string>("AccessIdentifier")
553 .IsRequired()
554 .HasColumnType("nvarchar(max)");
555
556 b.Property<long>("CompileJobId")
557 .HasColumnType("bigint");
558
559 b.Property<long?>("InitialCompileJobId")
560 .HasColumnType("bigint");
561
562 b.Property<int>("LaunchSecurityLevel")
563 .HasColumnType("int");
564
565 b.Property<int>("LaunchVisibility")
566 .HasColumnType("int");
567
568 b.Property<int>("Port")
569 .HasColumnType("int");
570
571 b.Property<int>("ProcessId")
572 .HasColumnType("int");
573
574 b.Property<int>("RebootState")
575 .HasColumnType("int");
576
577 b.Property<int?>("TopicPort")
578 .HasColumnType("int");
579
580 b.HasKey("Id");
581
582 b.HasIndex("CompileJobId");
583
584 b.HasIndex("InitialCompileJobId");
585
586 b.ToTable("ReattachInformations");
587 });
588
589 modelBuilder.Entity("Tgstation.Server.Host.Models.RepositorySettings", b =>
590 {
591 b.Property<long>("Id")
592 .ValueGeneratedOnAdd()
593 .HasColumnType("bigint");
594
595 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
596
597 b.Property<string>("AccessToken")
598 .HasMaxLength(10000)
599 .HasColumnType("nvarchar(max)");
600
601 b.Property<string>("AccessUser")
602 .HasMaxLength(10000)
603 .HasColumnType("nvarchar(max)");
604
605 b.Property<bool?>("AutoUpdatesKeepTestMerges")
606 .IsRequired()
607 .HasColumnType("bit");
608
609 b.Property<bool?>("AutoUpdatesSynchronize")
610 .IsRequired()
611 .HasColumnType("bit");
612
613 b.Property<string>("CommitterEmail")
614 .IsRequired()
615 .HasMaxLength(10000)
616 .HasColumnType("nvarchar(max)");
617
618 b.Property<string>("CommitterName")
619 .IsRequired()
620 .HasMaxLength(10000)
621 .HasColumnType("nvarchar(max)");
622
623 b.Property<bool?>("CreateGitHubDeployments")
624 .IsRequired()
625 .HasColumnType("bit");
626
627 b.Property<long>("InstanceId")
628 .HasColumnType("bigint");
629
630 b.Property<bool?>("PostTestMergeComment")
631 .IsRequired()
632 .HasColumnType("bit");
633
634 b.Property<bool?>("PushTestMergeCommits")
635 .IsRequired()
636 .HasColumnType("bit");
637
638 b.Property<bool?>("ShowTestMergeCommitters")
639 .IsRequired()
640 .HasColumnType("bit");
641
642 b.Property<bool?>("UpdateSubmodules")
643 .IsRequired()
644 .HasColumnType("bit");
645
646 b.HasKey("Id");
647
648 b.HasIndex("InstanceId")
649 .IsUnique();
650
651 b.ToTable("RepositorySettings");
652 });
653
654 modelBuilder.Entity("Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
655 {
656 b.Property<long>("Id")
657 .ValueGeneratedOnAdd()
658 .HasColumnType("bigint");
659
660 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
661
662 b.Property<long>("RevisionInformationId")
663 .HasColumnType("bigint");
664
665 b.Property<long>("TestMergeId")
666 .HasColumnType("bigint");
667
668 b.HasKey("Id");
669
670 b.HasIndex("RevisionInformationId");
671
672 b.HasIndex("TestMergeId");
673
674 b.ToTable("RevInfoTestMerges");
675 });
676
677 modelBuilder.Entity("Tgstation.Server.Host.Models.RevisionInformation", b =>
678 {
679 b.Property<long>("Id")
680 .ValueGeneratedOnAdd()
681 .HasColumnType("bigint");
682
683 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
684
685 b.Property<string>("CommitSha")
686 .IsRequired()
687 .HasMaxLength(40)
688 .HasColumnType("nvarchar(40)");
689
690 b.Property<long>("InstanceId")
691 .HasColumnType("bigint");
692
693 b.Property<string>("OriginCommitSha")
694 .IsRequired()
695 .HasMaxLength(40)
696 .HasColumnType("nvarchar(40)");
697
698 b.Property<DateTimeOffset>("Timestamp")
699 .HasColumnType("datetimeoffset");
700
701 b.HasKey("Id");
702
703 b.HasIndex("InstanceId", "CommitSha")
704 .IsUnique();
705
706 b.ToTable("RevisionInformations");
707 });
708
709 modelBuilder.Entity("Tgstation.Server.Host.Models.TestMerge", b =>
710 {
711 b.Property<long>("Id")
712 .ValueGeneratedOnAdd()
713 .HasColumnType("bigint");
714
715 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
716
717 b.Property<string>("Author")
718 .IsRequired()
719 .HasColumnType("nvarchar(max)");
720
721 b.Property<string>("BodyAtMerge")
722 .IsRequired()
723 .HasColumnType("nvarchar(max)");
724
725 b.Property<string>("Comment")
726 .HasMaxLength(10000)
727 .HasColumnType("nvarchar(max)");
728
729 b.Property<DateTimeOffset>("MergedAt")
730 .HasColumnType("datetimeoffset");
731
732 b.Property<long>("MergedById")
733 .HasColumnType("bigint");
734
735 b.Property<int>("Number")
736 .HasColumnType("int");
737
738 b.Property<long?>("PrimaryRevisionInformationId")
739 .IsRequired()
740 .HasColumnType("bigint");
741
742 b.Property<string>("TargetCommitSha")
743 .IsRequired()
744 .HasMaxLength(40)
745 .HasColumnType("nvarchar(40)");
746
747 b.Property<string>("TitleAtMerge")
748 .IsRequired()
749 .HasColumnType("nvarchar(max)");
750
751 b.Property<string>("Url")
752 .IsRequired()
753 .HasColumnType("nvarchar(max)");
754
755 b.HasKey("Id");
756
757 b.HasIndex("MergedById");
758
759 b.HasIndex("PrimaryRevisionInformationId")
760 .IsUnique();
761
762 b.ToTable("TestMerges");
763 });
764
765 modelBuilder.Entity("Tgstation.Server.Host.Models.User", b =>
766 {
767 b.Property<long?>("Id")
768 .ValueGeneratedOnAdd()
769 .HasColumnType("bigint");
770
771 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long?>("Id"));
772
773 b.Property<string>("CanonicalName")
774 .IsRequired()
775 .HasMaxLength(100)
776 .HasColumnType("nvarchar(100)");
777
778 b.Property<DateTimeOffset?>("CreatedAt")
779 .IsRequired()
780 .HasColumnType("datetimeoffset");
781
782 b.Property<long?>("CreatedById")
783 .HasColumnType("bigint");
784
785 b.Property<bool?>("Enabled")
786 .IsRequired()
787 .HasColumnType("bit");
788
789 b.Property<long?>("GroupId")
790 .HasColumnType("bigint");
791
792 b.Property<DateTimeOffset?>("LastPasswordUpdate")
793 .HasColumnType("datetimeoffset");
794
795 b.Property<string>("Name")
796 .IsRequired()
797 .HasMaxLength(100)
798 .HasColumnType("nvarchar(100)");
799
800 b.Property<string>("PasswordHash")
801 .HasColumnType("nvarchar(max)");
802
803 b.Property<string>("SystemIdentifier")
804 .HasMaxLength(100)
805 .HasColumnType("nvarchar(100)");
806
807 b.HasKey("Id");
808
809 b.HasIndex("CanonicalName")
810 .IsUnique();
811
812 b.HasIndex("CreatedById");
813
814 b.HasIndex("GroupId");
815
816 b.HasIndex("SystemIdentifier")
817 .IsUnique()
818 .HasFilter("[SystemIdentifier] IS NOT NULL");
819
820 b.ToTable("Users");
821 });
822
823 modelBuilder.Entity("Tgstation.Server.Host.Models.UserGroup", b =>
824 {
825 b.Property<long?>("Id")
826 .ValueGeneratedOnAdd()
827 .HasColumnType("bigint");
828
829 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long?>("Id"));
830
831 b.Property<string>("Name")
832 .IsRequired()
833 .HasMaxLength(100)
834 .HasColumnType("nvarchar(100)");
835
836 b.HasKey("Id");
837
838 b.HasIndex("Name")
839 .IsUnique();
840
841 b.ToTable("Groups");
842 });
843
844 modelBuilder.Entity("Tgstation.Server.Host.Models.ChatBot", b =>
845 {
846 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
847 .WithMany("ChatSettings")
848 .HasForeignKey("InstanceId")
849 .OnDelete(DeleteBehavior.Cascade)
850 .IsRequired();
851
852 b.Navigation("Instance");
853 });
854
855 modelBuilder.Entity("Tgstation.Server.Host.Models.ChatChannel", b =>
856 {
857 b.HasOne("Tgstation.Server.Host.Models.ChatBot", "ChatSettings")
858 .WithMany("Channels")
859 .HasForeignKey("ChatSettingsId")
860 .OnDelete(DeleteBehavior.Cascade)
861 .IsRequired();
862
863 b.Navigation("ChatSettings");
864 });
865
866 modelBuilder.Entity("Tgstation.Server.Host.Models.CompileJob", b =>
867 {
868 b.HasOne("Tgstation.Server.Host.Models.Job", "Job")
869 .WithOne()
870 .HasForeignKey("Tgstation.Server.Host.Models.CompileJob", "JobId")
871 .OnDelete(DeleteBehavior.Cascade)
872 .IsRequired();
873
874 b.HasOne("Tgstation.Server.Host.Models.RevisionInformation", "RevisionInformation")
875 .WithMany("CompileJobs")
876 .HasForeignKey("RevisionInformationId")
877 .OnDelete(DeleteBehavior.ClientNoAction)
878 .IsRequired();
879
880 b.Navigation("Job");
881
882 b.Navigation("RevisionInformation");
883 });
884
885 modelBuilder.Entity("Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
886 {
887 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
888 .WithOne("DreamDaemonSettings")
889 .HasForeignKey("Tgstation.Server.Host.Models.DreamDaemonSettings", "InstanceId")
890 .OnDelete(DeleteBehavior.Cascade)
891 .IsRequired();
892
893 b.Navigation("Instance");
894 });
895
896 modelBuilder.Entity("Tgstation.Server.Host.Models.DreamMakerSettings", b =>
897 {
898 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
899 .WithOne("DreamMakerSettings")
900 .HasForeignKey("Tgstation.Server.Host.Models.DreamMakerSettings", "InstanceId")
901 .OnDelete(DeleteBehavior.Cascade)
902 .IsRequired();
903
904 b.Navigation("Instance");
905 });
906
907 modelBuilder.Entity("Tgstation.Server.Host.Models.InstancePermissionSet", b =>
908 {
909 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
910 .WithMany("InstancePermissionSets")
911 .HasForeignKey("InstanceId")
912 .OnDelete(DeleteBehavior.Cascade)
913 .IsRequired();
914
915 b.HasOne("Tgstation.Server.Host.Models.PermissionSet", "PermissionSet")
916 .WithMany("InstancePermissionSets")
917 .HasForeignKey("PermissionSetId")
918 .OnDelete(DeleteBehavior.Cascade)
919 .IsRequired();
920
921 b.Navigation("Instance");
922
923 b.Navigation("PermissionSet");
924 });
925
926 modelBuilder.Entity("Tgstation.Server.Host.Models.Job", b =>
927 {
928 b.HasOne("Tgstation.Server.Host.Models.User", "CancelledBy")
929 .WithMany()
930 .HasForeignKey("CancelledById");
931
932 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
933 .WithMany("Jobs")
934 .HasForeignKey("InstanceId")
935 .OnDelete(DeleteBehavior.Cascade)
936 .IsRequired();
937
938 b.HasOne("Tgstation.Server.Host.Models.User", "StartedBy")
939 .WithMany()
940 .HasForeignKey("StartedById")
941 .OnDelete(DeleteBehavior.Cascade)
942 .IsRequired();
943
944 b.Navigation("CancelledBy");
945
946 b.Navigation("Instance");
947
948 b.Navigation("StartedBy");
949 });
950
951 modelBuilder.Entity("Tgstation.Server.Host.Models.OAuthConnection", b =>
952 {
953 b.HasOne("Tgstation.Server.Host.Models.User", "User")
954 .WithMany("OAuthConnections")
955 .HasForeignKey("UserId")
956 .OnDelete(DeleteBehavior.Cascade)
957 .IsRequired();
958
959 b.Navigation("User");
960 });
961
962 modelBuilder.Entity("Tgstation.Server.Host.Models.OidcConnection", b =>
963 {
964 b.HasOne("Tgstation.Server.Host.Models.User", "User")
965 .WithMany("OidcConnections")
966 .HasForeignKey("UserId")
967 .OnDelete(DeleteBehavior.Cascade)
968 .IsRequired();
969
970 b.Navigation("User");
971 });
972
973 modelBuilder.Entity("Tgstation.Server.Host.Models.PermissionSet", b =>
974 {
975 b.HasOne("Tgstation.Server.Host.Models.UserGroup", "Group")
976 .WithOne("PermissionSet")
977 .HasForeignKey("Tgstation.Server.Host.Models.PermissionSet", "GroupId")
978 .OnDelete(DeleteBehavior.Cascade);
979
980 b.HasOne("Tgstation.Server.Host.Models.User", "User")
981 .WithOne("PermissionSet")
982 .HasForeignKey("Tgstation.Server.Host.Models.PermissionSet", "UserId")
983 .OnDelete(DeleteBehavior.Cascade);
984
985 b.Navigation("Group");
986
987 b.Navigation("User");
988 });
989
990 modelBuilder.Entity("Tgstation.Server.Host.Models.ReattachInformation", b =>
991 {
992 b.HasOne("Tgstation.Server.Host.Models.CompileJob", "CompileJob")
993 .WithMany()
994 .HasForeignKey("CompileJobId")
995 .OnDelete(DeleteBehavior.Cascade)
996 .IsRequired();
997
998 b.HasOne("Tgstation.Server.Host.Models.CompileJob", "InitialCompileJob")
999 .WithMany()
1000 .HasForeignKey("InitialCompileJobId");
1001
1002 b.Navigation("CompileJob");
1003
1004 b.Navigation("InitialCompileJob");
1005 });
1006
1007 modelBuilder.Entity("Tgstation.Server.Host.Models.RepositorySettings", b =>
1008 {
1009 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
1010 .WithOne("RepositorySettings")
1011 .HasForeignKey("Tgstation.Server.Host.Models.RepositorySettings", "InstanceId")
1012 .OnDelete(DeleteBehavior.Cascade)
1013 .IsRequired();
1014
1015 b.Navigation("Instance");
1016 });
1017
1018 modelBuilder.Entity("Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
1019 {
1020 b.HasOne("Tgstation.Server.Host.Models.RevisionInformation", "RevisionInformation")
1021 .WithMany("ActiveTestMerges")
1022 .HasForeignKey("RevisionInformationId")
1023 .OnDelete(DeleteBehavior.Cascade)
1024 .IsRequired();
1025
1026 b.HasOne("Tgstation.Server.Host.Models.TestMerge", "TestMerge")
1027 .WithMany("RevisonInformations")
1028 .HasForeignKey("TestMergeId")
1029 .OnDelete(DeleteBehavior.ClientNoAction)
1030 .IsRequired();
1031
1032 b.Navigation("RevisionInformation");
1033
1034 b.Navigation("TestMerge");
1035 });
1036
1037 modelBuilder.Entity("Tgstation.Server.Host.Models.RevisionInformation", b =>
1038 {
1039 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
1040 .WithMany("RevisionInformations")
1041 .HasForeignKey("InstanceId")
1042 .OnDelete(DeleteBehavior.Cascade)
1043 .IsRequired();
1044
1045 b.Navigation("Instance");
1046 });
1047
1048 modelBuilder.Entity("Tgstation.Server.Host.Models.TestMerge", b =>
1049 {
1050 b.HasOne("Tgstation.Server.Host.Models.User", "MergedBy")
1051 .WithMany("TestMerges")
1052 .HasForeignKey("MergedById")
1053 .OnDelete(DeleteBehavior.Restrict)
1054 .IsRequired();
1055
1056 b.HasOne("Tgstation.Server.Host.Models.RevisionInformation", "PrimaryRevisionInformation")
1057 .WithOne("PrimaryTestMerge")
1058 .HasForeignKey("Tgstation.Server.Host.Models.TestMerge", "PrimaryRevisionInformationId")
1059 .OnDelete(DeleteBehavior.Cascade)
1060 .IsRequired();
1061
1062 b.Navigation("MergedBy");
1063
1064 b.Navigation("PrimaryRevisionInformation");
1065 });
1066
1067 modelBuilder.Entity("Tgstation.Server.Host.Models.User", b =>
1068 {
1069 b.HasOne("Tgstation.Server.Host.Models.User", "CreatedBy")
1070 .WithMany("CreatedUsers")
1071 .HasForeignKey("CreatedById");
1072
1073 b.HasOne("Tgstation.Server.Host.Models.UserGroup", "Group")
1074 .WithMany("Users")
1075 .HasForeignKey("GroupId");
1076
1077 b.Navigation("CreatedBy");
1078
1079 b.Navigation("Group");
1080 });
1081
1082 modelBuilder.Entity("Tgstation.Server.Host.Models.ChatBot", b =>
1083 {
1084 b.Navigation("Channels");
1085 });
1086
1087 modelBuilder.Entity("Tgstation.Server.Host.Models.Instance", b =>
1088 {
1089 b.Navigation("ChatSettings");
1090
1091 b.Navigation("DreamDaemonSettings");
1092
1093 b.Navigation("DreamMakerSettings");
1094
1095 b.Navigation("InstancePermissionSets");
1096
1097 b.Navigation("Jobs");
1098
1099 b.Navigation("RepositorySettings");
1100
1101 b.Navigation("RevisionInformations");
1102 });
1103
1104 modelBuilder.Entity("Tgstation.Server.Host.Models.PermissionSet", b =>
1105 {
1106 b.Navigation("InstancePermissionSets");
1107 });
1108
1109 modelBuilder.Entity("Tgstation.Server.Host.Models.RevisionInformation", b =>
1110 {
1111 b.Navigation("ActiveTestMerges");
1112
1113 b.Navigation("CompileJobs");
1114
1115 b.Navigation("PrimaryTestMerge");
1116 });
1117
1118 modelBuilder.Entity("Tgstation.Server.Host.Models.TestMerge", b =>
1119 {
1120 b.Navigation("RevisonInformations");
1121 });
1122
1123 modelBuilder.Entity("Tgstation.Server.Host.Models.User", b =>
1124 {
1125 b.Navigation("CreatedUsers");
1126
1127 b.Navigation("OAuthConnections");
1128
1129 b.Navigation("OidcConnections");
1130
1131 b.Navigation("PermissionSet");
1132
1133 b.Navigation("TestMerges");
1134 });
1135
1136 modelBuilder.Entity("Tgstation.Server.Host.Models.UserGroup", b =>
1137 {
1138 b.Navigation("PermissionSet")
1139 .IsRequired();
1140
1141 b.Navigation("Users");
1142 });
1143#pragma warning restore 612, 618
1144 }
1145 }
1146}