// using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; using X1.Infrastructure.Context; #nullable disable namespace X1.Infrastructure.Migrations { [DbContext(typeof(AppDbContext))] partial class AppDbContextModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "8.0.0") .HasAnnotation("Relational:MaxIdentifierLength", 63); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); modelBuilder.Entity("X1.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("tb_roles", null, t => { t.HasComment("角色表"); }); }); modelBuilder.Entity("X1.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_user_Email"); b.HasIndex("NormalizedEmail") .HasDatabaseName("EmailIndex"); b.HasIndex("NormalizedUserName") .IsUnique() .HasDatabaseName("UserNameIndex"); b.HasIndex("PhoneNumber") .IsUnique() .HasDatabaseName("IX_user_PhoneNumber"); b.HasIndex("UserName") .IsUnique() .HasDatabaseName("IX_user_UserName"); b.ToTable("tb_users", null, t => { t.HasComment("用户表"); }); }); modelBuilder.Entity("X1.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("DeviceCode") .IsRequired() .HasMaxLength(50) .HasColumnType("character varying(50)") .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("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("DeviceCode") .IsUnique() .HasDatabaseName("IX_cellular_device_DeviceCode"); b.HasIndex("SerialNumber") .IsUnique() .HasDatabaseName("IX_cellular_device_SerialNumber"); b.ToTable("tb_cellular_device", null, t => { t.HasComment("蜂窝设备表"); }); }); modelBuilder.Entity("X1.Domain.Entities.Device.CellularDeviceRuntime", b => { b.Property("Id") .HasColumnType("text"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone"); b.Property("DeviceCode") .IsRequired() .HasMaxLength(50) .HasColumnType("character varying(50)"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false); b.Property("NetworkStackCode") .HasMaxLength(50) .HasColumnType("character varying(50)"); b.Property("RuntimeCode") .HasMaxLength(50) .HasColumnType("character varying(50)"); b.Property("RuntimeStatus") .ValueGeneratedOnAdd() .HasColumnType("integer") .HasDefaultValue(0); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone"); b.HasKey("Id"); b.HasIndex("DeviceCode") .IsUnique(); b.HasIndex("IsDeleted"); b.HasIndex("NetworkStackCode"); b.HasIndex("RuntimeCode"); b.HasIndex("RuntimeStatus"); b.HasIndex("DeviceCode", "CreatedAt") .HasDatabaseName("IX_CellularDeviceRuntimes_DeviceCode_CreatedAt"); b.ToTable("tb_cellular_device_runtimes", (string)null); }); modelBuilder.Entity("X1.Domain.Entities.Device.CellularDeviceRuntimeDetail", b => { b.Property("Id") .HasMaxLength(450) .HasColumnType("character varying(450)"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone"); b.Property("CreatedBy") .HasMaxLength(450) .HasColumnType("character varying(450)"); b.Property("DeviceCode") .IsRequired() .HasMaxLength(50) .HasColumnType("character varying(50)"); b.Property("NetworkStackCode") .IsRequired() .HasMaxLength(50) .HasColumnType("character varying(50)"); b.Property("RuntimeCode") .IsRequired() .HasMaxLength(50) .HasColumnType("character varying(50)"); b.Property("RuntimeStatus") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false); b.HasKey("Id"); b.HasIndex("CreatedAt") .HasDatabaseName("IX_CellularDeviceRuntimeDetails_CreatedAt"); b.HasIndex("CreatedBy") .HasDatabaseName("IX_CellularDeviceRuntimeDetails_CreatedBy"); b.HasIndex("RuntimeCode") .HasDatabaseName("IX_CellularDeviceRuntimeDetails_RuntimeCode"); b.HasIndex("RuntimeStatus") .HasDatabaseName("IX_CellularDeviceRuntimeDetails_RuntimeStatus"); b.ToTable("tb_cellular_device_runtime_details", (string)null); }); modelBuilder.Entity("X1.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("tb_protocol_versions", null, t => { t.HasComment("协议版本表"); }); }); modelBuilder.Entity("X1.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("tb_login_logs", null, t => { t.HasComment("用户登录日志表"); }); }); modelBuilder.Entity("X1.Domain.Entities.Logging.ProtocolLog", b => { b.Property("Id") .HasColumnType("text") .HasComment("主键ID"); b.Property("CellID") .HasColumnType("integer") .HasComment("小区ID"); b.Property("DeviceCode") .IsRequired() .HasMaxLength(50) .HasColumnType("character varying(50)") .HasComment("设备代码"); b.Property("Direction") .HasColumnType("integer") .HasComment("日志方向类型"); b.Property("IMSI") .HasMaxLength(50) .HasColumnType("character varying(50)") .HasComment("国际移动用户识别码"); b.Property("Info") .HasMaxLength(500) .HasColumnType("character varying(500)") .HasComment("信息字段"); b.Property("LayerType") .HasMaxLength(50) .HasColumnType("integer") .HasComment("协议层类型"); b.Property("Message") .HasMaxLength(1000) .HasColumnType("character varying(1000)") .HasComment("消息字段"); b.Property("MessageDetailJson") .HasColumnType("text") .HasComment("消息详情集合(JSON格式存储)"); b.Property("MessageId") .HasColumnType("bigint") .HasComment("消息ID"); b.Property("PLMN") .HasMaxLength(20) .HasColumnType("character varying(20)") .HasComment("公共陆地移动网络标识"); b.Property("RuntimeCode") .IsRequired() .HasMaxLength(50) .HasColumnType("character varying(50)") .HasComment("运行时代码"); b.Property("TimeMs") .HasColumnType("bigint") .HasComment("时间间隔(毫秒)"); b.Property("Timestamp") .HasColumnType("bigint") .HasComment("时间戳"); b.Property("UEID") .HasColumnType("integer") .HasComment("用户设备ID"); b.HasKey("Id"); b.HasIndex("DeviceCode") .HasDatabaseName("IX_ProtocolLog_DeviceCode"); b.HasIndex("LayerType") .HasDatabaseName("IX_ProtocolLog_LayerType"); b.HasIndex("MessageId") .HasDatabaseName("IX_ProtocolLog_MessageId"); b.HasIndex("RuntimeCode") .HasDatabaseName("IX_ProtocolLog_RuntimeCode"); b.HasIndex("Timestamp") .HasDatabaseName("IX_ProtocolLog_Timestamp"); b.HasIndex("DeviceCode", "RuntimeCode") .HasDatabaseName("IX_ProtocolLog_DeviceCode_RuntimeCode"); b.HasIndex("DeviceCode", "Timestamp") .HasDatabaseName("IX_ProtocolLog_DeviceCode_Timestamp"); b.ToTable("tb_protocol_logs", null, t => { t.HasComment("协议日志表"); }); }); modelBuilder.Entity("X1.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("tb_core_network_configs", null, t => { t.HasComment("核心网配置表"); }); }); modelBuilder.Entity("X1.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("tb_ims_configurations", null, t => { t.HasComment("IMS配置表"); }); }); modelBuilder.Entity("X1.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("NetworkStackCode") .IsRequired() .HasMaxLength(50) .HasColumnType("character varying(50)") .HasComment("网络栈编码"); 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("NetworkStackCode") .IsUnique() .HasDatabaseName("IX_NetworkStackConfigs_NetworkStackCode"); b.HasIndex("NetworkStackName") .IsUnique() .HasDatabaseName("IX_NetworkStackConfigs_NetworkStackName"); b.HasIndex("RanId") .HasDatabaseName("IX_NetworkStackConfigs_RanId"); b.ToTable("tb_network_stack_configs", null, t => { t.HasComment("网络栈配置表"); }); }); modelBuilder.Entity("X1.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("tb_ran_configurations", null, t => { t.HasComment("RAN配置表"); }); }); modelBuilder.Entity("X1.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("tb_stack_core_ims_bindings", null, t => { t.HasComment("栈与核心网/IMS绑定关系表"); }); }); modelBuilder.Entity("X1.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("tb_permissions", (string)null); }); modelBuilder.Entity("X1.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("tb_role_permissions", (string)null); }); modelBuilder.Entity("X1.Domain.Entities.Terminal.AdbOperation", b => { b.Property("Id") .HasColumnType("text"); b.Property("Command") .IsRequired() .HasMaxLength(1000) .HasColumnType("character varying(1000)") .HasComment("执行的ADB命令"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasComment("创建时间"); b.Property("CreatedBy") .HasMaxLength(100) .HasColumnType("character varying(100)") .HasComment("创建人"); b.Property("Description") .IsRequired() .HasMaxLength(500) .HasColumnType("character varying(500)") .HasComment("ADB操作的描述"); b.Property("DeviceId") .IsRequired() .HasMaxLength(100) .HasColumnType("character varying(100)") .HasComment("设备ID"); b.Property("IsEnabled") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(true) .HasComment("是否启用"); b.Property("Path") .HasMaxLength(500) .HasColumnType("character varying(500)") .HasComment("命令执行时所依赖的路径(当启用绝对路径时必填)"); b.Property("ScreenshotData") .HasColumnType("BYTEA") .HasComment("操作截图数据(字节数组)"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasComment("更新时间"); b.Property("UpdatedBy") .HasMaxLength(100) .HasColumnType("character varying(100)") .HasComment("更新人"); b.Property("UseAbsolutePath") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasComment("是否启用绝对路径"); b.Property("WaitTimeMs") .ValueGeneratedOnAdd() .HasColumnType("integer") .HasDefaultValue(0) .HasComment("执行命令完需要等待的时间(毫秒)"); b.HasKey("Id"); b.HasIndex("Command") .HasDatabaseName("IX_AdbOperations_Command"); b.HasIndex("CreatedAt") .HasDatabaseName("IX_AdbOperations_CreatedAt"); b.HasIndex("DeviceId") .HasDatabaseName("IX_AdbOperations_DeviceId"); b.HasIndex("IsEnabled") .HasDatabaseName("IX_AdbOperations_IsEnabled"); b.ToTable("tb_adboperations", (string)null); }); modelBuilder.Entity("X1.Domain.Entities.Terminal.AtOperation", b => { b.Property("Id") .HasColumnType("text"); b.Property("BaudRate") .ValueGeneratedOnAdd() .HasColumnType("integer") .HasDefaultValue(115200) .HasComment("波特率"); b.Property("Command") .IsRequired() .HasMaxLength(1000) .HasColumnType("character varying(1000)") .HasComment("AT命令内容"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasComment("创建时间"); b.Property("CreatedBy") .HasMaxLength(100) .HasColumnType("character varying(100)") .HasComment("创建人"); b.Property("DataBits") .ValueGeneratedOnAdd() .HasColumnType("integer") .HasDefaultValue(8) .HasComment("数据位"); b.Property("Description") .IsRequired() .HasMaxLength(500) .HasColumnType("character varying(500)") .HasComment("操作描述"); b.Property("DeviceId") .IsRequired() .HasMaxLength(100) .HasColumnType("character varying(100)") .HasComment("设备ID"); b.Property("IsEnabled") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(true) .HasComment("是否启用"); b.Property("Parameters") .IsRequired() .ValueGeneratedOnAdd() .HasMaxLength(2000) .HasColumnType("character varying(2000)") .HasDefaultValue("") .HasComment("命令参数(JSON格式)"); b.Property("Parity") .IsRequired() .ValueGeneratedOnAdd() .HasMaxLength(10) .HasColumnType("character varying(10)") .HasDefaultValue("NONE") .HasComment("校验位"); b.Property("Port") .IsRequired() .HasMaxLength(50) .HasColumnType("character varying(50)") .HasComment("串口端口"); b.Property("ScreenshotData") .HasColumnType("BYTEA") .HasComment("操作截图数据(字节数组)"); b.Property("StopBits") .IsRequired() .ValueGeneratedOnAdd() .HasMaxLength(10) .HasColumnType("character varying(10)") .HasDefaultValue("1") .HasComment("停止位"); b.Property("Timeout") .ValueGeneratedOnAdd() .HasColumnType("integer") .HasDefaultValue(30) .HasComment("超时时间(秒)"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasComment("更新时间"); b.Property("UpdatedBy") .HasMaxLength(100) .HasColumnType("character varying(100)") .HasComment("更新人"); b.HasKey("Id"); b.HasIndex("Command") .HasDatabaseName("IX_AtOperations_Command"); b.HasIndex("CreatedAt") .HasDatabaseName("IX_AtOperations_CreatedAt"); b.HasIndex("DeviceId") .HasDatabaseName("IX_AtOperations_DeviceId"); b.HasIndex("IsEnabled") .HasDatabaseName("IX_AtOperations_IsEnabled"); b.ToTable("tb_atoperations", (string)null); }); modelBuilder.Entity("X1.Domain.Entities.Terminal.TerminalDevice", b => { b.Property("Id") .HasMaxLength(450) .HasColumnType("character varying(450)"); b.Property("Alias") .IsRequired() .HasMaxLength(100) .HasColumnType("character varying(100)"); b.Property("AndroidVersion") .HasMaxLength(20) .HasColumnType("character varying(20)"); b.Property("BootSerial") .HasMaxLength(50) .HasColumnType("character varying(50)"); b.Property("Brand") .IsRequired() .HasMaxLength(50) .HasColumnType("character varying(50)"); b.Property("BuildId") .HasMaxLength(100) .HasColumnType("character varying(100)"); b.Property("BuildType") .ValueGeneratedOnAdd() .HasColumnType("integer") .HasDefaultValue(0); b.Property("Description") .IsRequired() .HasMaxLength(500) .HasColumnType("character varying(500)"); b.Property("Device") .IsRequired() .HasMaxLength(50) .HasColumnType("character varying(50)"); b.Property("Hardware") .HasMaxLength(100) .HasColumnType("character varying(100)"); b.Property("HardwarePlatform") .HasMaxLength(100) .HasColumnType("character varying(100)"); b.Property("IsEnabled") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(true); b.Property("LastConnectedAt") .HasColumnType("timestamp with time zone"); b.Property("LastDisconnectedAt") .HasColumnType("timestamp with time zone"); b.Property("Locale") .HasMaxLength(20) .HasColumnType("character varying(20)"); b.Property("Model") .IsRequired() .HasMaxLength(100) .HasColumnType("character varying(100)"); b.Property("Name") .IsRequired() .HasMaxLength(100) .HasColumnType("character varying(100)"); b.Property("SdkVersion") .HasMaxLength(10) .HasColumnType("character varying(10)"); b.Property("Serial") .IsRequired() .HasMaxLength(50) .HasColumnType("character varying(50)"); b.Property("ServiceSerial") .IsRequired() .HasMaxLength(50) .HasColumnType("character varying(50)"); b.Property("Status") .IsRequired() .HasColumnType("text"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone"); b.HasKey("Id"); b.HasIndex("AndroidVersion"); b.HasIndex("Brand"); b.HasIndex("Hardware"); b.HasIndex("IsEnabled"); b.HasIndex("LastConnectedAt"); b.HasIndex("Model"); b.HasIndex("Serial") .IsUnique(); b.HasIndex("ServiceSerial"); b.HasIndex("Status"); b.ToTable("tb_terminal_devices", (string)null); }); modelBuilder.Entity("X1.Domain.Entities.Terminal.TerminalService", b => { b.Property("Id") .HasMaxLength(450) .HasColumnType("character varying(450)"); b.Property("AgentPort") .HasColumnType("integer"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone"); b.Property("CreatedBy") .IsRequired() .HasMaxLength(450) .HasColumnType("character varying(450)"); b.Property("Description") .IsRequired() .HasMaxLength(500) .HasColumnType("character varying(500)"); b.Property("IpAddress") .IsRequired() .HasMaxLength(45) .HasColumnType("character varying(45)"); b.Property("IsDeleted") .HasColumnType("boolean"); b.Property("IsEnabled") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(true); b.Property("IsServiceStarted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false); b.Property("Name") .IsRequired() .HasMaxLength(100) .HasColumnType("character varying(100)"); b.Property("SerialNumber") .IsRequired() .HasMaxLength(50) .HasColumnType("character varying(50)"); b.Property("ServiceCode") .IsRequired() .HasMaxLength(50) .HasColumnType("character varying(50)"); b.Property("ServiceType") .ValueGeneratedOnAdd() .HasColumnType("integer") .HasDefaultValue(1); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone"); b.Property("UpdatedBy") .HasMaxLength(450) .HasColumnType("character varying(450)"); b.HasKey("Id"); b.HasIndex("CreatedAt"); b.HasIndex("IpAddress"); b.HasIndex("IsEnabled"); b.HasIndex("IsServiceStarted"); b.HasIndex("SerialNumber") .IsUnique(); b.HasIndex("ServiceCode") .IsUnique(); b.HasIndex("ServiceType"); b.ToTable("tb_terminal_services", (string)null); }); modelBuilder.Entity("X1.Domain.Entities.TestCase.CaseStepConfig", b => { b.Property("Id") .HasMaxLength(450) .HasColumnType("character varying(450)") .HasColumnName("id"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("createdat"); b.Property("CreatedBy") .IsRequired() .HasMaxLength(450) .HasColumnType("character varying(450)") .HasColumnName("createdby"); b.Property("Description") .HasMaxLength(500) .HasColumnType("character varying(500)") .HasColumnName("description"); b.Property("Icon") .HasMaxLength(100) .HasColumnType("character varying(100)") .HasColumnName("icon"); b.Property("IsDeleted") .HasColumnType("boolean"); b.Property("IsEnabled") .HasColumnType("boolean") .HasColumnName("isenabled"); b.Property("Mapping") .IsRequired() .HasMaxLength(200) .HasColumnType("character varying(200)") .HasColumnName("mapping"); b.Property("StepName") .IsRequired() .HasMaxLength(100) .HasColumnType("character varying(100)") .HasColumnName("stepname"); b.Property("StepType") .HasColumnType("integer") .HasColumnName("steptype"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updatedat"); b.Property("UpdatedBy") .HasMaxLength(450) .HasColumnType("character varying(450)") .HasColumnName("updatedby"); b.HasKey("Id"); b.HasIndex("IsEnabled") .HasDatabaseName("ix_tb_casestepconfig_isenabled"); b.HasIndex("StepName") .HasDatabaseName("ix_tb_casestepconfig_stepname"); b.HasIndex("StepType") .HasDatabaseName("ix_tb_casestepconfig_steptype"); b.ToTable("tb_casestepconfig", (string)null); }); modelBuilder.Entity("X1.Domain.Entities.TestCase.TestCaseEdge", b => { b.Property("Id") .HasMaxLength(450) .HasColumnType("character varying(450)") .HasColumnName("id"); b.Property("Condition") .HasMaxLength(200) .HasColumnType("character varying(200)") .HasColumnName("condition"); b.Property("EdgeId") .IsRequired() .HasMaxLength(100) .HasColumnType("character varying(100)") .HasColumnName("edgeid"); b.Property("EdgeType") .HasMaxLength(50) .HasColumnType("character varying(50)") .HasColumnName("edgetype"); b.Property("IsAnimated") .HasColumnType("boolean") .HasColumnName("isanimated"); b.Property("SourceNodeId") .IsRequired() .HasMaxLength(100) .HasColumnType("character varying(100)") .HasColumnName("sourcenodeid"); b.Property("Style") .HasMaxLength(500) .HasColumnType("character varying(500)") .HasColumnName("style"); b.Property("TargetNodeId") .IsRequired() .HasMaxLength(100) .HasColumnType("character varying(100)") .HasColumnName("targetnodeid"); b.Property("TestCaseId") .IsRequired() .HasMaxLength(450) .HasColumnType("character varying(450)") .HasColumnName("testcaseid"); b.HasKey("Id"); b.HasIndex("EdgeId") .HasDatabaseName("IX_testcaseedge_edgeid"); b.HasIndex("SourceNodeId") .HasDatabaseName("IX_testcaseedge_sourcenodeid"); b.HasIndex("TargetNodeId") .HasDatabaseName("IX_testcaseedge_targetnodeid"); b.HasIndex("TestCaseId") .HasDatabaseName("IX_testcaseedge_testcaseid"); b.ToTable("tb_testcaseedge", (string)null); }); modelBuilder.Entity("X1.Domain.Entities.TestCase.TestCaseFlow", b => { b.Property("Id") .HasMaxLength(450) .HasColumnType("character varying(450)") .HasColumnName("id"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("createdat"); b.Property("CreatedBy") .IsRequired() .HasMaxLength(450) .HasColumnType("character varying(450)") .HasColumnName("createdby"); b.Property("Description") .HasMaxLength(1000) .HasColumnType("character varying(1000)") .HasColumnName("description"); b.Property("IsEnabled") .HasColumnType("boolean") .HasColumnName("isenabled"); b.Property("Name") .IsRequired() .HasMaxLength(200) .HasColumnType("character varying(200)") .HasColumnName("name"); b.Property("Type") .HasColumnType("integer") .HasColumnName("type"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updatedat"); b.Property("UpdatedBy") .HasMaxLength(450) .HasColumnType("character varying(450)") .HasColumnName("updatedby"); b.Property("ViewportX") .HasColumnType("double precision") .HasColumnName("viewport_x"); b.Property("ViewportY") .HasColumnType("double precision") .HasColumnName("viewport_y"); b.Property("ViewportZoom") .HasColumnType("double precision") .HasColumnName("viewport_zoom"); b.HasKey("Id"); b.HasIndex("IsEnabled") .HasDatabaseName("IX_testcaseflow_isenabled"); b.HasIndex("Name") .HasDatabaseName("IX_testcaseflow_name"); b.HasIndex("Type") .HasDatabaseName("IX_testcaseflow_type"); b.ToTable("tb_testcaseflow", (string)null); }); modelBuilder.Entity("X1.Domain.Entities.TestCase.TestCaseNode", b => { b.Property("Id") .HasMaxLength(450) .HasColumnType("character varying(450)") .HasColumnName("id"); b.Property("Height") .HasColumnType("double precision") .HasColumnName("height"); b.Property("IsDragging") .HasColumnType("boolean") .HasColumnName("isdragging"); b.Property("IsSelected") .HasColumnType("boolean") .HasColumnName("isselected"); b.Property("NodeId") .IsRequired() .HasMaxLength(100) .HasColumnType("character varying(100)") .HasColumnName("nodeid"); b.Property("PositionAbsoluteX") .HasColumnType("double precision") .HasColumnName("positionabsolutex"); b.Property("PositionAbsoluteY") .HasColumnType("double precision") .HasColumnName("positionabsolutey"); b.Property("PositionX") .HasColumnType("double precision") .HasColumnName("positionx"); b.Property("PositionY") .HasColumnType("double precision") .HasColumnName("positiony"); b.Property("SequenceNumber") .HasColumnType("integer") .HasColumnName("sequencenumber"); b.Property("StepId") .HasMaxLength(450) .HasColumnType("character varying(450)") .HasColumnName("stepid"); b.Property("TestCaseId") .IsRequired() .HasMaxLength(450) .HasColumnType("character varying(450)") .HasColumnName("testcaseid"); b.Property("Width") .HasColumnType("double precision") .HasColumnName("width"); b.HasKey("Id"); b.HasIndex("NodeId") .HasDatabaseName("IX_testcasenode_nodeid"); b.HasIndex("SequenceNumber") .HasDatabaseName("IX_testcasenode_sequencenumber"); b.HasIndex("StepId"); b.HasIndex("TestCaseId") .HasDatabaseName("IX_testcasenode_testcaseid"); b.ToTable("tb_testcasenode", (string)null); }); modelBuilder.Entity("X1.Domain.Entities.UserRole", b => { b.Property("UserId") .HasColumnType("text"); b.Property("RoleId") .HasColumnType("text"); b.HasKey("UserId", "RoleId"); b.HasIndex("RoleId"); b.ToTable("tb_user_roles", null, t => { t.HasComment("用户角色关系表"); }); }); modelBuilder.Entity("X1.Domain.Entities.Device.CellularDeviceRuntime", b => { b.HasOne("X1.Domain.Entities.Device.CellularDevice", "Device") .WithOne("Runtime") .HasForeignKey("X1.Domain.Entities.Device.CellularDeviceRuntime", "DeviceCode") .HasPrincipalKey("X1.Domain.Entities.Device.CellularDevice", "DeviceCode") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Device"); }); modelBuilder.Entity("X1.Domain.Entities.Device.ProtocolVersion", b => { b.HasOne("X1.Domain.Entities.Device.CellularDevice", null) .WithMany("ProtocolVersions") .HasForeignKey("SerialNumber") .HasPrincipalKey("SerialNumber") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("X1.Domain.Entities.Logging.LoginLog", b => { b.HasOne("X1.Domain.Entities.AppUser", null) .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); }); modelBuilder.Entity("X1.Domain.Entities.NetworkProfile.NetworkStackConfig", b => { b.HasOne("X1.Domain.Entities.NetworkProfile.RAN_Configuration", null) .WithMany() .HasForeignKey("RanId") .OnDelete(DeleteBehavior.SetNull); }); modelBuilder.Entity("X1.Domain.Entities.NetworkProfile.Stack_CoreIMS_Binding", b => { b.HasOne("X1.Domain.Entities.NetworkProfile.CoreNetworkConfig", "CoreNetworkConfig") .WithMany() .HasForeignKey("CnId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("X1.Domain.Entities.NetworkProfile.IMS_Configuration", "IMSConfiguration") .WithMany() .HasForeignKey("ImsId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("X1.Domain.Entities.NetworkProfile.NetworkStackConfig", "NetworkStackConfig") .WithMany("StackCoreIMSBindings") .HasForeignKey("NetworkStackConfigId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("CoreNetworkConfig"); b.Navigation("IMSConfiguration"); b.Navigation("NetworkStackConfig"); }); modelBuilder.Entity("X1.Domain.Entities.RolePermission", b => { b.HasOne("X1.Domain.Entities.Permission", "Permission") .WithMany("RolePermissions") .HasForeignKey("PermissionId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("X1.Domain.Entities.AppRole", "Role") .WithMany() .HasForeignKey("RoleId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Permission"); b.Navigation("Role"); }); modelBuilder.Entity("X1.Domain.Entities.TestCase.TestCaseEdge", b => { b.HasOne("X1.Domain.Entities.TestCase.TestCaseFlow", "TestCase") .WithMany("Edges") .HasForeignKey("TestCaseId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("TestCase"); }); modelBuilder.Entity("X1.Domain.Entities.TestCase.TestCaseNode", b => { b.HasOne("X1.Domain.Entities.TestCase.CaseStepConfig", "StepConfig") .WithMany() .HasForeignKey("StepId") .OnDelete(DeleteBehavior.SetNull); b.HasOne("X1.Domain.Entities.TestCase.TestCaseFlow", "TestCase") .WithMany("Nodes") .HasForeignKey("TestCaseId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("StepConfig"); b.Navigation("TestCase"); }); modelBuilder.Entity("X1.Domain.Entities.UserRole", b => { b.HasOne("X1.Domain.Entities.AppRole", "Role") .WithMany() .HasForeignKey("RoleId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("X1.Domain.Entities.AppUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Role"); b.Navigation("User"); }); modelBuilder.Entity("X1.Domain.Entities.Device.CellularDevice", b => { b.Navigation("ProtocolVersions"); b.Navigation("Runtime"); }); modelBuilder.Entity("X1.Domain.Entities.NetworkProfile.NetworkStackConfig", b => { b.Navigation("StackCoreIMSBindings"); }); modelBuilder.Entity("X1.Domain.Entities.Permission", b => { b.Navigation("RolePermissions"); }); modelBuilder.Entity("X1.Domain.Entities.TestCase.TestCaseFlow", b => { b.Navigation("Edges"); b.Navigation("Nodes"); }); #pragma warning restore 612, 618 } } }