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