17#pragma warning disable 612, 618
19 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn)
20 .HasAnnotation(
"ProductVersion",
"3.1.5")
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<
long>(
"JobId")
136 .HasColumnType(
"bigint");
138 b.Property<
int>(
"MinimumSecurityLevel")
139 .HasColumnType(
"integer");
141 b.Property<
string>(
"Output")
143 .HasColumnType(
"text");
145 b.Property<
long>(
"RevisionInformationId")
146 .HasColumnType(
"bigint");
150 b.HasIndex(
"DirectoryName");
155 b.HasIndex(
"RevisionInformationId");
157 b.ToTable(
"CompileJobs");
160 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
162 b.Property<
long>(
"Id")
163 .ValueGeneratedOnAdd()
164 .HasColumnType(
"bigint")
165 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
167 b.Property<
bool?>(
"AllowWebClient")
169 .HasColumnType(
"boolean");
171 b.Property<
bool?>(
"AutoStart")
173 .HasColumnType(
"boolean");
175 b.Property<
long>(
"HeartbeatSeconds")
176 .HasColumnType(
"bigint");
178 b.Property<
long>(
"InstanceId")
179 .HasColumnType(
"bigint");
181 b.Property<
int>(
"Port")
182 .HasColumnType(
"integer");
184 b.Property<
int>(
"SecurityLevel")
185 .HasColumnType(
"integer");
187 b.Property<
long>(
"StartupTimeout")
188 .HasColumnType(
"bigint");
190 b.Property<
long>(
"TopicRequestTimeout")
191 .HasColumnType(
"bigint");
195 b.HasIndex(
"InstanceId")
198 b.ToTable(
"DreamDaemonSettings");
201 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
203 b.Property<
long>(
"Id")
204 .ValueGeneratedOnAdd()
205 .HasColumnType(
"bigint")
206 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
208 b.Property<
int>(
"ApiValidationPort")
209 .HasColumnType(
"integer");
211 b.Property<
int>(
"ApiValidationSecurityLevel")
212 .HasColumnType(
"integer");
214 b.Property<
long>(
"InstanceId")
215 .HasColumnType(
"bigint");
217 b.Property<
string>(
"ProjectName")
218 .HasColumnType(
"character varying(10000)")
219 .HasMaxLength(10000);
223 b.HasIndex(
"InstanceId")
226 b.ToTable(
"DreamMakerSettings");
229 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
231 b.Property<
long>(
"Id")
232 .ValueGeneratedOnAdd()
233 .HasColumnType(
"bigint")
234 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
236 b.Property<
long>(
"AutoUpdateInterval")
237 .HasColumnType(
"bigint");
239 b.Property<
int>(
"ChatBotLimit")
240 .HasColumnType(
"integer");
242 b.Property<
int>(
"ConfigurationType")
243 .HasColumnType(
"integer");
245 b.Property<
string>(
"Name")
247 .HasColumnType(
"character varying(10000)")
248 .HasMaxLength(10000);
250 b.Property<
bool?>(
"Online")
252 .HasColumnType(
"boolean");
254 b.Property<
string>(
"Path")
256 .HasColumnType(
"text");
263 b.ToTable(
"Instances");
266 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
268 b.Property<
long>(
"Id")
269 .ValueGeneratedOnAdd()
270 .HasColumnType(
"bigint")
271 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
273 b.Property<decimal>(
"ByondRights")
274 .HasColumnType(
"numeric(20,0)");
276 b.Property<decimal>(
"ChatBotRights")
277 .HasColumnType(
"numeric(20,0)");
279 b.Property<decimal>(
"ConfigurationRights")
280 .HasColumnType(
"numeric(20,0)");
282 b.Property<decimal>(
"DreamDaemonRights")
283 .HasColumnType(
"numeric(20,0)");
285 b.Property<decimal>(
"DreamMakerRights")
286 .HasColumnType(
"numeric(20,0)");
288 b.Property<
long>(
"InstanceId")
289 .HasColumnType(
"bigint");
291 b.Property<decimal>(
"InstanceUserRights")
292 .HasColumnType(
"numeric(20,0)");
294 b.Property<decimal>(
"RepositoryRights")
295 .HasColumnType(
"numeric(20,0)");
297 b.Property<
long?>(
"UserId")
299 .HasColumnType(
"bigint");
303 b.HasIndex(
"InstanceId");
305 b.HasIndex(
"UserId",
"InstanceId")
308 b.ToTable(
"InstanceUsers");
311 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
313 b.Property<
long>(
"Id")
314 .ValueGeneratedOnAdd()
315 .HasColumnType(
"bigint")
316 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
318 b.Property<decimal?>(
"CancelRight")
319 .HasColumnType(
"numeric(20,0)");
321 b.Property<decimal?>(
"CancelRightsType")
322 .HasColumnType(
"numeric(20,0)");
324 b.Property<
bool?>(
"Cancelled")
326 .HasColumnType(
"boolean");
328 b.Property<
long?>(
"CancelledById")
329 .HasColumnType(
"bigint");
331 b.Property<
string>(
"Description")
333 .HasColumnType(
"text");
335 b.Property<
long?>(
"ErrorCode")
336 .HasColumnType(
"bigint");
338 b.Property<
string>(
"ExceptionDetails")
339 .HasColumnType(
"text");
341 b.Property<
long>(
"InstanceId")
342 .HasColumnType(
"bigint");
344 b.Property<DateTimeOffset?>(
"StartedAt")
346 .HasColumnType(
"timestamp with time zone");
348 b.Property<
long>(
"StartedById")
349 .HasColumnType(
"bigint");
351 b.Property<DateTimeOffset?>(
"StoppedAt")
352 .HasColumnType(
"timestamp with time zone");
356 b.HasIndex(
"CancelledById");
358 b.HasIndex(
"InstanceId");
360 b.HasIndex(
"StartedById");
365 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
367 b.Property<
long>(
"Id")
368 .ValueGeneratedOnAdd()
369 .HasColumnType(
"bigint")
370 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
372 b.Property<
string>(
"AccessIdentifier")
374 .HasColumnType(
"text");
376 b.Property<
long>(
"CompileJobId")
377 .HasColumnType(
"bigint");
379 b.Property<
int>(
"LaunchSecurityLevel")
380 .HasColumnType(
"integer");
382 b.Property<
int>(
"Port")
383 .HasColumnType(
"integer");
385 b.Property<
int>(
"ProcessId")
386 .HasColumnType(
"integer");
388 b.Property<
int>(
"RebootState")
389 .HasColumnType(
"integer");
393 b.HasIndex(
"CompileJobId");
395 b.ToTable(
"ReattachInformations");
398 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
400 b.Property<
long>(
"Id")
401 .ValueGeneratedOnAdd()
402 .HasColumnType(
"bigint")
403 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
405 b.Property<
string>(
"AccessToken")
406 .HasColumnType(
"character varying(10000)")
407 .HasMaxLength(10000);
409 b.Property<
string>(
"AccessUser")
410 .HasColumnType(
"character varying(10000)")
411 .HasMaxLength(10000);
413 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
415 .HasColumnType(
"boolean");
417 b.Property<
bool?>(
"AutoUpdatesSynchronize")
419 .HasColumnType(
"boolean");
421 b.Property<
string>(
"CommitterEmail")
423 .HasColumnType(
"character varying(10000)")
424 .HasMaxLength(10000);
426 b.Property<
string>(
"CommitterName")
428 .HasColumnType(
"character varying(10000)")
429 .HasMaxLength(10000);
431 b.Property<
long>(
"InstanceId")
432 .HasColumnType(
"bigint");
434 b.Property<
bool?>(
"PostTestMergeComment")
436 .HasColumnType(
"boolean");
438 b.Property<
bool?>(
"PushTestMergeCommits")
440 .HasColumnType(
"boolean");
442 b.Property<
bool?>(
"ShowTestMergeCommitters")
444 .HasColumnType(
"boolean");
448 b.HasIndex(
"InstanceId")
451 b.ToTable(
"RepositorySettings");
454 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
456 b.Property<
long>(
"Id")
457 .ValueGeneratedOnAdd()
458 .HasColumnType(
"bigint")
459 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
461 b.Property<
long>(
"RevisionInformationId")
462 .HasColumnType(
"bigint");
464 b.Property<
long>(
"TestMergeId")
465 .HasColumnType(
"bigint");
469 b.HasIndex(
"RevisionInformationId");
471 b.HasIndex(
"TestMergeId");
473 b.ToTable(
"RevInfoTestMerges");
476 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
478 b.Property<
long>(
"Id")
479 .ValueGeneratedOnAdd()
480 .HasColumnType(
"bigint")
481 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
483 b.Property<
string>(
"CommitSha")
485 .HasColumnType(
"character varying(40)")
488 b.Property<
long>(
"InstanceId")
489 .HasColumnType(
"bigint");
491 b.Property<
string>(
"OriginCommitSha")
493 .HasColumnType(
"character varying(40)")
498 b.HasIndex(
"InstanceId",
"CommitSha")
501 b.ToTable(
"RevisionInformations");
504 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
506 b.Property<
long>(
"Id")
507 .ValueGeneratedOnAdd()
508 .HasColumnType(
"bigint")
509 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
511 b.Property<
string>(
"Author")
513 .HasColumnType(
"text");
515 b.Property<
string>(
"BodyAtMerge")
517 .HasColumnType(
"text");
519 b.Property<
string>(
"Comment")
520 .HasColumnType(
"character varying(10000)")
521 .HasMaxLength(10000);
523 b.Property<DateTimeOffset>(
"MergedAt")
524 .HasColumnType(
"timestamp with time zone");
526 b.Property<
long>(
"MergedById")
527 .HasColumnType(
"bigint");
529 b.Property<
int>(
"Number")
530 .HasColumnType(
"integer");
532 b.Property<
long?>(
"PrimaryRevisionInformationId")
534 .HasColumnType(
"bigint");
536 b.Property<
string>(
"PullRequestRevision")
538 .HasColumnType(
"character varying(40)")
541 b.Property<
string>(
"TitleAtMerge")
543 .HasColumnType(
"text");
545 b.Property<
string>(
"Url")
547 .HasColumnType(
"text");
551 b.HasIndex(
"MergedById");
553 b.HasIndex(
"PrimaryRevisionInformationId")
556 b.ToTable(
"TestMerges");
559 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
561 b.Property<
long?>(
"Id")
562 .ValueGeneratedOnAdd()
563 .HasColumnType(
"bigint")
564 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
566 b.Property<decimal>(
"AdministrationRights")
567 .HasColumnType(
"numeric(20,0)");
569 b.Property<
string>(
"CanonicalName")
571 .HasColumnType(
"text");
573 b.Property<DateTimeOffset?>(
"CreatedAt")
575 .HasColumnType(
"timestamp with time zone");
577 b.Property<
long?>(
"CreatedById")
578 .HasColumnType(
"bigint");
580 b.Property<
bool?>(
"Enabled")
582 .HasColumnType(
"boolean");
584 b.Property<decimal>(
"InstanceManagerRights")
585 .HasColumnType(
"numeric(20,0)");
587 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
588 .HasColumnType(
"timestamp with time zone");
590 b.Property<
string>(
"Name")
592 .HasColumnType(
"character varying(10000)")
593 .HasMaxLength(10000);
595 b.Property<
string>(
"PasswordHash")
596 .HasColumnType(
"text");
598 b.Property<
string>(
"SystemIdentifier")
599 .HasColumnType(
"text");
603 b.HasIndex(
"CanonicalName")
606 b.HasIndex(
"CreatedById");
608 b.HasIndex(
"SystemIdentifier")
614 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
616 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
617 .WithMany(
"ChatSettings")
618 .HasForeignKey(
"InstanceId")
619 .OnDelete(DeleteBehavior.Cascade)
623 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
625 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
626 .WithMany(
"Channels")
627 .HasForeignKey(
"ChatSettingsId")
628 .OnDelete(DeleteBehavior.Cascade)
632 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
634 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
636 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
637 .OnDelete(DeleteBehavior.Cascade)
640 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
641 .WithMany(
"CompileJobs")
642 .HasForeignKey(
"RevisionInformationId")
643 .OnDelete(DeleteBehavior.Cascade)
647 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
649 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
650 .WithOne(
"DreamDaemonSettings")
651 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
652 .OnDelete(DeleteBehavior.Cascade)
656 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
658 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
659 .WithOne(
"DreamMakerSettings")
660 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
661 .OnDelete(DeleteBehavior.Cascade)
665 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
667 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
668 .WithMany(
"InstanceUsers")
669 .HasForeignKey(
"InstanceId")
670 .OnDelete(DeleteBehavior.Cascade)
673 b.HasOne(
"Tgstation.Server.Host.Models.User",
null)
674 .WithMany(
"InstanceUsers")
675 .HasForeignKey(
"UserId")
676 .OnDelete(DeleteBehavior.Cascade)
680 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
682 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
684 .HasForeignKey(
"CancelledById");
686 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
688 .HasForeignKey(
"InstanceId")
689 .OnDelete(DeleteBehavior.Cascade)
692 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
694 .HasForeignKey(
"StartedById")
695 .OnDelete(DeleteBehavior.Cascade)
699 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
701 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
703 .HasForeignKey(
"CompileJobId")
704 .OnDelete(DeleteBehavior.Cascade)
708 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
710 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
711 .WithOne(
"RepositorySettings")
712 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
713 .OnDelete(DeleteBehavior.Cascade)
717 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
719 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
720 .WithMany(
"ActiveTestMerges")
721 .HasForeignKey(
"RevisionInformationId")
722 .OnDelete(DeleteBehavior.Cascade)
725 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
726 .WithMany(
"RevisonInformations")
727 .HasForeignKey(
"TestMergeId")
728 .OnDelete(DeleteBehavior.ClientNoAction)
732 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
734 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
735 .WithMany(
"RevisionInformations")
736 .HasForeignKey(
"InstanceId")
737 .OnDelete(DeleteBehavior.Cascade)
741 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
743 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
744 .WithMany(
"TestMerges")
745 .HasForeignKey(
"MergedById")
746 .OnDelete(DeleteBehavior.Restrict)
749 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
750 .WithOne(
"PrimaryTestMerge")
751 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
752 .OnDelete(DeleteBehavior.Cascade)
756 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
758 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
759 .WithMany(
"CreatedUsers")
760 .HasForeignKey(
"CreatedById");
762#pragma warning restore 612, 618