diff --git a/.gitignore b/.gitignore
index ab627c0d2d9591f9defe148dc6c25cc91fe4b83c..4d64ba312cc22cc76cdf164a55b52964e8fc2547 100644
--- a/.gitignore
+++ b/.gitignore
@@ -29,21 +29,21 @@ appsettings.Production.json
# 前端 (Node.js)
node_modules/
-dist/
-build/
-.next/
-.nuxt/
-.cache/
-.parcel-cache/
-.vite/
-*.log
-npm-debug.log*
-yarn-debug.log*
-yarn-error.log*
+# dist/
+# build/
+# .next/
+# .nuxt/
+# .cache/
+# .parcel-cache/
+# .vite/
+# *.log
+# npm-debug.log*
+# yarn-debug.log*
+# yarn-error.log*
-# Uniapp特殊文件
-unpackage/
-.hbuilderx/
+# # Uniapp特殊文件
+# unpackage/
+# .hbuilderx/
# 环境变量和配置
# .env
diff --git a/FlaskAPI/dockerfile b/FlaskAPI/dockerfile
index fe49e763462574a0832b411601cd6fc4571bfde2..1de922e05d341c657f079db2fdc8a19633257e5b 100644
--- a/FlaskAPI/dockerfile
+++ b/FlaskAPI/dockerfile
@@ -2,7 +2,7 @@ FROM swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/python:3.11-slim
WORKDIR /app
-COPY requirements.txt .
+COPY requirements.txt ./
COPY zh_core_web_sm-3.7.0-py3-none-any.whl /tmp/
RUN pip install --no-cache-dir -r requirements.txt
@@ -10,5 +10,7 @@ RUN pip install /tmp/zh_core_web_sm-3.7.0-py3-none-any.whl
COPY . .
+RUN pip install gunicorn
+
EXPOSE 5000
CMD ["gunicorn", "-b", "0.0.0.0:5000", "app:app"]
diff --git a/backend/dockerfile b/backend/dockerfile
index 1c63d6f8f1f6199266935248d965a3be3e8855eb..26f99925e8cc7ab49922669376390609563821ac 100644
--- a/backend/dockerfile
+++ b/backend/dockerfile
@@ -12,4 +12,4 @@ RUN dotnet publish -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=build /app/publish .
-ENTRYPOINT ["dotnet", "UniversalAdminSystem.dll"]
+ENTRYPOINT ["dotnet", "UniversalAdminSystem.Api.dll"]
diff --git a/backend/src/UniversalAdminSystem.Api/appsettings.json b/backend/src/UniversalAdminSystem.Api/appsettings.json
index 070b4fdfe3bf7dc8183251b8c216f0d051696bd2..c2990ed11aae4ad7aeb569b038685b25b34bcfc6 100644
--- a/backend/src/UniversalAdminSystem.Api/appsettings.json
+++ b/backend/src/UniversalAdminSystem.Api/appsettings.json
@@ -8,8 +8,8 @@
},
"AllowedHosts": "*",
"ConnectionStrings": {
- "pgSql": "Server=localhost;Port=5432;Username=admin;Password=031028@yue;Database=rag_vector_db",
- "RabbitMq": "amqp://admin:admin@localhost:5672/"
+ "pgSql": "Server=47.116.179.160;Port=5432;Username=postgres;Password=031028@yue;Database=rag_vector_db",
+ "RabbitMq": "amqp://admin:admin@47.116.179.160:5672/"
},
"Jwt": {
"Key": "YourSuperSecretKey1232347509872093oiqewupori",
diff --git a/backend/src/UniversalAdminSystem.Infrastructure/Migrations/20250807030354_RAG1.Designer.cs b/backend/src/UniversalAdminSystem.Infrastructure/Migrations/20250807030354_RAG1.Designer.cs
deleted file mode 100644
index 9d2ff06b3e1801697a125c3d76c9b627bb78bd4f..0000000000000000000000000000000000000000
--- a/backend/src/UniversalAdminSystem.Infrastructure/Migrations/20250807030354_RAG1.Designer.cs
+++ /dev/null
@@ -1,392 +0,0 @@
-//
-using System;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
-using Pgvector;
-using UniversalAdminSystem.Infrastructure.Persistence.DbContexts;
-
-#nullable disable
-
-namespace UniversalAdminSystem.Infrastructure.Migrations
-{
- [DbContext(typeof(UniversalAdminSystemDbContext))]
- [Migration("20250807030354_RAG1")]
- partial class RAG1
- {
- ///
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder
- .HasAnnotation("ProductVersion", "8.0.0")
- .HasAnnotation("Relational:MaxIdentifierLength", 63);
-
- NpgsqlModelBuilderExtensions.HasPostgresExtension(modelBuilder, "vector");
- NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
-
- modelBuilder.Entity("RolePermissions", b =>
- {
- b.Property("RoleId")
- .HasColumnType("uuid");
-
- b.Property("PermissionId")
- .HasColumnType("uuid");
-
- b.HasKey("RoleId", "PermissionId");
-
- b.HasIndex("PermissionId");
-
- b.HasIndex("RoleId");
-
- b.ToTable("RolePermissions");
- });
-
- modelBuilder.Entity("UniversalAdminSystem.Domian.FileStorage.Aggregates.File", b =>
- {
- b.Property("Id")
- .HasColumnType("uuid");
-
- b.Property("AccessLevel")
- .HasColumnType("integer");
-
- b.Property("IsFolder")
- .HasColumnType("boolean");
-
- b.Property("Name")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("OwnerId")
- .HasColumnType("uuid");
-
- b.Property("ParentId")
- .HasColumnType("uuid");
-
- b.Property("Path")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("SecurityCheckResult")
- .HasColumnType("text");
-
- b.Property("Size")
- .HasColumnType("bigint");
-
- b.Property("Type")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("UploadTime")
- .HasColumnType("timestamp with time zone");
-
- b.HasKey("Id");
-
- b.ToTable("Files");
- });
-
- modelBuilder.Entity("UniversalAdminSystem.Domian.LogManagement.Aggregates.LogEntry", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("uuid");
-
- b.Property("Context")
- .HasColumnType("text");
-
- b.Property("Exception")
- .HasColumnType("text");
-
- b.Property("Level")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("Message")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("Source")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("Timestamp")
- .HasColumnType("timestamp with time zone");
-
- b.Property("UserId")
- .HasColumnType("uuid");
-
- b.HasKey("Id");
-
- b.ToTable("LogEntries");
- });
-
- modelBuilder.Entity("UniversalAdminSystem.Domian.PermissionManagement.Aggregate.Permission", b =>
- {
- b.Property("PermissionId")
- .ValueGeneratedOnAdd()
- .HasColumnType("uuid");
-
- b.Property("Action")
- .HasColumnType("integer");
-
- b.Property("Code")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("CreateTime")
- .HasColumnType("timestamp with time zone");
-
- b.Property("Description")
- .HasColumnType("text");
-
- b.Property("IsSystem")
- .HasColumnType("boolean");
-
- b.Property("Name")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("PermissionType")
- .HasColumnType("integer");
-
- b.Property("Resource")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("UpdateTime")
- .HasColumnType("timestamp with time zone");
-
- b.HasKey("PermissionId");
-
- b.HasIndex("Code")
- .IsUnique();
-
- b.ToTable("Permissions");
- });
-
- modelBuilder.Entity("UniversalAdminSystem.Domian.PermissionManagement.Aggregate.Role", b =>
- {
- b.Property("RoleId")
- .HasColumnType("uuid");
-
- b.Property("CreateTime")
- .HasColumnType("timestamp with time zone");
-
- b.Property("Description")
- .HasColumnType("text");
-
- b.Property("IsSupper")
- .HasColumnType("boolean");
-
- b.Property("IsSystem")
- .HasColumnType("boolean");
-
- b.Property("Name")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("UpdateTime")
- .HasColumnType("timestamp with time zone");
-
- b.HasKey("RoleId");
-
- b.HasIndex("Name")
- .IsUnique();
-
- b.ToTable("Roles");
- });
-
- modelBuilder.Entity("UniversalAdminSystem.Domian.SystemSettings.Aggregates.SystemSetting", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("uuid");
-
- b.Property("CreateTime")
- .HasColumnType("timestamp with time zone");
-
- b.Property("Description")
- .HasColumnType("text");
-
- b.Property("Group")
- .HasColumnType("text");
-
- b.Property("Key")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("UpdateTime")
- .HasColumnType("timestamp with time zone");
-
- b.Property("Value")
- .IsRequired()
- .HasColumnType("text");
-
- b.HasKey("Id");
-
- b.ToTable("SystemSettings");
- });
-
- modelBuilder.Entity("UniversalAdminSystem.Domian.UserConversations.Aggregates.Conversations", b =>
- {
- b.Property("Id")
- .HasColumnType("uuid");
-
- b.Property("CreateDate")
- .HasColumnType("timestamp with time zone");
-
- b.Property("Title")
- .HasColumnType("text");
-
- b.Property("UpdateDate")
- .HasColumnType("timestamp with time zone");
-
- b.Property("UserId")
- .HasColumnType("uuid");
-
- b.HasKey("Id");
-
- b.ToTable("Conversations");
- });
-
- modelBuilder.Entity("UniversalAdminSystem.Domian.UserConversations.Aggregates.Message", b =>
- {
- b.Property("Id")
- .HasColumnType("uuid");
-
- b.Property("Content")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("ConversationId")
- .HasColumnType("uuid");
-
- b.Property("CreateDate")
- .HasColumnType("timestamp with time zone");
-
- b.Property("Role")
- .IsRequired()
- .HasColumnType("text");
-
- b.HasKey("Id");
-
- b.ToTable("Messages");
- });
-
- modelBuilder.Entity("UniversalAdminSystem.Domian.UserManagement.Aggregates.User", b =>
- {
- b.Property("UserId")
- .HasColumnType("uuid");
-
- b.Property("Account")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("Email")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("Password")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("RoleId")
- .HasColumnType("uuid");
-
- b.Property("Salt")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("Status")
- .HasColumnType("integer");
-
- b.Property("UserInfoId")
- .HasColumnType("uuid");
-
- b.HasKey("UserId");
-
- b.HasIndex("Account")
- .IsUnique();
-
- b.HasIndex("RoleId");
-
- b.ToTable("Users");
- });
-
- modelBuilder.Entity("UniversalAdminSystem.Domian.UserManagement.Entities.UserInfo", b =>
- {
- b.Property("UserInfoId")
- .HasColumnType("uuid");
-
- b.Property("Address")
- .HasColumnType("text");
-
- b.Property("Age")
- .HasColumnType("integer");
-
- b.Property("Gender")
- .HasColumnType("integer");
-
- b.Property("Name")
- .HasColumnType("text");
-
- b.Property("Phone")
- .HasColumnType("text");
-
- b.HasKey("UserInfoId");
-
- b.ToTable("UserInfos");
- });
-
- modelBuilder.Entity("UniversalAdminSystem.Domian.knowledge.Aggregates.DocumentChunk", b =>
- {
- b.Property("Id")
- .HasColumnType("uuid");
-
- b.Property("Content")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("Embedding")
- .IsRequired()
- .HasColumnType("vector(1536)");
-
- b.Property("FileId")
- .HasColumnType("uuid");
-
- b.Property("Level")
- .HasColumnType("integer");
-
- b.HasKey("Id");
-
- b.ToTable("Chunks");
- });
-
- modelBuilder.Entity("RolePermissions", b =>
- {
- b.HasOne("UniversalAdminSystem.Domian.PermissionManagement.Aggregate.Permission", null)
- .WithMany()
- .HasForeignKey("PermissionId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("UniversalAdminSystem.Domian.PermissionManagement.Aggregate.Role", null)
- .WithMany()
- .HasForeignKey("RoleId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
-
- modelBuilder.Entity("UniversalAdminSystem.Domian.UserManagement.Aggregates.User", b =>
- {
- b.HasOne("UniversalAdminSystem.Domian.PermissionManagement.Aggregate.Role", null)
- .WithMany()
- .HasForeignKey("RoleId")
- .OnDelete(DeleteBehavior.SetNull);
- });
-#pragma warning restore 612, 618
- }
- }
-}
diff --git a/backend/src/UniversalAdminSystem.Infrastructure/Migrations/20250812085226_last.Designer.cs b/backend/src/UniversalAdminSystem.Infrastructure/Migrations/20250812085226_last.Designer.cs
deleted file mode 100644
index 5334287b04ed11df5ed92e0e2051aad042fec345..0000000000000000000000000000000000000000
--- a/backend/src/UniversalAdminSystem.Infrastructure/Migrations/20250812085226_last.Designer.cs
+++ /dev/null
@@ -1,394 +0,0 @@
-//
-using System;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
-using Pgvector;
-using UniversalAdminSystem.Infrastructure.Persistence.DbContexts;
-
-#nullable disable
-
-namespace UniversalAdminSystem.Infrastructure.Migrations
-{
- [DbContext(typeof(UniversalAdminSystemDbContext))]
- [Migration("20250812085226_last")]
- partial class last
- {
- ///
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder
- .HasAnnotation("ProductVersion", "8.0.0")
- .HasAnnotation("Relational:MaxIdentifierLength", 63);
-
- NpgsqlModelBuilderExtensions.HasPostgresExtension(modelBuilder, "vector");
- NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
-
- modelBuilder.Entity("RolePermissions", b =>
- {
- b.Property("RoleId")
- .HasColumnType("uuid");
-
- b.Property("PermissionId")
- .HasColumnType("uuid");
-
- b.HasKey("RoleId", "PermissionId");
-
- b.HasIndex("PermissionId");
-
- b.HasIndex("RoleId");
-
- b.ToTable("RolePermissions");
- });
-
- modelBuilder.Entity("UniversalAdminSystem.Domian.FileStorage.Aggregates.File", b =>
- {
- b.Property("Id")
- .HasColumnType("uuid");
-
- b.Property("AccessLevel")
- .HasColumnType("integer");
-
- b.Property("IsFolder")
- .HasColumnType("boolean");
-
- b.Property("Name")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("OwnerId")
- .HasColumnType("uuid");
-
- b.Property("ParentId")
- .HasColumnType("uuid");
-
- b.Property("Path")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("SecurityCheckResult")
- .HasColumnType("text");
-
- b.Property("Size")
- .HasColumnType("bigint");
-
- b.Property("Type")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("UploadTime")
- .HasColumnType("timestamp with time zone");
-
- b.HasKey("Id");
-
- b.ToTable("Files");
- });
-
- modelBuilder.Entity("UniversalAdminSystem.Domian.LogManagement.Aggregates.LogEntry", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("uuid");
-
- b.Property("Context")
- .HasColumnType("text");
-
- b.Property("Exception")
- .HasColumnType("text");
-
- b.Property("Level")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("Message")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("Source")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("Timestamp")
- .HasColumnType("timestamp with time zone");
-
- b.Property("UserId")
- .HasColumnType("uuid");
-
- b.HasKey("Id");
-
- b.ToTable("LogEntries");
- });
-
- modelBuilder.Entity("UniversalAdminSystem.Domian.PermissionManagement.Aggregate.Permission", b =>
- {
- b.Property("PermissionId")
- .ValueGeneratedOnAdd()
- .HasColumnType("uuid");
-
- b.Property("Action")
- .HasColumnType("integer");
-
- b.Property("Code")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("CreateTime")
- .HasColumnType("timestamp with time zone");
-
- b.Property("Description")
- .HasColumnType("text");
-
- b.Property("IsSystem")
- .HasColumnType("boolean");
-
- b.Property("Name")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("PermissionType")
- .HasColumnType("integer");
-
- b.Property("Resource")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("UpdateTime")
- .HasColumnType("timestamp with time zone");
-
- b.HasKey("PermissionId");
-
- b.HasIndex("Code")
- .IsUnique();
-
- b.ToTable("Permissions");
- });
-
- modelBuilder.Entity("UniversalAdminSystem.Domian.PermissionManagement.Aggregate.Role", b =>
- {
- b.Property("RoleId")
- .HasColumnType("uuid");
-
- b.Property("CreateTime")
- .HasColumnType("timestamp with time zone");
-
- b.Property("Description")
- .HasColumnType("text");
-
- b.Property("IsSupper")
- .HasColumnType("boolean");
-
- b.Property("IsSystem")
- .HasColumnType("boolean");
-
- b.Property("Name")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("UpdateTime")
- .HasColumnType("timestamp with time zone");
-
- b.HasKey("RoleId");
-
- b.HasIndex("Name")
- .IsUnique();
-
- b.ToTable("Roles");
- });
-
- modelBuilder.Entity("UniversalAdminSystem.Domian.SystemSettings.Aggregates.SystemSetting", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("uuid");
-
- b.Property("CreateTime")
- .HasColumnType("timestamp with time zone");
-
- b.Property("Description")
- .HasColumnType("text");
-
- b.Property("Group")
- .HasColumnType("text");
-
- b.Property("Key")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("UpdateTime")
- .HasColumnType("timestamp with time zone");
-
- b.Property("Value")
- .IsRequired()
- .HasColumnType("text");
-
- b.HasKey("Id");
-
- b.ToTable("SystemSettings");
- });
-
- modelBuilder.Entity("UniversalAdminSystem.Domian.UserConversations.Aggregates.Conversations", b =>
- {
- b.Property("Id")
- .HasColumnType("uuid");
-
- b.Property("CreateDate")
- .HasColumnType("timestamp with time zone");
-
- b.Property("Title")
- .HasColumnType("text");
-
- b.Property("UpdateDate")
- .HasColumnType("timestamp with time zone");
-
- b.Property("UserId")
- .HasColumnType("uuid");
-
- b.HasKey("Id");
-
- b.ToTable("Conversations");
- });
-
- modelBuilder.Entity("UniversalAdminSystem.Domian.UserConversations.Aggregates.Message", b =>
- {
- b.Property("Id")
- .HasColumnType("uuid");
-
- b.Property("Content")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("ConversationId")
- .HasColumnType("uuid");
-
- b.Property("CreateDate")
- .HasColumnType("timestamp with time zone");
-
- b.Property("Role")
- .IsRequired()
- .HasColumnType("text");
-
- b.HasKey("Id");
-
- b.ToTable("Messages");
- });
-
- modelBuilder.Entity("UniversalAdminSystem.Domian.UserManagement.Aggregates.User", b =>
- {
- b.Property("UserId")
- .HasColumnType("uuid");
-
- b.Property("Account")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("Email")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("Password")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("RoleId")
- .HasColumnType("uuid");
-
- b.Property("Salt")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("Status")
- .HasColumnType("integer");
-
- b.Property("UserInfoId")
- .HasColumnType("uuid");
-
- b.HasKey("UserId");
-
- b.HasIndex("Account")
- .IsUnique();
-
- b.HasIndex("RoleId");
-
- b.ToTable("Users");
- });
-
- modelBuilder.Entity("UniversalAdminSystem.Domian.UserManagement.Entities.UserInfo", b =>
- {
- b.Property("UserInfoId")
- .HasColumnType("uuid");
-
- b.Property("Address")
- .HasColumnType("text");
-
- b.Property("Age")
- .HasColumnType("integer");
-
- b.Property("Gender")
- .HasColumnType("integer");
-
- b.Property("Name")
- .HasColumnType("text");
-
- b.Property("Phone")
- .HasColumnType("text");
-
- b.HasKey("UserInfoId");
-
- b.ToTable("UserInfos");
- });
-
- modelBuilder.Entity("UniversalAdminSystem.Domian.knowledge.Aggregates.DocumentChunk", b =>
- {
- b.Property("Id")
- .HasColumnType("uuid");
-
- b.Property("Content")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("Embedding")
- .IsRequired()
- .HasColumnType("vector(1536)");
-
- b.Property("FileId")
- .HasColumnType("uuid");
-
- b.Property("Level")
- .HasColumnType("integer");
-
- b.HasKey("Id");
-
- b.HasIndex("Embedding");
-
- b.ToTable("Chunks");
- });
-
- modelBuilder.Entity("RolePermissions", b =>
- {
- b.HasOne("UniversalAdminSystem.Domian.PermissionManagement.Aggregate.Permission", null)
- .WithMany()
- .HasForeignKey("PermissionId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("UniversalAdminSystem.Domian.PermissionManagement.Aggregate.Role", null)
- .WithMany()
- .HasForeignKey("RoleId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
-
- modelBuilder.Entity("UniversalAdminSystem.Domian.UserManagement.Aggregates.User", b =>
- {
- b.HasOne("UniversalAdminSystem.Domian.PermissionManagement.Aggregate.Role", null)
- .WithMany()
- .HasForeignKey("RoleId")
- .OnDelete(DeleteBehavior.SetNull);
- });
-#pragma warning restore 612, 618
- }
- }
-}
diff --git a/backend/src/UniversalAdminSystem.Infrastructure/Migrations/20250812085226_last.cs b/backend/src/UniversalAdminSystem.Infrastructure/Migrations/20250812085226_last.cs
deleted file mode 100644
index d47c9b5d56cd48fcd684c8c5a352fe6461240293..0000000000000000000000000000000000000000
--- a/backend/src/UniversalAdminSystem.Infrastructure/Migrations/20250812085226_last.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-using Microsoft.EntityFrameworkCore.Migrations;
-
-#nullable disable
-
-namespace UniversalAdminSystem.Infrastructure.Migrations
-{
- ///
- public partial class last : Migration
- {
- ///
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.CreateIndex(
- name: "IX_Chunks_Embedding",
- table: "Chunks",
- column: "Embedding");
- }
-
- ///
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropIndex(
- name: "IX_Chunks_Embedding",
- table: "Chunks");
- }
- }
-}
diff --git a/backend/src/UniversalAdminSystem.Infrastructure/Migrations/20250812093344_postgre_vector.Designer.cs b/backend/src/UniversalAdminSystem.Infrastructure/Migrations/20250812093344_postgre_vector.Designer.cs
deleted file mode 100644
index a18b7afefccfd0c9db06c6bcafd8a1a278cf3a95..0000000000000000000000000000000000000000
--- a/backend/src/UniversalAdminSystem.Infrastructure/Migrations/20250812093344_postgre_vector.Designer.cs
+++ /dev/null
@@ -1,433 +0,0 @@
-//
-using System;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
-using Pgvector;
-using UniversalAdminSystem.Infrastructure.Persistence.DbContexts;
-
-#nullable disable
-
-namespace UniversalAdminSystem.Infrastructure.Migrations
-{
- [DbContext(typeof(UniversalAdminSystemDbContext))]
- [Migration("20250812093344_postgre_vector")]
- partial class postgre_vector
- {
- ///
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder
- .HasAnnotation("ProductVersion", "8.0.0")
- .HasAnnotation("Relational:MaxIdentifierLength", 63);
-
- NpgsqlModelBuilderExtensions.HasPostgresExtension(modelBuilder, "vector");
- NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
-
- modelBuilder.Entity("RolePermissions", b =>
- {
- b.Property("RoleId")
- .HasColumnType("uuid");
-
- b.Property("PermissionId")
- .HasColumnType("uuid");
-
- b.HasKey("RoleId", "PermissionId");
-
- b.HasIndex("PermissionId");
-
- b.HasIndex("RoleId");
-
- b.ToTable("RolePermissions");
- });
-
- modelBuilder.Entity("UniversalAdminSystem.Domian.FileStorage.Aggregates.File", b =>
- {
- b.Property("Id")
- .HasColumnType("uuid");
-
- b.Property("AccessLevel")
- .HasColumnType("integer");
-
- b.Property("IsFolder")
- .HasColumnType("boolean");
-
- b.Property("Name")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("OwnerId")
- .HasColumnType("uuid");
-
- b.Property("ParentId")
- .HasColumnType("uuid");
-
- b.Property("Path")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("SecurityCheckResult")
- .HasColumnType("text");
-
- b.Property("Size")
- .HasColumnType("bigint");
-
- b.Property("Type")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("UploadTime")
- .HasColumnType("timestamp with time zone");
-
- b.HasKey("Id");
-
- b.ToTable("Files");
- });
-
- modelBuilder.Entity("UniversalAdminSystem.Domian.LogManagement.Aggregates.LogEntry", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("uuid");
-
- b.Property("Context")
- .HasColumnType("text");
-
- b.Property("Exception")
- .HasColumnType("text");
-
- b.Property("Level")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("Message")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("Source")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("Timestamp")
- .HasColumnType("timestamp with time zone");
-
- b.Property("UserId")
- .HasColumnType("uuid");
-
- b.HasKey("Id");
-
- b.ToTable("LogEntries");
- });
-
- modelBuilder.Entity("UniversalAdminSystem.Domian.PermissionManagement.Aggregate.Permission", b =>
- {
- b.Property("PermissionId")
- .ValueGeneratedOnAdd()
- .HasColumnType("uuid");
-
- b.Property("Action")
- .HasColumnType("integer");
-
- b.Property("Code")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("CreateTime")
- .HasColumnType("timestamp with time zone");
-
- b.Property("Description")
- .HasColumnType("text");
-
- b.Property("IsSystem")
- .HasColumnType("boolean");
-
- b.Property("Name")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("PermissionType")
- .HasColumnType("integer");
-
- b.Property("Resource")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("UpdateTime")
- .HasColumnType("timestamp with time zone");
-
- b.HasKey("PermissionId");
-
- b.HasIndex("Code")
- .IsUnique();
-
- b.ToTable("Permissions");
- });
-
- modelBuilder.Entity("UniversalAdminSystem.Domian.PermissionManagement.Aggregate.Role", b =>
- {
- b.Property("RoleId")
- .HasColumnType("uuid");
-
- b.Property("CreateTime")
- .HasColumnType("timestamp with time zone");
-
- b.Property("Description")
- .HasColumnType("text");
-
- b.Property("IsSupper")
- .HasColumnType("boolean");
-
- b.Property("IsSystem")
- .HasColumnType("boolean");
-
- b.Property("Name")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("UpdateTime")
- .HasColumnType("timestamp with time zone");
-
- b.HasKey("RoleId");
-
- b.HasIndex("Name")
- .IsUnique();
-
- b.ToTable("Roles");
- });
-
- modelBuilder.Entity("UniversalAdminSystem.Domian.SystemSettings.Aggregates.SystemSetting", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("uuid");
-
- b.Property("CreateTime")
- .HasColumnType("timestamp with time zone");
-
- b.Property("Description")
- .HasColumnType("text");
-
- b.Property("Group")
- .HasColumnType("text");
-
- b.Property("Key")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("UpdateTime")
- .HasColumnType("timestamp with time zone");
-
- b.Property("Value")
- .IsRequired()
- .HasColumnType("text");
-
- b.HasKey("Id");
-
- b.ToTable("SystemSettings");
- });
-
- modelBuilder.Entity("UniversalAdminSystem.Domian.UserConversations.Aggregates.Conversations", b =>
- {
- b.Property("Id")
- .HasColumnType("uuid");
-
- b.Property("CreateDate")
- .HasColumnType("timestamp with time zone");
-
- b.Property("Title")
- .HasColumnType("text");
-
- b.Property("UpdateDate")
- .HasColumnType("timestamp with time zone");
-
- b.Property("UserId")
- .HasColumnType("uuid");
-
- b.HasKey("Id");
-
- b.ToTable("Conversations");
- });
-
- modelBuilder.Entity("UniversalAdminSystem.Domian.UserConversations.Aggregates.Message", b =>
- {
- b.Property("Id")
- .HasColumnType("uuid");
-
- b.Property("Content")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("ConversationId")
- .HasColumnType("uuid");
-
- b.Property("CreateDate")
- .HasColumnType("timestamp with time zone");
-
- b.Property("Role")
- .IsRequired()
- .HasColumnType("text");
-
- b.HasKey("Id");
-
- b.ToTable("Messages");
- });
-
- modelBuilder.Entity("UniversalAdminSystem.Domian.UserManagement.Aggregates.User", b =>
- {
- b.Property("UserId")
- .HasColumnType("uuid");
-
- b.Property("Account")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("Email")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("Password")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("RoleId")
- .HasColumnType("uuid");
-
- b.Property("Salt")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("Status")
- .HasColumnType("integer");
-
- b.Property("UserInfoId")
- .HasColumnType("uuid");
-
- b.HasKey("UserId");
-
- b.HasIndex("Account")
- .IsUnique();
-
- b.HasIndex("RoleId");
-
- b.ToTable("Users");
- });
-
- modelBuilder.Entity("UniversalAdminSystem.Domian.UserManagement.Entities.UserInfo", b =>
- {
- b.Property("UserInfoId")
- .HasColumnType("uuid");
-
- b.Property("Address")
- .HasColumnType("text");
-
- b.Property("Age")
- .HasColumnType("integer");
-
- b.Property("Gender")
- .HasColumnType("integer");
-
- b.Property("Name")
- .HasColumnType("text");
-
- b.Property("Phone")
- .HasColumnType("text");
-
- b.HasKey("UserInfoId");
-
- b.ToTable("UserInfos");
- });
-
- modelBuilder.Entity("UniversalAdminSystem.Domian.knowledge.Aggregates.DocumentChunk", b =>
- {
- b.Property("Id")
- .HasColumnType("uuid");
-
- b.Property("Content")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("Embedding")
- .IsRequired()
- .HasColumnType("vector(1536)");
-
- b.Property("FileId")
- .HasColumnType("uuid");
-
- b.Property("Level")
- .HasColumnType("integer");
-
- b.HasKey("Id");
-
- b.ToTable("Chunks");
- });
-
- modelBuilder.Entity("UniversalAdminSystem.Infrastructure.RabbitMQ.Jobs.FileProcessingJob", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("uuid");
-
- b.Property("ContentType")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("CreatedAt")
- .HasColumnType("timestamp with time zone");
-
- b.Property("FileId")
- .HasColumnType("uuid");
-
- b.Property("FilePath")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("NextAttemptAt")
- .HasColumnType("timestamp with time zone");
-
- b.Property("RetryCount")
- .HasColumnType("integer");
-
- b.Property("Size")
- .HasColumnType("bigint");
-
- b.Property("Status")
- .IsRequired()
- .HasMaxLength(32)
- .HasColumnType("character varying(32)");
-
- b.HasKey("Id");
-
- b.HasIndex("Status", "NextAttemptAt", "CreatedAt");
-
- b.ToTable("FileProcessingJobs");
- });
-
- modelBuilder.Entity("RolePermissions", b =>
- {
- b.HasOne("UniversalAdminSystem.Domian.PermissionManagement.Aggregate.Permission", null)
- .WithMany()
- .HasForeignKey("PermissionId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("UniversalAdminSystem.Domian.PermissionManagement.Aggregate.Role", null)
- .WithMany()
- .HasForeignKey("RoleId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
-
- modelBuilder.Entity("UniversalAdminSystem.Domian.UserManagement.Aggregates.User", b =>
- {
- b.HasOne("UniversalAdminSystem.Domian.PermissionManagement.Aggregate.Role", null)
- .WithMany()
- .HasForeignKey("RoleId")
- .OnDelete(DeleteBehavior.SetNull);
- });
-#pragma warning restore 612, 618
- }
- }
-}
diff --git a/backend/src/UniversalAdminSystem.Infrastructure/Migrations/20250812093344_postgre_vector.cs b/backend/src/UniversalAdminSystem.Infrastructure/Migrations/20250812093344_postgre_vector.cs
deleted file mode 100644
index 3c14a143eca58c074c98de39c34052eb81822b08..0000000000000000000000000000000000000000
--- a/backend/src/UniversalAdminSystem.Infrastructure/Migrations/20250812093344_postgre_vector.cs
+++ /dev/null
@@ -1,46 +0,0 @@
-using System;
-using Microsoft.EntityFrameworkCore.Migrations;
-
-#nullable disable
-
-namespace UniversalAdminSystem.Infrastructure.Migrations
-{
- ///
- public partial class postgre_vector : Migration
- {
- ///
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.CreateTable(
- name: "FileProcessingJobs",
- columns: table => new
- {
- Id = table.Column(type: "uuid", nullable: false),
- FileId = table.Column(type: "uuid", nullable: false),
- FilePath = table.Column(type: "text", nullable: false),
- ContentType = table.Column(type: "text", nullable: false),
- Size = table.Column(type: "bigint", nullable: false),
- Status = table.Column(type: "character varying(32)", maxLength: 32, nullable: false),
- RetryCount = table.Column(type: "integer", nullable: false),
- CreatedAt = table.Column(type: "timestamp with time zone", nullable: false),
- NextAttemptAt = table.Column(type: "timestamp with time zone", nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_FileProcessingJobs", x => x.Id);
- });
-
- migrationBuilder.CreateIndex(
- name: "IX_FileProcessingJobs_Status_NextAttemptAt_CreatedAt",
- table: "FileProcessingJobs",
- columns: new[] { "Status", "NextAttemptAt", "CreatedAt" });
- }
-
- ///
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropTable(
- name: "FileProcessingJobs");
- }
- }
-}
diff --git a/backend/src/UniversalAdminSystem.Infrastructure/Migrations/20250812104226_postgre_vector_2.Designer.cs b/backend/src/UniversalAdminSystem.Infrastructure/Migrations/20250812104226_postgre_vector_2.Designer.cs
deleted file mode 100644
index ddf64368a82354615abae9e93c6ff5ee615a6dc2..0000000000000000000000000000000000000000
--- a/backend/src/UniversalAdminSystem.Infrastructure/Migrations/20250812104226_postgre_vector_2.Designer.cs
+++ /dev/null
@@ -1,433 +0,0 @@
-//
-using System;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
-using Pgvector;
-using UniversalAdminSystem.Infrastructure.Persistence.DbContexts;
-
-#nullable disable
-
-namespace UniversalAdminSystem.Infrastructure.Migrations
-{
- [DbContext(typeof(UniversalAdminSystemDbContext))]
- [Migration("20250812104226_postgre_vector_2")]
- partial class postgre_vector_2
- {
- ///
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder
- .HasAnnotation("ProductVersion", "8.0.0")
- .HasAnnotation("Relational:MaxIdentifierLength", 63);
-
- NpgsqlModelBuilderExtensions.HasPostgresExtension(modelBuilder, "vector");
- NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
-
- modelBuilder.Entity("RolePermissions", b =>
- {
- b.Property("RoleId")
- .HasColumnType("uuid");
-
- b.Property("PermissionId")
- .HasColumnType("uuid");
-
- b.HasKey("RoleId", "PermissionId");
-
- b.HasIndex("PermissionId");
-
- b.HasIndex("RoleId");
-
- b.ToTable("RolePermissions");
- });
-
- modelBuilder.Entity("UniversalAdminSystem.Domian.FileStorage.Aggregates.File", b =>
- {
- b.Property("Id")
- .HasColumnType("uuid");
-
- b.Property("AccessLevel")
- .HasColumnType("integer");
-
- b.Property("IsFolder")
- .HasColumnType("boolean");
-
- b.Property("Name")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("OwnerId")
- .HasColumnType("uuid");
-
- b.Property("ParentId")
- .HasColumnType("uuid");
-
- b.Property("Path")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("SecurityCheckResult")
- .HasColumnType("text");
-
- b.Property("Size")
- .HasColumnType("bigint");
-
- b.Property("Type")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("UploadTime")
- .HasColumnType("timestamp with time zone");
-
- b.HasKey("Id");
-
- b.ToTable("Files");
- });
-
- modelBuilder.Entity("UniversalAdminSystem.Domian.LogManagement.Aggregates.LogEntry", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("uuid");
-
- b.Property