diff --git a/mem0.NET b/mem0.NET
new file mode 160000
index 00000000..064885a6
--- /dev/null
+++ b/mem0.NET
@@ -0,0 +1 @@
+Subproject commit 064885a681438a2290c60112ad6a5d49cee9b36c
diff --git a/src/Service/FastWiki.Service/FastWiki.Service.csproj b/src/Service/FastWiki.Service/FastWiki.Service.csproj
index 423daad2..4b54359d 100644
--- a/src/Service/FastWiki.Service/FastWiki.Service.csproj
+++ b/src/Service/FastWiki.Service/FastWiki.Service.csproj
@@ -87,4 +87,8 @@
<_ContentIncludedByDefault Remove="wwwroot\uploads\20240816\27166df2bf0042058a77bfcadef29b2a1.png" />
<_ContentIncludedByDefault Remove="wwwroot\uploads\20240816\7ccbd188751846fd972d4bf71db86236基础组件发版(gp-gateway-center).md" />
+
+
+
+
diff --git a/src/Service/FastWiki.Service/Migrations/PostgreSQL/20240422143639_Initial.cs b/src/Service/FastWiki.Service/Migrations/PostgreSQL/20240422143639_Initial.cs
deleted file mode 100644
index 0b273049..00000000
--- a/src/Service/FastWiki.Service/Migrations/PostgreSQL/20240422143639_Initial.cs
+++ /dev/null
@@ -1,289 +0,0 @@
-using Microsoft.EntityFrameworkCore.Migrations;
-using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
-
-namespace FastWiki.Service.Migrations.PostgreSQL;
-
-///
-public partial class Initial : Migration
-{
- ///
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.CreateTable(
- "wiki-chat-application",
- table => new
- {
- Id = table.Column("text", nullable: false),
- Name = table.Column("text", nullable: false),
- Prompt = table.Column("text", nullable: false),
- ChatModel = table.Column("text", nullable: false),
- Temperature = table.Column("double precision", nullable: false),
- MaxResponseToken = table.Column("integer", nullable: false),
- Template = table.Column("text", nullable: false),
- Parameter = table.Column("text", nullable: false),
- Opener = table.Column("text", nullable: false),
- WikiIds = table.Column("text", nullable: false),
- ReferenceUpperLimit = table.Column("integer", nullable: false),
- Relevancy = table.Column("double precision", nullable: false),
- NoReplyFoundTemplate = table.Column("text", nullable: true),
- ShowSourceFile = table.Column("boolean", nullable: false),
- Extend = table.Column("text", nullable: false),
- FunctionIds = table.Column("text", nullable: false),
- Creator = table.Column("uuid", nullable: true),
- CreationTime = table.Column("timestamp without time zone", nullable: false),
- Modifier = table.Column("uuid", nullable: true),
- ModificationTime = table.Column("timestamp without time zone", nullable: false),
- IsDeleted = table.Column("boolean", nullable: false)
- },
- constraints: table => { table.PrimaryKey("PK_wiki-chat-application", x => x.Id); });
-
- migrationBuilder.CreateTable(
- "wiki-chat-dialog",
- table => new
- {
- Id = table.Column("text", nullable: false),
- Name = table.Column("text", nullable: false),
- ChatId = table.Column("text", nullable: true),
- ApplicationId = table.Column("text", nullable: false),
- Description = table.Column("text", nullable: false),
- Type = table.Column("integer", nullable: false),
- Creator = table.Column("uuid", nullable: false),
- CreationTime = table.Column("timestamp without time zone", nullable: false),
- Modifier = table.Column("uuid", nullable: false),
- ModificationTime = table.Column("timestamp without time zone", nullable: false),
- IsDeleted = table.Column("boolean", nullable: false)
- },
- constraints: table => { table.PrimaryKey("PK_wiki-chat-dialog", x => x.Id); });
-
- migrationBuilder.CreateTable(
- "wiki-chat-dialog-history",
- table => new
- {
- Id = table.Column("text", nullable: false),
- ChatDialogId = table.Column("text", nullable: false),
- Content = table.Column("text", maxLength: -1, nullable: false),
- TokenConsumption = table.Column("integer", nullable: false),
- Current = table.Column("boolean", nullable: false),
- Type = table.Column("integer", nullable: false),
- ReferenceFile = table.Column("text", nullable: false),
- Creator = table.Column("uuid", nullable: false),
- CreationTime = table.Column("timestamp without time zone", nullable: false),
- Modifier = table.Column("uuid", nullable: false),
- ModificationTime = table.Column("timestamp without time zone", nullable: false),
- IsDeleted = table.Column("boolean", nullable: false)
- },
- constraints: table => { table.PrimaryKey("PK_wiki-chat-dialog-history", x => x.Id); });
-
- migrationBuilder.CreateTable(
- "wiki-chat-share",
- table => new
- {
- Id = table.Column("text", nullable: false),
- Name = table.Column("text", nullable: false),
- ChatApplicationId = table.Column("text", nullable: false),
- Expires = table.Column("timestamp without time zone", nullable: true),
- UsedToken = table.Column("bigint", nullable: false),
- AvailableToken = table.Column("bigint", nullable: false),
- AvailableQuantity = table.Column("integer", nullable: false),
- APIKey = table.Column("text", nullable: true),
- Creator = table.Column("uuid", nullable: false),
- CreationTime = table.Column("timestamp without time zone", nullable: false),
- Modifier = table.Column("uuid", nullable: false),
- ModificationTime = table.Column("timestamp without time zone", nullable: false)
- },
- constraints: table => { table.PrimaryKey("PK_wiki-chat-share", x => x.Id); });
-
- migrationBuilder.CreateTable(
- "wiki-file-storages",
- table => new
- {
- Id = table.Column("bigint", nullable: false)
- .Annotation("Npgsql:ValueGenerationStrategy",
- NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
- Name = table.Column("character varying(100)", maxLength: 100, nullable: false),
- Path = table.Column("character varying(200)", maxLength: 200, nullable: false),
- Size = table.Column("bigint", nullable: false),
- IsCompression = table.Column("boolean", nullable: false),
- FullName = table.Column("text", nullable: false),
- Creator = table.Column("uuid", nullable: true),
- CreationTime = table.Column("timestamp without time zone", nullable: false),
- Modifier = table.Column("uuid", nullable: true),
- ModificationTime = table.Column("timestamp without time zone", nullable: false),
- IsDeleted = table.Column("boolean", nullable: false)
- },
- constraints: table => { table.PrimaryKey("PK_wiki-file-storages", x => x.Id); });
-
- migrationBuilder.CreateTable(
- "wiki-function-calls",
- table => new
- {
- Id = table.Column("bigint", nullable: false)
- .Annotation("Npgsql:ValueGenerationStrategy",
- NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
- Name = table.Column("text", nullable: false),
- Description = table.Column("text", nullable: false),
- Content = table.Column("text", nullable: false),
- Parameters = table.Column("text", nullable: false),
- Items = table.Column("text", nullable: false),
- Enable = table.Column("boolean", nullable: false),
- Imports = table.Column("text", nullable: false),
- Main = table.Column("text", nullable: false),
- Creator = table.Column("uuid", nullable: false),
- CreationTime = table.Column("timestamp without time zone", nullable: false),
- Modifier = table.Column("uuid", nullable: false),
- ModificationTime = table.Column("timestamp without time zone", nullable: false),
- IsDeleted = table.Column("boolean", nullable: false)
- },
- constraints: table => { table.PrimaryKey("PK_wiki-function-calls", x => x.Id); });
-
- migrationBuilder.CreateTable(
- "wiki-users",
- table => new
- {
- Id = table.Column("uuid", nullable: false),
- Account = table.Column("text", nullable: false),
- Name = table.Column("character varying(100)", maxLength: 100, nullable: false),
- Password = table.Column("character varying(100)", maxLength: 100, nullable: false),
- Salt = table.Column("text", nullable: false),
- Avatar = table.Column("text", nullable: false),
- Email = table.Column("text", nullable: false),
- Phone = table.Column("text", nullable: false),
- IsDisable = table.Column("boolean", nullable: false),
- Role = table.Column("integer", nullable: false),
- Creator = table.Column("uuid", nullable: true),
- CreationTime = table.Column("timestamp without time zone", nullable: false),
- Modifier = table.Column("uuid", nullable: true),
- ModificationTime = table.Column("timestamp without time zone", nullable: false),
- IsDeleted = table.Column("boolean", nullable: false)
- },
- constraints: table => { table.PrimaryKey("PK_wiki-users", x => x.Id); });
-
- migrationBuilder.CreateTable(
- "wiki-wiki-details",
- table => new
- {
- Id = table.Column("bigint", nullable: false)
- .Annotation("Npgsql:ValueGenerationStrategy",
- NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
- WikiId = table.Column("bigint", nullable: false),
- FileName = table.Column("character varying(100)", maxLength: 100, nullable: false),
- Path = table.Column("character varying(200)", maxLength: 200, nullable: false),
- FileId = table.Column("bigint", nullable: false),
- DataCount = table.Column("integer", nullable: false),
- Type = table.Column("character varying(100)", maxLength: 100, nullable: false),
- State = table.Column("integer", nullable: false),
- Creator = table.Column("bigint", nullable: false),
- CreationTime = table.Column("timestamp without time zone", nullable: false),
- Modifier = table.Column("bigint", nullable: false),
- ModificationTime = table.Column("timestamp without time zone", nullable: false),
- MaxTokensPerParagraph = table.Column("integer", nullable: false),
- MaxTokensPerLine = table.Column("integer", nullable: false),
- OverlappingTokens = table.Column("integer", nullable: false),
- Mode = table.Column("integer", nullable: false),
- TrainingPattern = table.Column("integer", nullable: false),
- QAPromptTemplate = table.Column("text", nullable: true)
- },
- constraints: table => { table.PrimaryKey("PK_wiki-wiki-details", x => x.Id); });
-
- migrationBuilder.CreateTable(
- "wiki-wikis",
- table => new
- {
- Id = table.Column("bigint", nullable: false)
- .Annotation("Npgsql:ValueGenerationStrategy",
- NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
- Icon = table.Column("text", nullable: false),
- Name = table.Column("character varying(100)", maxLength: 100, nullable: false),
- Model = table.Column("text", nullable: false),
- EmbeddingModel = table.Column("text", nullable: false),
- Creator = table.Column("uuid", nullable: true),
- CreationTime = table.Column("timestamp without time zone", nullable: false),
- Modifier = table.Column("uuid", nullable: true),
- ModificationTime = table.Column("timestamp without time zone", nullable: false),
- IsDeleted = table.Column("boolean", nullable: false)
- },
- constraints: table => { table.PrimaryKey("PK_wiki-wikis", x => x.Id); });
-
- migrationBuilder.InsertData(
- "wiki-users",
- new[]
- {
- "Id", "Account", "Avatar", "CreationTime", "Creator", "Email", "IsDeleted", "IsDisable",
- "ModificationTime", "Modifier", "Name", "Password", "Phone", "Role", "Salt"
- },
- new object[]
- {
- new Guid("81ba41a1-27df-4f6c-b327-dfec1bce8c85"), "admin",
- "https://blog-simple.oss-cn-shenzhen.aliyuncs.com/Avatar.jpg",
- new DateTime(2024, 4, 22, 14, 36, 39, 431, DateTimeKind.Utc).AddTicks(7635), null, "239573049@qq.com",
- false, false, new DateTime(2024, 4, 22, 14, 36, 39, 431, DateTimeKind.Utc).AddTicks(7638), null,
- "admin", "ae322a2c4c237df3b8683703e51442aa", "13049809673", 2, "19ea5ff625024a1d80bbf86c054e132c"
- });
-
- migrationBuilder.CreateIndex(
- "IX_wiki-chat-application_Name",
- "wiki-chat-application",
- "Name");
-
- migrationBuilder.CreateIndex(
- "IX_wiki-chat-dialog_ChatId",
- "wiki-chat-dialog",
- "ChatId");
-
- migrationBuilder.CreateIndex(
- "IX_wiki-chat-dialog-history_ChatDialogId",
- "wiki-chat-dialog-history",
- "ChatDialogId");
-
- migrationBuilder.CreateIndex(
- "IX_wiki-chat-dialog-history_Creator",
- "wiki-chat-dialog-history",
- "Creator");
-
- migrationBuilder.CreateIndex(
- "IX_wiki-chat-share_ChatApplicationId",
- "wiki-chat-share",
- "ChatApplicationId");
-
- migrationBuilder.CreateIndex(
- "IX_wiki-function-calls_CreationTime",
- "wiki-function-calls",
- "CreationTime");
-
- migrationBuilder.CreateIndex(
- "IX_wiki-wikis_Name",
- "wiki-wikis",
- "Name");
- }
-
- ///
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropTable(
- "wiki-chat-application");
-
- migrationBuilder.DropTable(
- "wiki-chat-dialog");
-
- migrationBuilder.DropTable(
- "wiki-chat-dialog-history");
-
- migrationBuilder.DropTable(
- "wiki-chat-share");
-
- migrationBuilder.DropTable(
- "wiki-file-storages");
-
- migrationBuilder.DropTable(
- "wiki-function-calls");
-
- migrationBuilder.DropTable(
- "wiki-users");
-
- migrationBuilder.DropTable(
- "wiki-wiki-details");
-
- migrationBuilder.DropTable(
- "wiki-wikis");
- }
-}
\ No newline at end of file
diff --git a/src/Service/FastWiki.Service/Migrations/PostgreSQL/20240512150624_RemoveDialog.Designer.cs b/src/Service/FastWiki.Service/Migrations/PostgreSQL/20240512150624_RemoveDialog.Designer.cs
deleted file mode 100644
index 167ad66c..00000000
--- a/src/Service/FastWiki.Service/Migrations/PostgreSQL/20240512150624_RemoveDialog.Designer.cs
+++ /dev/null
@@ -1,483 +0,0 @@
-//
-using System;
-using FastWiki.Service.DataAccess;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
-
-#nullable disable
-
-namespace FastWiki.Service.Migrations.PostgreSQL
-{
- [DbContext(typeof(WikiDbContext))]
- [Migration("20240512150624_RemoveDialog")]
- partial class RemoveDialog
- {
- ///
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder
- .HasAnnotation("ProductVersion", "8.0.0")
- .HasAnnotation("Relational:MaxIdentifierLength", 63);
-
- NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
-
- modelBuilder.Entity("FastWiki.Service.Domain.ChatApplications.Aggregates.ChatApplication", b =>
- {
- b.Property("Id")
- .HasColumnType("text");
-
- b.Property("ChatModel")
- .HasColumnType("text");
-
- b.Property("CreationTime")
- .HasColumnType("timestamp without time zone");
-
- b.Property("Creator")
- .HasColumnType("uuid");
-
- b.Property("Extend")
- .HasColumnType("text");
-
- b.Property("FunctionIds")
- .HasColumnType("text");
-
- b.Property("IsDeleted")
- .HasColumnType("boolean");
-
- b.Property("MaxResponseToken")
- .HasColumnType("integer");
-
- b.Property("ModificationTime")
- .HasColumnType("timestamp without time zone");
-
- b.Property("Modifier")
- .HasColumnType("uuid");
-
- b.Property("Name")
- .HasColumnType("text");
-
- b.Property("NoReplyFoundTemplate")
- .HasColumnType("text");
-
- b.Property("Opener")
- .HasColumnType("text");
-
- b.Property("Parameter")
- .HasColumnType("text");
-
- b.Property("Prompt")
- .HasColumnType("text");
-
- b.Property("ReferenceUpperLimit")
- .HasColumnType("integer");
-
- b.Property("Relevancy")
- .HasColumnType("double precision");
-
- b.Property("ShowSourceFile")
- .HasColumnType("boolean");
-
- b.Property("Temperature")
- .HasColumnType("double precision");
-
- b.Property("Template")
- .HasColumnType("text");
-
- b.Property("WikiIds")
- .HasColumnType("text");
-
- b.HasKey("Id");
-
- b.HasIndex("Name");
-
- b.ToTable("wiki-chat-application", (string)null);
- });
-
- modelBuilder.Entity("FastWiki.Service.Domain.ChatApplications.Aggregates.ChatRecord", b =>
- {
- b.Property("Id")
- .HasColumnType("text");
-
- b.Property("ApplicationId")
- .HasColumnType("text");
-
- b.Property("CreationTime")
- .HasColumnType("timestamp without time zone");
-
- b.Property("Creator")
- .HasColumnType("uuid");
-
- b.Property("ModificationTime")
- .HasColumnType("timestamp without time zone");
-
- b.Property("Modifier")
- .HasColumnType("uuid");
-
- b.Property("Question")
- .HasColumnType("text");
-
- b.HasKey("Id");
-
- b.HasIndex("CreationTime");
-
- b.ToTable("wiki-chat-record", (string)null);
- });
-
- modelBuilder.Entity("FastWiki.Service.Domain.ChatApplications.Aggregates.ChatShare", b =>
- {
- b.Property("Id")
- .HasColumnType("text");
-
- b.Property("APIKey")
- .HasColumnType("text");
-
- b.Property("AvailableQuantity")
- .HasColumnType("integer");
-
- b.Property("AvailableToken")
- .HasColumnType("bigint");
-
- b.Property("ChatApplicationId")
- .HasColumnType("text");
-
- b.Property("CreationTime")
- .HasColumnType("timestamp without time zone");
-
- b.Property("Creator")
- .HasColumnType("uuid");
-
- b.Property("Expires")
- .HasColumnType("timestamp without time zone");
-
- b.Property("ModificationTime")
- .HasColumnType("timestamp without time zone");
-
- b.Property("Modifier")
- .HasColumnType("uuid");
-
- b.Property("Name")
- .HasColumnType("text");
-
- b.Property("UsedToken")
- .HasColumnType("bigint");
-
- b.HasKey("Id");
-
- b.HasIndex("ChatApplicationId");
-
- b.ToTable("wiki-chat-share", (string)null);
- });
-
- modelBuilder.Entity("FastWiki.Service.Domain.ChatApplications.Aggregates.Questions", b =>
- {
- b.Property("Id")
- .HasColumnType("text");
-
- b.Property("ApplicationId")
- .HasColumnType("text");
-
- b.Property("CreationTime")
- .HasColumnType("timestamp without time zone");
-
- b.Property("Order")
- .HasColumnType("integer");
-
- b.Property("Question")
- .HasColumnType("text");
-
- b.HasKey("Id");
-
- b.HasIndex("CreationTime");
-
- b.ToTable("wiki-questions", (string)null);
- });
-
- modelBuilder.Entity("FastWiki.Service.Domain.Function.Aggregates.FastWikiFunctionCall", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("bigint");
-
- NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
-
- b.Property("Content")
- .HasColumnType("text");
-
- b.Property("CreationTime")
- .HasColumnType("timestamp without time zone");
-
- b.Property("Creator")
- .HasColumnType("uuid");
-
- b.Property("Description")
- .HasColumnType("text");
-
- b.Property("Enable")
- .HasColumnType("boolean");
-
- b.Property("Imports")
- .HasColumnType("text");
-
- b.Property("IsDeleted")
- .HasColumnType("boolean");
-
- b.Property("Items")
- .HasColumnType("text");
-
- b.Property("Main")
- .HasColumnType("text");
-
- b.Property("ModificationTime")
- .HasColumnType("timestamp without time zone");
-
- b.Property("Modifier")
- .HasColumnType("uuid");
-
- b.Property("Name")
- .HasColumnType("text");
-
- b.Property("Parameters")
- .HasColumnType("text");
-
- b.HasKey("Id");
-
- b.HasIndex("CreationTime");
-
- b.ToTable("wiki-function-calls", (string)null);
- });
-
- modelBuilder.Entity("FastWiki.Service.Domain.Storage.Aggregates.FileStorage", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("bigint");
-
- NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
-
- b.Property("CreationTime")
- .HasColumnType("timestamp without time zone");
-
- b.Property("Creator")
- .HasColumnType("uuid");
-
- b.Property("FullName")
- .HasColumnType("text");
-
- b.Property("IsCompression")
- .HasColumnType("boolean");
-
- b.Property("IsDeleted")
- .HasColumnType("boolean");
-
- b.Property("ModificationTime")
- .HasColumnType("timestamp without time zone");
-
- b.Property("Modifier")
- .HasColumnType("uuid");
-
- b.Property("Name")
- .HasMaxLength(100)
- .HasColumnType("character varying(100)");
-
- b.Property("Path")
- .HasMaxLength(200)
- .HasColumnType("character varying(200)");
-
- b.Property("Size")
- .HasColumnType("bigint");
-
- b.HasKey("Id");
-
- b.ToTable("wiki-file-storages", (string)null);
- });
-
- modelBuilder.Entity("FastWiki.Service.Domain.Users.Aggregates.User", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("uuid");
-
- b.Property("Account")
- .HasColumnType("text");
-
- b.Property("Avatar")
- .HasColumnType("text");
-
- b.Property("CreationTime")
- .HasColumnType("timestamp without time zone");
-
- b.Property("Creator")
- .HasColumnType("uuid");
-
- b.Property("Email")
- .HasColumnType("text");
-
- b.Property("IsDeleted")
- .HasColumnType("boolean");
-
- b.Property("IsDisable")
- .HasColumnType("boolean");
-
- b.Property("ModificationTime")
- .HasColumnType("timestamp without time zone");
-
- b.Property("Modifier")
- .HasColumnType("uuid");
-
- b.Property("Name")
- .HasMaxLength(100)
- .HasColumnType("character varying(100)");
-
- b.Property("Password")
- .HasMaxLength(100)
- .HasColumnType("character varying(100)");
-
- b.Property("Phone")
- .HasColumnType("text");
-
- b.Property("Role")
- .HasColumnType("integer");
-
- b.Property("Salt")
- .HasColumnType("text");
-
- b.HasKey("Id");
-
- b.ToTable("wiki-users", (string)null);
-
- b.HasData(
- new
- {
- Id = new Guid("369059b8-6905-488b-87ab-447afa38b4de"),
- Account = "admin",
- Avatar = "https://blog-simple.oss-cn-shenzhen.aliyuncs.com/Avatar.jpg",
- CreationTime = new DateTime(2024, 5, 12, 15, 6, 23, 950, DateTimeKind.Utc).AddTicks(9764),
- Email = "239573049@qq.com",
- IsDeleted = false,
- IsDisable = false,
- ModificationTime = new DateTime(2024, 5, 12, 15, 6, 23, 950, DateTimeKind.Utc).AddTicks(9767),
- Name = "admin",
- Password = "25b55175d0b2235c4fd324a0388343e0",
- Phone = "13049809673",
- Role = 2,
- Salt = "c2f1bbebf79549178117880c43e58776"
- });
- });
-
- modelBuilder.Entity("FastWiki.Service.Domain.Wikis.Aggregates.Wiki", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("bigint");
-
- NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
-
- b.Property("CreationTime")
- .HasColumnType("timestamp without time zone");
-
- b.Property("Creator")
- .HasColumnType("uuid");
-
- b.Property("EmbeddingModel")
- .HasColumnType("text");
-
- b.Property("Icon")
- .HasColumnType("text");
-
- b.Property("IsDeleted")
- .HasColumnType("boolean");
-
- b.Property("Model")
- .HasColumnType("text");
-
- b.Property("ModificationTime")
- .HasColumnType("timestamp without time zone");
-
- b.Property("Modifier")
- .HasColumnType("uuid");
-
- b.Property("Name")
- .HasMaxLength(100)
- .HasColumnType("character varying(100)");
-
- b.HasKey("Id");
-
- b.HasIndex("Name");
-
- b.ToTable("wiki-wikis", (string)null);
- });
-
- modelBuilder.Entity("FastWiki.Service.Domain.Wikis.Aggregates.WikiDetail", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("bigint");
-
- NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
-
- b.Property("CreationTime")
- .HasColumnType("timestamp without time zone");
-
- b.Property("Creator")
- .HasColumnType("bigint");
-
- b.Property("DataCount")
- .HasColumnType("integer");
-
- b.Property("FileId")
- .HasColumnType("bigint");
-
- b.Property("FileName")
- .HasMaxLength(100)
- .HasColumnType("character varying(100)");
-
- b.Property("MaxTokensPerLine")
- .HasColumnType("integer");
-
- b.Property("MaxTokensPerParagraph")
- .HasColumnType("integer");
-
- b.Property("Mode")
- .HasColumnType("integer");
-
- b.Property("ModificationTime")
- .HasColumnType("timestamp without time zone");
-
- b.Property("Modifier")
- .HasColumnType("bigint");
-
- b.Property("OverlappingTokens")
- .HasColumnType("integer");
-
- b.Property("Path")
- .HasMaxLength(200)
- .HasColumnType("character varying(200)");
-
- b.Property("QAPromptTemplate")
- .HasColumnType("text");
-
- b.Property("State")
- .HasColumnType("integer");
-
- b.Property("TrainingPattern")
- .HasColumnType("integer");
-
- b.Property("Type")
- .HasMaxLength(100)
- .HasColumnType("character varying(100)");
-
- b.Property("WikiId")
- .HasColumnType("bigint");
-
- b.HasKey("Id");
-
- b.ToTable("wiki-wiki-details", (string)null);
- });
-#pragma warning restore 612, 618
- }
- }
-}
diff --git a/src/Service/FastWiki.Service/Migrations/PostgreSQL/20240512150624_RemoveDialog.cs b/src/Service/FastWiki.Service/Migrations/PostgreSQL/20240512150624_RemoveDialog.cs
deleted file mode 100644
index 66e92d0b..00000000
--- a/src/Service/FastWiki.Service/Migrations/PostgreSQL/20240512150624_RemoveDialog.cs
+++ /dev/null
@@ -1,819 +0,0 @@
-using Microsoft.EntityFrameworkCore.Migrations;
-
-namespace FastWiki.Service.Migrations.PostgreSQL;
-
-///
-public partial class RemoveDialog : Migration
-{
- ///
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropTable(
- "wiki-chat-dialog");
-
- migrationBuilder.DropTable(
- "wiki-chat-dialog-history");
-
- migrationBuilder.DeleteData(
- "wiki-users",
- "Id",
- new Guid("81ba41a1-27df-4f6c-b327-dfec1bce8c85"));
-
- migrationBuilder.AlterColumn(
- "Name",
- "wiki-wikis",
- "character varying(100)",
- maxLength: 100,
- nullable: true,
- oldClrType: typeof(string),
- oldType: "character varying(100)",
- oldMaxLength: 100);
-
- migrationBuilder.AlterColumn(
- "Model",
- "wiki-wikis",
- "text",
- nullable: true,
- oldClrType: typeof(string),
- oldType: "text");
-
- migrationBuilder.AlterColumn(
- "Icon",
- "wiki-wikis",
- "text",
- nullable: true,
- oldClrType: typeof(string),
- oldType: "text");
-
- migrationBuilder.AlterColumn(
- "EmbeddingModel",
- "wiki-wikis",
- "text",
- nullable: true,
- oldClrType: typeof(string),
- oldType: "text");
-
- migrationBuilder.AlterColumn(
- "Type",
- "wiki-wiki-details",
- "character varying(100)",
- maxLength: 100,
- nullable: true,
- oldClrType: typeof(string),
- oldType: "character varying(100)",
- oldMaxLength: 100);
-
- migrationBuilder.AlterColumn(
- "Path",
- "wiki-wiki-details",
- "character varying(200)",
- maxLength: 200,
- nullable: true,
- oldClrType: typeof(string),
- oldType: "character varying(200)",
- oldMaxLength: 200);
-
- migrationBuilder.AlterColumn(
- "FileName",
- "wiki-wiki-details",
- "character varying(100)",
- maxLength: 100,
- nullable: true,
- oldClrType: typeof(string),
- oldType: "character varying(100)",
- oldMaxLength: 100);
-
- migrationBuilder.AlterColumn(
- "Salt",
- "wiki-users",
- "text",
- nullable: true,
- oldClrType: typeof(string),
- oldType: "text");
-
- migrationBuilder.AlterColumn(
- "Phone",
- "wiki-users",
- "text",
- nullable: true,
- oldClrType: typeof(string),
- oldType: "text");
-
- migrationBuilder.AlterColumn(
- "Password",
- "wiki-users",
- "character varying(100)",
- maxLength: 100,
- nullable: true,
- oldClrType: typeof(string),
- oldType: "character varying(100)",
- oldMaxLength: 100);
-
- migrationBuilder.AlterColumn(
- "Name",
- "wiki-users",
- "character varying(100)",
- maxLength: 100,
- nullable: true,
- oldClrType: typeof(string),
- oldType: "character varying(100)",
- oldMaxLength: 100);
-
- migrationBuilder.AlterColumn(
- "Email",
- "wiki-users",
- "text",
- nullable: true,
- oldClrType: typeof(string),
- oldType: "text");
-
- migrationBuilder.AlterColumn(
- "Avatar",
- "wiki-users",
- "text",
- nullable: true,
- oldClrType: typeof(string),
- oldType: "text");
-
- migrationBuilder.AlterColumn