diff --git a/TASVideos.Data/Entity/Submission.cs b/TASVideos.Data/Entity/Submission.cs
index e85c89bc0..24ec30480 100644
--- a/TASVideos.Data/Entity/Submission.cs
+++ b/TASVideos.Data/Entity/Submission.cs
@@ -162,8 +162,8 @@ public void GenerateTitle()
public long? CycleCount { get; set; }
- [StringLength(50)]
- public string? SyncedBy { get; set; }
+ public int? SyncedByUserId { get; set; }
+ public virtual User? SyncedByUser { get; set; }
public DateTime? SyncedOn { get; set; }
}
diff --git a/TASVideos.Data/Migrations/20240902160912_SyncedByUserIdColumn.Designer.cs b/TASVideos.Data/Migrations/20240902160912_SyncedByUserIdColumn.Designer.cs
new file mode 100644
index 000000000..e118be46a
--- /dev/null
+++ b/TASVideos.Data/Migrations/20240902160912_SyncedByUserIdColumn.Designer.cs
@@ -0,0 +1,3562 @@
+//
+using System;
+using System.ComponentModel.DataAnnotations.Schema;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
+using NpgsqlTypes;
+using TASVideos.Data;
+
+#nullable disable
+
+namespace TASVideos.Data.Migrations
+{
+ [DbContext(typeof(ApplicationDbContext))]
+ [Migration("20240902160912_SyncedByUserIdColumn")]
+ partial class SyncedByUserIdColumn
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "8.0.6")
+ .HasAnnotation("Relational:MaxIdentifierLength", 63);
+
+ NpgsqlModelBuilderExtensions.HasPostgresExtension(modelBuilder, "citext");
+ NpgsqlModelBuilderExtensions.HasPostgresExtension(modelBuilder, "pg_trgm");
+ NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
+
+ modelBuilder.Entity("TASVideos.Data.CustomAutoHistory", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("Changed")
+ .HasColumnType("citext")
+ .HasColumnName("changed");
+
+ b.Property("Created")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("created");
+
+ b.Property("Kind")
+ .HasColumnType("integer")
+ .HasColumnName("kind");
+
+ b.Property("RowId")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("citext")
+ .HasColumnName("row_id");
+
+ b.Property("TableName")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("citext")
+ .HasColumnName("table_name");
+
+ b.Property("UserId")
+ .HasColumnType("integer")
+ .HasColumnName("user_id");
+
+ b.HasKey("Id")
+ .HasName("pk_auto_history");
+
+ b.ToTable("auto_history", (string)null);
+ });
+
+ modelBuilder.Entity("TASVideos.Data.Entity.Awards.Award", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("Description")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("citext")
+ .HasColumnName("description");
+
+ b.Property("ShortName")
+ .IsRequired()
+ .HasMaxLength(25)
+ .HasColumnType("citext")
+ .HasColumnName("short_name");
+
+ b.Property("Type")
+ .HasColumnType("integer")
+ .HasColumnName("type");
+
+ b.HasKey("Id")
+ .HasName("pk_awards");
+
+ b.HasIndex("ShortName")
+ .IsUnique()
+ .HasDatabaseName("ix_awards_short_name");
+
+ b.ToTable("awards", (string)null);
+ });
+
+ modelBuilder.Entity("TASVideos.Data.Entity.Awards.PublicationAward", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("AwardId")
+ .HasColumnType("integer")
+ .HasColumnName("award_id");
+
+ b.Property("PublicationId")
+ .HasColumnType("integer")
+ .HasColumnName("publication_id");
+
+ b.Property("Year")
+ .HasColumnType("integer")
+ .HasColumnName("year");
+
+ b.HasKey("Id")
+ .HasName("pk_publication_awards");
+
+ b.HasIndex("AwardId")
+ .HasDatabaseName("ix_publication_awards_award_id");
+
+ b.HasIndex("PublicationId")
+ .HasDatabaseName("ix_publication_awards_publication_id");
+
+ b.ToTable("publication_awards", (string)null);
+ });
+
+ modelBuilder.Entity("TASVideos.Data.Entity.Awards.UserAward", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("AwardId")
+ .HasColumnType("integer")
+ .HasColumnName("award_id");
+
+ b.Property("UserId")
+ .HasColumnType("integer")
+ .HasColumnName("user_id");
+
+ b.Property("Year")
+ .HasColumnType("integer")
+ .HasColumnName("year");
+
+ b.HasKey("Id")
+ .HasName("pk_user_awards");
+
+ b.HasIndex("AwardId")
+ .HasDatabaseName("ix_user_awards_award_id");
+
+ b.HasIndex("UserId")
+ .HasDatabaseName("ix_user_awards_user_id");
+
+ b.ToTable("user_awards", (string)null);
+ });
+
+ modelBuilder.Entity("TASVideos.Data.Entity.DeprecatedMovieFormat", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("CreateTimestamp")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("create_timestamp");
+
+ b.Property("Deprecated")
+ .HasColumnType("boolean")
+ .HasColumnName("deprecated");
+
+ b.Property("FileExtension")
+ .IsRequired()
+ .HasMaxLength(8)
+ .HasColumnType("citext")
+ .HasColumnName("file_extension");
+
+ b.Property("LastUpdateTimestamp")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("last_update_timestamp");
+
+ b.HasKey("Id")
+ .HasName("pk_deprecated_movie_formats");
+
+ b.HasIndex("FileExtension")
+ .IsUnique()
+ .HasDatabaseName("ix_deprecated_movie_formats_file_extension");
+
+ b.ToTable("deprecated_movie_formats", (string)null);
+ });
+
+ modelBuilder.Entity("TASVideos.Data.Entity.Flag", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("IconPath")
+ .HasMaxLength(48)
+ .HasColumnType("citext")
+ .HasColumnName("icon_path");
+
+ b.Property("LinkPath")
+ .HasMaxLength(48)
+ .HasColumnType("citext")
+ .HasColumnName("link_path");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(32)
+ .HasColumnType("citext")
+ .HasColumnName("name");
+
+ b.Property("PermissionRestriction")
+ .HasColumnType("integer")
+ .HasColumnName("permission_restriction");
+
+ b.Property("Token")
+ .IsRequired()
+ .HasMaxLength(24)
+ .HasColumnType("citext")
+ .HasColumnName("token");
+
+ b.Property("Weight")
+ .HasColumnType("double precision")
+ .HasColumnName("weight");
+
+ b.HasKey("Id")
+ .HasName("pk_flags");
+
+ b.HasIndex("Token")
+ .IsUnique()
+ .HasDatabaseName("ix_flags_token");
+
+ b.ToTable("flags", (string)null);
+ });
+
+ modelBuilder.Entity("TASVideos.Data.Entity.Forum.Forum", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("CanCreateTopics")
+ .HasColumnType("boolean")
+ .HasColumnName("can_create_topics");
+
+ b.Property("CategoryId")
+ .HasColumnType("integer")
+ .HasColumnName("category_id");
+
+ b.Property("CreateTimestamp")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("create_timestamp");
+
+ b.Property("Description")
+ .HasMaxLength(1000)
+ .HasColumnType("citext")
+ .HasColumnName("description");
+
+ b.Property("LastUpdateTimestamp")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("last_update_timestamp");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("citext")
+ .HasColumnName("name");
+
+ b.Property("Ordinal")
+ .HasColumnType("integer")
+ .HasColumnName("ordinal");
+
+ b.Property("Restricted")
+ .HasColumnType("boolean")
+ .HasColumnName("restricted");
+
+ b.Property("ShortName")
+ .IsRequired()
+ .HasMaxLength(10)
+ .HasColumnType("citext")
+ .HasColumnName("short_name");
+
+ b.HasKey("Id")
+ .HasName("pk_forums");
+
+ b.HasIndex("CategoryId")
+ .HasDatabaseName("ix_forums_category_id");
+
+ b.ToTable("forums", (string)null);
+ });
+
+ modelBuilder.Entity("TASVideos.Data.Entity.Forum.ForumCategory", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("CreateTimestamp")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("create_timestamp");
+
+ b.Property("Description")
+ .HasMaxLength(1000)
+ .HasColumnType("citext")
+ .HasColumnName("description");
+
+ b.Property("LastUpdateTimestamp")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("last_update_timestamp");
+
+ b.Property("Ordinal")
+ .HasColumnType("integer")
+ .HasColumnName("ordinal");
+
+ b.Property("Title")
+ .IsRequired()
+ .HasMaxLength(30)
+ .HasColumnType("citext")
+ .HasColumnName("title");
+
+ b.HasKey("Id")
+ .HasName("pk_forum_categories");
+
+ b.ToTable("forum_categories", (string)null);
+ });
+
+ modelBuilder.Entity("TASVideos.Data.Entity.Forum.ForumPoll", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("CloseDate")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("close_date");
+
+ b.Property("CreateTimestamp")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("create_timestamp");
+
+ b.Property("LastUpdateTimestamp")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("last_update_timestamp");
+
+ b.Property("MultiSelect")
+ .HasColumnType("boolean")
+ .HasColumnName("multi_select");
+
+ b.Property("Question")
+ .IsRequired()
+ .HasMaxLength(500)
+ .HasColumnType("citext")
+ .HasColumnName("question");
+
+ b.Property("TopicId")
+ .HasColumnType("integer")
+ .HasColumnName("topic_id");
+
+ b.HasKey("Id")
+ .HasName("pk_forum_polls");
+
+ b.ToTable("forum_polls", (string)null);
+ });
+
+ modelBuilder.Entity("TASVideos.Data.Entity.Forum.ForumPollOption", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("CreateTimestamp")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("create_timestamp");
+
+ b.Property("LastUpdateTimestamp")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("last_update_timestamp");
+
+ b.Property("Ordinal")
+ .HasColumnType("integer")
+ .HasColumnName("ordinal");
+
+ b.Property("PollId")
+ .HasColumnType("integer")
+ .HasColumnName("poll_id");
+
+ b.Property("Text")
+ .IsRequired()
+ .HasMaxLength(250)
+ .HasColumnType("citext")
+ .HasColumnName("text");
+
+ b.HasKey("Id")
+ .HasName("pk_forum_poll_options");
+
+ b.HasIndex("PollId")
+ .HasDatabaseName("ix_forum_poll_options_poll_id");
+
+ b.ToTable("forum_poll_options", (string)null);
+ });
+
+ modelBuilder.Entity("TASVideos.Data.Entity.Forum.ForumPollOptionVote", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("CreateTimestamp")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("create_timestamp");
+
+ b.Property("IpAddress")
+ .HasMaxLength(50)
+ .HasColumnType("citext")
+ .HasColumnName("ip_address");
+
+ b.Property("PollOptionId")
+ .HasColumnType("integer")
+ .HasColumnName("poll_option_id");
+
+ b.Property("UserId")
+ .HasColumnType("integer")
+ .HasColumnName("user_id");
+
+ b.HasKey("Id")
+ .HasName("pk_forum_poll_option_votes");
+
+ b.HasIndex("PollOptionId")
+ .HasDatabaseName("ix_forum_poll_option_votes_poll_option_id");
+
+ b.HasIndex("UserId")
+ .HasDatabaseName("ix_forum_poll_option_votes_user_id");
+
+ b.ToTable("forum_poll_option_votes", (string)null);
+ });
+
+ modelBuilder.Entity("TASVideos.Data.Entity.Forum.ForumPost", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("CreateTimestamp")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("create_timestamp");
+
+ b.Property("EnableBbCode")
+ .HasColumnType("boolean")
+ .HasColumnName("enable_bb_code");
+
+ b.Property("EnableHtml")
+ .HasColumnType("boolean")
+ .HasColumnName("enable_html");
+
+ b.Property("ForumId")
+ .HasColumnType("integer")
+ .HasColumnName("forum_id");
+
+ b.Property("IpAddress")
+ .HasMaxLength(50)
+ .HasColumnType("citext")
+ .HasColumnName("ip_address");
+
+ b.Property("LastUpdateTimestamp")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("last_update_timestamp");
+
+ b.Property("PostEditedTimestamp")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("post_edited_timestamp");
+
+ b.Property("PosterId")
+ .HasColumnType("integer")
+ .HasColumnName("poster_id");
+
+ b.Property("PosterMood")
+ .HasColumnType("integer")
+ .HasColumnName("poster_mood");
+
+ b.Property("SearchVector")
+ .IsRequired()
+ .ValueGeneratedOnAddOrUpdate()
+ .HasColumnType("tsvector")
+ .HasColumnName("search_vector")
+ .HasAnnotation("Npgsql:TsVectorConfig", "english")
+ .HasAnnotation("Npgsql:TsVectorProperties", new[] { "Text" });
+
+ b.Property("Subject")
+ .HasMaxLength(150)
+ .HasColumnType("citext")
+ .HasColumnName("subject");
+
+ b.Property("Text")
+ .IsRequired()
+ .HasColumnType("citext")
+ .HasColumnName("text");
+
+ b.Property("TopicId")
+ .HasColumnType("integer")
+ .HasColumnName("topic_id");
+
+ b.HasKey("Id")
+ .HasName("pk_forum_posts");
+
+ b.HasIndex("ForumId")
+ .HasDatabaseName("ix_forum_posts_forum_id");
+
+ b.HasIndex("PosterId")
+ .HasDatabaseName("ix_forum_posts_poster_id");
+
+ b.HasIndex("SearchVector")
+ .HasDatabaseName("ix_forum_posts_search_vector");
+
+ NpgsqlIndexBuilderExtensions.HasMethod(b.HasIndex("SearchVector"), "GIN");
+
+ b.HasIndex("Text")
+ .HasDatabaseName("ix_forum_posts_text");
+
+ NpgsqlIndexBuilderExtensions.HasMethod(b.HasIndex("Text"), "gin");
+ NpgsqlIndexBuilderExtensions.HasOperators(b.HasIndex("Text"), new[] { "gin_trgm_ops" });
+
+ b.HasIndex("TopicId")
+ .HasDatabaseName("ix_forum_posts_topic_id");
+
+ b.ToTable("forum_posts", (string)null);
+ });
+
+ modelBuilder.Entity("TASVideos.Data.Entity.Forum.ForumTopic", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("CreateTimestamp")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("create_timestamp");
+
+ b.Property("ForumId")
+ .HasColumnType("integer")
+ .HasColumnName("forum_id");
+
+ b.Property("GameId")
+ .HasColumnType("integer")
+ .HasColumnName("game_id");
+
+ b.Property("IsLocked")
+ .HasColumnType("boolean")
+ .HasColumnName("is_locked");
+
+ b.Property("LastUpdateTimestamp")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("last_update_timestamp");
+
+ b.Property("PollId")
+ .HasColumnType("integer")
+ .HasColumnName("poll_id");
+
+ b.Property("PosterId")
+ .HasColumnType("integer")
+ .HasColumnName("poster_id");
+
+ b.Property("SubmissionId")
+ .HasColumnType("integer")
+ .HasColumnName("submission_id");
+
+ b.Property("Title")
+ .IsRequired()
+ .HasMaxLength(500)
+ .HasColumnType("citext")
+ .HasColumnName("title");
+
+ b.Property("Type")
+ .HasColumnType("integer")
+ .HasColumnName("type");
+
+ b.HasKey("Id")
+ .HasName("pk_forum_topics");
+
+ b.HasIndex("ForumId")
+ .HasDatabaseName("ix_forum_topics_forum_id");
+
+ b.HasIndex("GameId")
+ .HasDatabaseName("ix_forum_topics_game_id");
+
+ b.HasIndex("PollId")
+ .IsUnique()
+ .HasDatabaseName("ix_forum_topics_poll_id");
+
+ b.HasIndex("PosterId")
+ .HasDatabaseName("ix_forum_topics_poster_id");
+
+ b.HasIndex("SubmissionId")
+ .IsUnique()
+ .HasDatabaseName("ix_forum_topics_submission_id");
+
+ b.ToTable("forum_topics", (string)null);
+ });
+
+ modelBuilder.Entity("TASVideos.Data.Entity.Forum.ForumTopicWatch", b =>
+ {
+ b.Property("UserId")
+ .HasColumnType("integer")
+ .HasColumnName("user_id");
+
+ b.Property("ForumTopicId")
+ .HasColumnType("integer")
+ .HasColumnName("forum_topic_id");
+
+ b.Property("IsNotified")
+ .HasColumnType("boolean")
+ .HasColumnName("is_notified");
+
+ b.HasKey("UserId", "ForumTopicId")
+ .HasName("pk_forum_topic_watches");
+
+ b.HasIndex("ForumTopicId")
+ .HasDatabaseName("ix_forum_topic_watches_forum_topic_id");
+
+ b.ToTable("forum_topic_watches", (string)null);
+ });
+
+ modelBuilder.Entity("TASVideos.Data.Entity.Game.Game", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("Abbreviation")
+ .HasMaxLength(24)
+ .HasColumnType("citext")
+ .HasColumnName("abbreviation");
+
+ b.Property("Aliases")
+ .HasMaxLength(250)
+ .HasColumnType("citext")
+ .HasColumnName("aliases");
+
+ b.Property("CreateTimestamp")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("create_timestamp");
+
+ b.Property("DisplayName")
+ .IsRequired()
+ .HasMaxLength(100)
+ .HasColumnType("citext")
+ .HasColumnName("display_name");
+
+ b.Property("GameResourcesPage")
+ .HasMaxLength(300)
+ .HasColumnType("citext")
+ .HasColumnName("game_resources_page");
+
+ b.Property("LastUpdateTimestamp")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("last_update_timestamp");
+
+ b.Property("ScreenshotUrl")
+ .HasMaxLength(250)
+ .HasColumnType("citext")
+ .HasColumnName("screenshot_url");
+
+ b.HasKey("Id")
+ .HasName("pk_games");
+
+ b.HasIndex("Abbreviation")
+ .IsUnique()
+ .HasDatabaseName("ix_games_abbreviation");
+
+ b.ToTable("games", (string)null);
+ });
+
+ modelBuilder.Entity("TASVideos.Data.Entity.Game.GameGameGroup", b =>
+ {
+ b.Property("GameId")
+ .HasColumnType("integer")
+ .HasColumnName("game_id");
+
+ b.Property("GameGroupId")
+ .HasColumnType("integer")
+ .HasColumnName("game_group_id");
+
+ b.HasKey("GameId", "GameGroupId")
+ .HasName("pk_game_game_groups");
+
+ b.HasIndex("GameGroupId")
+ .HasDatabaseName("ix_game_game_groups_game_group_id");
+
+ b.HasIndex("GameId")
+ .HasDatabaseName("ix_game_game_groups_game_id");
+
+ b.ToTable("game_game_groups", (string)null);
+ });
+
+ modelBuilder.Entity("TASVideos.Data.Entity.Game.GameGenre", b =>
+ {
+ b.Property("GameId")
+ .HasColumnType("integer")
+ .HasColumnName("game_id");
+
+ b.Property("GenreId")
+ .HasColumnType("integer")
+ .HasColumnName("genre_id");
+
+ b.HasKey("GameId", "GenreId")
+ .HasName("pk_game_genres");
+
+ b.HasIndex("GameId")
+ .HasDatabaseName("ix_game_genres_game_id");
+
+ b.HasIndex("GenreId")
+ .HasDatabaseName("ix_game_genres_genre_id");
+
+ b.ToTable("game_genres", (string)null);
+ });
+
+ modelBuilder.Entity("TASVideos.Data.Entity.Game.GameGoal", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("DisplayName")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("citext")
+ .HasColumnName("display_name");
+
+ b.Property("GameId")
+ .HasColumnType("integer")
+ .HasColumnName("game_id");
+
+ b.HasKey("Id")
+ .HasName("pk_game_goals");
+
+ b.HasIndex("GameId")
+ .HasDatabaseName("ix_game_goals_game_id");
+
+ b.ToTable("game_goals", (string)null);
+ });
+
+ modelBuilder.Entity("TASVideos.Data.Entity.Game.GameGroup", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("Abbreviation")
+ .HasMaxLength(255)
+ .HasColumnType("citext")
+ .HasColumnName("abbreviation");
+
+ b.Property("Description")
+ .HasMaxLength(2000)
+ .HasColumnType("citext")
+ .HasColumnName("description");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("citext")
+ .HasColumnName("name");
+
+ b.HasKey("Id")
+ .HasName("pk_game_groups");
+
+ b.HasIndex("Abbreviation")
+ .IsUnique()
+ .HasDatabaseName("ix_game_groups_abbreviation");
+
+ b.HasIndex("Name")
+ .IsUnique()
+ .HasDatabaseName("ix_game_groups_name");
+
+ b.ToTable("game_groups", (string)null);
+ });
+
+ modelBuilder.Entity("TASVideos.Data.Entity.Game.GameSystem", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("integer")
+ .HasColumnName("id")
+ .HasAnnotation("DatabaseGenerated", DatabaseGeneratedOption.None);
+
+ b.Property("Code")
+ .IsRequired()
+ .HasMaxLength(8)
+ .HasColumnType("citext")
+ .HasColumnName("code");
+
+ b.Property("CreateTimestamp")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("create_timestamp");
+
+ b.Property("DisplayName")
+ .IsRequired()
+ .HasMaxLength(100)
+ .HasColumnType("citext")
+ .HasColumnName("display_name");
+
+ b.Property("LastUpdateTimestamp")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("last_update_timestamp");
+
+ b.HasKey("Id")
+ .HasName("pk_game_systems");
+
+ b.HasIndex("Code")
+ .IsUnique()
+ .HasDatabaseName("ix_game_systems_code");
+
+ b.ToTable("game_systems", (string)null);
+ });
+
+ modelBuilder.Entity("TASVideos.Data.Entity.Game.GameSystemFrameRate", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("CreateTimestamp")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("create_timestamp");
+
+ b.Property("FrameRate")
+ .HasColumnType("double precision")
+ .HasColumnName("frame_rate");
+
+ b.Property("GameSystemId")
+ .HasColumnType("integer")
+ .HasColumnName("game_system_id");
+
+ b.Property("LastUpdateTimestamp")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("last_update_timestamp");
+
+ b.Property("Obsolete")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("boolean")
+ .HasDefaultValue(false)
+ .HasColumnName("obsolete");
+
+ b.Property("Preliminary")
+ .HasColumnType("boolean")
+ .HasColumnName("preliminary");
+
+ b.Property("RegionCode")
+ .IsRequired()
+ .HasMaxLength(8)
+ .HasColumnType("citext")
+ .HasColumnName("region_code");
+
+ b.HasKey("Id")
+ .HasName("pk_game_system_frame_rates");
+
+ b.HasIndex("GameSystemId")
+ .HasDatabaseName("ix_game_system_frame_rates_game_system_id");
+
+ b.ToTable("game_system_frame_rates", (string)null);
+ });
+
+ modelBuilder.Entity("TASVideos.Data.Entity.Game.GameVersion", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("CreateTimestamp")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("create_timestamp");
+
+ b.Property("GameId")
+ .HasColumnType("integer")
+ .HasColumnName("game_id");
+
+ b.Property("LastUpdateTimestamp")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("last_update_timestamp");
+
+ b.Property("Md5")
+ .HasMaxLength(32)
+ .HasColumnType("citext")
+ .HasColumnName("md5");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("citext")
+ .HasColumnName("name");
+
+ b.Property("Notes")
+ .HasMaxLength(2000)
+ .HasColumnType("citext")
+ .HasColumnName("notes");
+
+ b.Property("Region")
+ .HasMaxLength(50)
+ .HasColumnType("citext")
+ .HasColumnName("region");
+
+ b.Property("Sha1")
+ .HasMaxLength(40)
+ .HasColumnType("citext")
+ .HasColumnName("sha1");
+
+ b.Property("SourceDb")
+ .HasMaxLength(50)
+ .HasColumnType("citext")
+ .HasColumnName("source_db");
+
+ b.Property("SystemId")
+ .HasColumnType("integer")
+ .HasColumnName("system_id");
+
+ b.Property("TitleOverride")
+ .HasMaxLength(255)
+ .HasColumnType("citext")
+ .HasColumnName("title_override");
+
+ b.Property("Type")
+ .HasColumnType("integer")
+ .HasColumnName("type");
+
+ b.Property("Version")
+ .HasMaxLength(50)
+ .HasColumnType("citext")
+ .HasColumnName("version");
+
+ b.HasKey("Id")
+ .HasName("pk_game_versions");
+
+ b.HasIndex("GameId")
+ .HasDatabaseName("ix_game_versions_game_id");
+
+ b.HasIndex("SystemId")
+ .HasDatabaseName("ix_game_versions_system_id");
+
+ b.ToTable("game_versions", (string)null);
+ });
+
+ modelBuilder.Entity("TASVideos.Data.Entity.Game.Genre", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("DisplayName")
+ .IsRequired()
+ .HasMaxLength(20)
+ .HasColumnType("citext")
+ .HasColumnName("display_name");
+
+ b.HasKey("Id")
+ .HasName("pk_genres");
+
+ b.ToTable("genres", (string)null);
+ });
+
+ modelBuilder.Entity("TASVideos.Data.Entity.IpBan", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("CreateTimestamp")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("create_timestamp");
+
+ b.Property("LastUpdateTimestamp")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("last_update_timestamp");
+
+ b.Property("Mask")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("citext")
+ .HasColumnName("mask");
+
+ b.HasKey("Id")
+ .HasName("pk_ip_bans");
+
+ b.HasIndex("Mask")
+ .IsUnique()
+ .HasDatabaseName("ix_ip_bans_mask");
+
+ b.ToTable("ip_bans", (string)null);
+ });
+
+ modelBuilder.Entity("TASVideos.Data.Entity.MediaPost", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("Body")
+ .IsRequired()
+ .HasMaxLength(1024)
+ .HasColumnType("citext")
+ .HasColumnName("body");
+
+ b.Property("CreateTimestamp")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("create_timestamp");
+
+ b.Property("Group")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("citext")
+ .HasColumnName("group");
+
+ b.Property("LastUpdateTimestamp")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("last_update_timestamp");
+
+ b.Property("Link")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("citext")
+ .HasColumnName("link");
+
+ b.Property("Title")
+ .IsRequired()
+ .HasMaxLength(512)
+ .HasColumnType("citext")
+ .HasColumnName("title");
+
+ b.Property("Type")
+ .IsRequired()
+ .HasMaxLength(100)
+ .HasColumnType("citext")
+ .HasColumnName("type");
+
+ b.Property("User")
+ .IsRequired()
+ .HasMaxLength(100)
+ .HasColumnType("citext")
+ .HasColumnName("user");
+
+ b.HasKey("Id")
+ .HasName("pk_media_posts");
+
+ b.ToTable("media_posts", (string)null);
+ });
+
+ modelBuilder.Entity("TASVideos.Data.Entity.PrivateMessage", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("CreateTimestamp")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("create_timestamp");
+
+ b.Property("DeletedForFromUser")
+ .HasColumnType("boolean")
+ .HasColumnName("deleted_for_from_user");
+
+ b.Property("DeletedForToUser")
+ .HasColumnType("boolean")
+ .HasColumnName("deleted_for_to_user");
+
+ b.Property("EnableBbCode")
+ .HasColumnType("boolean")
+ .HasColumnName("enable_bb_code");
+
+ b.Property("EnableHtml")
+ .HasColumnType("boolean")
+ .HasColumnName("enable_html");
+
+ b.Property("FromUserId")
+ .HasColumnType("integer")
+ .HasColumnName("from_user_id");
+
+ b.Property("LastUpdateTimestamp")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("last_update_timestamp");
+
+ b.Property("ReadOn")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("read_on");
+
+ b.Property("SavedForFromUser")
+ .HasColumnType("boolean")
+ .HasColumnName("saved_for_from_user");
+
+ b.Property("SavedForToUser")
+ .HasColumnType("boolean")
+ .HasColumnName("saved_for_to_user");
+
+ b.Property("Subject")
+ .HasMaxLength(500)
+ .HasColumnType("citext")
+ .HasColumnName("subject");
+
+ b.Property("Text")
+ .IsRequired()
+ .HasMaxLength(10000)
+ .HasColumnType("citext")
+ .HasColumnName("text");
+
+ b.Property("ToUserId")
+ .HasColumnType("integer")
+ .HasColumnName("to_user_id");
+
+ b.HasKey("Id")
+ .HasName("pk_private_messages");
+
+ b.HasIndex("FromUserId")
+ .HasDatabaseName("ix_private_messages_from_user_id");
+
+ b.HasIndex("ToUserId", "ReadOn", "DeletedForToUser")
+ .HasDatabaseName("ix_private_messages_to_user_id_read_on_deleted_for_to_user");
+
+ b.ToTable("private_messages", (string)null);
+ });
+
+ modelBuilder.Entity("TASVideos.Data.Entity.Publication", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("AdditionalAuthors")
+ .HasMaxLength(200)
+ .HasColumnType("citext")
+ .HasColumnName("additional_authors");
+
+ b.Property("CreateTimestamp")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("create_timestamp");
+
+ b.Property("EmulatorVersion")
+ .HasMaxLength(50)
+ .HasColumnType("citext")
+ .HasColumnName("emulator_version");
+
+ b.Property("Frames")
+ .HasColumnType("integer")
+ .HasColumnName("frames");
+
+ b.Property("GameGoalId")
+ .HasColumnType("integer")
+ .HasColumnName("game_goal_id");
+
+ b.Property("GameId")
+ .HasColumnType("integer")
+ .HasColumnName("game_id");
+
+ b.Property("GameVersionId")
+ .HasColumnType("integer")
+ .HasColumnName("game_version_id");
+
+ b.Property("LastUpdateTimestamp")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("last_update_timestamp");
+
+ b.Property("MovieFile")
+ .IsRequired()
+ .HasColumnType("bytea")
+ .HasColumnName("movie_file");
+
+ b.Property("MovieFileName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("citext")
+ .HasColumnName("movie_file_name");
+
+ b.Property("ObsoletedById")
+ .HasColumnType("integer")
+ .HasColumnName("obsoleted_by_id");
+
+ b.Property("PublicationClassId")
+ .HasColumnType("integer")
+ .HasColumnName("publication_class_id");
+
+ b.Property("RerecordCount")
+ .HasColumnType("integer")
+ .HasColumnName("rerecord_count");
+
+ b.Property("SubmissionId")
+ .HasColumnType("integer")
+ .HasColumnName("submission_id");
+
+ b.Property("SystemFrameRateId")
+ .HasColumnType("integer")
+ .HasColumnName("system_frame_rate_id");
+
+ b.Property("SystemId")
+ .HasColumnType("integer")
+ .HasColumnName("system_id");
+
+ b.Property("Title")
+ .IsRequired()
+ .HasMaxLength(500)
+ .HasColumnType("citext")
+ .HasColumnName("title");
+
+ b.HasKey("Id")
+ .HasName("pk_publications");
+
+ b.HasIndex("GameGoalId")
+ .HasDatabaseName("ix_publications_game_goal_id");
+
+ b.HasIndex("GameId")
+ .HasDatabaseName("ix_publications_game_id");
+
+ b.HasIndex("GameVersionId")
+ .HasDatabaseName("ix_publications_game_version_id");
+
+ b.HasIndex("MovieFileName")
+ .IsUnique()
+ .HasDatabaseName("ix_publications_movie_file_name");
+
+ b.HasIndex("ObsoletedById")
+ .HasDatabaseName("ix_publications_obsoleted_by_id");
+
+ b.HasIndex("PublicationClassId")
+ .HasDatabaseName("ix_publications_publication_class_id");
+
+ b.HasIndex("SubmissionId")
+ .IsUnique()
+ .HasDatabaseName("ix_publications_submission_id");
+
+ b.HasIndex("SystemFrameRateId")
+ .HasDatabaseName("ix_publications_system_frame_rate_id");
+
+ b.HasIndex("SystemId")
+ .HasDatabaseName("ix_publications_system_id");
+
+ b.ToTable("publications", (string)null);
+ });
+
+ modelBuilder.Entity("TASVideos.Data.Entity.PublicationAuthor", b =>
+ {
+ b.Property("UserId")
+ .HasColumnType("integer")
+ .HasColumnName("user_id");
+
+ b.Property("PublicationId")
+ .HasColumnType("integer")
+ .HasColumnName("publication_id");
+
+ b.Property("Ordinal")
+ .HasColumnType("integer")
+ .HasColumnName("ordinal");
+
+ b.HasKey("UserId", "PublicationId")
+ .HasName("pk_publication_authors");
+
+ b.HasIndex("PublicationId")
+ .HasDatabaseName("ix_publication_authors_publication_id");
+
+ b.ToTable("publication_authors", (string)null);
+ });
+
+ modelBuilder.Entity("TASVideos.Data.Entity.PublicationClass", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("integer")
+ .HasColumnName("id")
+ .HasAnnotation("DatabaseGenerated", DatabaseGeneratedOption.None);
+
+ b.Property("IconPath")
+ .HasMaxLength(100)
+ .HasColumnType("citext")
+ .HasColumnName("icon_path");
+
+ b.Property("Link")
+ .IsRequired()
+ .HasMaxLength(100)
+ .HasColumnType("citext")
+ .HasColumnName("link");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(20)
+ .HasColumnType("citext")
+ .HasColumnName("name");
+
+ b.HasKey("Id")
+ .HasName("pk_publication_classes");
+
+ b.HasIndex("Name")
+ .IsUnique()
+ .HasDatabaseName("ix_publication_classes_name");
+
+ b.ToTable("publication_classes", (string)null);
+ });
+
+ modelBuilder.Entity("TASVideos.Data.Entity.PublicationFile", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("CreateTimestamp")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("create_timestamp");
+
+ b.Property("Description")
+ .HasMaxLength(250)
+ .HasColumnType("citext")
+ .HasColumnName("description");
+
+ b.Property("FileData")
+ .HasColumnType("bytea")
+ .HasColumnName("file_data");
+
+ b.Property("LastUpdateTimestamp")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("last_update_timestamp");
+
+ b.Property("Path")
+ .IsRequired()
+ .HasMaxLength(250)
+ .HasColumnType("citext")
+ .HasColumnName("path");
+
+ b.Property("PublicationId")
+ .HasColumnType("integer")
+ .HasColumnName("publication_id");
+
+ b.Property("Type")
+ .HasColumnType("integer")
+ .HasColumnName("type");
+
+ b.HasKey("Id")
+ .HasName("pk_publication_files");
+
+ b.HasIndex("PublicationId")
+ .HasDatabaseName("ix_publication_files_publication_id");
+
+ b.ToTable("publication_files", (string)null);
+ });
+
+ modelBuilder.Entity("TASVideos.Data.Entity.PublicationFlag", b =>
+ {
+ b.Property("PublicationId")
+ .HasColumnType("integer")
+ .HasColumnName("publication_id");
+
+ b.Property("FlagId")
+ .HasColumnType("integer")
+ .HasColumnName("flag_id");
+
+ b.HasKey("PublicationId", "FlagId")
+ .HasName("pk_publication_flags");
+
+ b.HasIndex("FlagId")
+ .HasDatabaseName("ix_publication_flags_flag_id");
+
+ b.HasIndex("PublicationId")
+ .HasDatabaseName("ix_publication_flags_publication_id");
+
+ b.ToTable("publication_flags", (string)null);
+ });
+
+ modelBuilder.Entity("TASVideos.Data.Entity.PublicationMaintenanceLog", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("Log")
+ .IsRequired()
+ .HasMaxLength(1024)
+ .HasColumnType("citext")
+ .HasColumnName("log");
+
+ b.Property("PublicationId")
+ .HasColumnType("integer")
+ .HasColumnName("publication_id");
+
+ b.Property("TimeStamp")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("time_stamp");
+
+ b.Property("UserId")
+ .HasColumnType("integer")
+ .HasColumnName("user_id");
+
+ b.HasKey("Id")
+ .HasName("pk_publication_maintenance_logs");
+
+ b.HasIndex("PublicationId")
+ .HasDatabaseName("ix_publication_maintenance_logs_publication_id");
+
+ b.HasIndex("UserId")
+ .HasDatabaseName("ix_publication_maintenance_logs_user_id");
+
+ b.ToTable("publication_maintenance_logs", (string)null);
+ });
+
+ modelBuilder.Entity("TASVideos.Data.Entity.PublicationRating", b =>
+ {
+ b.Property("UserId")
+ .HasColumnType("integer")
+ .HasColumnName("user_id");
+
+ b.Property("PublicationId")
+ .HasColumnType("integer")
+ .HasColumnName("publication_id");
+
+ b.Property("Value")
+ .HasColumnType("double precision")
+ .HasColumnName("value");
+
+ b.HasKey("UserId", "PublicationId")
+ .HasName("pk_publication_ratings");
+
+ b.HasIndex("PublicationId")
+ .HasDatabaseName("ix_publication_ratings_publication_id");
+
+ b.HasIndex("UserId", "PublicationId")
+ .IsUnique()
+ .HasDatabaseName("ix_publication_ratings_user_id_publication_id");
+
+ b.ToTable("publication_ratings", (string)null);
+ });
+
+ modelBuilder.Entity("TASVideos.Data.Entity.PublicationTag", b =>
+ {
+ b.Property("PublicationId")
+ .HasColumnType("integer")
+ .HasColumnName("publication_id");
+
+ b.Property("TagId")
+ .HasColumnType("integer")
+ .HasColumnName("tag_id");
+
+ b.HasKey("PublicationId", "TagId")
+ .HasName("pk_publication_tags");
+
+ b.HasIndex("PublicationId")
+ .HasDatabaseName("ix_publication_tags_publication_id");
+
+ b.HasIndex("TagId")
+ .HasDatabaseName("ix_publication_tags_tag_id");
+
+ b.ToTable("publication_tags", (string)null);
+ });
+
+ modelBuilder.Entity("TASVideos.Data.Entity.PublicationUrl", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("CreateTimestamp")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("create_timestamp");
+
+ b.Property("DisplayName")
+ .HasMaxLength(100)
+ .HasColumnType("citext")
+ .HasColumnName("display_name");
+
+ b.Property("LastUpdateTimestamp")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("last_update_timestamp");
+
+ b.Property("PublicationId")
+ .HasColumnType("integer")
+ .HasColumnName("publication_id");
+
+ b.Property("Type")
+ .HasColumnType("integer")
+ .HasColumnName("type");
+
+ b.Property("Url")
+ .IsRequired()
+ .HasMaxLength(500)
+ .HasColumnType("citext")
+ .HasColumnName("url");
+
+ b.HasKey("Id")
+ .HasName("pk_publication_urls");
+
+ b.HasIndex("PublicationId")
+ .HasDatabaseName("ix_publication_urls_publication_id");
+
+ b.HasIndex("Type")
+ .HasDatabaseName("ix_publication_urls_type");
+
+ b.ToTable("publication_urls", (string)null);
+ });
+
+ modelBuilder.Entity("TASVideos.Data.Entity.Role", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("AutoAssignPostCount")
+ .HasColumnType("integer")
+ .HasColumnName("auto_assign_post_count");
+
+ b.Property("AutoAssignPublications")
+ .HasColumnType("boolean")
+ .HasColumnName("auto_assign_publications");
+
+ b.Property("ConcurrencyStamp")
+ .HasColumnType("citext")
+ .HasColumnName("concurrency_stamp");
+
+ b.Property("CreateTimestamp")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("create_timestamp");
+
+ b.Property("Description")
+ .IsRequired()
+ .HasMaxLength(300)
+ .HasColumnType("citext")
+ .HasColumnName("description");
+
+ b.Property("IsDefault")
+ .HasColumnType("boolean")
+ .HasColumnName("is_default");
+
+ b.Property