17#pragma warning disable 612, 618
19 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn)
20 .HasAnnotation(
"ProductVersion",
"3.1.6")
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<
bool?>(
"AllowWebClient")
175 .HasColumnType(
"boolean");
177 b.Property<
bool?>(
"AutoStart")
179 .HasColumnType(
"boolean");
181 b.Property<
long>(
"HeartbeatSeconds")
182 .HasColumnType(
"bigint");
184 b.Property<
long>(
"InstanceId")
185 .HasColumnType(
"bigint");
187 b.Property<
int>(
"Port")
188 .HasColumnType(
"integer");
190 b.Property<
int>(
"SecurityLevel")
191 .HasColumnType(
"integer");
193 b.Property<
long>(
"StartupTimeout")
194 .HasColumnType(
"bigint");
196 b.Property<
long>(
"TopicRequestTimeout")
197 .HasColumnType(
"bigint");
201 b.HasIndex(
"InstanceId")
204 b.ToTable(
"DreamDaemonSettings");
207 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
209 b.Property<
long>(
"Id")
210 .ValueGeneratedOnAdd()
211 .HasColumnType(
"bigint")
212 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
214 b.Property<
int>(
"ApiValidationPort")
215 .HasColumnType(
"integer");
217 b.Property<
int>(
"ApiValidationSecurityLevel")
218 .HasColumnType(
"integer");
220 b.Property<
long>(
"InstanceId")
221 .HasColumnType(
"bigint");
223 b.Property<
string>(
"ProjectName")
224 .HasColumnType(
"character varying(10000)")
225 .HasMaxLength(10000);
227 b.Property<
bool?>(
"RequireDMApiValidation")
229 .HasColumnType(
"boolean");
233 b.HasIndex(
"InstanceId")
236 b.ToTable(
"DreamMakerSettings");
239 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
241 b.Property<
long>(
"Id")
242 .ValueGeneratedOnAdd()
243 .HasColumnType(
"bigint")
244 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
246 b.Property<
long>(
"AutoUpdateInterval")
247 .HasColumnType(
"bigint");
249 b.Property<
int>(
"ChatBotLimit")
250 .HasColumnType(
"integer");
252 b.Property<
int>(
"ConfigurationType")
253 .HasColumnType(
"integer");
255 b.Property<
string>(
"Name")
257 .HasColumnType(
"character varying(10000)")
258 .HasMaxLength(10000);
260 b.Property<
bool?>(
"Online")
262 .HasColumnType(
"boolean");
264 b.Property<
string>(
"Path")
266 .HasColumnType(
"text");
273 b.ToTable(
"Instances");
276 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
278 b.Property<
long>(
"Id")
279 .ValueGeneratedOnAdd()
280 .HasColumnType(
"bigint")
281 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
283 b.Property<decimal>(
"ByondRights")
284 .HasColumnType(
"numeric(20,0)");
286 b.Property<decimal>(
"ChatBotRights")
287 .HasColumnType(
"numeric(20,0)");
289 b.Property<decimal>(
"ConfigurationRights")
290 .HasColumnType(
"numeric(20,0)");
292 b.Property<decimal>(
"DreamDaemonRights")
293 .HasColumnType(
"numeric(20,0)");
295 b.Property<decimal>(
"DreamMakerRights")
296 .HasColumnType(
"numeric(20,0)");
298 b.Property<
long>(
"InstanceId")
299 .HasColumnType(
"bigint");
301 b.Property<decimal>(
"InstanceUserRights")
302 .HasColumnType(
"numeric(20,0)");
304 b.Property<decimal>(
"RepositoryRights")
305 .HasColumnType(
"numeric(20,0)");
307 b.Property<
long>(
"UserId")
308 .HasColumnType(
"bigint");
312 b.HasIndex(
"InstanceId");
314 b.HasIndex(
"UserId",
"InstanceId")
317 b.ToTable(
"InstanceUsers");
320 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
322 b.Property<
long>(
"Id")
323 .ValueGeneratedOnAdd()
324 .HasColumnType(
"bigint")
325 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
327 b.Property<decimal?>(
"CancelRight")
328 .HasColumnType(
"numeric(20,0)");
330 b.Property<decimal?>(
"CancelRightsType")
331 .HasColumnType(
"numeric(20,0)");
333 b.Property<
bool?>(
"Cancelled")
335 .HasColumnType(
"boolean");
337 b.Property<
long?>(
"CancelledById")
338 .HasColumnType(
"bigint");
340 b.Property<
string>(
"Description")
342 .HasColumnType(
"text");
344 b.Property<
long?>(
"ErrorCode")
345 .HasColumnType(
"bigint");
347 b.Property<
string>(
"ExceptionDetails")
348 .HasColumnType(
"text");
350 b.Property<
long>(
"InstanceId")
351 .HasColumnType(
"bigint");
353 b.Property<DateTimeOffset?>(
"StartedAt")
355 .HasColumnType(
"timestamp with time zone");
357 b.Property<
long>(
"StartedById")
358 .HasColumnType(
"bigint");
360 b.Property<DateTimeOffset?>(
"StoppedAt")
361 .HasColumnType(
"timestamp with time zone");
365 b.HasIndex(
"CancelledById");
367 b.HasIndex(
"InstanceId");
369 b.HasIndex(
"StartedById");
374 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
376 b.Property<
long>(
"Id")
377 .ValueGeneratedOnAdd()
378 .HasColumnType(
"bigint")
379 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
381 b.Property<
string>(
"AccessIdentifier")
383 .HasColumnType(
"text");
385 b.Property<
long>(
"CompileJobId")
386 .HasColumnType(
"bigint");
388 b.Property<
int>(
"LaunchSecurityLevel")
389 .HasColumnType(
"integer");
391 b.Property<
int>(
"Port")
392 .HasColumnType(
"integer");
394 b.Property<
int>(
"ProcessId")
395 .HasColumnType(
"integer");
397 b.Property<
int>(
"RebootState")
398 .HasColumnType(
"integer");
402 b.HasIndex(
"CompileJobId");
404 b.ToTable(
"ReattachInformations");
407 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
409 b.Property<
long>(
"Id")
410 .ValueGeneratedOnAdd()
411 .HasColumnType(
"bigint")
412 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
414 b.Property<
string>(
"AccessToken")
415 .HasColumnType(
"character varying(10000)")
416 .HasMaxLength(10000);
418 b.Property<
string>(
"AccessUser")
419 .HasColumnType(
"character varying(10000)")
420 .HasMaxLength(10000);
422 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
424 .HasColumnType(
"boolean");
426 b.Property<
bool?>(
"AutoUpdatesSynchronize")
428 .HasColumnType(
"boolean");
430 b.Property<
string>(
"CommitterEmail")
432 .HasColumnType(
"character varying(10000)")
433 .HasMaxLength(10000);
435 b.Property<
string>(
"CommitterName")
437 .HasColumnType(
"character varying(10000)")
438 .HasMaxLength(10000);
440 b.Property<
bool?>(
"CreateGitHubDeployments")
442 .HasColumnType(
"boolean");
444 b.Property<
long>(
"InstanceId")
445 .HasColumnType(
"bigint");
447 b.Property<
bool?>(
"PostTestMergeComment")
449 .HasColumnType(
"boolean");
451 b.Property<
bool?>(
"PushTestMergeCommits")
453 .HasColumnType(
"boolean");
455 b.Property<
bool?>(
"ShowTestMergeCommitters")
457 .HasColumnType(
"boolean");
461 b.HasIndex(
"InstanceId")
464 b.ToTable(
"RepositorySettings");
467 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
469 b.Property<
long>(
"Id")
470 .ValueGeneratedOnAdd()
471 .HasColumnType(
"bigint")
472 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
474 b.Property<
long>(
"RevisionInformationId")
475 .HasColumnType(
"bigint");
477 b.Property<
long>(
"TestMergeId")
478 .HasColumnType(
"bigint");
482 b.HasIndex(
"RevisionInformationId");
484 b.HasIndex(
"TestMergeId");
486 b.ToTable(
"RevInfoTestMerges");
489 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
491 b.Property<
long>(
"Id")
492 .ValueGeneratedOnAdd()
493 .HasColumnType(
"bigint")
494 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
496 b.Property<
string>(
"CommitSha")
498 .HasColumnType(
"character varying(40)")
501 b.Property<
long>(
"InstanceId")
502 .HasColumnType(
"bigint");
504 b.Property<
string>(
"OriginCommitSha")
506 .HasColumnType(
"character varying(40)")
511 b.HasIndex(
"InstanceId",
"CommitSha")
514 b.ToTable(
"RevisionInformations");
517 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
519 b.Property<
long>(
"Id")
520 .ValueGeneratedOnAdd()
521 .HasColumnType(
"bigint")
522 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
524 b.Property<
string>(
"Author")
526 .HasColumnType(
"text");
528 b.Property<
string>(
"BodyAtMerge")
530 .HasColumnType(
"text");
532 b.Property<
string>(
"Comment")
533 .HasColumnType(
"character varying(10000)")
534 .HasMaxLength(10000);
536 b.Property<DateTimeOffset>(
"MergedAt")
537 .HasColumnType(
"timestamp with time zone");
539 b.Property<
long>(
"MergedById")
540 .HasColumnType(
"bigint");
542 b.Property<
int>(
"Number")
543 .HasColumnType(
"integer");
545 b.Property<
long?>(
"PrimaryRevisionInformationId")
547 .HasColumnType(
"bigint");
549 b.Property<
string>(
"PullRequestRevision")
551 .HasColumnType(
"character varying(40)")
554 b.Property<
string>(
"TitleAtMerge")
556 .HasColumnType(
"text");
558 b.Property<
string>(
"Url")
560 .HasColumnType(
"text");
564 b.HasIndex(
"MergedById");
566 b.HasIndex(
"PrimaryRevisionInformationId")
569 b.ToTable(
"TestMerges");
572 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
574 b.Property<
long?>(
"Id")
575 .ValueGeneratedOnAdd()
576 .HasColumnType(
"bigint")
577 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
579 b.Property<decimal>(
"AdministrationRights")
580 .HasColumnType(
"numeric(20,0)");
582 b.Property<
string>(
"CanonicalName")
584 .HasColumnType(
"text");
586 b.Property<DateTimeOffset?>(
"CreatedAt")
588 .HasColumnType(
"timestamp with time zone");
590 b.Property<
long?>(
"CreatedById")
591 .HasColumnType(
"bigint");
593 b.Property<
bool?>(
"Enabled")
595 .HasColumnType(
"boolean");
597 b.Property<decimal>(
"InstanceManagerRights")
598 .HasColumnType(
"numeric(20,0)");
600 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
601 .HasColumnType(
"timestamp with time zone");
603 b.Property<
string>(
"Name")
605 .HasColumnType(
"character varying(10000)")
606 .HasMaxLength(10000);
608 b.Property<
string>(
"PasswordHash")
609 .HasColumnType(
"text");
611 b.Property<
string>(
"SystemIdentifier")
612 .HasColumnType(
"text");
616 b.HasIndex(
"CanonicalName")
619 b.HasIndex(
"CreatedById");
621 b.HasIndex(
"SystemIdentifier")
627 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
629 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
630 .WithMany(
"ChatSettings")
631 .HasForeignKey(
"InstanceId")
632 .OnDelete(DeleteBehavior.Cascade)
636 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
638 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
639 .WithMany(
"Channels")
640 .HasForeignKey(
"ChatSettingsId")
641 .OnDelete(DeleteBehavior.Cascade)
645 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
647 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
649 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
650 .OnDelete(DeleteBehavior.Cascade)
653 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
654 .WithMany(
"CompileJobs")
655 .HasForeignKey(
"RevisionInformationId")
656 .OnDelete(DeleteBehavior.Cascade)
660 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
662 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
663 .WithOne(
"DreamDaemonSettings")
664 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
665 .OnDelete(DeleteBehavior.Cascade)
669 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
671 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
672 .WithOne(
"DreamMakerSettings")
673 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
674 .OnDelete(DeleteBehavior.Cascade)
678 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
680 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
681 .WithMany(
"InstanceUsers")
682 .HasForeignKey(
"InstanceId")
683 .OnDelete(DeleteBehavior.Cascade)
686 b.HasOne(
"Tgstation.Server.Host.Models.User",
null)
687 .WithMany(
"InstanceUsers")
688 .HasForeignKey(
"UserId")
689 .OnDelete(DeleteBehavior.Cascade)
693 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
695 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
697 .HasForeignKey(
"CancelledById");
699 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
701 .HasForeignKey(
"InstanceId")
702 .OnDelete(DeleteBehavior.Cascade)
705 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
707 .HasForeignKey(
"StartedById")
708 .OnDelete(DeleteBehavior.Cascade)
712 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
714 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
716 .HasForeignKey(
"CompileJobId")
717 .OnDelete(DeleteBehavior.Cascade)
721 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
723 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
724 .WithOne(
"RepositorySettings")
725 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
726 .OnDelete(DeleteBehavior.Cascade)
730 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
732 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
733 .WithMany(
"ActiveTestMerges")
734 .HasForeignKey(
"RevisionInformationId")
735 .OnDelete(DeleteBehavior.Cascade)
738 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
739 .WithMany(
"RevisonInformations")
740 .HasForeignKey(
"TestMergeId")
741 .OnDelete(DeleteBehavior.ClientNoAction)
745 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
747 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
748 .WithMany(
"RevisionInformations")
749 .HasForeignKey(
"InstanceId")
750 .OnDelete(DeleteBehavior.Cascade)
754 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
756 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
757 .WithMany(
"TestMerges")
758 .HasForeignKey(
"MergedById")
759 .OnDelete(DeleteBehavior.Restrict)
762 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
763 .WithOne(
"PrimaryTestMerge")
764 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
765 .OnDelete(DeleteBehavior.Cascade)
769 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
771 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
772 .WithMany(
"CreatedUsers")
773 .HasForeignKey(
"CreatedById");
775#pragma warning restore 612, 618