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