17#pragma warning disable 612, 618
19 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn)
20 .HasAnnotation(
"ProductVersion",
"3.1.7")
21 .HasAnnotation(
"Relational:MaxIdentifierLength", 63);
23 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
25 b.Property<
long>(
"Id")
26 .ValueGeneratedOnAdd()
27 .HasColumnType(
"bigint")
28 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
30 b.Property<
int>(
"ChannelLimit")
31 .HasColumnType(
"integer");
33 b.Property<
string>(
"ConnectionString")
35 .HasColumnType(
"character varying(10000)")
38 b.Property<
bool?>(
"Enabled")
39 .HasColumnType(
"boolean");
41 b.Property<
long>(
"InstanceId")
42 .HasColumnType(
"bigint");
44 b.Property<
string>(
"Name")
46 .HasColumnType(
"character varying(100)")
49 b.Property<
int>(
"Provider")
50 .HasColumnType(
"integer");
52 b.Property<
long>(
"ReconnectionInterval")
53 .HasColumnType(
"bigint");
57 b.HasIndex(
"InstanceId",
"Name")
60 b.ToTable(
"ChatBots");
63 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
65 b.Property<
long>(
"Id")
66 .ValueGeneratedOnAdd()
67 .HasColumnType(
"bigint")
68 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
70 b.Property<
long>(
"ChatSettingsId")
71 .HasColumnType(
"bigint");
73 b.Property<decimal?>(
"DiscordChannelId")
74 .HasColumnType(
"numeric(20,0)");
76 b.Property<
string>(
"IrcChannel")
77 .HasColumnType(
"character varying(100)")
80 b.Property<
bool?>(
"IsAdminChannel")
82 .HasColumnType(
"boolean");
84 b.Property<
bool?>(
"IsUpdatesChannel")
86 .HasColumnType(
"boolean");
88 b.Property<
bool?>(
"IsWatchdogChannel")
90 .HasColumnType(
"boolean");
92 b.Property<
string>(
"Tag")
93 .HasColumnType(
"character varying(10000)")
98 b.HasIndex(
"ChatSettingsId",
"DiscordChannelId")
101 b.HasIndex(
"ChatSettingsId",
"IrcChannel")
104 b.ToTable(
"ChatChannels");
107 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
109 b.Property<
long>(
"Id")
110 .ValueGeneratedOnAdd()
111 .HasColumnType(
"bigint")
112 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
114 b.Property<
string>(
"ByondVersion")
116 .HasColumnType(
"text");
118 b.Property<
int?>(
"DMApiMajorVersion")
119 .HasColumnType(
"integer");
121 b.Property<
int?>(
"DMApiMinorVersion")
122 .HasColumnType(
"integer");
124 b.Property<
int?>(
"DMApiPatchVersion")
125 .HasColumnType(
"integer");
127 b.Property<Guid?>(
"DirectoryName")
129 .HasColumnType(
"uuid");
131 b.Property<
string>(
"DmeName")
133 .HasColumnType(
"text");
135 b.Property<
int?>(
"GitHubDeploymentId")
136 .HasColumnType(
"integer");
138 b.Property<
long?>(
"GitHubRepoId")
139 .HasColumnType(
"bigint");
141 b.Property<
long>(
"JobId")
142 .HasColumnType(
"bigint");
144 b.Property<
int?>(
"MinimumSecurityLevel")
145 .HasColumnType(
"integer");
147 b.Property<
string>(
"Output")
149 .HasColumnType(
"text");
151 b.Property<
long>(
"RevisionInformationId")
152 .HasColumnType(
"bigint");
156 b.HasIndex(
"DirectoryName");
161 b.HasIndex(
"RevisionInformationId");
163 b.ToTable(
"CompileJobs");
166 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
168 b.Property<
long>(
"Id")
169 .ValueGeneratedOnAdd()
170 .HasColumnType(
"bigint")
171 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
173 b.Property<
string>(
"AdditionalParameters")
175 .HasColumnType(
"character varying(10000)")
176 .HasMaxLength(10000);
178 b.Property<
bool?>(
"AllowWebClient")
180 .HasColumnType(
"boolean");
182 b.Property<
bool?>(
"AutoStart")
184 .HasColumnType(
"boolean");
186 b.Property<
long>(
"HeartbeatSeconds")
187 .HasColumnType(
"bigint");
189 b.Property<
long>(
"InstanceId")
190 .HasColumnType(
"bigint");
192 b.Property<
int>(
"Port")
193 .HasColumnType(
"integer");
195 b.Property<
int>(
"SecurityLevel")
196 .HasColumnType(
"integer");
198 b.Property<
long>(
"StartupTimeout")
199 .HasColumnType(
"bigint");
201 b.Property<
long>(
"TopicRequestTimeout")
202 .HasColumnType(
"bigint");
206 b.HasIndex(
"InstanceId")
209 b.ToTable(
"DreamDaemonSettings");
212 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
214 b.Property<
long>(
"Id")
215 .ValueGeneratedOnAdd()
216 .HasColumnType(
"bigint")
217 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
219 b.Property<
int>(
"ApiValidationPort")
220 .HasColumnType(
"integer");
222 b.Property<
int>(
"ApiValidationSecurityLevel")
223 .HasColumnType(
"integer");
225 b.Property<
long>(
"InstanceId")
226 .HasColumnType(
"bigint");
228 b.Property<
string>(
"ProjectName")
229 .HasColumnType(
"character varying(10000)")
230 .HasMaxLength(10000);
232 b.Property<
bool?>(
"RequireDMApiValidation")
234 .HasColumnType(
"boolean");
238 b.HasIndex(
"InstanceId")
241 b.ToTable(
"DreamMakerSettings");
244 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
246 b.Property<
long>(
"Id")
247 .ValueGeneratedOnAdd()
248 .HasColumnType(
"bigint")
249 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
251 b.Property<
long>(
"AutoUpdateInterval")
252 .HasColumnType(
"bigint");
254 b.Property<
int>(
"ChatBotLimit")
255 .HasColumnType(
"integer");
257 b.Property<
int>(
"ConfigurationType")
258 .HasColumnType(
"integer");
260 b.Property<
string>(
"Name")
262 .HasColumnType(
"character varying(10000)")
263 .HasMaxLength(10000);
265 b.Property<
bool?>(
"Online")
267 .HasColumnType(
"boolean");
269 b.Property<
string>(
"Path")
271 .HasColumnType(
"text");
278 b.ToTable(
"Instances");
281 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
283 b.Property<
long>(
"Id")
284 .ValueGeneratedOnAdd()
285 .HasColumnType(
"bigint")
286 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
288 b.Property<decimal>(
"ByondRights")
289 .HasColumnType(
"numeric(20,0)");
291 b.Property<decimal>(
"ChatBotRights")
292 .HasColumnType(
"numeric(20,0)");
294 b.Property<decimal>(
"ConfigurationRights")
295 .HasColumnType(
"numeric(20,0)");
297 b.Property<decimal>(
"DreamDaemonRights")
298 .HasColumnType(
"numeric(20,0)");
300 b.Property<decimal>(
"DreamMakerRights")
301 .HasColumnType(
"numeric(20,0)");
303 b.Property<
long>(
"InstanceId")
304 .HasColumnType(
"bigint");
306 b.Property<decimal>(
"InstanceUserRights")
307 .HasColumnType(
"numeric(20,0)");
309 b.Property<decimal>(
"RepositoryRights")
310 .HasColumnType(
"numeric(20,0)");
312 b.Property<
long>(
"UserId")
313 .HasColumnType(
"bigint");
317 b.HasIndex(
"InstanceId");
319 b.HasIndex(
"UserId",
"InstanceId")
322 b.ToTable(
"InstanceUsers");
325 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
327 b.Property<
long>(
"Id")
328 .ValueGeneratedOnAdd()
329 .HasColumnType(
"bigint")
330 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
332 b.Property<decimal?>(
"CancelRight")
333 .HasColumnType(
"numeric(20,0)");
335 b.Property<decimal?>(
"CancelRightsType")
336 .HasColumnType(
"numeric(20,0)");
338 b.Property<
bool?>(
"Cancelled")
340 .HasColumnType(
"boolean");
342 b.Property<
long?>(
"CancelledById")
343 .HasColumnType(
"bigint");
345 b.Property<
string>(
"Description")
347 .HasColumnType(
"text");
349 b.Property<
long?>(
"ErrorCode")
350 .HasColumnType(
"bigint");
352 b.Property<
string>(
"ExceptionDetails")
353 .HasColumnType(
"text");
355 b.Property<
long>(
"InstanceId")
356 .HasColumnType(
"bigint");
358 b.Property<DateTimeOffset?>(
"StartedAt")
360 .HasColumnType(
"timestamp with time zone");
362 b.Property<
long>(
"StartedById")
363 .HasColumnType(
"bigint");
365 b.Property<DateTimeOffset?>(
"StoppedAt")
366 .HasColumnType(
"timestamp with time zone");
370 b.HasIndex(
"CancelledById");
372 b.HasIndex(
"InstanceId");
374 b.HasIndex(
"StartedById");
379 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
381 b.Property<
long>(
"Id")
382 .ValueGeneratedOnAdd()
383 .HasColumnType(
"bigint")
384 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
386 b.Property<
string>(
"AccessIdentifier")
388 .HasColumnType(
"text");
390 b.Property<
long>(
"CompileJobId")
391 .HasColumnType(
"bigint");
393 b.Property<
int>(
"LaunchSecurityLevel")
394 .HasColumnType(
"integer");
396 b.Property<
int>(
"Port")
397 .HasColumnType(
"integer");
399 b.Property<
int>(
"ProcessId")
400 .HasColumnType(
"integer");
402 b.Property<
int>(
"RebootState")
403 .HasColumnType(
"integer");
407 b.HasIndex(
"CompileJobId");
409 b.ToTable(
"ReattachInformations");
412 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
414 b.Property<
long>(
"Id")
415 .ValueGeneratedOnAdd()
416 .HasColumnType(
"bigint")
417 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
419 b.Property<
string>(
"AccessToken")
420 .HasColumnType(
"character varying(10000)")
421 .HasMaxLength(10000);
423 b.Property<
string>(
"AccessUser")
424 .HasColumnType(
"character varying(10000)")
425 .HasMaxLength(10000);
427 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
429 .HasColumnType(
"boolean");
431 b.Property<
bool?>(
"AutoUpdatesSynchronize")
433 .HasColumnType(
"boolean");
435 b.Property<
string>(
"CommitterEmail")
437 .HasColumnType(
"character varying(10000)")
438 .HasMaxLength(10000);
440 b.Property<
string>(
"CommitterName")
442 .HasColumnType(
"character varying(10000)")
443 .HasMaxLength(10000);
445 b.Property<
bool?>(
"CreateGitHubDeployments")
447 .HasColumnType(
"boolean");
449 b.Property<
long>(
"InstanceId")
450 .HasColumnType(
"bigint");
452 b.Property<
bool?>(
"PostTestMergeComment")
454 .HasColumnType(
"boolean");
456 b.Property<
bool?>(
"PushTestMergeCommits")
458 .HasColumnType(
"boolean");
460 b.Property<
bool?>(
"ShowTestMergeCommitters")
462 .HasColumnType(
"boolean");
466 b.HasIndex(
"InstanceId")
469 b.ToTable(
"RepositorySettings");
472 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
474 b.Property<
long>(
"Id")
475 .ValueGeneratedOnAdd()
476 .HasColumnType(
"bigint")
477 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
479 b.Property<
long>(
"RevisionInformationId")
480 .HasColumnType(
"bigint");
482 b.Property<
long>(
"TestMergeId")
483 .HasColumnType(
"bigint");
487 b.HasIndex(
"RevisionInformationId");
489 b.HasIndex(
"TestMergeId");
491 b.ToTable(
"RevInfoTestMerges");
494 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
496 b.Property<
long>(
"Id")
497 .ValueGeneratedOnAdd()
498 .HasColumnType(
"bigint")
499 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
501 b.Property<
string>(
"CommitSha")
503 .HasColumnType(
"character varying(40)")
506 b.Property<
long>(
"InstanceId")
507 .HasColumnType(
"bigint");
509 b.Property<
string>(
"OriginCommitSha")
511 .HasColumnType(
"character varying(40)")
516 b.HasIndex(
"InstanceId",
"CommitSha")
519 b.ToTable(
"RevisionInformations");
522 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
524 b.Property<
long>(
"Id")
525 .ValueGeneratedOnAdd()
526 .HasColumnType(
"bigint")
527 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
529 b.Property<
string>(
"Author")
531 .HasColumnType(
"text");
533 b.Property<
string>(
"BodyAtMerge")
535 .HasColumnType(
"text");
537 b.Property<
string>(
"Comment")
538 .HasColumnType(
"character varying(10000)")
539 .HasMaxLength(10000);
541 b.Property<DateTimeOffset>(
"MergedAt")
542 .HasColumnType(
"timestamp with time zone");
544 b.Property<
long>(
"MergedById")
545 .HasColumnType(
"bigint");
547 b.Property<
int>(
"Number")
548 .HasColumnType(
"integer");
550 b.Property<
long?>(
"PrimaryRevisionInformationId")
552 .HasColumnType(
"bigint");
554 b.Property<
string>(
"PullRequestRevision")
556 .HasColumnType(
"character varying(40)")
559 b.Property<
string>(
"TitleAtMerge")
561 .HasColumnType(
"text");
563 b.Property<
string>(
"Url")
565 .HasColumnType(
"text");
569 b.HasIndex(
"MergedById");
571 b.HasIndex(
"PrimaryRevisionInformationId")
574 b.ToTable(
"TestMerges");
577 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
579 b.Property<
long?>(
"Id")
580 .ValueGeneratedOnAdd()
581 .HasColumnType(
"bigint")
582 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
584 b.Property<decimal>(
"AdministrationRights")
585 .HasColumnType(
"numeric(20,0)");
587 b.Property<
string>(
"CanonicalName")
589 .HasColumnType(
"text");
591 b.Property<DateTimeOffset?>(
"CreatedAt")
593 .HasColumnType(
"timestamp with time zone");
595 b.Property<
long?>(
"CreatedById")
596 .HasColumnType(
"bigint");
598 b.Property<
bool?>(
"Enabled")
600 .HasColumnType(
"boolean");
602 b.Property<decimal>(
"InstanceManagerRights")
603 .HasColumnType(
"numeric(20,0)");
605 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
606 .HasColumnType(
"timestamp with time zone");
608 b.Property<
string>(
"Name")
610 .HasColumnType(
"character varying(10000)")
611 .HasMaxLength(10000);
613 b.Property<
string>(
"PasswordHash")
614 .HasColumnType(
"text");
616 b.Property<
string>(
"SystemIdentifier")
617 .HasColumnType(
"text");
621 b.HasIndex(
"CanonicalName")
624 b.HasIndex(
"CreatedById");
626 b.HasIndex(
"SystemIdentifier")
632 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
634 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
635 .WithMany(
"ChatSettings")
636 .HasForeignKey(
"InstanceId")
637 .OnDelete(DeleteBehavior.Cascade)
641 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
643 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
644 .WithMany(
"Channels")
645 .HasForeignKey(
"ChatSettingsId")
646 .OnDelete(DeleteBehavior.Cascade)
650 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
652 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
654 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
655 .OnDelete(DeleteBehavior.Cascade)
658 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
659 .WithMany(
"CompileJobs")
660 .HasForeignKey(
"RevisionInformationId")
661 .OnDelete(DeleteBehavior.Cascade)
665 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
667 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
668 .WithOne(
"DreamDaemonSettings")
669 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
670 .OnDelete(DeleteBehavior.Cascade)
674 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
676 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
677 .WithOne(
"DreamMakerSettings")
678 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
679 .OnDelete(DeleteBehavior.Cascade)
683 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
685 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
686 .WithMany(
"InstanceUsers")
687 .HasForeignKey(
"InstanceId")
688 .OnDelete(DeleteBehavior.Cascade)
691 b.HasOne(
"Tgstation.Server.Host.Models.User",
null)
692 .WithMany(
"InstanceUsers")
693 .HasForeignKey(
"UserId")
694 .OnDelete(DeleteBehavior.Cascade)
698 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
700 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
702 .HasForeignKey(
"CancelledById");
704 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
706 .HasForeignKey(
"InstanceId")
707 .OnDelete(DeleteBehavior.Cascade)
710 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
712 .HasForeignKey(
"StartedById")
713 .OnDelete(DeleteBehavior.Cascade)
717 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
719 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
721 .HasForeignKey(
"CompileJobId")
722 .OnDelete(DeleteBehavior.Cascade)
726 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
728 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
729 .WithOne(
"RepositorySettings")
730 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
731 .OnDelete(DeleteBehavior.Cascade)
735 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
737 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
738 .WithMany(
"ActiveTestMerges")
739 .HasForeignKey(
"RevisionInformationId")
740 .OnDelete(DeleteBehavior.Cascade)
743 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
744 .WithMany(
"RevisonInformations")
745 .HasForeignKey(
"TestMergeId")
746 .OnDelete(DeleteBehavior.ClientNoAction)
750 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
752 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
753 .WithMany(
"RevisionInformations")
754 .HasForeignKey(
"InstanceId")
755 .OnDelete(DeleteBehavior.Cascade)
759 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
761 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
762 .WithMany(
"TestMerges")
763 .HasForeignKey(
"MergedById")
764 .OnDelete(DeleteBehavior.Restrict)
767 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
768 .WithOne(
"PrimaryTestMerge")
769 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
770 .OnDelete(DeleteBehavior.Cascade)
774 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
776 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
777 .WithMany(
"CreatedUsers")
778 .HasForeignKey(
"CreatedById");
780#pragma warning restore 612, 618