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