diff --git a/SwipetorApp/Migrations/20241013185127_Init.Designer.cs b/SwipetorApp/Migrations/20241013185127_Init.Designer.cs
new file mode 100644
index 0000000..5ea6352
--- /dev/null
+++ b/SwipetorApp/Migrations/20241013185127_Init.Designer.cs
@@ -0,0 +1,2151 @@
+//
+using System;
+using System.Collections.Generic;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
+using NpgsqlTypes;
+using SwipetorApp.Models.DbEntities;
+
+#nullable disable
+
+namespace SwipetorApp.Migrations
+{
+ [DbContext(typeof(DbCx))]
+ [Migration("20241013185127_Init")]
+ partial class Init
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "8.0.6")
+ .HasAnnotation("Proxies:ChangeTracking", false)
+ .HasAnnotation("Proxies:CheckEquality", false)
+ .HasAnnotation("Proxies:LazyLoading", true)
+ .HasAnnotation("Relational:MaxIdentifierLength", 63);
+
+ NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.AuditLog", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid")
+ .HasColumnName("id");
+
+ b.Property("Action")
+ .HasColumnType("text")
+ .HasColumnName("action");
+
+ b.Property("BrowserAgent")
+ .HasMaxLength(2048)
+ .HasColumnType("character varying(2048)")
+ .HasColumnName("browser_agent");
+
+ b.Property("CreatedAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("created_at");
+
+ b.Property("CreatedIp")
+ .HasMaxLength(64)
+ .HasColumnType("character varying(64)")
+ .HasColumnName("created_ip");
+
+ b.Property("EntityId")
+ .HasMaxLength(64)
+ .HasColumnType("character varying(64)")
+ .HasColumnName("entity_id");
+
+ b.Property("EntityName")
+ .HasMaxLength(128)
+ .HasColumnType("character varying(128)")
+ .HasColumnName("entity_name");
+
+ b.Property("Log")
+ .HasMaxLength(4096)
+ .HasColumnType("character varying(4096)")
+ .HasColumnName("log");
+
+ b.Property("UserId")
+ .HasColumnType("integer")
+ .HasColumnName("user_id");
+
+ b.HasKey("Id")
+ .HasName("pk_audit_logs");
+
+ b.HasIndex("Action")
+ .HasDatabaseName("ix_audit_logs_action");
+
+ b.HasIndex("CreatedAt")
+ .HasDatabaseName("ix_audit_logs_created_at");
+
+ b.HasIndex("CreatedIp")
+ .HasDatabaseName("ix_audit_logs_created_ip");
+
+ b.HasIndex("EntityId")
+ .HasDatabaseName("ix_audit_logs_entity_id");
+
+ b.HasIndex("EntityName")
+ .HasDatabaseName("ix_audit_logs_entity_name");
+
+ b.HasIndex("UserId")
+ .HasDatabaseName("ix_audit_logs_user_id");
+
+ b.ToTable("audit_logs", (string)null);
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.Comment", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("CreatedAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("created_at");
+
+ b.Property("CreatedIp")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("character varying(64)")
+ .HasColumnName("created_ip");
+
+ b.Property("LikeCount")
+ .HasColumnType("integer")
+ .HasColumnName("like_count");
+
+ b.Property("ModifiedAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("modified_at");
+
+ b.Property("ModifiedIp")
+ .HasMaxLength(64)
+ .HasColumnType("character varying(64)")
+ .HasColumnName("modified_ip");
+
+ b.Property("PostId")
+ .HasColumnType("integer")
+ .HasColumnName("post_id");
+
+ b.Property("Txt")
+ .IsRequired()
+ .HasMaxLength(65536)
+ .HasColumnType("character varying(65536)")
+ .HasColumnName("txt");
+
+ b.Property("UserId")
+ .HasColumnType("integer")
+ .HasColumnName("user_id");
+
+ b.HasKey("Id")
+ .HasName("pk_comments");
+
+ b.HasIndex("LikeCount")
+ .HasDatabaseName("ix_comments_like_count");
+
+ b.HasIndex("PostId")
+ .HasDatabaseName("ix_comments_post_id");
+
+ b.HasIndex("UserId")
+ .HasDatabaseName("ix_comments_user_id");
+
+ b.ToTable("comments", (string)null);
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.CustomDomain", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("DomainName")
+ .HasMaxLength(64)
+ .HasColumnType("character varying(64)")
+ .HasColumnName("domain_name");
+
+ b.Property("RecaptchaKey")
+ .HasMaxLength(128)
+ .HasColumnType("character varying(128)")
+ .HasColumnName("recaptcha_key");
+
+ b.Property("RecaptchaSecret")
+ .HasMaxLength(128)
+ .HasColumnType("character varying(128)")
+ .HasColumnName("recaptcha_secret");
+
+ b.Property("UserId")
+ .HasColumnType("integer")
+ .HasColumnName("user_id");
+
+ b.HasKey("Id")
+ .HasName("pk_custom_domains");
+
+ b.HasIndex("DomainName")
+ .HasDatabaseName("ix_custom_domains_domain_name");
+
+ b.HasIndex("UserId")
+ .IsUnique()
+ .HasDatabaseName("ix_custom_domains_user_id");
+
+ b.ToTable("custom_domains", (string)null);
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.EnglishWord", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("Word")
+ .HasMaxLength(128)
+ .HasColumnType("character varying(128)")
+ .HasColumnName("word");
+
+ b.HasKey("Id")
+ .HasName("pk_english_words");
+
+ b.ToTable("english_words", (string)null);
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.FavPost", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("CreatedAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("created_at");
+
+ b.Property("CreatedIp")
+ .HasMaxLength(64)
+ .HasColumnType("character varying(64)")
+ .HasColumnName("created_ip");
+
+ b.Property("PostId")
+ .HasColumnType("integer")
+ .HasColumnName("post_id");
+
+ b.Property("UserId")
+ .HasColumnType("integer")
+ .HasColumnName("user_id");
+
+ b.HasKey("Id")
+ .HasName("pk_fav_posts");
+
+ b.HasIndex("PostId")
+ .HasDatabaseName("ix_fav_posts_post_id");
+
+ b.HasIndex("UserId")
+ .HasDatabaseName("ix_fav_posts_user_id");
+
+ b.ToTable("fav_posts", (string)null);
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.Hub", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("LastPostAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("last_post_at");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(32)
+ .HasColumnType("character varying(32)")
+ .HasColumnName("name");
+
+ b.Property("Ordering")
+ .HasColumnType("integer")
+ .HasColumnName("ordering");
+
+ b.Property("PhotoId")
+ .HasColumnType("uuid")
+ .HasColumnName("photo_id");
+
+ b.Property("PostCount")
+ .HasColumnType("integer")
+ .HasColumnName("post_count");
+
+ b.HasKey("Id")
+ .HasName("pk_hubs");
+
+ b.HasIndex("LastPostAt")
+ .HasDatabaseName("ix_hubs_last_post_at");
+
+ b.HasIndex("Ordering")
+ .HasDatabaseName("ix_hubs_ordering");
+
+ b.HasIndex("PhotoId")
+ .HasDatabaseName("ix_hubs_photo_id");
+
+ b.HasIndex("PostCount")
+ .HasDatabaseName("ix_hubs_post_count");
+
+ b.ToTable("hubs", (string)null);
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.KeyValue", b =>
+ {
+ b.Property("Key")
+ .HasMaxLength(64)
+ .HasColumnType("character varying(64)")
+ .HasColumnName("key");
+
+ b.Property("ModifiedAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("modified_at");
+
+ b.Property("ModifiedIp")
+ .HasMaxLength(64)
+ .HasColumnType("character varying(64)")
+ .HasColumnName("modified_ip");
+
+ b.Property("Value")
+ .HasMaxLength(4096)
+ .HasColumnType("character varying(4096)")
+ .HasColumnName("value");
+
+ b.HasKey("Key")
+ .HasName("pk_key_values");
+
+ b.ToTable("key_values", (string)null);
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.Location", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("Capital")
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)")
+ .HasColumnName("capital");
+
+ b.Property("FullName")
+ .HasMaxLength(64)
+ .HasColumnType("character varying(64)")
+ .HasColumnName("full_name");
+
+ b.Property("Iso2")
+ .HasMaxLength(2)
+ .HasColumnType("character varying(2)")
+ .HasColumnName("iso2");
+
+ b.Property("Iso3")
+ .HasMaxLength(3)
+ .HasColumnType("character varying(3)")
+ .HasColumnName("iso3");
+
+ b.Property("Lat")
+ .HasColumnType("double precision")
+ .HasColumnName("lat");
+
+ b.Property("Lng")
+ .HasColumnType("double precision")
+ .HasColumnName("lng");
+
+ b.Property("Name")
+ .HasMaxLength(64)
+ .HasColumnType("character varying(64)")
+ .HasColumnName("name");
+
+ b.Property("NameAscii")
+ .HasMaxLength(64)
+ .HasColumnType("character varying(64)")
+ .HasColumnName("name_ascii");
+
+ b.Property("ParentId")
+ .HasColumnType("integer")
+ .HasColumnName("parent_id");
+
+ b.Property("Population")
+ .HasColumnType("integer")
+ .HasColumnName("population");
+
+ b.Property("SearchVector")
+ .ValueGeneratedOnAddOrUpdate()
+ .HasColumnType("tsvector")
+ .HasColumnName("search_vector")
+ .HasAnnotation("Npgsql:TsVectorConfig", "english")
+ .HasAnnotation("Npgsql:TsVectorProperties", new[] { "Name", "NameAscii", "FullName" });
+
+ b.Property("SimplemapsId")
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)")
+ .HasColumnName("simplemaps_id");
+
+ b.Property("Type")
+ .HasColumnType("integer")
+ .HasColumnName("type");
+
+ b.HasKey("Id")
+ .HasName("pk_locations");
+
+ b.HasIndex("FullName")
+ .HasDatabaseName("ix_locations_full_name");
+
+ b.HasIndex("Iso2")
+ .HasDatabaseName("ix_locations_iso2");
+
+ b.HasIndex("Iso3")
+ .HasDatabaseName("ix_locations_iso3");
+
+ b.HasIndex("Lat")
+ .HasDatabaseName("ix_locations_lat");
+
+ b.HasIndex("Lng")
+ .HasDatabaseName("ix_locations_lng");
+
+ b.HasIndex("Name")
+ .HasDatabaseName("ix_locations_name");
+
+ b.HasIndex("NameAscii")
+ .HasDatabaseName("ix_locations_name_ascii");
+
+ b.HasIndex("ParentId")
+ .HasDatabaseName("ix_locations_parent_id");
+
+ b.HasIndex("SearchVector")
+ .HasDatabaseName("ix_locations_search_vector");
+
+ NpgsqlIndexBuilderExtensions.HasMethod(b.HasIndex("SearchVector"), "GIN");
+
+ b.HasIndex("Type")
+ .HasDatabaseName("ix_locations_type");
+
+ b.ToTable("locations", (string)null);
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.LoginAttempt", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid")
+ .HasColumnName("id");
+
+ b.Property("BrowserAgent")
+ .HasMaxLength(2048)
+ .HasColumnType("character varying(2048)")
+ .HasColumnName("browser_agent");
+
+ b.Property("CreatedAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("created_at");
+
+ b.Property("CreatedIp")
+ .HasMaxLength(64)
+ .HasColumnType("character varying(64)")
+ .HasColumnName("created_ip");
+
+ b.Property("LoginRequestId")
+ .HasColumnType("uuid")
+ .HasColumnName("login_request_id");
+
+ b.Property("TriedEmailCode")
+ .HasMaxLength(64)
+ .HasColumnType("character varying(64)")
+ .HasColumnName("tried_email_code");
+
+ b.Property("UserId")
+ .HasColumnType("integer")
+ .HasColumnName("user_id");
+
+ b.HasKey("Id")
+ .HasName("pk_login_attempts");
+
+ b.HasIndex("CreatedAt")
+ .HasDatabaseName("ix_login_attempts_created_at");
+
+ b.HasIndex("CreatedIp")
+ .HasDatabaseName("ix_login_attempts_created_ip");
+
+ b.HasIndex("LoginRequestId")
+ .HasDatabaseName("ix_login_attempts_login_request_id");
+
+ b.HasIndex("UserId")
+ .HasDatabaseName("ix_login_attempts_user_id");
+
+ b.ToTable("login_attempts", (string)null);
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.LoginRequest", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid")
+ .HasColumnName("id");
+
+ b.Property("BrowserAgent")
+ .HasMaxLength(2048)
+ .HasColumnType("character varying(2048)")
+ .HasColumnName("browser_agent");
+
+ b.Property("CreatedAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("created_at");
+
+ b.Property("CreatedIp")
+ .HasMaxLength(64)
+ .HasColumnType("character varying(64)")
+ .HasColumnName("created_ip");
+
+ b.Property("Email")
+ .HasMaxLength(128)
+ .HasColumnType("character varying(128)")
+ .HasColumnName("email");
+
+ b.Property("EmailCode")
+ .HasMaxLength(32)
+ .HasColumnType("character varying(32)")
+ .HasColumnName("email_code");
+
+ b.Property("IsUsed")
+ .HasColumnType("boolean")
+ .HasColumnName("is_used");
+
+ b.Property("UserId")
+ .HasColumnType("integer")
+ .HasColumnName("user_id");
+
+ b.HasKey("Id")
+ .HasName("pk_login_requests");
+
+ b.HasIndex("CreatedAt")
+ .HasDatabaseName("ix_login_requests_created_at");
+
+ b.HasIndex("CreatedIp")
+ .HasDatabaseName("ix_login_requests_created_ip");
+
+ b.HasIndex("Email")
+ .HasDatabaseName("ix_login_requests_email");
+
+ b.HasIndex("EmailCode")
+ .HasDatabaseName("ix_login_requests_email_code");
+
+ b.HasIndex("IsUsed")
+ .HasDatabaseName("ix_login_requests_is_used");
+
+ b.HasIndex("UserId")
+ .HasDatabaseName("ix_login_requests_user_id");
+
+ b.ToTable("login_requests", (string)null);
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.Notif", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("CreatedAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("created_at");
+
+ b.Property("Data")
+ .HasMaxLength(4096)
+ .HasColumnType("character varying(4096)")
+ .HasColumnName("data");
+
+ b.Property("IsRead")
+ .HasColumnType("boolean")
+ .HasColumnName("is_read");
+
+ b.Property("IsViewed")
+ .HasColumnType("boolean")
+ .HasColumnName("is_viewed");
+
+ b.Property("PushNotifSentAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("push_notif_sent_at");
+
+ b.Property("ReceiverUserId")
+ .HasColumnType("integer")
+ .HasColumnName("receiver_user_id");
+
+ b.Property("RelatedCommentId")
+ .HasColumnType("integer")
+ .HasColumnName("related_comment_id");
+
+ b.Property("RelatedPostId")
+ .HasColumnType("integer")
+ .HasColumnName("related_post_id");
+
+ b.Property("SenderUserId")
+ .HasColumnType("integer")
+ .HasColumnName("sender_user_id");
+
+ b.Property("Type")
+ .HasColumnType("integer")
+ .HasColumnName("type");
+
+ b.HasKey("Id")
+ .HasName("pk_notifs");
+
+ b.HasIndex("CreatedAt")
+ .HasDatabaseName("ix_notifs_created_at");
+
+ b.HasIndex("IsRead")
+ .HasDatabaseName("ix_notifs_is_read");
+
+ b.HasIndex("IsViewed")
+ .HasDatabaseName("ix_notifs_is_viewed");
+
+ b.HasIndex("PushNotifSentAt")
+ .HasDatabaseName("ix_notifs_push_notif_sent_at");
+
+ b.HasIndex("ReceiverUserId")
+ .HasDatabaseName("ix_notifs_receiver_user_id");
+
+ b.HasIndex("RelatedCommentId")
+ .HasDatabaseName("ix_notifs_related_comment_id");
+
+ b.HasIndex("RelatedPostId")
+ .HasDatabaseName("ix_notifs_related_post_id");
+
+ b.HasIndex("SenderUserId")
+ .HasDatabaseName("ix_notifs_sender_user_id");
+
+ b.HasIndex("Type")
+ .HasDatabaseName("ix_notifs_type");
+
+ b.ToTable("notifs", (string)null);
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.Photo", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid")
+ .HasColumnName("id");
+
+ b.Property("CreatedAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("created_at");
+
+ b.Property("CreatedIp")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("character varying(64)")
+ .HasColumnName("created_ip");
+
+ b.Property("Ext")
+ .HasMaxLength(8)
+ .HasColumnType("character varying(8)")
+ .HasColumnName("ext");
+
+ b.Property("Height")
+ .HasColumnType("integer")
+ .HasColumnName("height");
+
+ b.Property("ReferenceUrl")
+ .HasMaxLength(1024)
+ .HasColumnType("character varying(1024)")
+ .HasColumnName("reference_url");
+
+ b.Property>("Sizes")
+ .HasColumnType("integer[]")
+ .HasColumnName("sizes");
+
+ b.Property("Width")
+ .HasColumnType("integer")
+ .HasColumnName("width");
+
+ b.HasKey("Id")
+ .HasName("pk_photos");
+
+ b.ToTable("photos", (string)null);
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.PmMsg", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("CreatedAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("created_at");
+
+ b.Property("ThreadId")
+ .HasColumnType("bigint")
+ .HasColumnName("thread_id");
+
+ b.Property("ThreadUserId")
+ .HasColumnType("integer")
+ .HasColumnName("thread_user_id");
+
+ b.Property("Txt")
+ .HasMaxLength(65536)
+ .HasColumnType("character varying(65536)")
+ .HasColumnName("txt");
+
+ b.Property("UserId")
+ .HasColumnType("integer")
+ .HasColumnName("user_id");
+
+ b.HasKey("Id")
+ .HasName("pk_pm_msgs");
+
+ b.HasIndex("ThreadId")
+ .HasDatabaseName("ix_pm_msgs_thread_id");
+
+ b.HasIndex("ThreadUserId")
+ .HasDatabaseName("ix_pm_msgs_thread_user_id");
+
+ b.HasIndex("UserId")
+ .HasDatabaseName("ix_pm_msgs_user_id");
+
+ b.ToTable("pm_msgs", (string)null);
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.PmPermission", b =>
+ {
+ b.Property("ReceiverUserId")
+ .HasColumnType("integer")
+ .HasColumnName("receiver_user_id");
+
+ b.Property("SenderUserId")
+ .HasColumnType("integer")
+ .HasColumnName("sender_user_id");
+
+ b.Property("CreatedAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("created_at");
+
+ b.Property("CreatedIp")
+ .HasMaxLength(64)
+ .HasColumnType("character varying(64)")
+ .HasColumnName("created_ip");
+
+ b.Property("IsAllowed")
+ .HasColumnType("boolean")
+ .HasColumnName("is_allowed");
+
+ b.Property("IsBlocked")
+ .HasColumnType("boolean")
+ .HasColumnName("is_blocked");
+
+ b.HasKey("ReceiverUserId", "SenderUserId")
+ .HasName("pk_pm_permissions");
+
+ b.HasIndex("IsAllowed")
+ .HasDatabaseName("ix_pm_permissions_is_allowed");
+
+ b.HasIndex("IsBlocked")
+ .HasDatabaseName("ix_pm_permissions_is_blocked");
+
+ b.HasIndex("SenderUserId")
+ .HasDatabaseName("ix_pm_permissions_sender_user_id");
+
+ b.ToTable("pm_permissions", (string)null);
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.PmThread", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("CreatedAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("created_at");
+
+ b.Property("LastMsgAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("last_msg_at");
+
+ b.Property("LastMsgId")
+ .HasColumnType("bigint")
+ .HasColumnName("last_msg_id");
+
+ b.Property("UserCount")
+ .HasColumnType("integer")
+ .HasColumnName("user_count");
+
+ b.HasKey("Id")
+ .HasName("pk_pm_threads");
+
+ b.HasIndex("CreatedAt")
+ .HasDatabaseName("ix_pm_threads_created_at");
+
+ b.HasIndex("LastMsgAt")
+ .HasDatabaseName("ix_pm_threads_last_msg_at");
+
+ b.HasIndex("LastMsgId")
+ .HasDatabaseName("ix_pm_threads_last_msg_id");
+
+ b.ToTable("pm_threads", (string)null);
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.PmThreadUser", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("CreatedAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("created_at");
+
+ b.Property("EmailSentAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("email_sent_at");
+
+ b.Property("FirstUnreadMsgId")
+ .HasColumnType("bigint")
+ .HasColumnName("first_unread_msg_id");
+
+ b.Property("IsInitiator")
+ .HasColumnType("boolean")
+ .HasColumnName("is_initiator");
+
+ b.Property("LastMsgAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("last_msg_at");
+
+ b.Property("LastReadMsgId")
+ .HasColumnType("bigint")
+ .HasColumnName("last_read_msg_id");
+
+ b.Property("ThreadId")
+ .HasColumnType("bigint")
+ .HasColumnName("thread_id");
+
+ b.Property("UnreadMsgCount")
+ .HasColumnType("integer")
+ .HasColumnName("unread_msg_count");
+
+ b.Property("UserId")
+ .HasColumnType("integer")
+ .HasColumnName("user_id");
+
+ b.HasKey("Id")
+ .HasName("pk_pm_thread_users");
+
+ b.HasIndex("EmailSentAt")
+ .HasDatabaseName("ix_pm_thread_users_email_sent_at");
+
+ b.HasIndex("FirstUnreadMsgId")
+ .HasDatabaseName("ix_pm_thread_users_first_unread_msg_id");
+
+ b.HasIndex("IsInitiator")
+ .HasDatabaseName("ix_pm_thread_users_is_initiator");
+
+ b.HasIndex("LastMsgAt")
+ .HasDatabaseName("ix_pm_thread_users_last_msg_at");
+
+ b.HasIndex("LastReadMsgId")
+ .HasDatabaseName("ix_pm_thread_users_last_read_msg_id");
+
+ b.HasIndex("ThreadId")
+ .HasDatabaseName("ix_pm_thread_users_thread_id");
+
+ b.HasIndex("UnreadMsgCount")
+ .HasDatabaseName("ix_pm_thread_users_unread_msg_count");
+
+ b.HasIndex("UserId")
+ .HasDatabaseName("ix_pm_thread_users_user_id");
+
+ b.ToTable("pm_thread_users", (string)null);
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.Post", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("CommentsCount")
+ .HasColumnType("integer")
+ .HasColumnName("comments_count");
+
+ b.Property("CreatedAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("created_at");
+
+ b.Property("CreatedIp")
+ .HasMaxLength(64)
+ .HasColumnType("character varying(64)")
+ .HasColumnName("created_ip");
+
+ b.Property("FavCount")
+ .HasColumnType("integer")
+ .HasColumnName("fav_count");
+
+ b.Property("IsPublished")
+ .HasColumnType("boolean")
+ .HasColumnName("is_published");
+
+ b.Property("IsRemoved")
+ .HasColumnType("boolean")
+ .HasColumnName("is_removed");
+
+ b.Property("ModifiedAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("modified_at");
+
+ b.Property("Title")
+ .HasMaxLength(128)
+ .HasColumnType("character varying(128)")
+ .HasColumnName("title");
+
+ b.Property("UserId")
+ .HasColumnType("integer")
+ .HasColumnName("user_id");
+
+ b.HasKey("Id")
+ .HasName("pk_posts");
+
+ b.HasIndex("CreatedAt")
+ .HasDatabaseName("ix_posts_created_at");
+
+ b.HasIndex("CreatedIp")
+ .HasDatabaseName("ix_posts_created_ip");
+
+ b.HasIndex("FavCount")
+ .HasDatabaseName("ix_posts_fav_count");
+
+ b.HasIndex("IsPublished")
+ .HasDatabaseName("ix_posts_is_published");
+
+ b.HasIndex("IsRemoved")
+ .HasDatabaseName("ix_posts_is_removed");
+
+ b.HasIndex("UserId")
+ .HasDatabaseName("ix_posts_user_id");
+
+ b.ToTable("posts", (string)null);
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.PostHub", b =>
+ {
+ b.Property("PostId")
+ .HasColumnType("integer")
+ .HasColumnName("post_id");
+
+ b.Property("HubId")
+ .HasColumnType("integer")
+ .HasColumnName("hub_id");
+
+ b.HasKey("PostId", "HubId")
+ .HasName("pk_post_hubs");
+
+ b.HasIndex("HubId")
+ .HasDatabaseName("ix_post_hubs_hub_id");
+
+ b.ToTable("post_hubs", (string)null);
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.PostMedia", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("Article")
+ .HasMaxLength(1024000)
+ .HasColumnType("character varying(1024000)")
+ .HasColumnName("article");
+
+ b.Property("ClipTimes")
+ .HasColumnType("text")
+ .HasColumnName("clip_times");
+
+ b.Property("ClippedVideoId")
+ .HasColumnType("uuid")
+ .HasColumnName("clipped_video_id");
+
+ b.Property("Description")
+ .HasMaxLength(512)
+ .HasColumnType("character varying(512)")
+ .HasColumnName("description");
+
+ b.Property("IsFollowersOnly")
+ .HasColumnType("boolean")
+ .HasColumnName("is_followers_only");
+
+ b.Property("IsInstant")
+ .HasColumnType("boolean")
+ .HasColumnName("is_instant");
+
+ b.Property("Ordering")
+ .HasColumnType("integer")
+ .HasColumnName("ordering");
+
+ b.Property("PhotoId")
+ .HasColumnType("uuid")
+ .HasColumnName("photo_id");
+
+ b.Property("PostId")
+ .HasColumnType("integer")
+ .HasColumnName("post_id");
+
+ b.Property("PreviewPhotoId")
+ .HasColumnType("uuid")
+ .HasColumnName("preview_photo_id");
+
+ b.Property("PreviewPhotoTime")
+ .HasColumnType("double precision")
+ .HasColumnName("preview_photo_time");
+
+ b.Property("SubPlanId")
+ .HasColumnType("integer")
+ .HasColumnName("sub_plan_id");
+
+ b.Property("Type")
+ .HasColumnType("integer")
+ .HasColumnName("type");
+
+ b.Property("VideoId")
+ .HasColumnType("uuid")
+ .HasColumnName("video_id");
+
+ b.HasKey("Id")
+ .HasName("pk_post_medias");
+
+ b.HasIndex("ClippedVideoId")
+ .HasDatabaseName("ix_post_medias_clipped_video_id");
+
+ b.HasIndex("IsInstant")
+ .HasDatabaseName("ix_post_medias_is_instant");
+
+ b.HasIndex("Ordering")
+ .HasDatabaseName("ix_post_medias_ordering");
+
+ b.HasIndex("PhotoId")
+ .HasDatabaseName("ix_post_medias_photo_id");
+
+ b.HasIndex("PostId")
+ .HasDatabaseName("ix_post_medias_post_id");
+
+ b.HasIndex("PreviewPhotoId")
+ .HasDatabaseName("ix_post_medias_preview_photo_id");
+
+ b.HasIndex("SubPlanId")
+ .HasDatabaseName("ix_post_medias_sub_plan_id");
+
+ b.HasIndex("Type")
+ .HasDatabaseName("ix_post_medias_type");
+
+ b.HasIndex("VideoId")
+ .HasDatabaseName("ix_post_medias_video_id");
+
+ b.ToTable("post_medias", (string)null);
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.PostNotifBatch", b =>
+ {
+ b.Property("PostId")
+ .HasColumnType("integer")
+ .HasColumnName("post_id");
+
+ b.Property("CreatedAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("created_at");
+
+ b.Property("IsDone")
+ .HasColumnType("boolean")
+ .HasColumnName("is_done");
+
+ b.Property("ProcessedCount")
+ .HasColumnType("integer")
+ .HasColumnName("processed_count");
+
+ b.HasKey("PostId")
+ .HasName("pk_post_notif_batches");
+
+ b.HasIndex("CreatedAt")
+ .HasDatabaseName("ix_post_notif_batches_created_at");
+
+ b.HasIndex("IsDone")
+ .HasDatabaseName("ix_post_notif_batches_is_done");
+
+ b.ToTable("post_notif_batches", (string)null);
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.PostView", b =>
+ {
+ b.Property("UserId")
+ .HasColumnType("integer")
+ .HasColumnName("user_id");
+
+ b.Property("PostId")
+ .HasColumnType("integer")
+ .HasColumnName("post_id");
+
+ b.Property("CreatedIp")
+ .HasMaxLength(64)
+ .HasColumnType("character varying(64)")
+ .HasColumnName("created_ip");
+
+ b.Property("ViewedAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("viewed_at");
+
+ b.HasKey("UserId", "PostId")
+ .HasName("pk_post_views");
+
+ b.HasIndex("PostId")
+ .HasDatabaseName("ix_post_views_post_id");
+
+ b.ToTable("post_views", (string)null);
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.PushDevice", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("CreatedAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("created_at");
+
+ b.Property("CreatedIp")
+ .HasMaxLength(64)
+ .HasColumnType("character varying(64)")
+ .HasColumnName("created_ip");
+
+ b.Property("LastUsedAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("last_used_at");
+
+ b.Property("Token")
+ .IsRequired()
+ .HasMaxLength(1024)
+ .HasColumnType("character varying(1024)")
+ .HasColumnName("token");
+
+ b.Property("UserId")
+ .HasColumnType("integer")
+ .HasColumnName("user_id");
+
+ b.HasKey("Id")
+ .HasName("pk_push_devices");
+
+ b.HasIndex("LastUsedAt")
+ .HasDatabaseName("ix_push_devices_last_used_at");
+
+ b.HasIndex("Token")
+ .HasDatabaseName("ix_push_devices_token");
+
+ b.HasIndex("UserId")
+ .HasDatabaseName("ix_push_devices_user_id");
+
+ b.ToTable("push_devices", (string)null);
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.RemoteVideoInfo", b =>
+ {
+ b.Property("RefDomain")
+ .HasMaxLength(128)
+ .HasColumnType("character varying(128)")
+ .HasColumnName("ref_domain");
+
+ b.Property("RefId")
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)")
+ .HasColumnName("ref_id");
+
+ b.Property("Action")
+ .HasMaxLength(64)
+ .HasColumnType("character varying(64)")
+ .HasColumnName("action");
+
+ b.Property("CreatedAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("created_at");
+
+ b.Property("ExtraInfo")
+ .HasMaxLength(1024)
+ .HasColumnType("character varying(1024)")
+ .HasColumnName("extra_info");
+
+ b.HasKey("RefDomain", "RefId")
+ .HasName("pk_remote_video_infos");
+
+ b.HasIndex("Action")
+ .HasDatabaseName("ix_remote_video_infos_action");
+
+ b.ToTable("remote_video_infos", (string)null);
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.Sprite", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid")
+ .HasColumnName("id");
+
+ b.Property("Interval")
+ .HasColumnType("double precision")
+ .HasColumnName("interval");
+
+ b.Property("StartTime")
+ .HasColumnType("double precision")
+ .HasColumnName("start_time");
+
+ b.Property("ThumbnailCount")
+ .HasColumnType("integer")
+ .HasColumnName("thumbnail_count");
+
+ b.Property("ThumbnailHeight")
+ .HasColumnType("integer")
+ .HasColumnName("thumbnail_height");
+
+ b.Property("ThumbnailWidth")
+ .HasColumnType("integer")
+ .HasColumnName("thumbnail_width");
+
+ b.Property("VideoId")
+ .HasColumnType("uuid")
+ .HasColumnName("video_id");
+
+ b.HasKey("Id")
+ .HasName("pk_sprites");
+
+ b.HasIndex("VideoId")
+ .HasDatabaseName("ix_sprites_video_id");
+
+ b.ToTable("sprites", (string)null);
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.Sub", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("BrowserAgent")
+ .HasMaxLength(2048)
+ .HasColumnType("character varying(2048)")
+ .HasColumnName("browser_agent");
+
+ b.Property("CreatedAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("created_at");
+
+ b.Property("CreatedIp")
+ .HasMaxLength(64)
+ .HasColumnType("character varying(64)")
+ .HasColumnName("created_ip");
+
+ b.Property("EndedAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("ended_at");
+
+ b.Property("IsActive")
+ .HasColumnType("boolean")
+ .HasColumnName("is_active");
+
+ b.Property("ModifiedAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("modified_at");
+
+ b.Property("PlanId")
+ .HasColumnType("integer")
+ .HasColumnName("plan_id");
+
+ b.Property("StartedAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("started_at");
+
+ b.Property("UserId")
+ .HasColumnType("integer")
+ .HasColumnName("user_id");
+
+ b.HasKey("Id")
+ .HasName("pk_subscriptions");
+
+ b.HasIndex("CreatedIp")
+ .HasDatabaseName("ix_subscriptions_created_ip");
+
+ b.HasIndex("PlanId")
+ .HasDatabaseName("ix_subscriptions_plan_id");
+
+ b.HasIndex("UserId")
+ .HasDatabaseName("ix_subscriptions_user_id");
+
+ b.ToTable("subscriptions", (string)null);
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.SubPlan", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("Currency")
+ .HasColumnType("text")
+ .HasColumnName("currency");
+
+ b.Property("Description")
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)")
+ .HasColumnName("description");
+
+ b.Property("Name")
+ .HasMaxLength(30)
+ .HasColumnType("character varying(30)")
+ .HasColumnName("name");
+
+ b.Property("OwnerUserId")
+ .HasColumnType("integer")
+ .HasColumnName("owner_user_id");
+
+ b.Property("Price")
+ .HasColumnType("numeric")
+ .HasColumnName("price");
+
+ b.HasKey("Id")
+ .HasName("pk_sub_plans");
+
+ b.HasIndex("OwnerUserId")
+ .HasDatabaseName("ix_sub_plans_owner_user_id");
+
+ b.ToTable("sub_plans", (string)null);
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.User", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("BrowserAgent")
+ .HasMaxLength(2048)
+ .HasColumnType("character varying(2048)")
+ .HasColumnName("browser_agent");
+
+ b.Property("CommentCount")
+ .HasColumnType("integer")
+ .HasColumnName("comment_count");
+
+ b.Property("CreatedAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("created_at");
+
+ b.Property("CreatedIp")
+ .HasMaxLength(64)
+ .HasColumnType("character varying(64)")
+ .HasColumnName("created_ip");
+
+ b.Property("Description")
+ .HasMaxLength(200)
+ .HasColumnType("character varying(200)")
+ .HasColumnName("description");
+
+ b.Property("Email")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("character varying(128)")
+ .HasColumnName("email");
+
+ b.Property("LastNotifCheckAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("last_notif_check_at");
+
+ b.Property("LastNotifEmailAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("last_notif_email_at");
+
+ b.Property("LastOnlineAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("last_online_at");
+
+ b.Property("LastOnlineIp")
+ .HasMaxLength(64)
+ .HasColumnType("character varying(64)")
+ .HasColumnName("last_online_ip");
+
+ b.Property("LastPmCheckAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("last_pm_check_at");
+
+ b.Property("ModifiedIp")
+ .HasMaxLength(64)
+ .HasColumnType("character varying(64)")
+ .HasColumnName("modified_ip");
+
+ b.Property("NotifEmailIntervalHours")
+ .HasColumnType("integer")
+ .HasColumnName("notif_email_interval_hours");
+
+ b.Property("PhotoId")
+ .HasColumnType("uuid")
+ .HasColumnName("photo_id");
+
+ b.Property("PmEmailIntervalHours")
+ .HasColumnType("integer")
+ .HasColumnName("pm_email_interval_hours");
+
+ b.Property("PremiumUntil")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("premium_until");
+
+ b.Property("RobotSource")
+ .HasMaxLength(200)
+ .HasColumnType("character varying(200)")
+ .HasColumnName("robot_source");
+
+ b.Property("Role")
+ .HasColumnType("integer")
+ .HasColumnName("role");
+
+ b.Property("Secret")
+ .IsRequired()
+ .HasMaxLength(16)
+ .HasColumnType("character varying(16)")
+ .HasColumnName("secret");
+
+ b.Property("Username")
+ .HasMaxLength(18)
+ .HasColumnType("character varying(18)")
+ .HasColumnName("username");
+
+ b.HasKey("Id")
+ .HasName("pk_users");
+
+ b.HasIndex("CreatedIp")
+ .HasDatabaseName("ix_users_created_ip");
+
+ b.HasIndex("Email")
+ .HasDatabaseName("ix_users_email");
+
+ b.HasIndex("LastNotifCheckAt")
+ .HasDatabaseName("ix_users_last_notif_check_at");
+
+ b.HasIndex("LastNotifEmailAt")
+ .HasDatabaseName("ix_users_last_notif_email_at");
+
+ b.HasIndex("LastOnlineAt")
+ .HasDatabaseName("ix_users_last_online_at");
+
+ b.HasIndex("LastPmCheckAt")
+ .HasDatabaseName("ix_users_last_pm_check_at");
+
+ b.HasIndex("ModifiedIp")
+ .HasDatabaseName("ix_users_modified_ip");
+
+ b.HasIndex("NotifEmailIntervalHours")
+ .HasDatabaseName("ix_users_notif_email_interval_hours");
+
+ b.HasIndex("PhotoId")
+ .HasDatabaseName("ix_users_photo_id");
+
+ b.HasIndex("PmEmailIntervalHours")
+ .HasDatabaseName("ix_users_pm_email_interval_hours");
+
+ b.HasIndex("Role")
+ .HasDatabaseName("ix_users_role");
+
+ b.HasIndex("Username")
+ .IsUnique()
+ .HasDatabaseName("ix_users_username");
+
+ b.ToTable("users", (string)null);
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.UserFollow", b =>
+ {
+ b.Property("FollowerUserId")
+ .HasColumnType("integer")
+ .HasColumnName("follower_user_id");
+
+ b.Property("FollowedUserId")
+ .HasColumnType("integer")
+ .HasColumnName("followed_user_id");
+
+ b.Property("LastNewPostNotifAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("last_new_post_notif_at");
+
+ b.HasKey("FollowerUserId", "FollowedUserId")
+ .HasName("pk_user_follows");
+
+ b.HasIndex("FollowedUserId")
+ .HasDatabaseName("ix_user_follows_followed_user_id");
+
+ b.HasIndex("LastNewPostNotifAt")
+ .HasDatabaseName("ix_user_follows_last_new_post_notif_at");
+
+ b.ToTable("user_follows", (string)null);
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.Video", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid")
+ .HasColumnName("id");
+
+ b.Property("Captions")
+ .HasMaxLength(102400)
+ .HasColumnType("character varying(102400)")
+ .HasColumnName("captions");
+
+ b.Property("Checksum")
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)")
+ .HasColumnName("checksum");
+
+ b.Property("CreatedAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("created_at");
+
+ b.Property("CreatedIp")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("character varying(64)")
+ .HasColumnName("created_ip");
+
+ b.Property("Duration")
+ .HasColumnType("double precision")
+ .HasColumnName("duration");
+
+ b.Property("Ext")
+ .HasMaxLength(8)
+ .HasColumnType("character varying(8)")
+ .HasColumnName("ext");
+
+ b.Property("Formats")
+ .HasColumnType("jsonb")
+ .HasColumnName("formats");
+
+ b.Property("Height")
+ .HasColumnType("integer")
+ .HasColumnName("height");
+
+ b.Property("ReferenceDesc")
+ .HasMaxLength(102400)
+ .HasColumnType("character varying(102400)")
+ .HasColumnName("reference_desc");
+
+ b.Property("ReferenceDomain")
+ .HasMaxLength(128)
+ .HasColumnType("character varying(128)")
+ .HasColumnName("reference_domain");
+
+ b.Property("ReferenceId")
+ .HasMaxLength(128)
+ .HasColumnType("character varying(128)")
+ .HasColumnName("reference_id");
+
+ b.Property("ReferenceJson")
+ .HasMaxLength(1024000)
+ .HasColumnType("character varying(1024000)")
+ .HasColumnName("reference_json");
+
+ b.Property("ReferenceTitle")
+ .HasMaxLength(512)
+ .HasColumnType("character varying(512)")
+ .HasColumnName("reference_title");
+
+ b.Property("ReferenceUrl")
+ .HasMaxLength(1024)
+ .HasColumnType("character varying(1024)")
+ .HasColumnName("reference_url");
+
+ b.Property("SizeInBytes")
+ .HasColumnType("bigint")
+ .HasColumnName("size_in_bytes");
+
+ b.Property("Width")
+ .HasColumnType("integer")
+ .HasColumnName("width");
+
+ b.HasKey("Id")
+ .HasName("pk_videos");
+
+ b.HasIndex("Checksum")
+ .HasDatabaseName("ix_videos_checksum");
+
+ b.HasIndex("ReferenceDomain")
+ .HasDatabaseName("ix_videos_reference_domain");
+
+ b.HasIndex("ReferenceId")
+ .HasDatabaseName("ix_videos_reference_id");
+
+ b.HasIndex("SizeInBytes")
+ .HasDatabaseName("ix_videos_size_in_bytes");
+
+ b.ToTable("videos", (string)null);
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.AuditLog", b =>
+ {
+ b.HasOne("SwipetorApp.Models.DbEntities.User", "User")
+ .WithMany()
+ .HasForeignKey("UserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired()
+ .HasConstraintName("fk_audit_logs_users_user_id");
+
+ b.Navigation("User");
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.Comment", b =>
+ {
+ b.HasOne("SwipetorApp.Models.DbEntities.Post", "Post")
+ .WithMany("Comments")
+ .HasForeignKey("PostId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired()
+ .HasConstraintName("fk_comments_posts_post_id");
+
+ b.HasOne("SwipetorApp.Models.DbEntities.User", "User")
+ .WithMany()
+ .HasForeignKey("UserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired()
+ .HasConstraintName("fk_comments_users_user_id");
+
+ b.Navigation("Post");
+
+ b.Navigation("User");
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.CustomDomain", b =>
+ {
+ b.HasOne("SwipetorApp.Models.DbEntities.User", "User")
+ .WithOne("CustomDomain")
+ .HasForeignKey("SwipetorApp.Models.DbEntities.CustomDomain", "UserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired()
+ .HasConstraintName("fk_custom_domains_users_user_id");
+
+ b.Navigation("User");
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.FavPost", b =>
+ {
+ b.HasOne("SwipetorApp.Models.DbEntities.Post", "Post")
+ .WithMany("Favs")
+ .HasForeignKey("PostId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired()
+ .HasConstraintName("fk_fav_posts_posts_post_id");
+
+ b.HasOne("SwipetorApp.Models.DbEntities.User", "User")
+ .WithMany()
+ .HasForeignKey("UserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired()
+ .HasConstraintName("fk_fav_posts_users_user_id");
+
+ b.Navigation("Post");
+
+ b.Navigation("User");
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.Hub", b =>
+ {
+ b.HasOne("SwipetorApp.Models.DbEntities.Photo", "Photo")
+ .WithMany()
+ .HasForeignKey("PhotoId")
+ .HasConstraintName("fk_hubs_photos_photo_id");
+
+ b.Navigation("Photo");
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.Location", b =>
+ {
+ b.HasOne("SwipetorApp.Models.DbEntities.Location", "Parent")
+ .WithMany("Children")
+ .HasForeignKey("ParentId")
+ .HasConstraintName("fk_locations_locations_parent_id");
+
+ b.Navigation("Parent");
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.LoginAttempt", b =>
+ {
+ b.HasOne("SwipetorApp.Models.DbEntities.LoginRequest", "LoginRequest")
+ .WithMany()
+ .HasForeignKey("LoginRequestId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired()
+ .HasConstraintName("fk_login_attempts_login_requests_login_request_id");
+
+ b.HasOne("SwipetorApp.Models.DbEntities.User", "User")
+ .WithMany()
+ .HasForeignKey("UserId")
+ .HasConstraintName("fk_login_attempts_users_user_id");
+
+ b.Navigation("LoginRequest");
+
+ b.Navigation("User");
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.LoginRequest", b =>
+ {
+ b.HasOne("SwipetorApp.Models.DbEntities.User", "User")
+ .WithMany()
+ .HasForeignKey("UserId")
+ .HasConstraintName("fk_login_requests_users_user_id");
+
+ b.Navigation("User");
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.Notif", b =>
+ {
+ b.HasOne("SwipetorApp.Models.DbEntities.User", "ReceiverUser")
+ .WithMany("Notifs")
+ .HasForeignKey("ReceiverUserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired()
+ .HasConstraintName("fk_notifs_users_receiver_user_id");
+
+ b.HasOne("SwipetorApp.Models.DbEntities.Comment", "RelatedComment")
+ .WithMany()
+ .HasForeignKey("RelatedCommentId")
+ .HasConstraintName("fk_notifs_comments_related_comment_id");
+
+ b.HasOne("SwipetorApp.Models.DbEntities.Post", "RelatedPost")
+ .WithMany()
+ .HasForeignKey("RelatedPostId")
+ .HasConstraintName("fk_notifs_posts_related_post_id");
+
+ b.HasOne("SwipetorApp.Models.DbEntities.User", "SenderUser")
+ .WithMany()
+ .HasForeignKey("SenderUserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .HasConstraintName("fk_notifs_users_sender_user_id");
+
+ b.Navigation("ReceiverUser");
+
+ b.Navigation("RelatedComment");
+
+ b.Navigation("RelatedPost");
+
+ b.Navigation("SenderUser");
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.PmMsg", b =>
+ {
+ b.HasOne("SwipetorApp.Models.DbEntities.PmThread", "Thread")
+ .WithMany("Msgs")
+ .HasForeignKey("ThreadId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired()
+ .HasConstraintName("fk_pm_msgs_pm_threads_thread_id");
+
+ b.HasOne("SwipetorApp.Models.DbEntities.PmThreadUser", "ThreadUser")
+ .WithMany("Msgs")
+ .HasForeignKey("ThreadUserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired()
+ .HasConstraintName("fk_pm_msgs_pm_thread_users_thread_user_id");
+
+ b.HasOne("SwipetorApp.Models.DbEntities.User", "User")
+ .WithMany()
+ .HasForeignKey("UserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired()
+ .HasConstraintName("fk_pm_msgs_users_user_id");
+
+ b.Navigation("Thread");
+
+ b.Navigation("ThreadUser");
+
+ b.Navigation("User");
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.PmPermission", b =>
+ {
+ b.HasOne("SwipetorApp.Models.DbEntities.User", "ReceiverUser")
+ .WithMany()
+ .HasForeignKey("ReceiverUserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired()
+ .HasConstraintName("fk_pm_permissions_users_receiver_user_id");
+
+ b.HasOne("SwipetorApp.Models.DbEntities.User", "SenderUser")
+ .WithMany()
+ .HasForeignKey("SenderUserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired()
+ .HasConstraintName("fk_pm_permissions_users_sender_user_id");
+
+ b.Navigation("ReceiverUser");
+
+ b.Navigation("SenderUser");
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.PmThread", b =>
+ {
+ b.HasOne("SwipetorApp.Models.DbEntities.PmMsg", "LastMsg")
+ .WithMany()
+ .HasForeignKey("LastMsgId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .HasConstraintName("fk_pm_threads_pm_msgs_last_msg_id");
+
+ b.Navigation("LastMsg");
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.PmThreadUser", b =>
+ {
+ b.HasOne("SwipetorApp.Models.DbEntities.PmMsg", "FirstUnreadMsg")
+ .WithMany()
+ .HasForeignKey("FirstUnreadMsgId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .HasConstraintName("fk_pm_thread_users_pm_msgs_first_unread_msg_id");
+
+ b.HasOne("SwipetorApp.Models.DbEntities.PmMsg", "LastReadMsg")
+ .WithMany()
+ .HasForeignKey("LastReadMsgId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .HasConstraintName("fk_pm_thread_users_pm_msgs_last_read_msg_id");
+
+ b.HasOne("SwipetorApp.Models.DbEntities.PmThread", "Thread")
+ .WithMany("ThreadUsers")
+ .HasForeignKey("ThreadId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired()
+ .HasConstraintName("fk_pm_thread_users_pm_threads_thread_id");
+
+ b.HasOne("SwipetorApp.Models.DbEntities.User", "User")
+ .WithMany("PmThreadUsers")
+ .HasForeignKey("UserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired()
+ .HasConstraintName("fk_pm_thread_users_users_user_id");
+
+ b.Navigation("FirstUnreadMsg");
+
+ b.Navigation("LastReadMsg");
+
+ b.Navigation("Thread");
+
+ b.Navigation("User");
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.Post", b =>
+ {
+ b.HasOne("SwipetorApp.Models.DbEntities.User", "User")
+ .WithMany("Posts")
+ .HasForeignKey("UserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired()
+ .HasConstraintName("fk_posts_users_user_id");
+
+ b.Navigation("User");
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.PostHub", b =>
+ {
+ b.HasOne("SwipetorApp.Models.DbEntities.Hub", "Hub")
+ .WithMany("PostHubs")
+ .HasForeignKey("HubId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired()
+ .HasConstraintName("fk_post_hubs_hubs_hub_id");
+
+ b.HasOne("SwipetorApp.Models.DbEntities.Post", "Post")
+ .WithMany("PostHubs")
+ .HasForeignKey("PostId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired()
+ .HasConstraintName("fk_post_hubs_posts_post_id");
+
+ b.Navigation("Hub");
+
+ b.Navigation("Post");
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.PostMedia", b =>
+ {
+ b.HasOne("SwipetorApp.Models.DbEntities.Video", "ClippedVideo")
+ .WithMany()
+ .HasForeignKey("ClippedVideoId")
+ .HasConstraintName("fk_post_medias_videos_clipped_video_id");
+
+ b.HasOne("SwipetorApp.Models.DbEntities.Photo", "Photo")
+ .WithMany()
+ .HasForeignKey("PhotoId")
+ .HasConstraintName("fk_post_medias_photos_photo_id");
+
+ b.HasOne("SwipetorApp.Models.DbEntities.Post", "Post")
+ .WithMany("Medias")
+ .HasForeignKey("PostId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired()
+ .HasConstraintName("fk_post_medias_posts_post_id");
+
+ b.HasOne("SwipetorApp.Models.DbEntities.Photo", "PreviewPhoto")
+ .WithMany()
+ .HasForeignKey("PreviewPhotoId")
+ .HasConstraintName("fk_post_medias_photos_preview_photo_id");
+
+ b.HasOne("SwipetorApp.Models.DbEntities.SubPlan", "SubPlan")
+ .WithMany()
+ .HasForeignKey("SubPlanId")
+ .HasConstraintName("fk_post_medias_sub_plans_sub_plan_id");
+
+ b.HasOne("SwipetorApp.Models.DbEntities.Video", "Video")
+ .WithMany()
+ .HasForeignKey("VideoId")
+ .HasConstraintName("fk_post_medias_videos_video_id");
+
+ b.Navigation("ClippedVideo");
+
+ b.Navigation("Photo");
+
+ b.Navigation("Post");
+
+ b.Navigation("PreviewPhoto");
+
+ b.Navigation("SubPlan");
+
+ b.Navigation("Video");
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.PostNotifBatch", b =>
+ {
+ b.HasOne("SwipetorApp.Models.DbEntities.Post", "Post")
+ .WithOne("NotifBatch")
+ .HasForeignKey("SwipetorApp.Models.DbEntities.PostNotifBatch", "PostId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired()
+ .HasConstraintName("fk_post_notif_batches_posts_post_id");
+
+ b.Navigation("Post");
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.PostView", b =>
+ {
+ b.HasOne("SwipetorApp.Models.DbEntities.Post", "Post")
+ .WithMany("PostViews")
+ .HasForeignKey("PostId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired()
+ .HasConstraintName("fk_post_views_posts_post_id");
+
+ b.HasOne("SwipetorApp.Models.DbEntities.User", "User")
+ .WithMany()
+ .HasForeignKey("UserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired()
+ .HasConstraintName("fk_post_views_users_user_id");
+
+ b.Navigation("Post");
+
+ b.Navigation("User");
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.PushDevice", b =>
+ {
+ b.HasOne("SwipetorApp.Models.DbEntities.User", "User")
+ .WithMany("PushDevices")
+ .HasForeignKey("UserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired()
+ .HasConstraintName("fk_push_devices_users_user_id");
+
+ b.Navigation("User");
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.Sprite", b =>
+ {
+ b.HasOne("SwipetorApp.Models.DbEntities.Video", "Video")
+ .WithMany("Sprites")
+ .HasForeignKey("VideoId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired()
+ .HasConstraintName("fk_sprites_videos_video_id");
+
+ b.Navigation("Video");
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.Sub", b =>
+ {
+ b.HasOne("SwipetorApp.Models.DbEntities.SubPlan", "Plan")
+ .WithMany("Subscriptions")
+ .HasForeignKey("PlanId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired()
+ .HasConstraintName("fk_subscriptions_sub_plans_plan_id");
+
+ b.HasOne("SwipetorApp.Models.DbEntities.User", "User")
+ .WithMany("Subscriptions")
+ .HasForeignKey("UserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired()
+ .HasConstraintName("fk_subscriptions_users_user_id");
+
+ b.Navigation("Plan");
+
+ b.Navigation("User");
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.SubPlan", b =>
+ {
+ b.HasOne("SwipetorApp.Models.DbEntities.User", "OwnerUser")
+ .WithMany("OwnedSubscriptionPlans")
+ .HasForeignKey("OwnerUserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired()
+ .HasConstraintName("fk_sub_plans_users_owner_user_id");
+
+ b.Navigation("OwnerUser");
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.User", b =>
+ {
+ b.HasOne("SwipetorApp.Models.DbEntities.Photo", "Photo")
+ .WithMany()
+ .HasForeignKey("PhotoId")
+ .HasConstraintName("fk_users_photos_photo_id");
+
+ b.Navigation("Photo");
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.UserFollow", b =>
+ {
+ b.HasOne("SwipetorApp.Models.DbEntities.User", "FollowedUser")
+ .WithMany("Followers")
+ .HasForeignKey("FollowedUserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired()
+ .HasConstraintName("fk_user_follows_users_followed_user_id");
+
+ b.HasOne("SwipetorApp.Models.DbEntities.User", "FollowerUser")
+ .WithMany("Following")
+ .HasForeignKey("FollowerUserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired()
+ .HasConstraintName("fk_user_follows_users_follower_user_id");
+
+ b.Navigation("FollowedUser");
+
+ b.Navigation("FollowerUser");
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.Hub", b =>
+ {
+ b.Navigation("PostHubs");
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.Location", b =>
+ {
+ b.Navigation("Children");
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.PmThread", b =>
+ {
+ b.Navigation("Msgs");
+
+ b.Navigation("ThreadUsers");
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.PmThreadUser", b =>
+ {
+ b.Navigation("Msgs");
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.Post", b =>
+ {
+ b.Navigation("Comments");
+
+ b.Navigation("Favs");
+
+ b.Navigation("Medias");
+
+ b.Navigation("NotifBatch");
+
+ b.Navigation("PostHubs");
+
+ b.Navigation("PostViews");
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.SubPlan", b =>
+ {
+ b.Navigation("Subscriptions");
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.User", b =>
+ {
+ b.Navigation("CustomDomain");
+
+ b.Navigation("Followers");
+
+ b.Navigation("Following");
+
+ b.Navigation("Notifs");
+
+ b.Navigation("OwnedSubscriptionPlans");
+
+ b.Navigation("PmThreadUsers");
+
+ b.Navigation("Posts");
+
+ b.Navigation("PushDevices");
+
+ b.Navigation("Subscriptions");
+ });
+
+ modelBuilder.Entity("SwipetorApp.Models.DbEntities.Video", b =>
+ {
+ b.Navigation("Sprites");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/SwipetorApp/Migrations/20241013185127_Init.cs b/SwipetorApp/Migrations/20241013185127_Init.cs
new file mode 100644
index 0000000..ba7dbe0
--- /dev/null
+++ b/SwipetorApp/Migrations/20241013185127_Init.cs
@@ -0,0 +1,1468 @@
+using System;
+using System.Collections.Generic;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
+using NpgsqlTypes;
+
+#nullable disable
+
+namespace SwipetorApp.Migrations
+{
+ ///
+ public partial class Init : Migration
+ {
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.CreateTable(
+ name: "english_words",
+ columns: table => new
+ {
+ id = table.Column(type: "integer", nullable: false)
+ .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
+ word = table.Column(type: "character varying(128)", maxLength: 128, nullable: true)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("pk_english_words", x => x.id);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "key_values",
+ columns: table => new
+ {
+ key = table.Column(type: "character varying(64)", maxLength: 64, nullable: false),
+ value = table.Column(type: "character varying(4096)", maxLength: 4096, nullable: true),
+ modified_ip = table.Column(type: "character varying(64)", maxLength: 64, nullable: true),
+ modified_at = table.Column(type: "timestamp with time zone", nullable: true)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("pk_key_values", x => x.key);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "locations",
+ columns: table => new
+ {
+ id = table.Column(type: "integer", nullable: false)
+ .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
+ name = table.Column(type: "character varying(64)", maxLength: 64, nullable: true),
+ name_ascii = table.Column(type: "character varying(64)", maxLength: 64, nullable: true),
+ full_name = table.Column(type: "character varying(64)", maxLength: 64, nullable: true),
+ search_vector = table.Column(type: "tsvector", nullable: true)
+ .Annotation("Npgsql:TsVectorConfig", "english")
+ .Annotation("Npgsql:TsVectorProperties", new[] { "name", "name_ascii", "full_name" }),
+ lat = table.Column(type: "double precision", nullable: false),
+ lng = table.Column(type: "double precision", nullable: false),
+ population = table.Column