tgstation-server 6.12.3
The /tg/station 13 server suite
Loading...
Searching...
No Matches
20200420181015_MYLimitsOnChat.Designer.cs
Go to the documentation of this file.
1// <auto-generated />
2using System;
3using Microsoft.EntityFrameworkCore;
4using Microsoft.EntityFrameworkCore.Infrastructure;
5using Microsoft.EntityFrameworkCore.Migrations;
6
8{
9 [DbContext(typeof(MySqlDatabaseContext))]
10 [Migration("20200420181015_MYLimitsOnChat")]
11 partial class MYLimitsOnChat
12 {
14 protected override void BuildTargetModel(ModelBuilder modelBuilder)
15 {
16#pragma warning disable 612, 618
17 modelBuilder
18 .HasAnnotation("ProductVersion", "2.2.6-servicing-10079")
19 .HasAnnotation("Relational:MaxIdentifierLength", 64);
20
21 modelBuilder.Entity("Tgstation.Server.Host.Models.ChatBot", b =>
22 {
23 b.Property<long>("Id")
24 .ValueGeneratedOnAdd();
25
26 b.Property<ushort?>("ChannelLimit")
27 .IsRequired();
28
29 b.Property<string>("ConnectionString")
30 .IsRequired()
31 .HasMaxLength(10000);
32
33 b.Property<bool?>("Enabled");
34
35 b.Property<long>("InstanceId");
36
37 b.Property<string>("Name")
38 .IsRequired()
39 .HasMaxLength(100);
40
41 b.Property<int>("Provider");
42
43 b.Property<uint?>("ReconnectionInterval")
44 .IsRequired();
45
46 b.HasKey("Id");
47
48 b.HasIndex("InstanceId", "Name")
49 .IsUnique();
50
51 b.ToTable("ChatBots");
52 });
53
54 modelBuilder.Entity("Tgstation.Server.Host.Models.ChatChannel", b =>
55 {
56 b.Property<long>("Id")
57 .ValueGeneratedOnAdd();
58
59 b.Property<long>("ChatSettingsId");
60
61 b.Property<ulong?>("DiscordChannelId");
62
63 b.Property<string>("IrcChannel")
64 .HasMaxLength(100);
65
66 b.Property<bool?>("IsAdminChannel")
67 .IsRequired();
68
69 b.Property<bool?>("IsUpdatesChannel")
70 .IsRequired();
71
72 b.Property<bool?>("IsWatchdogChannel")
73 .IsRequired();
74
75 b.Property<string>("Tag")
76 .HasMaxLength(10000);
77
78 b.HasKey("Id");
79
80 b.HasIndex("ChatSettingsId", "DiscordChannelId")
81 .IsUnique();
82
83 b.HasIndex("ChatSettingsId", "IrcChannel")
84 .IsUnique();
85
86 b.ToTable("ChatChannels");
87 });
88
89 modelBuilder.Entity("Tgstation.Server.Host.Models.CompileJob", b =>
90 {
91 b.Property<long>("Id")
92 .ValueGeneratedOnAdd();
93
94 b.Property<string>("ByondVersion")
95 .IsRequired();
96
97 b.Property<Guid?>("DirectoryName")
98 .IsRequired();
99
100 b.Property<string>("DmeName")
101 .IsRequired();
102
103 b.Property<long>("JobId");
104
105 b.Property<int>("MinimumSecurityLevel");
106
107 b.Property<string>("Output")
108 .IsRequired();
109
110 b.Property<long>("RevisionInformationId");
111
112 b.HasKey("Id");
113
114 b.HasIndex("DirectoryName");
115
116 b.HasIndex("JobId")
117 .IsUnique();
118
119 b.HasIndex("RevisionInformationId");
120
121 b.ToTable("CompileJobs");
122 });
123
124 modelBuilder.Entity("Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
125 {
126 b.Property<long>("Id")
127 .ValueGeneratedOnAdd();
128
129 b.Property<string>("AccessToken");
130
131 b.Property<bool?>("AllowWebClient")
132 .IsRequired();
133
134 b.Property<bool?>("AutoStart")
135 .IsRequired();
136
137 b.Property<long>("InstanceId");
138
139 b.Property<ushort?>("PrimaryPort")
140 .IsRequired();
141
142 b.Property<int?>("ProcessId");
143
144 b.Property<ushort?>("SecondaryPort")
145 .IsRequired();
146
147 b.Property<int>("SecurityLevel");
148
149 b.Property<bool?>("SoftRestart")
150 .IsRequired();
151
152 b.Property<bool?>("SoftShutdown")
153 .IsRequired();
154
155 b.Property<uint?>("StartupTimeout")
156 .IsRequired();
157
158 b.HasKey("Id");
159
160 b.HasIndex("InstanceId")
161 .IsUnique();
162
163 b.ToTable("DreamDaemonSettings");
164 });
165
166 modelBuilder.Entity("Tgstation.Server.Host.Models.DreamMakerSettings", b =>
167 {
168 b.Property<long>("Id")
169 .ValueGeneratedOnAdd();
170
171 b.Property<ushort?>("ApiValidationPort")
172 .IsRequired();
173
174 b.Property<int>("ApiValidationSecurityLevel");
175
176 b.Property<long>("InstanceId");
177
178 b.Property<string>("ProjectName")
179 .HasMaxLength(10000);
180
181 b.HasKey("Id");
182
183 b.HasIndex("InstanceId")
184 .IsUnique();
185
186 b.ToTable("DreamMakerSettings");
187 });
188
189 modelBuilder.Entity("Tgstation.Server.Host.Models.Instance", b =>
190 {
191 b.Property<long>("Id")
192 .ValueGeneratedOnAdd();
193
194 b.Property<uint?>("AutoUpdateInterval")
195 .IsRequired();
196
197 b.Property<ushort?>("ChatBotLimit")
198 .IsRequired();
199
200 b.Property<int>("ConfigurationType");
201
202 b.Property<string>("Name")
203 .IsRequired()
204 .HasMaxLength(10000);
205
206 b.Property<bool?>("Online")
207 .IsRequired();
208
209 b.Property<string>("Path")
210 .IsRequired();
211
212 b.HasKey("Id");
213
214 b.HasIndex("Path")
215 .IsUnique();
216
217 b.ToTable("Instances");
218 });
219
220 modelBuilder.Entity("Tgstation.Server.Host.Models.InstanceUser", b =>
221 {
222 b.Property<long>("Id")
223 .ValueGeneratedOnAdd();
224
225 b.Property<ulong>("ByondRights");
226
227 b.Property<ulong>("ChatBotRights");
228
229 b.Property<ulong>("ConfigurationRights");
230
231 b.Property<ulong>("DreamDaemonRights");
232
233 b.Property<ulong>("DreamMakerRights");
234
235 b.Property<long>("InstanceId");
236
237 b.Property<ulong>("InstanceUserRights");
238
239 b.Property<ulong>("RepositoryRights");
240
241 b.Property<long?>("UserId")
242 .IsRequired();
243
244 b.HasKey("Id");
245
246 b.HasIndex("InstanceId");
247
248 b.HasIndex("UserId", "InstanceId")
249 .IsUnique();
250
251 b.ToTable("InstanceUsers");
252 });
253
254 modelBuilder.Entity("Tgstation.Server.Host.Models.Job", b =>
255 {
256 b.Property<long>("Id")
257 .ValueGeneratedOnAdd();
258
259 b.Property<ulong?>("CancelRight");
260
261 b.Property<ulong?>("CancelRightsType");
262
263 b.Property<bool?>("Cancelled")
264 .IsRequired();
265
266 b.Property<long?>("CancelledById");
267
268 b.Property<string>("Description")
269 .IsRequired();
270
271 b.Property<string>("ExceptionDetails");
272
273 b.Property<long>("InstanceId");
274
275 b.Property<DateTimeOffset?>("StartedAt")
276 .IsRequired();
277
278 b.Property<long?>("StartedById")
279 .IsRequired();
280
281 b.Property<DateTimeOffset?>("StoppedAt");
282
283 b.HasKey("Id");
284
285 b.HasIndex("CancelledById");
286
287 b.HasIndex("InstanceId");
288
289 b.HasIndex("StartedById");
290
291 b.ToTable("Jobs");
292 });
293
294 modelBuilder.Entity("Tgstation.Server.Host.Models.ReattachInformation", b =>
295 {
296 b.Property<long>("Id")
297 .ValueGeneratedOnAdd();
298
299 b.Property<string>("AccessIdentifier")
300 .IsRequired();
301
302 b.Property<string>("ChatChannelsJson")
303 .IsRequired();
304
305 b.Property<string>("ChatCommandsJson")
306 .IsRequired();
307
308 b.Property<long>("CompileJobId");
309
310 b.Property<bool>("IsPrimary");
311
312 b.Property<ushort>("Port");
313
314 b.Property<int>("ProcessId");
315
316 b.Property<int>("RebootState");
317
318 b.Property<string>("ServerCommandsJson")
319 .IsRequired();
320
321 b.HasKey("Id");
322
323 b.HasIndex("CompileJobId");
324
325 b.ToTable("ReattachInformations");
326 });
327
328 modelBuilder.Entity("Tgstation.Server.Host.Models.RepositorySettings", b =>
329 {
330 b.Property<long>("Id")
331 .ValueGeneratedOnAdd();
332
333 b.Property<string>("AccessToken")
334 .HasMaxLength(10000);
335
336 b.Property<string>("AccessUser")
337 .HasMaxLength(10000);
338
339 b.Property<bool?>("AutoUpdatesKeepTestMerges")
340 .IsRequired();
341
342 b.Property<bool?>("AutoUpdatesSynchronize")
343 .IsRequired();
344
345 b.Property<string>("CommitterEmail")
346 .IsRequired()
347 .HasMaxLength(10000);
348
349 b.Property<string>("CommitterName")
350 .IsRequired()
351 .HasMaxLength(10000);
352
353 b.Property<long>("InstanceId");
354
355 b.Property<bool?>("PostTestMergeComment")
356 .IsRequired();
357
358 b.Property<bool?>("PushTestMergeCommits")
359 .IsRequired();
360
361 b.Property<bool?>("ShowTestMergeCommitters")
362 .IsRequired();
363
364 b.HasKey("Id");
365
366 b.HasIndex("InstanceId")
367 .IsUnique();
368
369 b.ToTable("RepositorySettings");
370 });
371
372 modelBuilder.Entity("Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
373 {
374 b.Property<long>("Id")
375 .ValueGeneratedOnAdd();
376
377 b.Property<long>("RevisionInformationId");
378
379 b.Property<long>("TestMergeId");
380
381 b.HasKey("Id");
382
383 b.HasIndex("RevisionInformationId");
384
385 b.HasIndex("TestMergeId");
386
387 b.ToTable("RevInfoTestMerges");
388 });
389
390 modelBuilder.Entity("Tgstation.Server.Host.Models.RevisionInformation", b =>
391 {
392 b.Property<long>("Id")
393 .ValueGeneratedOnAdd();
394
395 b.Property<string>("CommitSha")
396 .IsRequired()
397 .HasMaxLength(40);
398
399 b.Property<long>("InstanceId");
400
401 b.Property<string>("OriginCommitSha")
402 .IsRequired()
403 .HasMaxLength(40);
404
405 b.HasKey("Id");
406
407 b.HasIndex("InstanceId", "CommitSha")
408 .IsUnique();
409
410 b.ToTable("RevisionInformations");
411 });
412
413 modelBuilder.Entity("Tgstation.Server.Host.Models.TestMerge", b =>
414 {
415 b.Property<long>("Id")
416 .ValueGeneratedOnAdd();
417
418 b.Property<string>("Author")
419 .IsRequired();
420
421 b.Property<string>("BodyAtMerge")
422 .IsRequired();
423
424 b.Property<string>("Comment")
425 .HasMaxLength(10000);
426
427 b.Property<DateTimeOffset>("MergedAt");
428
429 b.Property<long?>("MergedById")
430 .IsRequired();
431
432 b.Property<int>("Number");
433
434 b.Property<long?>("PrimaryRevisionInformationId")
435 .IsRequired();
436
437 b.Property<string>("PullRequestRevision")
438 .IsRequired()
439 .HasMaxLength(40);
440
441 b.Property<string>("TitleAtMerge")
442 .IsRequired();
443
444 b.Property<string>("Url")
445 .IsRequired();
446
447 b.HasKey("Id");
448
449 b.HasIndex("MergedById");
450
451 b.HasIndex("PrimaryRevisionInformationId")
452 .IsUnique();
453
454 b.ToTable("TestMerges");
455 });
456
457 modelBuilder.Entity("Tgstation.Server.Host.Models.User", b =>
458 {
459 b.Property<long?>("Id")
460 .ValueGeneratedOnAdd();
461
462 b.Property<ulong>("AdministrationRights");
463
464 b.Property<string>("CanonicalName")
465 .IsRequired();
466
467 b.Property<DateTimeOffset?>("CreatedAt")
468 .IsRequired();
469
470 b.Property<long?>("CreatedById");
471
472 b.Property<bool?>("Enabled")
473 .IsRequired();
474
475 b.Property<ulong>("InstanceManagerRights");
476
477 b.Property<DateTimeOffset?>("LastPasswordUpdate");
478
479 b.Property<string>("Name")
480 .IsRequired()
481 .HasMaxLength(10000);
482
483 b.Property<string>("PasswordHash");
484
485 b.Property<string>("SystemIdentifier");
486
487 b.HasKey("Id");
488
489 b.HasIndex("CanonicalName")
490 .IsUnique();
491
492 b.HasIndex("CreatedById");
493
494 b.HasIndex("SystemIdentifier")
495 .IsUnique();
496
497 b.ToTable("Users");
498 });
499
500 modelBuilder.Entity("Tgstation.Server.Host.Models.WatchdogReattachInformation", b =>
501 {
502 b.Property<long>("Id")
503 .ValueGeneratedOnAdd();
504
505 b.Property<long?>("AlphaId");
506
507 b.Property<bool>("AlphaIsActive");
508
509 b.Property<long?>("BravoId");
510
511 b.Property<long>("InstanceId");
512
513 b.HasKey("Id");
514
515 b.HasIndex("AlphaId");
516
517 b.HasIndex("BravoId");
518
519 b.HasIndex("InstanceId")
520 .IsUnique();
521
522 b.ToTable("WatchdogReattachInformations");
523 });
524
525 modelBuilder.Entity("Tgstation.Server.Host.Models.ChatBot", b =>
526 {
527 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
528 .WithMany("ChatSettings")
529 .HasForeignKey("InstanceId")
530 .OnDelete(DeleteBehavior.Cascade);
531 });
532
533 modelBuilder.Entity("Tgstation.Server.Host.Models.ChatChannel", b =>
534 {
535 b.HasOne("Tgstation.Server.Host.Models.ChatBot", "ChatSettings")
536 .WithMany("Channels")
537 .HasForeignKey("ChatSettingsId")
538 .OnDelete(DeleteBehavior.Cascade);
539 });
540
541 modelBuilder.Entity("Tgstation.Server.Host.Models.CompileJob", b =>
542 {
543 b.HasOne("Tgstation.Server.Host.Models.Job", "Job")
544 .WithOne()
545 .HasForeignKey("Tgstation.Server.Host.Models.CompileJob", "JobId")
546 .OnDelete(DeleteBehavior.Restrict);
547
548 b.HasOne("Tgstation.Server.Host.Models.RevisionInformation", "RevisionInformation")
549 .WithMany("CompileJobs")
550 .HasForeignKey("RevisionInformationId")
551 .OnDelete(DeleteBehavior.Cascade);
552 });
553
554 modelBuilder.Entity("Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
555 {
556 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
557 .WithOne("DreamDaemonSettings")
558 .HasForeignKey("Tgstation.Server.Host.Models.DreamDaemonSettings", "InstanceId")
559 .OnDelete(DeleteBehavior.Cascade);
560 });
561
562 modelBuilder.Entity("Tgstation.Server.Host.Models.DreamMakerSettings", b =>
563 {
564 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
565 .WithOne("DreamMakerSettings")
566 .HasForeignKey("Tgstation.Server.Host.Models.DreamMakerSettings", "InstanceId")
567 .OnDelete(DeleteBehavior.Cascade);
568 });
569
570 modelBuilder.Entity("Tgstation.Server.Host.Models.InstanceUser", b =>
571 {
572 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
573 .WithMany("InstanceUsers")
574 .HasForeignKey("InstanceId")
575 .OnDelete(DeleteBehavior.Cascade);
576
577 b.HasOne("Tgstation.Server.Host.Models.User")
578 .WithMany("InstanceUsers")
579 .HasForeignKey("UserId")
580 .OnDelete(DeleteBehavior.Cascade);
581 });
582
583 modelBuilder.Entity("Tgstation.Server.Host.Models.Job", b =>
584 {
585 b.HasOne("Tgstation.Server.Host.Models.User", "CancelledBy")
586 .WithMany()
587 .HasForeignKey("CancelledById");
588
589 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
590 .WithMany("Jobs")
591 .HasForeignKey("InstanceId")
592 .OnDelete(DeleteBehavior.Cascade);
593
594 b.HasOne("Tgstation.Server.Host.Models.User", "StartedBy")
595 .WithMany()
596 .HasForeignKey("StartedById")
597 .OnDelete(DeleteBehavior.Cascade);
598 });
599
600 modelBuilder.Entity("Tgstation.Server.Host.Models.ReattachInformation", b =>
601 {
602 b.HasOne("Tgstation.Server.Host.Models.CompileJob", "CompileJob")
603 .WithMany()
604 .HasForeignKey("CompileJobId")
605 .OnDelete(DeleteBehavior.Cascade);
606 });
607
608 modelBuilder.Entity("Tgstation.Server.Host.Models.RepositorySettings", b =>
609 {
610 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
611 .WithOne("RepositorySettings")
612 .HasForeignKey("Tgstation.Server.Host.Models.RepositorySettings", "InstanceId")
613 .OnDelete(DeleteBehavior.Cascade);
614 });
615
616 modelBuilder.Entity("Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
617 {
618 b.HasOne("Tgstation.Server.Host.Models.RevisionInformation", "RevisionInformation")
619 .WithMany("ActiveTestMerges")
620 .HasForeignKey("RevisionInformationId")
621 .OnDelete(DeleteBehavior.Cascade);
622
623 b.HasOne("Tgstation.Server.Host.Models.TestMerge", "TestMerge")
624 .WithMany("RevisonInformations")
625 .HasForeignKey("TestMergeId")
626 .OnDelete(DeleteBehavior.Cascade);
627 });
628
629 modelBuilder.Entity("Tgstation.Server.Host.Models.RevisionInformation", b =>
630 {
631 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
632 .WithMany("RevisionInformations")
633 .HasForeignKey("InstanceId")
634 .OnDelete(DeleteBehavior.Cascade);
635 });
636
637 modelBuilder.Entity("Tgstation.Server.Host.Models.TestMerge", b =>
638 {
639 b.HasOne("Tgstation.Server.Host.Models.User", "MergedBy")
640 .WithMany("TestMerges")
641 .HasForeignKey("MergedById")
642 .OnDelete(DeleteBehavior.Restrict);
643
644 b.HasOne("Tgstation.Server.Host.Models.RevisionInformation", "PrimaryRevisionInformation")
645 .WithOne("PrimaryTestMerge")
646 .HasForeignKey("Tgstation.Server.Host.Models.TestMerge", "PrimaryRevisionInformationId")
647 .OnDelete(DeleteBehavior.Restrict);
648 });
649
650 modelBuilder.Entity("Tgstation.Server.Host.Models.User", b =>
651 {
652 b.HasOne("Tgstation.Server.Host.Models.User", "CreatedBy")
653 .WithMany("CreatedUsers")
654 .HasForeignKey("CreatedById");
655 });
656
657 modelBuilder.Entity("Tgstation.Server.Host.Models.WatchdogReattachInformation", b =>
658 {
659 b.HasOne("Tgstation.Server.Host.Models.ReattachInformation", "Alpha")
660 .WithMany()
661 .HasForeignKey("AlphaId");
662
663 b.HasOne("Tgstation.Server.Host.Models.ReattachInformation", "Bravo")
664 .WithMany()
665 .HasForeignKey("BravoId");
666
667 b.HasOne("Tgstation.Server.Host.Models.Instance")
668 .WithOne("WatchdogReattachInformation")
669 .HasForeignKey("Tgstation.Server.Host.Models.WatchdogReattachInformation", "InstanceId")
670 .OnDelete(DeleteBehavior.Cascade);
671 });
672#pragma warning restore 612, 618
673 }
674 }
675}