diff --git a/TelegramSearchBot.Database/Migrations/20260601111353_AddLlmInvisibilityToUserWithGroup.Designer.cs b/TelegramSearchBot.Database/Migrations/20260601111353_AddLlmInvisibilityToUserWithGroup.Designer.cs
new file mode 100644
index 00000000..b75ae702
--- /dev/null
+++ b/TelegramSearchBot.Database/Migrations/20260601111353_AddLlmInvisibilityToUserWithGroup.Designer.cs
@@ -0,0 +1,896 @@
+//
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using TelegramSearchBot.Model;
+
+#nullable disable
+
+namespace TelegramSearchBot.Migrations
+{
+ [DbContext(typeof(DataDbContext))]
+ [Migration("20260601111353_AddLlmInvisibilityToUserWithGroup")]
+ partial class AddLlmInvisibilityToUserWithGroup
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder.HasAnnotation("ProductVersion", "10.0.7");
+
+ modelBuilder.Entity("TelegramSearchBot.Model.Data.AccountBook", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("CreatedAt")
+ .HasColumnType("TEXT");
+
+ b.Property("CreatedBy")
+ .HasColumnType("INTEGER");
+
+ b.Property("Description")
+ .HasMaxLength(500)
+ .HasColumnType("TEXT");
+
+ b.Property("GroupId")
+ .HasColumnType("INTEGER");
+
+ b.Property("IsActive")
+ .HasColumnType("INTEGER");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(100)
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.HasIndex("GroupId", "Name")
+ .IsUnique();
+
+ b.ToTable("AccountBooks");
+ });
+
+ modelBuilder.Entity("TelegramSearchBot.Model.Data.AccountRecord", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("AccountBookId")
+ .HasColumnType("INTEGER");
+
+ b.Property("Amount")
+ .HasColumnType("decimal(18,2)");
+
+ b.Property("CreatedAt")
+ .HasColumnType("TEXT");
+
+ b.Property("CreatedBy")
+ .HasColumnType("INTEGER");
+
+ b.Property("CreatedByUsername")
+ .HasMaxLength(100)
+ .HasColumnType("TEXT");
+
+ b.Property("Description")
+ .HasMaxLength(500)
+ .HasColumnType("TEXT");
+
+ b.Property("Tag")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Tag");
+
+ b.HasIndex("AccountBookId", "CreatedAt");
+
+ b.ToTable("AccountRecords");
+ });
+
+ modelBuilder.Entity("TelegramSearchBot.Model.Data.AppConfigurationItem", b =>
+ {
+ b.Property("Key")
+ .HasColumnType("TEXT");
+
+ b.Property("Value")
+ .HasColumnType("TEXT");
+
+ b.HasKey("Key");
+
+ b.ToTable("AppConfigurationItems");
+ });
+
+ modelBuilder.Entity("TelegramSearchBot.Model.Data.ChannelWithModel", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("IsDeleted")
+ .HasColumnType("INTEGER");
+
+ b.Property("LLMChannelId")
+ .HasColumnType("INTEGER");
+
+ b.Property("ModelName")
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.HasIndex("LLMChannelId");
+
+ b.ToTable("ChannelsWithModel");
+ });
+
+ modelBuilder.Entity("TelegramSearchBot.Model.Data.ConversationSegment", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("ContentSummary")
+ .HasColumnType("TEXT");
+
+ b.Property("CreatedAt")
+ .HasColumnType("TEXT");
+
+ b.Property("EndTime")
+ .HasColumnType("TEXT");
+
+ b.Property("FirstMessageId")
+ .HasColumnType("INTEGER");
+
+ b.Property("FullContent")
+ .HasColumnType("TEXT");
+
+ b.Property("GroupId")
+ .HasColumnType("INTEGER");
+
+ b.Property("IsVectorized")
+ .HasColumnType("INTEGER");
+
+ b.Property("LastMessageId")
+ .HasColumnType("INTEGER");
+
+ b.Property("MessageCount")
+ .HasColumnType("INTEGER");
+
+ b.Property("ParticipantCount")
+ .HasColumnType("INTEGER");
+
+ b.Property("StartTime")
+ .HasColumnType("TEXT");
+
+ b.Property("TopicKeywords")
+ .HasColumnType("TEXT");
+
+ b.Property("VectorId")
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.HasIndex("GroupId", "StartTime", "EndTime");
+
+ b.ToTable("ConversationSegments");
+ });
+
+ modelBuilder.Entity("TelegramSearchBot.Model.Data.ConversationSegmentMessage", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("ConversationSegmentId")
+ .HasColumnType("INTEGER");
+
+ b.Property("MessageDataId")
+ .HasColumnType("INTEGER");
+
+ b.Property("SequenceOrder")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ConversationSegmentId");
+
+ b.HasIndex("MessageDataId");
+
+ b.ToTable("ConversationSegmentMessages");
+ });
+
+ modelBuilder.Entity("TelegramSearchBot.Model.Data.FaissIndexFile", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("CreatedAt")
+ .HasColumnType("TEXT");
+
+ b.Property("Dimension")
+ .HasColumnType("INTEGER");
+
+ b.Property("FilePath")
+ .IsRequired()
+ .HasMaxLength(500)
+ .HasColumnType("TEXT");
+
+ b.Property("FileSize")
+ .HasColumnType("INTEGER");
+
+ b.Property("GroupId")
+ .HasColumnType("INTEGER");
+
+ b.Property("IndexType")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("TEXT");
+
+ b.Property("IsValid")
+ .HasColumnType("INTEGER");
+
+ b.Property("UpdatedAt")
+ .HasColumnType("TEXT");
+
+ b.Property("VectorCount")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("GroupId", "IndexType")
+ .IsUnique();
+
+ b.ToTable("FaissIndexFiles");
+ });
+
+ modelBuilder.Entity("TelegramSearchBot.Model.Data.GroupAccountSettings", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("ActiveAccountBookId")
+ .HasColumnType("INTEGER");
+
+ b.Property("GroupId")
+ .HasColumnType("INTEGER");
+
+ b.Property("IsAccountingEnabled")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("GroupId")
+ .IsUnique();
+
+ b.ToTable("GroupAccountSettings");
+ });
+
+ modelBuilder.Entity("TelegramSearchBot.Model.Data.GroupData", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("IsBlacklist")
+ .HasColumnType("INTEGER");
+
+ b.Property("IsForum")
+ .HasColumnType("INTEGER");
+
+ b.Property("Title")
+ .HasColumnType("TEXT");
+
+ b.Property("Type")
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.ToTable("GroupData");
+ });
+
+ modelBuilder.Entity("TelegramSearchBot.Model.Data.GroupSettings", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("AgentChatBatchWindowSeconds")
+ .HasColumnType("INTEGER");
+
+ b.Property("AgentChatMode")
+ .HasColumnType("INTEGER");
+
+ b.Property("GroupId")
+ .HasColumnType("INTEGER");
+
+ b.Property("ImageGenerationModelName")
+ .HasColumnType("TEXT");
+
+ b.Property("IsAgentChatEnabled")
+ .HasColumnType("INTEGER");
+
+ b.Property("IsManagerGroup")
+ .HasColumnType("INTEGER");
+
+ b.Property("LLMModelName")
+ .HasColumnType("TEXT");
+
+ b.Property("MusicGenerationModelName")
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.HasIndex("GroupId")
+ .IsUnique();
+
+ b.ToTable("GroupSettings");
+ });
+
+ modelBuilder.Entity("TelegramSearchBot.Model.Data.LLMChannel", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("ApiKey")
+ .HasColumnType("TEXT");
+
+ b.Property("Gateway")
+ .HasColumnType("TEXT");
+
+ b.Property("Name")
+ .HasColumnType("TEXT");
+
+ b.Property("Parallel")
+ .HasColumnType("INTEGER");
+
+ b.Property("Priority")
+ .HasColumnType("INTEGER");
+
+ b.Property("Provider")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.ToTable("LLMChannels");
+ });
+
+ modelBuilder.Entity("TelegramSearchBot.Model.Data.MemoryGraph", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("ChatId")
+ .HasColumnType("INTEGER");
+
+ b.Property("CreatedTime")
+ .HasColumnType("TEXT");
+
+ b.Property("EntityType")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("FromEntity")
+ .HasColumnType("TEXT");
+
+ b.Property("ItemType")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("Observations")
+ .HasColumnType("TEXT");
+
+ b.Property("RelationType")
+ .HasColumnType("TEXT");
+
+ b.Property("ToEntity")
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.ToTable("MemoryGraphs");
+ });
+
+ modelBuilder.Entity("TelegramSearchBot.Model.Data.Message", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("Content")
+ .HasColumnType("TEXT");
+
+ b.Property("DateTime")
+ .HasColumnType("TEXT");
+
+ b.Property("FromUserId")
+ .HasColumnType("INTEGER");
+
+ b.Property("GroupId")
+ .HasColumnType("INTEGER");
+
+ b.Property("MessageId")
+ .HasColumnType("INTEGER");
+
+ b.Property("ReplyToMessageId")
+ .HasColumnType("INTEGER");
+
+ b.Property("ReplyToUserId")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.ToTable("Messages");
+ });
+
+ modelBuilder.Entity("TelegramSearchBot.Model.Data.MessageExtension", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("MessageDataId")
+ .HasColumnType("INTEGER");
+
+ b.Property("Name")
+ .HasColumnType("TEXT");
+
+ b.Property("Value")
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.HasIndex("MessageDataId");
+
+ b.ToTable("MessageExtensions");
+ });
+
+ modelBuilder.Entity("TelegramSearchBot.Model.Data.ModelCapability", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("CapabilityName")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("CapabilityValue")
+ .HasColumnType("TEXT");
+
+ b.Property("ChannelWithModelId")
+ .HasColumnType("INTEGER");
+
+ b.Property("Description")
+ .HasColumnType("TEXT");
+
+ b.Property("LastUpdated")
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ChannelWithModelId");
+
+ b.ToTable("ModelCapabilities");
+ });
+
+ modelBuilder.Entity("TelegramSearchBot.Model.Data.ScheduledTaskExecution", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("CompletedTime")
+ .HasColumnType("TEXT");
+
+ b.Property("CreatedAt")
+ .HasColumnType("TEXT");
+
+ b.Property("ErrorMessage")
+ .HasMaxLength(1000)
+ .HasColumnType("TEXT");
+
+ b.Property("LastHeartbeat")
+ .HasColumnType("TEXT");
+
+ b.Property("ResultSummary")
+ .HasMaxLength(500)
+ .HasColumnType("TEXT");
+
+ b.Property("StartTime")
+ .HasColumnType("TEXT");
+
+ b.Property("Status")
+ .IsRequired()
+ .HasMaxLength(20)
+ .HasColumnType("TEXT");
+
+ b.Property("TaskName")
+ .IsRequired()
+ .HasMaxLength(100)
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.HasIndex("TaskName")
+ .IsUnique();
+
+ b.ToTable("ScheduledTaskExecutions");
+ });
+
+ modelBuilder.Entity("TelegramSearchBot.Model.Data.SearchPageCache", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("TEXT");
+
+ b.Property("CreatedTime")
+ .HasColumnType("TEXT");
+
+ b.Property("SearchOptionJson")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("UUID")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.ToTable("SearchPageCaches");
+ });
+
+ modelBuilder.Entity("TelegramSearchBot.Model.Data.ShortUrlMapping", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("CreationDate")
+ .HasColumnType("TEXT");
+
+ b.Property("ExpandedUrl")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("OriginalUrl")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.HasIndex("OriginalUrl");
+
+ b.ToTable("ShortUrlMappings");
+ });
+
+ modelBuilder.Entity("TelegramSearchBot.Model.Data.TelegramFileCacheEntry", b =>
+ {
+ b.Property("CacheKey")
+ .HasColumnType("TEXT");
+
+ b.Property("ExpiryDate")
+ .HasColumnType("TEXT");
+
+ b.Property("FileId")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.HasKey("CacheKey");
+
+ b.HasIndex("CacheKey")
+ .IsUnique();
+
+ b.ToTable("TelegramFileCacheEntries");
+ });
+
+ modelBuilder.Entity("TelegramSearchBot.Model.Data.TodoItem", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("ChatId")
+ .HasColumnType("INTEGER");
+
+ b.Property("CompletedAtUtc")
+ .HasColumnType("TEXT");
+
+ b.Property("CompletedBy")
+ .HasColumnType("INTEGER");
+
+ b.Property("CreatedAt")
+ .HasColumnType("TEXT");
+
+ b.Property("CreatedBy")
+ .HasColumnType("INTEGER");
+
+ b.Property("Description")
+ .HasMaxLength(2000)
+ .HasColumnType("TEXT");
+
+ b.Property("DueAtUtc")
+ .HasColumnType("TEXT");
+
+ b.Property("Priority")
+ .HasMaxLength(20)
+ .HasColumnType("TEXT");
+
+ b.Property("RemindAtUtc")
+ .HasColumnType("TEXT");
+
+ b.Property("ReminderMessageId")
+ .HasColumnType("INTEGER");
+
+ b.Property("ReminderSentAtUtc")
+ .HasColumnType("TEXT");
+
+ b.Property("SourceMessageId")
+ .HasColumnType("INTEGER");
+
+ b.Property("Status")
+ .IsRequired()
+ .HasMaxLength(20)
+ .HasColumnType("TEXT");
+
+ b.Property("Title")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("TEXT");
+
+ b.Property("TodoListId")
+ .HasColumnType("INTEGER");
+
+ b.Property("UpdatedAt")
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.HasIndex("TodoListId", "Status");
+
+ b.HasIndex("ChatId", "Status", "RemindAtUtc", "ReminderSentAtUtc");
+
+ b.ToTable("TodoItems");
+ });
+
+ modelBuilder.Entity("TelegramSearchBot.Model.Data.TodoList", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("ChatId")
+ .HasColumnType("INTEGER");
+
+ b.Property("CreatedAt")
+ .HasColumnType("TEXT");
+
+ b.Property("CreatedBy")
+ .HasColumnType("INTEGER");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(100)
+ .HasColumnType("TEXT");
+
+ b.Property("UpdatedAt")
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ChatId", "Name")
+ .IsUnique();
+
+ b.ToTable("TodoLists");
+ });
+
+ modelBuilder.Entity("TelegramSearchBot.Model.Data.UserData", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("FirstName")
+ .HasColumnType("TEXT");
+
+ b.Property("IsBot")
+ .HasColumnType("INTEGER");
+
+ b.Property("IsPremium")
+ .HasColumnType("INTEGER");
+
+ b.Property("LastName")
+ .HasColumnType("TEXT");
+
+ b.Property("UserName")
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.ToTable("UserData");
+ });
+
+ modelBuilder.Entity("TelegramSearchBot.Model.Data.UserWithGroup", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("GroupId")
+ .HasColumnType("INTEGER");
+
+ b.Property("IsLlmInvisible")
+ .HasColumnType("INTEGER");
+
+ b.Property("UserId")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("UserId", "GroupId")
+ .IsUnique();
+
+ b.ToTable("UsersWithGroup");
+ });
+
+ modelBuilder.Entity("TelegramSearchBot.Model.Data.VectorIndex", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("ContentSummary")
+ .HasMaxLength(1000)
+ .HasColumnType("TEXT");
+
+ b.Property("CreatedAt")
+ .HasColumnType("TEXT");
+
+ b.Property("EntityId")
+ .HasColumnType("INTEGER");
+
+ b.Property("FaissIndex")
+ .HasColumnType("INTEGER");
+
+ b.Property("GroupId")
+ .HasColumnType("INTEGER");
+
+ b.Property("UpdatedAt")
+ .HasColumnType("TEXT");
+
+ b.Property("VectorType")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.HasIndex("GroupId", "FaissIndex");
+
+ b.HasIndex("GroupId", "VectorType", "EntityId")
+ .IsUnique();
+
+ b.ToTable("VectorIndexes");
+ });
+
+ modelBuilder.Entity("TelegramSearchBot.Model.Data.AccountRecord", b =>
+ {
+ b.HasOne("TelegramSearchBot.Model.Data.AccountBook", "AccountBook")
+ .WithMany("Records")
+ .HasForeignKey("AccountBookId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("AccountBook");
+ });
+
+ modelBuilder.Entity("TelegramSearchBot.Model.Data.ChannelWithModel", b =>
+ {
+ b.HasOne("TelegramSearchBot.Model.Data.LLMChannel", "LLMChannel")
+ .WithMany("Models")
+ .HasForeignKey("LLMChannelId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("LLMChannel");
+ });
+
+ modelBuilder.Entity("TelegramSearchBot.Model.Data.ConversationSegmentMessage", b =>
+ {
+ b.HasOne("TelegramSearchBot.Model.Data.ConversationSegment", "ConversationSegment")
+ .WithMany("Messages")
+ .HasForeignKey("ConversationSegmentId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("TelegramSearchBot.Model.Data.Message", "Message")
+ .WithMany()
+ .HasForeignKey("MessageDataId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("ConversationSegment");
+
+ b.Navigation("Message");
+ });
+
+ modelBuilder.Entity("TelegramSearchBot.Model.Data.MessageExtension", b =>
+ {
+ b.HasOne("TelegramSearchBot.Model.Data.Message", "Message")
+ .WithMany("MessageExtensions")
+ .HasForeignKey("MessageDataId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Message");
+ });
+
+ modelBuilder.Entity("TelegramSearchBot.Model.Data.ModelCapability", b =>
+ {
+ b.HasOne("TelegramSearchBot.Model.Data.ChannelWithModel", "ChannelWithModel")
+ .WithMany("Capabilities")
+ .HasForeignKey("ChannelWithModelId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("ChannelWithModel");
+ });
+
+ modelBuilder.Entity("TelegramSearchBot.Model.Data.TodoItem", b =>
+ {
+ b.HasOne("TelegramSearchBot.Model.Data.TodoList", "TodoList")
+ .WithMany("Items")
+ .HasForeignKey("TodoListId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("TodoList");
+ });
+
+ modelBuilder.Entity("TelegramSearchBot.Model.Data.AccountBook", b =>
+ {
+ b.Navigation("Records");
+ });
+
+ modelBuilder.Entity("TelegramSearchBot.Model.Data.ChannelWithModel", b =>
+ {
+ b.Navigation("Capabilities");
+ });
+
+ modelBuilder.Entity("TelegramSearchBot.Model.Data.ConversationSegment", b =>
+ {
+ b.Navigation("Messages");
+ });
+
+ modelBuilder.Entity("TelegramSearchBot.Model.Data.LLMChannel", b =>
+ {
+ b.Navigation("Models");
+ });
+
+ modelBuilder.Entity("TelegramSearchBot.Model.Data.Message", b =>
+ {
+ b.Navigation("MessageExtensions");
+ });
+
+ modelBuilder.Entity("TelegramSearchBot.Model.Data.TodoList", b =>
+ {
+ b.Navigation("Items");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/TelegramSearchBot.Database/Migrations/20260601111353_AddLlmInvisibilityToUserWithGroup.cs b/TelegramSearchBot.Database/Migrations/20260601111353_AddLlmInvisibilityToUserWithGroup.cs
new file mode 100644
index 00000000..d66a09bf
--- /dev/null
+++ b/TelegramSearchBot.Database/Migrations/20260601111353_AddLlmInvisibilityToUserWithGroup.cs
@@ -0,0 +1,29 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace TelegramSearchBot.Migrations
+{
+ ///
+ public partial class AddLlmInvisibilityToUserWithGroup : Migration
+ {
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.AddColumn(
+ name: "IsLlmInvisible",
+ table: "UsersWithGroup",
+ type: "INTEGER",
+ nullable: false,
+ defaultValue: false);
+ }
+
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropColumn(
+ name: "IsLlmInvisible",
+ table: "UsersWithGroup");
+ }
+ }
+}
diff --git a/TelegramSearchBot.Database/Migrations/20260601113631_AddLlmInvisibilityLookupIndex.Designer.cs b/TelegramSearchBot.Database/Migrations/20260601113631_AddLlmInvisibilityLookupIndex.Designer.cs
new file mode 100644
index 00000000..3978cc1b
--- /dev/null
+++ b/TelegramSearchBot.Database/Migrations/20260601113631_AddLlmInvisibilityLookupIndex.Designer.cs
@@ -0,0 +1,898 @@
+//
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using TelegramSearchBot.Model;
+
+#nullable disable
+
+namespace TelegramSearchBot.Migrations
+{
+ [DbContext(typeof(DataDbContext))]
+ [Migration("20260601113631_AddLlmInvisibilityLookupIndex")]
+ partial class AddLlmInvisibilityLookupIndex
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder.HasAnnotation("ProductVersion", "10.0.7");
+
+ modelBuilder.Entity("TelegramSearchBot.Model.Data.AccountBook", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("CreatedAt")
+ .HasColumnType("TEXT");
+
+ b.Property("CreatedBy")
+ .HasColumnType("INTEGER");
+
+ b.Property("Description")
+ .HasMaxLength(500)
+ .HasColumnType("TEXT");
+
+ b.Property("GroupId")
+ .HasColumnType("INTEGER");
+
+ b.Property("IsActive")
+ .HasColumnType("INTEGER");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(100)
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.HasIndex("GroupId", "Name")
+ .IsUnique();
+
+ b.ToTable("AccountBooks");
+ });
+
+ modelBuilder.Entity("TelegramSearchBot.Model.Data.AccountRecord", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("AccountBookId")
+ .HasColumnType("INTEGER");
+
+ b.Property("Amount")
+ .HasColumnType("decimal(18,2)");
+
+ b.Property("CreatedAt")
+ .HasColumnType("TEXT");
+
+ b.Property("CreatedBy")
+ .HasColumnType("INTEGER");
+
+ b.Property("CreatedByUsername")
+ .HasMaxLength(100)
+ .HasColumnType("TEXT");
+
+ b.Property("Description")
+ .HasMaxLength(500)
+ .HasColumnType("TEXT");
+
+ b.Property("Tag")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Tag");
+
+ b.HasIndex("AccountBookId", "CreatedAt");
+
+ b.ToTable("AccountRecords");
+ });
+
+ modelBuilder.Entity("TelegramSearchBot.Model.Data.AppConfigurationItem", b =>
+ {
+ b.Property("Key")
+ .HasColumnType("TEXT");
+
+ b.Property("Value")
+ .HasColumnType("TEXT");
+
+ b.HasKey("Key");
+
+ b.ToTable("AppConfigurationItems");
+ });
+
+ modelBuilder.Entity("TelegramSearchBot.Model.Data.ChannelWithModel", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("IsDeleted")
+ .HasColumnType("INTEGER");
+
+ b.Property("LLMChannelId")
+ .HasColumnType("INTEGER");
+
+ b.Property("ModelName")
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.HasIndex("LLMChannelId");
+
+ b.ToTable("ChannelsWithModel");
+ });
+
+ modelBuilder.Entity("TelegramSearchBot.Model.Data.ConversationSegment", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("ContentSummary")
+ .HasColumnType("TEXT");
+
+ b.Property("CreatedAt")
+ .HasColumnType("TEXT");
+
+ b.Property("EndTime")
+ .HasColumnType("TEXT");
+
+ b.Property("FirstMessageId")
+ .HasColumnType("INTEGER");
+
+ b.Property("FullContent")
+ .HasColumnType("TEXT");
+
+ b.Property("GroupId")
+ .HasColumnType("INTEGER");
+
+ b.Property("IsVectorized")
+ .HasColumnType("INTEGER");
+
+ b.Property("LastMessageId")
+ .HasColumnType("INTEGER");
+
+ b.Property("MessageCount")
+ .HasColumnType("INTEGER");
+
+ b.Property("ParticipantCount")
+ .HasColumnType("INTEGER");
+
+ b.Property("StartTime")
+ .HasColumnType("TEXT");
+
+ b.Property("TopicKeywords")
+ .HasColumnType("TEXT");
+
+ b.Property("VectorId")
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.HasIndex("GroupId", "StartTime", "EndTime");
+
+ b.ToTable("ConversationSegments");
+ });
+
+ modelBuilder.Entity("TelegramSearchBot.Model.Data.ConversationSegmentMessage", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("ConversationSegmentId")
+ .HasColumnType("INTEGER");
+
+ b.Property("MessageDataId")
+ .HasColumnType("INTEGER");
+
+ b.Property("SequenceOrder")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ConversationSegmentId");
+
+ b.HasIndex("MessageDataId");
+
+ b.ToTable("ConversationSegmentMessages");
+ });
+
+ modelBuilder.Entity("TelegramSearchBot.Model.Data.FaissIndexFile", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("CreatedAt")
+ .HasColumnType("TEXT");
+
+ b.Property("Dimension")
+ .HasColumnType("INTEGER");
+
+ b.Property("FilePath")
+ .IsRequired()
+ .HasMaxLength(500)
+ .HasColumnType("TEXT");
+
+ b.Property("FileSize")
+ .HasColumnType("INTEGER");
+
+ b.Property("GroupId")
+ .HasColumnType("INTEGER");
+
+ b.Property("IndexType")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("TEXT");
+
+ b.Property("IsValid")
+ .HasColumnType("INTEGER");
+
+ b.Property("UpdatedAt")
+ .HasColumnType("TEXT");
+
+ b.Property("VectorCount")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("GroupId", "IndexType")
+ .IsUnique();
+
+ b.ToTable("FaissIndexFiles");
+ });
+
+ modelBuilder.Entity("TelegramSearchBot.Model.Data.GroupAccountSettings", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("ActiveAccountBookId")
+ .HasColumnType("INTEGER");
+
+ b.Property("GroupId")
+ .HasColumnType("INTEGER");
+
+ b.Property("IsAccountingEnabled")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("GroupId")
+ .IsUnique();
+
+ b.ToTable("GroupAccountSettings");
+ });
+
+ modelBuilder.Entity("TelegramSearchBot.Model.Data.GroupData", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("IsBlacklist")
+ .HasColumnType("INTEGER");
+
+ b.Property("IsForum")
+ .HasColumnType("INTEGER");
+
+ b.Property("Title")
+ .HasColumnType("TEXT");
+
+ b.Property("Type")
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.ToTable("GroupData");
+ });
+
+ modelBuilder.Entity("TelegramSearchBot.Model.Data.GroupSettings", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("AgentChatBatchWindowSeconds")
+ .HasColumnType("INTEGER");
+
+ b.Property("AgentChatMode")
+ .HasColumnType("INTEGER");
+
+ b.Property("GroupId")
+ .HasColumnType("INTEGER");
+
+ b.Property("ImageGenerationModelName")
+ .HasColumnType("TEXT");
+
+ b.Property("IsAgentChatEnabled")
+ .HasColumnType("INTEGER");
+
+ b.Property("IsManagerGroup")
+ .HasColumnType("INTEGER");
+
+ b.Property("LLMModelName")
+ .HasColumnType("TEXT");
+
+ b.Property("MusicGenerationModelName")
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.HasIndex("GroupId")
+ .IsUnique();
+
+ b.ToTable("GroupSettings");
+ });
+
+ modelBuilder.Entity("TelegramSearchBot.Model.Data.LLMChannel", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("ApiKey")
+ .HasColumnType("TEXT");
+
+ b.Property("Gateway")
+ .HasColumnType("TEXT");
+
+ b.Property("Name")
+ .HasColumnType("TEXT");
+
+ b.Property("Parallel")
+ .HasColumnType("INTEGER");
+
+ b.Property("Priority")
+ .HasColumnType("INTEGER");
+
+ b.Property("Provider")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.ToTable("LLMChannels");
+ });
+
+ modelBuilder.Entity("TelegramSearchBot.Model.Data.MemoryGraph", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("ChatId")
+ .HasColumnType("INTEGER");
+
+ b.Property("CreatedTime")
+ .HasColumnType("TEXT");
+
+ b.Property("EntityType")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("FromEntity")
+ .HasColumnType("TEXT");
+
+ b.Property("ItemType")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("Observations")
+ .HasColumnType("TEXT");
+
+ b.Property("RelationType")
+ .HasColumnType("TEXT");
+
+ b.Property("ToEntity")
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.ToTable("MemoryGraphs");
+ });
+
+ modelBuilder.Entity("TelegramSearchBot.Model.Data.Message", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("Content")
+ .HasColumnType("TEXT");
+
+ b.Property("DateTime")
+ .HasColumnType("TEXT");
+
+ b.Property("FromUserId")
+ .HasColumnType("INTEGER");
+
+ b.Property("GroupId")
+ .HasColumnType("INTEGER");
+
+ b.Property("MessageId")
+ .HasColumnType("INTEGER");
+
+ b.Property