diff --git a/src/X1.Infrastructure/Migrations/20250728164913_UpdateNetworkStackConfigAndBindings.Designer.cs b/src/X1.Infrastructure/Migrations/20250728164913_UpdateNetworkStackConfigAndBindings.Designer.cs
new file mode 100644
index 0000000..dfe2219
--- /dev/null
+++ b/src/X1.Infrastructure/Migrations/20250728164913_UpdateNetworkStackConfigAndBindings.Designer.cs
@@ -0,0 +1,909 @@
+//
+using System;
+using CellularManagement.Infrastructure.Context;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
+
+#nullable disable
+
+namespace X1.Infrastructure.Migrations
+{
+ [DbContext(typeof(AppDbContext))]
+ [Migration("20250728164913_UpdateNetworkStackConfigAndBindings")]
+ partial class UpdateNetworkStackConfigAndBindings
+ {
+ ///
+ 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("CellularManagement.Domain.Entities.AppRole", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("text")
+ .HasComment("角色ID,主键");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnType("text")
+ .HasComment("并发控制戳");
+
+ b.Property("CreatedAt")
+ .HasColumnType("timestamp with time zone")
+ .HasComment("创建时间");
+
+ b.Property("Description")
+ .HasMaxLength(500)
+ .HasColumnType("character varying(500)")
+ .HasComment("角色描述");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)")
+ .HasComment("角色名称");
+
+ b.Property("NormalizedName")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)")
+ .HasComment("标准化角色名称(大写)");
+
+ b.Property("UpdatedAt")
+ .HasColumnType("timestamp with time zone")
+ .HasComment("更新时间");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Name")
+ .IsUnique()
+ .HasDatabaseName("IX_Roles_Name");
+
+ b.HasIndex("NormalizedName")
+ .IsUnique()
+ .HasDatabaseName("RoleNameIndex");
+
+ b.ToTable("Roles", null, t =>
+ {
+ t.HasComment("角色表");
+ });
+ });
+
+ modelBuilder.Entity("CellularManagement.Domain.Entities.AppUser", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("text")
+ .HasComment("用户ID,主键");
+
+ b.Property("AccessFailedCount")
+ .HasColumnType("integer")
+ .HasComment("登录失败次数");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnType("text")
+ .HasComment("并发控制戳");
+
+ b.Property("CreatedTime")
+ .HasColumnType("timestamp with time zone")
+ .HasComment("创建时间");
+
+ b.Property("Email")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)")
+ .HasComment("电子邮箱");
+
+ b.Property("EmailConfirmed")
+ .HasColumnType("boolean")
+ .HasComment("邮箱是否已验证");
+
+ b.Property("IsActive")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("boolean")
+ .HasDefaultValue(true)
+ .HasComment("用户状态(true: 启用, false: 禁用)");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("boolean")
+ .HasDefaultValue(false)
+ .HasComment("是否已删除");
+
+ b.Property("LastLoginTime")
+ .HasColumnType("timestamp with time zone")
+ .HasComment("最后登录时间");
+
+ b.Property("LockoutEnabled")
+ .HasColumnType("boolean")
+ .HasComment("是否启用账户锁定");
+
+ b.Property("LockoutEnd")
+ .HasColumnType("timestamp with time zone")
+ .HasComment("账户锁定结束时间");
+
+ b.Property("ModifiedTime")
+ .HasColumnType("timestamp with time zone")
+ .HasComment("修改时间");
+
+ b.Property("NormalizedEmail")
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)")
+ .HasComment("标准化电子邮箱(大写)");
+
+ b.Property("NormalizedUserName")
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)")
+ .HasComment("标准化账号(大写)");
+
+ b.Property("PasswordHash")
+ .HasColumnType("text")
+ .HasComment("密码哈希值");
+
+ b.Property("PhoneNumber")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasComment("电话号码");
+
+ b.Property("PhoneNumberConfirmed")
+ .HasColumnType("boolean")
+ .HasComment("电话号码是否已验证");
+
+ b.Property("RealName")
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)")
+ .HasComment("用户名");
+
+ b.Property("SecurityStamp")
+ .HasColumnType("text")
+ .HasComment("安全戳,用于并发控制");
+
+ b.Property("TwoFactorEnabled")
+ .HasColumnType("boolean")
+ .HasComment("是否启用双因素认证");
+
+ b.Property("UserName")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)")
+ .HasComment("账号");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Email")
+ .IsUnique()
+ .HasDatabaseName("IX_Users_Email");
+
+ b.HasIndex("NormalizedEmail")
+ .HasDatabaseName("EmailIndex");
+
+ b.HasIndex("NormalizedUserName")
+ .IsUnique()
+ .HasDatabaseName("UserNameIndex");
+
+ b.HasIndex("PhoneNumber")
+ .IsUnique()
+ .HasDatabaseName("IX_Users_PhoneNumber");
+
+ b.HasIndex("UserName")
+ .IsUnique()
+ .HasDatabaseName("IX_Users_UserName");
+
+ b.ToTable("Users", null, t =>
+ {
+ t.HasComment("用户表");
+ });
+ });
+
+ modelBuilder.Entity("CellularManagement.Domain.Entities.Device.CellularDevice", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("text")
+ .HasComment("设备ID");
+
+ b.Property("AgentPort")
+ .HasColumnType("integer")
+ .HasComment("Agent端口");
+
+ b.Property("CreatedAt")
+ .HasColumnType("timestamp with time zone")
+ .HasComment("创建时间");
+
+ b.Property("CreatedBy")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Description")
+ .IsRequired()
+ .HasMaxLength(500)
+ .HasColumnType("character varying(500)")
+ .HasComment("设备描述");
+
+ b.Property("IpAddress")
+ .IsRequired()
+ .HasMaxLength(45)
+ .HasColumnType("character varying(45)")
+ .HasComment("IP地址");
+
+ b.Property("IsDeleted")
+ .HasColumnType("boolean");
+
+ b.Property("IsEnabled")
+ .HasColumnType("boolean")
+ .HasComment("是否启用");
+
+ b.Property("IsRunning")
+ .HasColumnType("boolean")
+ .HasComment("设备状态(启动/未启动)");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(100)
+ .HasColumnType("character varying(100)")
+ .HasComment("设备名称");
+
+ b.Property("SerialNumber")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)")
+ .HasComment("序列号");
+
+ b.Property("UpdatedAt")
+ .IsRequired()
+ .HasColumnType("timestamp with time zone")
+ .HasComment("更新时间");
+
+ b.Property("UpdatedBy")
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.HasIndex("SerialNumber")
+ .IsUnique()
+ .HasDatabaseName("IX_CellularDevices_SerialNumber");
+
+ b.ToTable("CellularDevices", null, t =>
+ {
+ t.HasComment("蜂窝设备表");
+ });
+ });
+
+ modelBuilder.Entity("CellularManagement.Domain.Entities.Device.ProtocolVersion", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("text")
+ .HasComment("版本ID");
+
+ b.Property("CreatedAt")
+ .HasColumnType("timestamp with time zone")
+ .HasComment("创建时间");
+
+ b.Property("CreatedBy")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Description")
+ .HasMaxLength(500)
+ .HasColumnType("character varying(500)")
+ .HasComment("版本描述");
+
+ b.Property("IsDeleted")
+ .HasColumnType("boolean");
+
+ b.Property("IsEnabled")
+ .HasColumnType("boolean")
+ .HasComment("是否启用");
+
+ b.Property("MinimumSupportedVersion")
+ .HasMaxLength(20)
+ .HasColumnType("character varying(20)")
+ .HasComment("最低支持版本");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)")
+ .HasComment("版本名称");
+
+ b.Property("ReleaseDate")
+ .HasColumnType("timestamp with time zone")
+ .HasComment("发布日期");
+
+ b.Property("SerialNumber")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)")
+ .HasComment("设备序列号");
+
+ b.Property("UpdatedAt")
+ .IsRequired()
+ .HasColumnType("timestamp with time zone")
+ .HasComment("更新时间");
+
+ b.Property("UpdatedBy")
+ .HasColumnType("text");
+
+ b.Property("Version")
+ .IsRequired()
+ .HasMaxLength(20)
+ .HasColumnType("character varying(20)")
+ .HasComment("版本号");
+
+ b.HasKey("Id");
+
+ b.HasIndex("SerialNumber")
+ .HasDatabaseName("IX_ProtocolVersions_SerialNumber");
+
+ b.HasIndex("Version")
+ .HasDatabaseName("IX_ProtocolVersions_Version");
+
+ b.ToTable("ProtocolVersions", null, t =>
+ {
+ t.HasComment("协议版本表");
+ });
+ });
+
+ modelBuilder.Entity("CellularManagement.Domain.Entities.Logging.LoginLog", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("text")
+ .HasComment("日志ID");
+
+ b.Property("Browser")
+ .HasMaxLength(100)
+ .HasColumnType("character varying(100)")
+ .HasComment("浏览器信息");
+
+ b.Property("CreatedAt")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("FailureReason")
+ .HasMaxLength(200)
+ .HasColumnType("character varying(200)")
+ .HasComment("失败原因");
+
+ b.Property("IpAddress")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)")
+ .HasComment("登录IP");
+
+ b.Property("IsDeleted")
+ .HasColumnType("boolean");
+
+ b.Property("IsSuccess")
+ .HasColumnType("boolean")
+ .HasComment("登录状态(成功/失败)");
+
+ b.Property("Location")
+ .HasMaxLength(200)
+ .HasColumnType("character varying(200)")
+ .HasComment("登录位置");
+
+ b.Property("LoginSource")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)");
+
+ b.Property("LoginTime")
+ .HasColumnType("timestamp with time zone")
+ .HasComment("登录时间");
+
+ b.Property("LoginType")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)");
+
+ b.Property("OperatingSystem")
+ .HasMaxLength(100)
+ .HasColumnType("character varying(100)")
+ .HasComment("操作系统信息");
+
+ b.Property("SessionId")
+ .HasMaxLength(100)
+ .HasColumnType("character varying(100)");
+
+ b.Property("UpdatedAt")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("UserAgent")
+ .IsRequired()
+ .HasMaxLength(500)
+ .HasColumnType("character varying(500)")
+ .HasComment("设备信息");
+
+ b.Property("UserId")
+ .IsRequired()
+ .HasMaxLength(450)
+ .HasColumnType("character varying(450)")
+ .HasComment("用户ID");
+
+ b.HasKey("Id");
+
+ b.HasIndex("IpAddress")
+ .HasDatabaseName("IX_LoginLogs_IpAddress");
+
+ b.HasIndex("LoginTime")
+ .HasDatabaseName("IX_LoginLogs_LoginTime");
+
+ b.HasIndex("UserId")
+ .HasDatabaseName("IX_LoginLogs_UserId");
+
+ b.HasIndex("UserId", "LoginTime")
+ .HasDatabaseName("IX_LoginLogs_UserId_LoginTime");
+
+ b.ToTable("LoginLogs", null, t =>
+ {
+ t.HasComment("用户登录日志表");
+ });
+ });
+
+ modelBuilder.Entity("CellularManagement.Domain.Entities.NetworkProfile.CoreNetworkConfig", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("text")
+ .HasComment("配置ID");
+
+ b.Property("ConfigContent")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasComment("配置内容(JSON格式)");
+
+ b.Property("CreatedAt")
+ .HasColumnType("timestamp with time zone")
+ .HasComment("创建时间");
+
+ b.Property("CreatedBy")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Description")
+ .IsRequired()
+ .HasMaxLength(500)
+ .HasColumnType("character varying(500)")
+ .HasComment("配置描述");
+
+ b.Property("IsDeleted")
+ .HasColumnType("boolean");
+
+ b.Property("IsDisabled")
+ .HasColumnType("boolean")
+ .HasComment("是否禁用");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(100)
+ .HasColumnType("character varying(100)")
+ .HasComment("配置名称");
+
+ b.Property("UpdatedAt")
+ .IsRequired()
+ .HasColumnType("timestamp with time zone")
+ .HasComment("更新时间");
+
+ b.Property("UpdatedBy")
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Name")
+ .HasDatabaseName("IX_CoreNetworkConfigs_Name");
+
+ b.ToTable("CoreNetworkConfigs", null, t =>
+ {
+ t.HasComment("核心网配置表");
+ });
+ });
+
+ modelBuilder.Entity("CellularManagement.Domain.Entities.NetworkProfile.IMS_Configuration", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("text")
+ .HasComment("配置ID");
+
+ b.Property("ConfigContent")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasComment("配置内容(JSON格式)");
+
+ b.Property("CreatedAt")
+ .HasColumnType("timestamp with time zone")
+ .HasComment("创建时间");
+
+ b.Property("CreatedBy")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Description")
+ .IsRequired()
+ .HasMaxLength(500)
+ .HasColumnType("character varying(500)")
+ .HasComment("配置描述");
+
+ b.Property("IsDeleted")
+ .HasColumnType("boolean");
+
+ b.Property("IsDisabled")
+ .HasColumnType("boolean")
+ .HasComment("是否禁用");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(100)
+ .HasColumnType("character varying(100)")
+ .HasComment("配置名称");
+
+ b.Property("UpdatedAt")
+ .IsRequired()
+ .HasColumnType("timestamp with time zone")
+ .HasComment("更新时间");
+
+ b.Property("UpdatedBy")
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Name")
+ .HasDatabaseName("IX_IMS_Configurations_Name");
+
+ b.ToTable("IMS_Configurations", null, t =>
+ {
+ t.HasComment("IMS配置表");
+ });
+ });
+
+ modelBuilder.Entity("CellularManagement.Domain.Entities.NetworkProfile.NetworkStackConfig", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("text")
+ .HasComment("配置ID");
+
+ b.Property("CreatedAt")
+ .HasColumnType("timestamp with time zone")
+ .HasComment("创建时间");
+
+ b.Property("CreatedBy")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Description")
+ .HasMaxLength(500)
+ .HasColumnType("character varying(500)")
+ .HasComment("描述");
+
+ b.Property("IsActive")
+ .HasColumnType("boolean")
+ .HasComment("是否激活");
+
+ b.Property("IsDeleted")
+ .HasColumnType("boolean");
+
+ b.Property("NetworkStackName")
+ .IsRequired()
+ .HasMaxLength(100)
+ .HasColumnType("character varying(100)")
+ .HasComment("网络栈名称");
+
+ b.Property("RanId")
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)")
+ .HasComment("RAN配置ID");
+
+ b.Property("UpdatedAt")
+ .IsRequired()
+ .HasColumnType("timestamp with time zone")
+ .HasComment("更新时间");
+
+ b.Property("UpdatedBy")
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.HasIndex("IsActive")
+ .HasDatabaseName("IX_NetworkStackConfigs_IsActive");
+
+ b.HasIndex("NetworkStackName")
+ .IsUnique()
+ .HasDatabaseName("IX_NetworkStackConfigs_NetworkStackName");
+
+ b.HasIndex("RanId")
+ .HasDatabaseName("IX_NetworkStackConfigs_RanId");
+
+ b.ToTable("NetworkStackConfigs", null, t =>
+ {
+ t.HasComment("网络栈配置表");
+ });
+ });
+
+ modelBuilder.Entity("CellularManagement.Domain.Entities.NetworkProfile.RAN_Configuration", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("text")
+ .HasComment("配置ID");
+
+ b.Property("ConfigContent")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasComment("配置内容(JSON格式)");
+
+ b.Property("CreatedAt")
+ .HasColumnType("timestamp with time zone")
+ .HasComment("创建时间");
+
+ b.Property("CreatedBy")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Description")
+ .IsRequired()
+ .HasMaxLength(500)
+ .HasColumnType("character varying(500)")
+ .HasComment("配置描述");
+
+ b.Property("IsDeleted")
+ .HasColumnType("boolean");
+
+ b.Property("IsDisabled")
+ .HasColumnType("boolean")
+ .HasComment("是否禁用");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(100)
+ .HasColumnType("character varying(100)")
+ .HasComment("配置名称");
+
+ b.Property("UpdatedAt")
+ .IsRequired()
+ .HasColumnType("timestamp with time zone")
+ .HasComment("更新时间");
+
+ b.Property("UpdatedBy")
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Name")
+ .HasDatabaseName("IX_RAN_Configurations_Name");
+
+ b.ToTable("RAN_Configurations", null, t =>
+ {
+ t.HasComment("RAN配置表");
+ });
+ });
+
+ modelBuilder.Entity("CellularManagement.Domain.Entities.NetworkProfile.Stack_CoreIMS_Binding", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("text")
+ .HasComment("绑定关系ID");
+
+ b.Property("CnId")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)")
+ .HasComment("核心网配置ID");
+
+ b.Property("ImsId")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)")
+ .HasComment("IMS配置ID");
+
+ b.Property("Index")
+ .HasColumnType("integer")
+ .HasComment("索引");
+
+ b.Property("NetworkStackConfigId")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)")
+ .HasComment("网络栈配置ID");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CnId")
+ .HasDatabaseName("IX_Stack_CoreIMS_Bindings_CnId");
+
+ b.HasIndex("ImsId")
+ .HasDatabaseName("IX_Stack_CoreIMS_Bindings_ImsId");
+
+ b.HasIndex("NetworkStackConfigId")
+ .HasDatabaseName("IX_Stack_CoreIMS_Bindings_NetworkStackConfigId");
+
+ b.HasIndex("NetworkStackConfigId", "Index")
+ .IsUnique()
+ .HasDatabaseName("IX_Stack_CoreIMS_Bindings_NetworkStackConfigId_Index");
+
+ b.ToTable("Stack_CoreIMS_Bindings", null, t =>
+ {
+ t.HasComment("栈与核心网/IMS绑定关系表");
+ });
+ });
+
+ modelBuilder.Entity("CellularManagement.Domain.Entities.Permission", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("text");
+
+ b.Property("Code")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)");
+
+ b.Property("CreatedAt")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("Description")
+ .HasMaxLength(200)
+ .HasColumnType("character varying(200)");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)");
+
+ b.Property("Type")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)");
+
+ b.HasKey("Id");
+
+ b.ToTable("Permissions", (string)null);
+ });
+
+ modelBuilder.Entity("CellularManagement.Domain.Entities.RolePermission", b =>
+ {
+ b.Property("RoleId")
+ .HasColumnType("text");
+
+ b.Property("PermissionId")
+ .HasColumnType("text");
+
+ b.Property("CreatedAt")
+ .HasColumnType("timestamp with time zone");
+
+ b.HasKey("RoleId", "PermissionId");
+
+ b.HasIndex("PermissionId");
+
+ b.ToTable("RolePermissions", (string)null);
+ });
+
+ modelBuilder.Entity("CellularManagement.Domain.Entities.UserRole", b =>
+ {
+ b.Property("UserId")
+ .HasColumnType("text");
+
+ b.Property("RoleId")
+ .HasColumnType("text");
+
+ b.HasKey("UserId", "RoleId");
+
+ b.HasIndex("RoleId");
+
+ b.ToTable("UserRoles", null, t =>
+ {
+ t.HasComment("用户角色关系表");
+ });
+ });
+
+ modelBuilder.Entity("CellularManagement.Domain.Entities.Device.ProtocolVersion", b =>
+ {
+ b.HasOne("CellularManagement.Domain.Entities.Device.CellularDevice", null)
+ .WithMany("ProtocolVersions")
+ .HasForeignKey("SerialNumber")
+ .HasPrincipalKey("SerialNumber")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+ });
+
+ modelBuilder.Entity("CellularManagement.Domain.Entities.Logging.LoginLog", b =>
+ {
+ b.HasOne("CellularManagement.Domain.Entities.AppUser", null)
+ .WithMany()
+ .HasForeignKey("UserId")
+ .OnDelete(DeleteBehavior.Restrict)
+ .IsRequired();
+ });
+
+ modelBuilder.Entity("CellularManagement.Domain.Entities.NetworkProfile.NetworkStackConfig", b =>
+ {
+ b.HasOne("CellularManagement.Domain.Entities.NetworkProfile.RAN_Configuration", null)
+ .WithMany()
+ .HasForeignKey("RanId")
+ .OnDelete(DeleteBehavior.SetNull);
+ });
+
+ modelBuilder.Entity("CellularManagement.Domain.Entities.NetworkProfile.Stack_CoreIMS_Binding", b =>
+ {
+ b.HasOne("CellularManagement.Domain.Entities.NetworkProfile.CoreNetworkConfig", "CoreNetworkConfig")
+ .WithMany()
+ .HasForeignKey("CnId")
+ .OnDelete(DeleteBehavior.Restrict)
+ .IsRequired();
+
+ b.HasOne("CellularManagement.Domain.Entities.NetworkProfile.IMS_Configuration", "IMSConfiguration")
+ .WithMany()
+ .HasForeignKey("ImsId")
+ .OnDelete(DeleteBehavior.Restrict)
+ .IsRequired();
+
+ b.HasOne("CellularManagement.Domain.Entities.NetworkProfile.NetworkStackConfig", "NetworkStackConfig")
+ .WithMany("StackCoreIMSBindings")
+ .HasForeignKey("NetworkStackConfigId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("CoreNetworkConfig");
+
+ b.Navigation("IMSConfiguration");
+
+ b.Navigation("NetworkStackConfig");
+ });
+
+ modelBuilder.Entity("CellularManagement.Domain.Entities.RolePermission", b =>
+ {
+ b.HasOne("CellularManagement.Domain.Entities.Permission", "Permission")
+ .WithMany("RolePermissions")
+ .HasForeignKey("PermissionId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("CellularManagement.Domain.Entities.AppRole", "Role")
+ .WithMany()
+ .HasForeignKey("RoleId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Permission");
+
+ b.Navigation("Role");
+ });
+
+ modelBuilder.Entity("CellularManagement.Domain.Entities.UserRole", b =>
+ {
+ b.HasOne("CellularManagement.Domain.Entities.AppRole", "Role")
+ .WithMany()
+ .HasForeignKey("RoleId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("CellularManagement.Domain.Entities.AppUser", "User")
+ .WithMany()
+ .HasForeignKey("UserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Role");
+
+ b.Navigation("User");
+ });
+
+ modelBuilder.Entity("CellularManagement.Domain.Entities.Device.CellularDevice", b =>
+ {
+ b.Navigation("ProtocolVersions");
+ });
+
+ modelBuilder.Entity("CellularManagement.Domain.Entities.NetworkProfile.NetworkStackConfig", b =>
+ {
+ b.Navigation("StackCoreIMSBindings");
+ });
+
+ modelBuilder.Entity("CellularManagement.Domain.Entities.Permission", b =>
+ {
+ b.Navigation("RolePermissions");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/src/X1.Infrastructure/Migrations/20250728164913_UpdateNetworkStackConfigAndBindings.cs b/src/X1.Infrastructure/Migrations/20250728164913_UpdateNetworkStackConfigAndBindings.cs
new file mode 100644
index 0000000..2c3194c
--- /dev/null
+++ b/src/X1.Infrastructure/Migrations/20250728164913_UpdateNetworkStackConfigAndBindings.cs
@@ -0,0 +1,266 @@
+using System;
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace X1.Infrastructure.Migrations
+{
+ ///
+ public partial class UpdateNetworkStackConfigAndBindings : Migration
+ {
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropForeignKey(
+ name: "FK_Stack_CoreIMS_Bindings_CoreNetworkConfigs_CnId",
+ table: "Stack_CoreIMS_Bindings");
+
+ migrationBuilder.DropForeignKey(
+ name: "FK_Stack_CoreIMS_Bindings_IMS_Configurations_ImsId",
+ table: "Stack_CoreIMS_Bindings");
+
+ migrationBuilder.DropForeignKey(
+ name: "FK_Stack_CoreIMS_Bindings_NetworkStackConfigs_StackId",
+ table: "Stack_CoreIMS_Bindings");
+
+ migrationBuilder.DropIndex(
+ name: "IX_Stack_CoreIMS_Bindings_StackId",
+ table: "Stack_CoreIMS_Bindings");
+
+ migrationBuilder.DropIndex(
+ name: "IX_Stack_CoreIMS_Bindings_StackId_Index",
+ table: "Stack_CoreIMS_Bindings");
+
+ migrationBuilder.DropUniqueConstraint(
+ name: "AK_NetworkStackConfigs_StackId",
+ table: "NetworkStackConfigs");
+
+ migrationBuilder.DropIndex(
+ name: "IX_NetworkStackConfigs_StackId",
+ table: "NetworkStackConfigs");
+
+ migrationBuilder.DropColumn(
+ name: "CreatedAt",
+ table: "Stack_CoreIMS_Bindings");
+
+ migrationBuilder.DropColumn(
+ name: "CreatedBy",
+ table: "Stack_CoreIMS_Bindings");
+
+ migrationBuilder.DropColumn(
+ name: "IsDeleted",
+ table: "Stack_CoreIMS_Bindings");
+
+ migrationBuilder.DropColumn(
+ name: "StackId",
+ table: "Stack_CoreIMS_Bindings");
+
+ migrationBuilder.DropColumn(
+ name: "UpdatedAt",
+ table: "Stack_CoreIMS_Bindings");
+
+ migrationBuilder.DropColumn(
+ name: "UpdatedBy",
+ table: "Stack_CoreIMS_Bindings");
+
+ migrationBuilder.DropColumn(
+ name: "StackId",
+ table: "NetworkStackConfigs");
+
+ migrationBuilder.AddColumn(
+ name: "NetworkStackConfigId",
+ table: "Stack_CoreIMS_Bindings",
+ type: "character varying(50)",
+ maxLength: 50,
+ nullable: false,
+ defaultValue: "",
+ comment: "网络栈配置ID");
+
+ migrationBuilder.AddColumn(
+ name: "NetworkStackName",
+ table: "NetworkStackConfigs",
+ type: "character varying(100)",
+ maxLength: 100,
+ nullable: false,
+ defaultValue: "",
+ comment: "网络栈名称");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_Stack_CoreIMS_Bindings_NetworkStackConfigId",
+ table: "Stack_CoreIMS_Bindings",
+ column: "NetworkStackConfigId");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_Stack_CoreIMS_Bindings_NetworkStackConfigId_Index",
+ table: "Stack_CoreIMS_Bindings",
+ columns: new[] { "NetworkStackConfigId", "Index" },
+ unique: true);
+
+ migrationBuilder.CreateIndex(
+ name: "IX_NetworkStackConfigs_NetworkStackName",
+ table: "NetworkStackConfigs",
+ column: "NetworkStackName",
+ unique: true);
+
+ migrationBuilder.AddForeignKey(
+ name: "FK_Stack_CoreIMS_Bindings_CoreNetworkConfigs_CnId",
+ table: "Stack_CoreIMS_Bindings",
+ column: "CnId",
+ principalTable: "CoreNetworkConfigs",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Restrict);
+
+ migrationBuilder.AddForeignKey(
+ name: "FK_Stack_CoreIMS_Bindings_IMS_Configurations_ImsId",
+ table: "Stack_CoreIMS_Bindings",
+ column: "ImsId",
+ principalTable: "IMS_Configurations",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Restrict);
+
+ migrationBuilder.AddForeignKey(
+ name: "FK_Stack_CoreIMS_Bindings_NetworkStackConfigs_NetworkStackConf~",
+ table: "Stack_CoreIMS_Bindings",
+ column: "NetworkStackConfigId",
+ principalTable: "NetworkStackConfigs",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ }
+
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropForeignKey(
+ name: "FK_Stack_CoreIMS_Bindings_CoreNetworkConfigs_CnId",
+ table: "Stack_CoreIMS_Bindings");
+
+ migrationBuilder.DropForeignKey(
+ name: "FK_Stack_CoreIMS_Bindings_IMS_Configurations_ImsId",
+ table: "Stack_CoreIMS_Bindings");
+
+ migrationBuilder.DropForeignKey(
+ name: "FK_Stack_CoreIMS_Bindings_NetworkStackConfigs_NetworkStackConf~",
+ table: "Stack_CoreIMS_Bindings");
+
+ migrationBuilder.DropIndex(
+ name: "IX_Stack_CoreIMS_Bindings_NetworkStackConfigId",
+ table: "Stack_CoreIMS_Bindings");
+
+ migrationBuilder.DropIndex(
+ name: "IX_Stack_CoreIMS_Bindings_NetworkStackConfigId_Index",
+ table: "Stack_CoreIMS_Bindings");
+
+ migrationBuilder.DropIndex(
+ name: "IX_NetworkStackConfigs_NetworkStackName",
+ table: "NetworkStackConfigs");
+
+ migrationBuilder.DropColumn(
+ name: "NetworkStackConfigId",
+ table: "Stack_CoreIMS_Bindings");
+
+ migrationBuilder.DropColumn(
+ name: "NetworkStackName",
+ table: "NetworkStackConfigs");
+
+ migrationBuilder.AddColumn(
+ name: "CreatedAt",
+ table: "Stack_CoreIMS_Bindings",
+ type: "timestamp with time zone",
+ nullable: false,
+ defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
+ comment: "创建时间");
+
+ migrationBuilder.AddColumn(
+ name: "CreatedBy",
+ table: "Stack_CoreIMS_Bindings",
+ type: "text",
+ nullable: false,
+ defaultValue: "");
+
+ migrationBuilder.AddColumn(
+ name: "IsDeleted",
+ table: "Stack_CoreIMS_Bindings",
+ type: "boolean",
+ nullable: false,
+ defaultValue: false);
+
+ migrationBuilder.AddColumn(
+ name: "StackId",
+ table: "Stack_CoreIMS_Bindings",
+ type: "character varying(50)",
+ maxLength: 50,
+ nullable: false,
+ defaultValue: "",
+ comment: "栈ID");
+
+ migrationBuilder.AddColumn(
+ name: "UpdatedAt",
+ table: "Stack_CoreIMS_Bindings",
+ type: "timestamp with time zone",
+ nullable: false,
+ defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
+ comment: "更新时间");
+
+ migrationBuilder.AddColumn(
+ name: "UpdatedBy",
+ table: "Stack_CoreIMS_Bindings",
+ type: "text",
+ nullable: true);
+
+ migrationBuilder.AddColumn(
+ name: "StackId",
+ table: "NetworkStackConfigs",
+ type: "character varying(50)",
+ maxLength: 50,
+ nullable: false,
+ defaultValue: "",
+ comment: "栈ID");
+
+ migrationBuilder.AddUniqueConstraint(
+ name: "AK_NetworkStackConfigs_StackId",
+ table: "NetworkStackConfigs",
+ column: "StackId");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_Stack_CoreIMS_Bindings_StackId",
+ table: "Stack_CoreIMS_Bindings",
+ column: "StackId");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_Stack_CoreIMS_Bindings_StackId_Index",
+ table: "Stack_CoreIMS_Bindings",
+ columns: new[] { "StackId", "Index" },
+ unique: true);
+
+ migrationBuilder.CreateIndex(
+ name: "IX_NetworkStackConfigs_StackId",
+ table: "NetworkStackConfigs",
+ column: "StackId",
+ unique: true);
+
+ migrationBuilder.AddForeignKey(
+ name: "FK_Stack_CoreIMS_Bindings_CoreNetworkConfigs_CnId",
+ table: "Stack_CoreIMS_Bindings",
+ column: "CnId",
+ principalTable: "CoreNetworkConfigs",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+
+ migrationBuilder.AddForeignKey(
+ name: "FK_Stack_CoreIMS_Bindings_IMS_Configurations_ImsId",
+ table: "Stack_CoreIMS_Bindings",
+ column: "ImsId",
+ principalTable: "IMS_Configurations",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+
+ migrationBuilder.AddForeignKey(
+ name: "FK_Stack_CoreIMS_Bindings_NetworkStackConfigs_StackId",
+ table: "Stack_CoreIMS_Bindings",
+ column: "StackId",
+ principalTable: "NetworkStackConfigs",
+ principalColumn: "StackId",
+ onDelete: ReferentialAction.Cascade);
+ }
+ }
+}
diff --git a/src/X1.Infrastructure/Migrations/AppDbContextModelSnapshot.cs b/src/X1.Infrastructure/Migrations/AppDbContextModelSnapshot.cs
index 9990678..4283455 100644
--- a/src/X1.Infrastructure/Migrations/AppDbContextModelSnapshot.cs
+++ b/src/X1.Infrastructure/Migrations/AppDbContextModelSnapshot.cs
@@ -583,17 +583,17 @@ namespace X1.Infrastructure.Migrations
b.Property("IsDeleted")
.HasColumnType("boolean");
+ b.Property("NetworkStackName")
+ .IsRequired()
+ .HasMaxLength(100)
+ .HasColumnType("character varying(100)")
+ .HasComment("网络栈名称");
+
b.Property("RanId")
.HasMaxLength(50)
.HasColumnType("character varying(50)")
.HasComment("RAN配置ID");
- b.Property("StackId")
- .IsRequired()
- .HasMaxLength(50)
- .HasColumnType("character varying(50)")
- .HasComment("栈ID");
-
b.Property("UpdatedAt")
.IsRequired()
.HasColumnType("timestamp with time zone")
@@ -607,13 +607,13 @@ namespace X1.Infrastructure.Migrations
b.HasIndex("IsActive")
.HasDatabaseName("IX_NetworkStackConfigs_IsActive");
+ b.HasIndex("NetworkStackName")
+ .IsUnique()
+ .HasDatabaseName("IX_NetworkStackConfigs_NetworkStackName");
+
b.HasIndex("RanId")
.HasDatabaseName("IX_NetworkStackConfigs_RanId");
- b.HasIndex("StackId")
- .IsUnique()
- .HasDatabaseName("IX_NetworkStackConfigs_StackId");
-
b.ToTable("NetworkStackConfigs", null, t =>
{
t.HasComment("网络栈配置表");
@@ -689,14 +689,6 @@ namespace X1.Infrastructure.Migrations
.HasColumnType("character varying(50)")
.HasComment("核心网配置ID");
- b.Property("CreatedAt")
- .HasColumnType("timestamp with time zone")
- .HasComment("创建时间");
-
- b.Property("CreatedBy")
- .IsRequired()
- .HasColumnType("text");
-
b.Property("ImsId")
.IsRequired()
.HasMaxLength(50)
@@ -707,22 +699,11 @@ namespace X1.Infrastructure.Migrations
.HasColumnType("integer")
.HasComment("索引");
- b.Property("IsDeleted")
- .HasColumnType("boolean");
-
- b.Property("StackId")
+ b.Property("NetworkStackConfigId")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("character varying(50)")
- .HasComment("栈ID");
-
- b.Property("UpdatedAt")
- .IsRequired()
- .HasColumnType("timestamp with time zone")
- .HasComment("更新时间");
-
- b.Property("UpdatedBy")
- .HasColumnType("text");
+ .HasComment("网络栈配置ID");
b.HasKey("Id");
@@ -732,12 +713,12 @@ namespace X1.Infrastructure.Migrations
b.HasIndex("ImsId")
.HasDatabaseName("IX_Stack_CoreIMS_Bindings_ImsId");
- b.HasIndex("StackId")
- .HasDatabaseName("IX_Stack_CoreIMS_Bindings_StackId");
+ b.HasIndex("NetworkStackConfigId")
+ .HasDatabaseName("IX_Stack_CoreIMS_Bindings_NetworkStackConfigId");
- b.HasIndex("StackId", "Index")
+ b.HasIndex("NetworkStackConfigId", "Index")
.IsUnique()
- .HasDatabaseName("IX_Stack_CoreIMS_Bindings_StackId_Index");
+ .HasDatabaseName("IX_Stack_CoreIMS_Bindings_NetworkStackConfigId_Index");
b.ToTable("Stack_CoreIMS_Bindings", null, t =>
{
@@ -845,19 +826,18 @@ namespace X1.Infrastructure.Migrations
b.HasOne("CellularManagement.Domain.Entities.NetworkProfile.CoreNetworkConfig", "CoreNetworkConfig")
.WithMany()
.HasForeignKey("CnId")
- .OnDelete(DeleteBehavior.Cascade)
+ .OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.HasOne("CellularManagement.Domain.Entities.NetworkProfile.IMS_Configuration", "IMSConfiguration")
.WithMany()
.HasForeignKey("ImsId")
- .OnDelete(DeleteBehavior.Cascade)
+ .OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.HasOne("CellularManagement.Domain.Entities.NetworkProfile.NetworkStackConfig", "NetworkStackConfig")
.WithMany("StackCoreIMSBindings")
- .HasForeignKey("StackId")
- .HasPrincipalKey("StackId")
+ .HasForeignKey("NetworkStackConfigId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
diff --git a/src/X1.WebAPI/logs/app-20250729.log b/src/X1.WebAPI/logs/app-20250729.log
index b60fce3..9b3938e 100644
--- a/src/X1.WebAPI/logs/app-20250729.log
+++ b/src/X1.WebAPI/logs/app-20250729.log
@@ -1888,3 +1888,107 @@ LIMIT @__p_1 OFFSET @__p_0
2025-07-29 00:44:11.715 +08:00 [INF] DESKTOP-1Q3GI6C [28] 连接健康检查完成,检查连接数:0,清理连接数:0,检查时间:2025-07-28 16:44:11
2025-07-29 00:44:41.727 +08:00 [DBG] DESKTOP-1Q3GI6C [29] 获取所有连接,当前连接数:0
2025-07-29 00:44:41.729 +08:00 [INF] DESKTOP-1Q3GI6C [29] 连接健康检查完成,检查连接数:0,清理连接数:0,检查时间:2025-07-28 16:44:41
+2025-07-29 00:49:07.667 +08:00 [INF] DESKTOP-1Q3GI6C [4] 数据库配置验证通过
+2025-07-29 00:49:07.690 +08:00 [INF] DESKTOP-1Q3GI6C [4] JWT配置验证通过
+2025-07-29 00:49:07.691 +08:00 [INF] DESKTOP-1Q3GI6C [4] 邮件配置验证通过
+2025-07-29 00:49:10.327 +08:00 [WRN] DESKTOP-1Q3GI6C [1] The entity type 'IdentityUserLogin' was first mapped explicitly and then ignored. Consider not mapping the entity type in the first place.
+2025-07-29 00:49:10.338 +08:00 [WRN] DESKTOP-1Q3GI6C [1] The entity type 'IdentityRoleClaim' was first mapped explicitly and then ignored. Consider not mapping the entity type in the first place.
+2025-07-29 00:49:10.340 +08:00 [WRN] DESKTOP-1Q3GI6C [1] The entity type 'IdentityUserClaim' was first mapped explicitly and then ignored. Consider not mapping the entity type in the first place.
+2025-07-29 00:49:10.341 +08:00 [WRN] DESKTOP-1Q3GI6C [1] The entity type 'IdentityUserToken' was first mapped explicitly and then ignored. Consider not mapping the entity type in the first place.
+2025-07-29 00:49:10.342 +08:00 [WRN] DESKTOP-1Q3GI6C [1] The entity type 'IdentityUserRole' was first mapped explicitly and then ignored. Consider not mapping the entity type in the first place.
+2025-07-29 00:49:10.411 +08:00 [WRN] DESKTOP-1Q3GI6C [1] Entity 'AppUser' has a global query filter defined and is the required end of a relationship with the entity 'UserRole'. This may lead to unexpected results when the required entity is filtered out. Either configure the navigation as optional, or define matching query filters for both entities in the navigation. See https://go.microsoft.com/fwlink/?linkid=2131316 for more information.
+2025-07-29 00:49:10.416 +08:00 [WRN] DESKTOP-1Q3GI6C [1] Sensitive data logging is enabled. Log entries and exception messages may include sensitive application data; this mode should only be enabled during development.
+2025-07-29 00:49:10.589 +08:00 [WRN] DESKTOP-1Q3GI6C [1] The entity type 'IdentityUserLogin' was first mapped explicitly and then ignored. Consider not mapping the entity type in the first place.
+2025-07-29 00:49:10.589 +08:00 [WRN] DESKTOP-1Q3GI6C [1] The entity type 'IdentityRoleClaim' was first mapped explicitly and then ignored. Consider not mapping the entity type in the first place.
+2025-07-29 00:49:10.590 +08:00 [WRN] DESKTOP-1Q3GI6C [1] The entity type 'IdentityUserClaim' was first mapped explicitly and then ignored. Consider not mapping the entity type in the first place.
+2025-07-29 00:49:10.591 +08:00 [WRN] DESKTOP-1Q3GI6C [1] The entity type 'IdentityUserToken' was first mapped explicitly and then ignored. Consider not mapping the entity type in the first place.
+2025-07-29 00:49:10.592 +08:00 [WRN] DESKTOP-1Q3GI6C [1] The entity type 'IdentityUserRole' was first mapped explicitly and then ignored. Consider not mapping the entity type in the first place.
+2025-07-29 00:49:10.599 +08:00 [WRN] DESKTOP-1Q3GI6C [1] Entity 'AppUser' has a global query filter defined and is the required end of a relationship with the entity 'UserRole'. This may lead to unexpected results when the required entity is filtered out. Either configure the navigation as optional, or define matching query filters for both entities in the navigation. See https://go.microsoft.com/fwlink/?linkid=2131316 for more information.
+2025-07-29 00:49:55.920 +08:00 [INF] DESKTOP-1Q3GI6C [4] 数据库配置验证通过
+2025-07-29 00:49:55.948 +08:00 [INF] DESKTOP-1Q3GI6C [4] JWT配置验证通过
+2025-07-29 00:49:55.949 +08:00 [INF] DESKTOP-1Q3GI6C [4] 邮件配置验证通过
+2025-07-29 00:49:56.317 +08:00 [WRN] DESKTOP-1Q3GI6C [1] The entity type 'IdentityUserLogin' was first mapped explicitly and then ignored. Consider not mapping the entity type in the first place.
+2025-07-29 00:49:56.326 +08:00 [WRN] DESKTOP-1Q3GI6C [1] The entity type 'IdentityRoleClaim' was first mapped explicitly and then ignored. Consider not mapping the entity type in the first place.
+2025-07-29 00:49:56.327 +08:00 [WRN] DESKTOP-1Q3GI6C [1] The entity type 'IdentityUserClaim' was first mapped explicitly and then ignored. Consider not mapping the entity type in the first place.
+2025-07-29 00:49:56.328 +08:00 [WRN] DESKTOP-1Q3GI6C [1] The entity type 'IdentityUserToken' was first mapped explicitly and then ignored. Consider not mapping the entity type in the first place.
+2025-07-29 00:49:56.329 +08:00 [WRN] DESKTOP-1Q3GI6C [1] The entity type 'IdentityUserRole' was first mapped explicitly and then ignored. Consider not mapping the entity type in the first place.
+2025-07-29 00:49:56.382 +08:00 [WRN] DESKTOP-1Q3GI6C [1] Entity 'AppUser' has a global query filter defined and is the required end of a relationship with the entity 'UserRole'. This may lead to unexpected results when the required entity is filtered out. Either configure the navigation as optional, or define matching query filters for both entities in the navigation. See https://go.microsoft.com/fwlink/?linkid=2131316 for more information.
+2025-07-29 00:49:56.387 +08:00 [WRN] DESKTOP-1Q3GI6C [1] Sensitive data logging is enabled. Log entries and exception messages may include sensitive application data; this mode should only be enabled during development.
+2025-07-29 00:49:56.797 +08:00 [INF] DESKTOP-1Q3GI6C [1] Executed DbCommand (40ms) [Parameters=[], CommandType='"Text"', CommandTimeout='30']
+SELECT EXISTS (
+ SELECT 1 FROM pg_catalog.pg_class c
+ JOIN pg_catalog.pg_namespace n ON n.oid=c.relnamespace
+ WHERE n.nspname='public' AND
+ c.relname='__EFMigrationsHistory'
+)
+2025-07-29 00:49:56.825 +08:00 [INF] DESKTOP-1Q3GI6C [1] Executed DbCommand (16ms) [Parameters=[], CommandType='"Text"', CommandTimeout='30']
+SELECT "MigrationId", "ProductVersion"
+FROM "__EFMigrationsHistory"
+ORDER BY "MigrationId";
+2025-07-29 00:49:56.931 +08:00 [INF] DESKTOP-1Q3GI6C [1] Executed DbCommand (15ms) [Parameters=[], CommandType='"Text"', CommandTimeout='30']
+SELECT EXISTS (
+ SELECT 1 FROM pg_catalog.pg_class c
+ JOIN pg_catalog.pg_namespace n ON n.oid=c.relnamespace
+ WHERE n.nspname='public' AND
+ c.relname='__EFMigrationsHistory'
+)
+2025-07-29 00:49:57.030 +08:00 [INF] DESKTOP-1Q3GI6C [1] Executed DbCommand (15ms) [Parameters=[], CommandType='"Text"', CommandTimeout='30']
+SELECT EXISTS (
+ SELECT 1 FROM pg_catalog.pg_class c
+ JOIN pg_catalog.pg_namespace n ON n.oid=c.relnamespace
+ WHERE n.nspname='public' AND
+ c.relname='__EFMigrationsHistory'
+)
+2025-07-29 00:49:57.059 +08:00 [INF] DESKTOP-1Q3GI6C [1] Executed DbCommand (16ms) [Parameters=[], CommandType='"Text"', CommandTimeout='30']
+SELECT "MigrationId", "ProductVersion"
+FROM "__EFMigrationsHistory"
+ORDER BY "MigrationId";
+2025-07-29 00:49:57.110 +08:00 [INF] DESKTOP-1Q3GI6C [1] Executed DbCommand (16ms) [Parameters=[], CommandType='"Text"', CommandTimeout='30']
+ALTER TABLE "Stack_CoreIMS_Bindings" DROP CONSTRAINT "FK_Stack_CoreIMS_Bindings_CoreNetworkConfigs_CnId";
+2025-07-29 00:49:57.126 +08:00 [INF] DESKTOP-1Q3GI6C [1] Executed DbCommand (15ms) [Parameters=[], CommandType='"Text"', CommandTimeout='30']
+ALTER TABLE "Stack_CoreIMS_Bindings" DROP CONSTRAINT "FK_Stack_CoreIMS_Bindings_IMS_Configurations_ImsId";
+2025-07-29 00:49:57.142 +08:00 [INF] DESKTOP-1Q3GI6C [1] Executed DbCommand (14ms) [Parameters=[], CommandType='"Text"', CommandTimeout='30']
+ALTER TABLE "Stack_CoreIMS_Bindings" DROP CONSTRAINT "FK_Stack_CoreIMS_Bindings_NetworkStackConfigs_StackId";
+2025-07-29 00:49:57.162 +08:00 [INF] DESKTOP-1Q3GI6C [1] Executed DbCommand (18ms) [Parameters=[], CommandType='"Text"', CommandTimeout='30']
+DROP INDEX "IX_Stack_CoreIMS_Bindings_StackId";
+2025-07-29 00:49:57.178 +08:00 [INF] DESKTOP-1Q3GI6C [1] Executed DbCommand (15ms) [Parameters=[], CommandType='"Text"', CommandTimeout='30']
+DROP INDEX "IX_Stack_CoreIMS_Bindings_StackId_Index";
+2025-07-29 00:49:57.194 +08:00 [INF] DESKTOP-1Q3GI6C [1] Executed DbCommand (15ms) [Parameters=[], CommandType='"Text"', CommandTimeout='30']
+ALTER TABLE "NetworkStackConfigs" DROP CONSTRAINT "AK_NetworkStackConfigs_StackId";
+2025-07-29 00:49:57.210 +08:00 [INF] DESKTOP-1Q3GI6C [1] Executed DbCommand (14ms) [Parameters=[], CommandType='"Text"', CommandTimeout='30']
+DROP INDEX "IX_NetworkStackConfigs_StackId";
+2025-07-29 00:49:57.226 +08:00 [INF] DESKTOP-1Q3GI6C [1] Executed DbCommand (14ms) [Parameters=[], CommandType='"Text"', CommandTimeout='30']
+ALTER TABLE "Stack_CoreIMS_Bindings" DROP COLUMN "CreatedAt";
+2025-07-29 00:49:57.242 +08:00 [INF] DESKTOP-1Q3GI6C [1] Executed DbCommand (14ms) [Parameters=[], CommandType='"Text"', CommandTimeout='30']
+ALTER TABLE "Stack_CoreIMS_Bindings" DROP COLUMN "CreatedBy";
+2025-07-29 00:49:57.258 +08:00 [INF] DESKTOP-1Q3GI6C [1] Executed DbCommand (14ms) [Parameters=[], CommandType='"Text"', CommandTimeout='30']
+ALTER TABLE "Stack_CoreIMS_Bindings" DROP COLUMN "IsDeleted";
+2025-07-29 00:49:57.274 +08:00 [INF] DESKTOP-1Q3GI6C [1] Executed DbCommand (14ms) [Parameters=[], CommandType='"Text"', CommandTimeout='30']
+ALTER TABLE "Stack_CoreIMS_Bindings" DROP COLUMN "StackId";
+2025-07-29 00:49:57.290 +08:00 [INF] DESKTOP-1Q3GI6C [1] Executed DbCommand (15ms) [Parameters=[], CommandType='"Text"', CommandTimeout='30']
+ALTER TABLE "Stack_CoreIMS_Bindings" DROP COLUMN "UpdatedAt";
+2025-07-29 00:49:57.305 +08:00 [INF] DESKTOP-1Q3GI6C [1] Executed DbCommand (14ms) [Parameters=[], CommandType='"Text"', CommandTimeout='30']
+ALTER TABLE "Stack_CoreIMS_Bindings" DROP COLUMN "UpdatedBy";
+2025-07-29 00:49:57.321 +08:00 [INF] DESKTOP-1Q3GI6C [1] Executed DbCommand (15ms) [Parameters=[], CommandType='"Text"', CommandTimeout='30']
+ALTER TABLE "NetworkStackConfigs" DROP COLUMN "StackId";
+2025-07-29 00:49:57.340 +08:00 [INF] DESKTOP-1Q3GI6C [1] Executed DbCommand (17ms) [Parameters=[], CommandType='"Text"', CommandTimeout='30']
+ALTER TABLE "Stack_CoreIMS_Bindings" ADD "NetworkStackConfigId" character varying(50) NOT NULL DEFAULT '';
+COMMENT ON COLUMN "Stack_CoreIMS_Bindings"."NetworkStackConfigId" IS '网络栈配置ID';
+2025-07-29 00:49:57.357 +08:00 [INF] DESKTOP-1Q3GI6C [1] Executed DbCommand (15ms) [Parameters=[], CommandType='"Text"', CommandTimeout='30']
+ALTER TABLE "NetworkStackConfigs" ADD "NetworkStackName" character varying(100) NOT NULL DEFAULT '';
+COMMENT ON COLUMN "NetworkStackConfigs"."NetworkStackName" IS '网络栈名称';
+2025-07-29 00:49:57.375 +08:00 [INF] DESKTOP-1Q3GI6C [1] Executed DbCommand (17ms) [Parameters=[], CommandType='"Text"', CommandTimeout='30']
+CREATE INDEX "IX_Stack_CoreIMS_Bindings_NetworkStackConfigId" ON "Stack_CoreIMS_Bindings" ("NetworkStackConfigId");
+2025-07-29 00:49:57.394 +08:00 [INF] DESKTOP-1Q3GI6C [1] Executed DbCommand (17ms) [Parameters=[], CommandType='"Text"', CommandTimeout='30']
+CREATE UNIQUE INDEX "IX_Stack_CoreIMS_Bindings_NetworkStackConfigId_Index" ON "Stack_CoreIMS_Bindings" ("NetworkStackConfigId", "Index");
+2025-07-29 00:49:57.412 +08:00 [INF] DESKTOP-1Q3GI6C [1] Executed DbCommand (17ms) [Parameters=[], CommandType='"Text"', CommandTimeout='30']
+CREATE UNIQUE INDEX "IX_NetworkStackConfigs_NetworkStackName" ON "NetworkStackConfigs" ("NetworkStackName");
+2025-07-29 00:49:57.429 +08:00 [INF] DESKTOP-1Q3GI6C [1] Executed DbCommand (15ms) [Parameters=[], CommandType='"Text"', CommandTimeout='30']
+ALTER TABLE "Stack_CoreIMS_Bindings" ADD CONSTRAINT "FK_Stack_CoreIMS_Bindings_CoreNetworkConfigs_CnId" FOREIGN KEY ("CnId") REFERENCES "CoreNetworkConfigs" ("Id") ON DELETE RESTRICT;
+2025-07-29 00:49:57.445 +08:00 [INF] DESKTOP-1Q3GI6C [1] Executed DbCommand (15ms) [Parameters=[], CommandType='"Text"', CommandTimeout='30']
+ALTER TABLE "Stack_CoreIMS_Bindings" ADD CONSTRAINT "FK_Stack_CoreIMS_Bindings_IMS_Configurations_ImsId" FOREIGN KEY ("ImsId") REFERENCES "IMS_Configurations" ("Id") ON DELETE RESTRICT;
+2025-07-29 00:49:57.462 +08:00 [INF] DESKTOP-1Q3GI6C [1] Executed DbCommand (15ms) [Parameters=[], CommandType='"Text"', CommandTimeout='30']
+ALTER TABLE "Stack_CoreIMS_Bindings" ADD CONSTRAINT "FK_Stack_CoreIMS_Bindings_NetworkStackConfigs_NetworkStackConf~" FOREIGN KEY ("NetworkStackConfigId") REFERENCES "NetworkStackConfigs" ("Id") ON DELETE CASCADE;
+2025-07-29 00:49:57.477 +08:00 [INF] DESKTOP-1Q3GI6C [1] Executed DbCommand (14ms) [Parameters=[], CommandType='"Text"', CommandTimeout='30']
+INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
+VALUES ('20250728164913_UpdateNetworkStackConfigAndBindings', '8.0.0');