From 91437a600f48163e10b20e5ec2ce3ba59b7ca7b2 Mon Sep 17 00:00:00 2001 From: ChenYi <296215406@outlook.com> Date: Wed, 28 Jan 2026 17:22:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E8=AE=BE=E5=A4=87=E7=AB=AF?= =?UTF-8?q?=E7=89=A9=E6=A8=A1=E5=9E=8B=E6=8C=87=E4=BB=A4=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=92=8C=E6=95=B0=E6=8D=AE=E4=B8=8A=E6=8A=A5=E8=A7=A3=E6=9E=90?= =?UTF-8?q?=E6=97=B6=E6=95=B0=E6=8D=AE=E5=88=86=E7=B1=BB=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98=E3=80=82=E8=8E=B7=E5=8F=96=E6=89=80?= =?UTF-8?q?=E6=9C=89=E5=B9=B3=E5=8F=B0=E7=AB=AF=E7=89=A9=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BusinessSystemAggregationService.cs | 2 +- .../DeviceAggregationService.cs | 72 +- ...8012938_updatedevicethingmodel.Designer.cs | 4303 ++++++++++++++++ .../20260128012938_updatedevicethingmodel.cs | 30 + ...15625_updatedeviceinfo20260128.Designer.cs | 4309 +++++++++++++++++ ...20260128015625_updatedeviceinfo20260128.cs | 30 + ...8_updatedeviceinfo202601281007.Designer.cs | 4309 +++++++++++++++++ ...0128020928_updatedeviceinfo202601281007.cs | 28 + .../Migrations/IoTDbContextModelSnapshot.cs | 12 +- 9 files changed, 13084 insertions(+), 11 deletions(-) create mode 100644 src/JiShe.IoT.EntityFrameworkCore/Migrations/20260128012938_updatedevicethingmodel.Designer.cs create mode 100644 src/JiShe.IoT.EntityFrameworkCore/Migrations/20260128012938_updatedevicethingmodel.cs create mode 100644 src/JiShe.IoT.EntityFrameworkCore/Migrations/20260128015625_updatedeviceinfo20260128.Designer.cs create mode 100644 src/JiShe.IoT.EntityFrameworkCore/Migrations/20260128015625_updatedeviceinfo20260128.cs create mode 100644 src/JiShe.IoT.EntityFrameworkCore/Migrations/20260128020928_updatedeviceinfo202601281007.Designer.cs create mode 100644 src/JiShe.IoT.EntityFrameworkCore/Migrations/20260128020928_updatedeviceinfo202601281007.cs diff --git a/src/JiShe.IoT.Application/BusinessSystemAggregation/BusinessSystemAggregationService.cs b/src/JiShe.IoT.Application/BusinessSystemAggregation/BusinessSystemAggregationService.cs index a113b04..517f42b 100644 --- a/src/JiShe.IoT.Application/BusinessSystemAggregation/BusinessSystemAggregationService.cs +++ b/src/JiShe.IoT.Application/BusinessSystemAggregation/BusinessSystemAggregationService.cs @@ -100,7 +100,7 @@ namespace JiShe.IoT.BusinessSystemAggregation throw new UserFriendlyException($"业务系统推送指令时设备{deviceInfo.DeviceAddress}平台端物模型属性标识符{item.Key}是升级指令操作,被禁止。"); } - if (deviceInfo.IsNeedConfigDevicMdoel && deviceInfo.DeviceThingModelDataId.HasValue && item.Key.ToLowerInvariant() == ThingModelFixedTypeConst.SpecialCommand.ToLowerInvariant()) + if (deviceInfo.IsNeedConfigDeviceModel && deviceInfo.DeviceThingModelDataId.HasValue && item.Key.ToLowerInvariant() == ThingModelFixedTypeConst.SpecialCommand.ToLowerInvariant()) { throw new UserFriendlyException($"业务系统推送指令时设备{deviceInfo.DeviceAddress}平台端物模型属性标识符{item.Key}是特殊指令操作,被禁止。"); } diff --git a/src/JiShe.IoT.Application/DeviceAggregation/DeviceAggregationService.cs b/src/JiShe.IoT.Application/DeviceAggregation/DeviceAggregationService.cs index 673fd7b..82777e8 100644 --- a/src/JiShe.IoT.Application/DeviceAggregation/DeviceAggregationService.cs +++ b/src/JiShe.IoT.Application/DeviceAggregation/DeviceAggregationService.cs @@ -1075,7 +1075,7 @@ namespace JiShe.IoT.DeviceAggregation //检查设备是否有配置设备端物模型信息 //如果有配置,就检查指令字典中是否有SpecialCommand标识符 //如果有就需要构建 SpecialCommand 的特别指令 - if (deviceInfo.IsNeedConfigDevicMdoel && deviceInfo.DeviceThingModelDataId.HasValue && input.Commands.ContainsKey(ThingModelFixedTypeConst.SpecialCommand)) + if (deviceInfo.IsNeedConfigDeviceModel && deviceInfo.DeviceThingModelDataId.HasValue && input.Commands.ContainsKey(ThingModelFixedTypeConst.SpecialCommand)) { var propertyInfo = await oneNETProductService.GetProductThingModelSpecialCommandDataTypeListAsync(new IdInput() { Id = deviceInfo.IoTPlatformProductId }); @@ -1118,9 +1118,9 @@ namespace JiShe.IoT.DeviceAggregation await redisPubSubService.PublishReliableAsync(DistributedMessageCenterConst.OneNETCommandIssuedEventName, packetTaskInfo); return true; } - catch (Exception) + catch (Exception ex) { - + logger.LogError($"{nameof(DeviceCommandInfoToOneNET)} 发送OneNET设备指令信息发生异常,设备地址:{deviceInfo.DeviceAddress},异常信息:{ex.Message}"); throw; } } @@ -1316,22 +1316,76 @@ namespace JiShe.IoT.DeviceAggregation return deviceDataResult.Data; } - var platformUpdatePropertyInfo = platformThingModelInfo.Where(d => d.StandardFieldName.ToLowerInvariant() == ThingModelFixedTypeConst.FIRMWARE_VERSION.ToLowerInvariant()).FirstOrDefault(); - //抄读结果如果有固件版本号,则更新固件版本号到设备信息中 - var firmwareVersionKey = platformUpdatePropertyInfo?.IoTPlatformRawFieldName.ToLowerInvariant(); + List updateKeys = new List() + { + ThingModelFixedTypeConst.FIRMWARE_VERSION.ToLowerInvariant(), + ThingModelFixedTypeConst.ReadingMode.ToLowerInvariant() + }; + var platformUpdatePropertyInfos = platformThingModelInfo.Where(d => updateKeys.Contains(d.StandardFieldName.ToLowerInvariant())).ToList(); + if (platformUpdatePropertyInfos == null || platformUpdatePropertyInfos.Count <= 0) + { + return deviceDataResult.Data; + } + + //根据抄读结果(单个或多个属性)更新设备信息,统一收集后只调用一次 UpdateDeviceInfos + bool needUpdate = false; + + //抄读结果如果有固件版本号,则更新固件版本号到设备信息中 + var firmwareVersionKey = platformUpdatePropertyInfos.FirstOrDefault(d => d.StandardFieldName?.ToLowerInvariant() == ThingModelFixedTypeConst.FIRMWARE_VERSION.ToLowerInvariant())?.IoTPlatformRawFieldName; if (!string.IsNullOrWhiteSpace(firmwareVersionKey) && deviceDataResult.Data.ContainsKey(firmwareVersionKey)) { deviceInfo.FirmwareVersion = deviceDataResult.Data[firmwareVersionKey].ToString(); - await deviceAppService.UpdateDeviceFirmwareVersion(deviceInfo); + needUpdate = true; + } + + //抄读结果如果有抄读模式,则更新抄读模式到设备信息中 + var readModeKey = platformUpdatePropertyInfos.FirstOrDefault(d => d.StandardFieldName?.ToLowerInvariant() == ThingModelFixedTypeConst.ReadingMode.ToLowerInvariant())?.IoTPlatformRawFieldName; + if (!string.IsNullOrWhiteSpace(readModeKey) && deviceDataResult.Data.ContainsKey(readModeKey)) + { + var readModeValue = deviceDataResult.Data[readModeKey]; + + // 兼容 JsonElement / 字符串 / 数值 三种情况 + int readModeInt; + if (readModeValue is System.Text.Json.JsonElement jsonElement) + { + if (jsonElement.ValueKind == System.Text.Json.JsonValueKind.Number && jsonElement.TryGetInt32(out var num)) + { + readModeInt = num; + } + else + { + readModeInt = Convert.ToInt32(jsonElement.ToString()); + } + } + else + { + readModeInt = Convert.ToInt32(readModeValue); + } + + deviceInfo.ReadingMode = (DeviceReadingModeEnum)readModeInt; + needUpdate = true; + } + + if (needUpdate) + { + await deviceAppService.UpdateDeviceInfos(deviceInfo); } return deviceDataResult.Data; } - catch (Exception) + catch (Exception ex) { - throw; + if (input.PropertyList.Contains(ThingModelFixedTypeConst.SpecialCommand)) + { + ex = new UserFriendlyException("请检查设备是否已经采集数据"); + throw ex; + } + else + { + throw; + } } } #endregion diff --git a/src/JiShe.IoT.EntityFrameworkCore/Migrations/20260128012938_updatedevicethingmodel.Designer.cs b/src/JiShe.IoT.EntityFrameworkCore/Migrations/20260128012938_updatedevicethingmodel.Designer.cs new file mode 100644 index 0000000..9a9e55c --- /dev/null +++ b/src/JiShe.IoT.EntityFrameworkCore/Migrations/20260128012938_updatedevicethingmodel.Designer.cs @@ -0,0 +1,4303 @@ +// +using System; +using JiShe.IoT.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace JiShe.IoT.Migrations +{ + [DbContext(typeof(IoTDbContext))] + [Migration("20260128012938_updatedevicethingmodel")] + partial class updatedevicethingmodel + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.PostgreSql) + .HasAnnotation("ProductVersion", "10.0.2") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + + modelBuilder.Entity("JiShe.ServicePro.BasicManagement.UserRefreshTokens.UserRefreshToken", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExpirationTime") + .HasColumnType("timestamp with time zone") + .HasComment("过期时间"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsUsed") + .HasColumnType("boolean") + .HasComment("是否使用"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("RefreshToken") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("刷新token"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("Token") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)") + .HasComment("Token"); + + b.Property("UserId") + .HasColumnType("uuid") + .HasComment("用户id"); + + b.HasKey("Id"); + + b.HasIndex("RefreshToken"); + + b.ToTable("ServiceProUserRefreshTokens", null, t => + { + t.HasComment("刷新Token"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.CTWingManagement.CTWingAccount.CTWingAccountInfo", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AccountId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("账号ID"); + + b.Property("AccountName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("账号名称"); + + b.Property("AppId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("应用 ID"); + + b.Property("AppKey") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("应用 AppKey"); + + b.Property("AppSecret") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("应用 AppSecret"); + + b.Property("CommunicationAddress") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("通讯服务地址"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties") + .HasComment("扩展属性,用于存储自定义字段,JSON格式"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("OSACreatorId") + .HasColumnType("integer") + .HasComment("旧系统授权创建者Id"); + + b.Property("OSADeleterId") + .HasColumnType("integer") + .HasComment("旧系统授权最后删除者Id"); + + b.Property("OSALastModifierId") + .HasColumnType("integer") + .HasComment("旧系统授权最后修改者Id"); + + b.Property("PhoneNumber") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("手机号码"); + + b.Property("PlatformTenantId") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("平台租户ID"); + + b.Property("ProductCount") + .HasColumnType("integer"); + + b.Property("Remark") + .HasColumnType("text") + .HasComment("备注"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId") + .HasComment("租户ID"); + + b.HasKey("Id"); + + b.HasIndex("CreationTime"); + + b.HasIndex(new[] { "Id", "AccountId", "AccountName", "CreationTime" }, "IX_ServiceProCTWingAccountInfo_IsNotUniqueKey") + .IsDescending(); + + b.ToTable("ServiceProCTWingAccountInfo", null, t => + { + t.HasComment("CTWing账号信息"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.CTWingManagement.CTWingProduct.CTWingPrivateProductInfo", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AccessType") + .HasColumnType("integer"); + + b.Property("AccountPhoneNumber") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("账户手机号"); + + b.Property("AuthType") + .HasColumnType("integer"); + + b.Property("CTWingAccountId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("账号ID"); + + b.Property("CommunicationAddress") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("通讯服务地址"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DataEncryption") + .HasColumnType("integer"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("DeviceCount") + .HasColumnType("integer"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties") + .HasComment("扩展属性,用于存储自定义字段,JSON格式"); + + b.Property("FeatureAccesskey") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasComment("设备访问密钥"); + + b.Property("IoTPlatformProductId") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("产品ID"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsEnabled") + .HasColumnType("boolean") + .HasComment("是否启用"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MasterKey") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasComment("OpenAPI 通信主密钥"); + + b.Property("NetworkType") + .HasColumnType("integer"); + + b.Property("NodeType") + .HasColumnType("integer"); + + b.Property("OSACreatorId") + .HasColumnType("integer") + .HasComment("旧系统授权创建者Id"); + + b.Property("OSADeleterId") + .HasColumnType("integer") + .HasComment("旧系统授权最后删除者Id"); + + b.Property("OSALastModifierId") + .HasColumnType("integer") + .HasComment("旧系统授权最后修改者Id"); + + b.Property("ProductDesc") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("必填,产品描述"); + + b.Property("ProductName") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("产品名称"); + + b.Property("ProductProtocol") + .HasColumnType("integer"); + + b.Property("ProductType") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("一级分类名"); + + b.Property("Protocol") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasComment("通讯协议"); + + b.Property("Remark") + .HasColumnType("text") + .HasComment("备注"); + + b.Property("SecondaryType") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("二级分类名"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId") + .HasComment("租户ID"); + + b.Property("ThingModelFileId") + .HasColumnType("uuid") + .HasComment("物模型文件Id"); + + b.Property("ThingModelFileName") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasComment("物模型文件名称"); + + b.Property("ThirdType") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("三级分类名"); + + b.Property("TupDeviceModel") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("设备型号"); + + b.Property("TupIsThrough") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.HasIndex("CreationTime"); + + b.HasIndex(new[] { "Id", "IoTPlatformProductId", "ProductName", "CreationTime" }, "IX_ServiceProCTWingPrivateProductInfo_IsNotUniqueKey") + .IsDescending(); + + b.ToTable("ServiceProCTWingPrivateProductInfo", null, t => + { + t.HasComment("CTWing产品信息"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionary", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b.Property("DisplayText") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AbpDataDictionaries", null, t => + { + t.HasComment("数据字典"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionaryDetail", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DataDictionaryId") + .HasColumnType("uuid"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b.Property("DisplayText") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ExtendedAttribute") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("IsEnabled") + .HasColumnType("boolean"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Order") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.HasIndex("DataDictionaryId"); + + b.ToTable("AbpDataDictionaryDetails", null, t => + { + t.HasComment("数据字典详情"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.DeviceInfos.DeviceFirmwareInfo", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties") + .HasComment("扩展属性,用于存储自定义字段,JSON格式"); + + b.Property("FirmwareFileId") + .HasColumnType("uuid") + .HasComment("固件文件Id"); + + b.Property("FirmwareFileName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasComment("固件文件名称"); + + b.Property("FirmwareHashCode") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasComment("固件哈希值"); + + b.Property("FirmwareLength") + .HasColumnType("bigint"); + + b.Property("FirmwareVersion") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("固件版本"); + + b.Property("IoTPlatform") + .HasColumnType("integer") + .HasComment("物联网平台类型"); + + b.Property("IoTPlatformProductId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("物联网平台中对应的产品Id"); + + b.Property("IoTPlatformProductName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasComment("物联网平台中对应的产品名称"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsEnable") + .HasColumnType("boolean") + .HasComment("是否启用"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("OSACreatorId") + .HasColumnType("integer") + .HasComment("旧系统授权创建者Id"); + + b.Property("OSADeleterId") + .HasColumnType("integer") + .HasComment("旧系统授权最后删除者Id"); + + b.Property("OSALastModifierId") + .HasColumnType("integer") + .HasComment("旧系统授权最后修改者Id"); + + b.Property("Remark") + .HasColumnType("text") + .HasComment("备注"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId") + .HasComment("租户ID"); + + b.HasKey("Id"); + + b.HasIndex("CreationTime"); + + b.HasIndex("IoTPlatformProductId"); + + b.HasIndex(new[] { "Id", "IoTPlatformProductId", "FirmwareVersion", "CreationTime" }, "IX_ServiceProDeviceFirmwareInfo_IsNotUniqueKey") + .IsDescending(); + + b.ToTable("ServiceProDeviceFirmwareInfo", null, t => + { + t.HasComment("设备固件信息"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.DeviceInfos.DeviceManagementInfo", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AccountPhoneNumber") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("账户手机号"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("DeviceAddress") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasComment("设备地址"); + + b.Property("DeviceName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("设备名称"); + + b.Property("DeviceOnlineStatus") + .HasColumnType("integer") + .HasComment("设备在线状态"); + + b.Property("DeviceSource") + .HasColumnType("integer") + .HasComment("设备来源类型"); + + b.Property("DeviceThingModelDataId") + .HasColumnType("uuid") + .HasComment("设备物模型数据Id"); + + b.Property("DeviceType") + .HasColumnType("integer") + .HasComment("设备类型,与业务系统无关,主要区分是网关设备、直连设备"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties") + .HasComment("扩展属性,用于存储自定义字段,JSON格式"); + + b.Property("FirmwareVersion") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("固件版本"); + + b.Property("IoTPlatform") + .HasColumnType("integer") + .HasComment("物联网平台类型,默认没有指定"); + + b.Property("IoTPlatformAccountId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("物联网平台中对应的账号Id"); + + b.Property("IoTPlatformDeviceOpenInfo") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("物联网平台中对应的设备Id或者名称"); + + b.Property("IoTPlatformProductId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("物联网平台中对应的产品Id"); + + b.Property("IoTPlatformProductName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("物联网平台中对应的产品Name"); + + b.Property("IoTPlatformResponse") + .HasColumnType("text") + .HasComment("物联网平台返回的响应信息"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsNeedConfigDevicMdoel") + .HasColumnType("boolean") + .HasComment("是否需要配置设备模型"); + + b.Property("IsPlatformPushSuccess") + .HasColumnType("boolean") + .HasComment("物联网平台推送是否成功"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LastOfflineTime") + .HasColumnType("timestamp with time zone") + .HasComment("最后离线时间"); + + b.Property("LastOnlineTime") + .HasColumnType("timestamp with time zone") + .HasComment("最后在线时间"); + + b.Property("OSACreatorId") + .HasColumnType("integer") + .HasComment("旧系统授权创建者Id"); + + b.Property("OSADeleterId") + .HasColumnType("integer") + .HasComment("旧系统授权最后删除者Id"); + + b.Property("OSALastModifierId") + .HasColumnType("integer") + .HasComment("旧系统授权最后修改者Id"); + + b.Property("PlatformPassword") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("物联网平台设备密码"); + + b.Property("Remark") + .HasColumnType("text") + .HasComment("备注"); + + b.Property("SubDeviceCapacity") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasDefaultValue(64) + .HasComment("子设备容量"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId") + .HasComment("租户ID"); + + b.Property("UpgradeDate") + .HasColumnType("timestamp with time zone") + .HasComment("升级日期"); + + b.HasKey("Id"); + + b.HasIndex("CreationTime"); + + b.HasIndex("DeviceAddress"); + + b.HasIndex(new[] { "Id", "DeviceName", "DeviceAddress", "IoTPlatformProductId", "CreationTime" }, "IX_ServiceProDeviceInfo_IsNotUniqueKey") + .IsDescending(); + + b.ToTable("ServiceProDeviceInfo", null, t => + { + t.HasComment("设备信息"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.DeviceInfos.DeviceUpgradeRecord", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("DeviceAddress") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("设备地址"); + + b.Property("DeviceDataId") + .HasColumnType("uuid") + .HasComment("设备数据Id"); + + b.Property("DeviceName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("设备名称"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties") + .HasComment("扩展属性,用于存储自定义字段,JSON格式"); + + b.Property("FirmwareSignature") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("签名校验值"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("NowFirmwareVersion") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("当前固件版本"); + + b.Property("OSACreatorId") + .HasColumnType("integer") + .HasComment("旧系统授权创建者Id"); + + b.Property("OSADeleterId") + .HasColumnType("integer") + .HasComment("旧系统授权最后删除者Id"); + + b.Property("OSALastModifierId") + .HasColumnType("integer") + .HasComment("旧系统授权最后修改者Id"); + + b.Property("OldFirmwareVersion") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("旧的固件版本"); + + b.Property("Remark") + .HasColumnType("text") + .HasComment("备注"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId") + .HasComment("租户ID"); + + b.Property("UpgradeDate") + .HasColumnType("timestamp with time zone") + .HasComment("升级日期"); + + b.Property("UpgradeDescription") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasComment("升级描述"); + + b.Property("UpgradeIdentifier") + .HasColumnType("bigint") + .HasComment("升级标识符号"); + + b.Property("UpgradeMessage") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasComment("升级信息"); + + b.Property("UpgradeResult") + .HasColumnType("integer") + .HasComment("升级结果"); + + b.Property("UpgradeSource") + .HasColumnType("integer") + .HasComment("升级来源"); + + b.Property("UpgradeStatus") + .HasColumnType("integer") + .HasComment("升级状态"); + + b.HasKey("Id"); + + b.HasIndex("CreationTime"); + + b.HasIndex("DeviceAddress"); + + b.HasIndex("UpgradeIdentifier") + .IsUnique(); + + b.HasIndex(new[] { "Id", "DeviceAddress", "UpgradeIdentifier", "NowFirmwareVersion", "CreationTime" }, "IX_ServiceProDeviceUpgradeRecord_IsNotUniqueKey") + .IsDescending(); + + b.ToTable("ServiceProDeviceUpgradeRecord", null, t => + { + t.HasComment("设备升级记录"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.DeviceInfos.SubDeviceManagementInfo", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("DeviceAddress") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasComment("网关设备或直连设备地址"); + + b.Property("DeviceDataId") + .HasColumnType("uuid") + .HasComment("网关设备或直连设备数据Id"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties") + .HasComment("扩展属性,用于存储自定义字段,JSON格式"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsSynced") + .HasColumnType("boolean") + .HasComment("是否同步"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("OSACreatorId") + .HasColumnType("integer") + .HasComment("旧系统授权创建者Id"); + + b.Property("OSADeleterId") + .HasColumnType("integer") + .HasComment("旧系统授权最后删除者Id"); + + b.Property("OSALastModifierId") + .HasColumnType("integer") + .HasComment("旧系统授权最后修改者Id"); + + b.Property("Remark") + .HasColumnType("text") + .HasComment("备注"); + + b.Property("SubDeviceAddress") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasComment("子设备地址"); + + b.Property("SubDeviceBrandCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("子设备品牌编码"); + + b.Property("SubDeviceIndex") + .HasColumnType("integer") + .HasComment("子设备索引,抑或是主设备下唯一标识符、计量代码"); + + b.Property("SubDeviceName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("子设备名称"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId") + .HasComment("租户ID"); + + b.HasKey("Id"); + + b.HasIndex("CreationTime"); + + b.HasIndex("DeviceAddress"); + + b.HasIndex("SubDeviceAddress"); + + b.HasIndex("SubDeviceIndex"); + + b.HasIndex(new[] { "Id", "DeviceAddress", "SubDeviceIndex", "SubDeviceAddress", "CreationTime" }, "IX_ServiceProSubDeviceManagementInfo_IsNotUniqueKey") + .IsDescending(); + + b.ToTable("ServiceProSubDeviceManagementInfo", null, t => + { + t.HasComment("子设备信息,需要下发配置的网关设备才用到"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.ThingModelInfos.DeviceThingModelCommandInfo", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CommandName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasComment("指令名称"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("DeviceThingModelId") + .HasColumnType("uuid") + .HasComment("设备端物模型Id"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties") + .HasComment("扩展属性,用于存储自定义字段,JSON格式"); + + b.Property("IoTPlatform") + .HasColumnType("integer") + .HasComment("物联网平台类型"); + + b.Property("IoTPlatformProductId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("物联网平台中对应的产品Id"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsEnable") + .HasColumnType("boolean") + .HasComment("是否启用"); + + b.Property("IssueCommand") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasComment("完整的单个下发指令"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("OSACreatorId") + .HasColumnType("integer") + .HasComment("旧系统授权创建者Id"); + + b.Property("OSADeleterId") + .HasColumnType("integer") + .HasComment("旧系统授权最后删除者Id"); + + b.Property("OSALastModifierId") + .HasColumnType("integer") + .HasComment("旧系统授权最后修改者Id"); + + b.Property("PropertyArray") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)") + .HasComment("指令设备端物模型的属性名称集合,JSON格式字符串数组"); + + b.Property("Remark") + .HasColumnType("text") + .HasComment("备注"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId") + .HasComment("租户ID"); + + b.HasKey("Id"); + + b.HasIndex("CreationTime"); + + b.HasIndex("DeviceThingModelId"); + + b.HasIndex(new[] { "Id", "DeviceThingModelId", "IoTPlatformProductId", "CreationTime" }, "IX_ServiceProIoTPlatformThingModelInfo_IsNotUniqueKey") + .IsDescending(); + + b.ToTable("ServiceProDeviceThingModelCommandInfo", null, t => + { + t.HasComment("设备端透传指令详情"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.ThingModelInfos.DeviceThingModelManagement", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("DeviceModelName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("设备端物模型名称"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties") + .HasComment("扩展属性,用于存储自定义字段,JSON格式"); + + b.Property("FunctionAnalysisFlag") + .HasColumnType("boolean") + .HasComment("函数解析标记,默认为false, 不能解析"); + + b.Property("FunctionScript") + .HasColumnType("text") + .HasComment("脚本函数体"); + + b.Property("IoTPlatform") + .HasColumnType("integer") + .HasComment("物联网平台类型,默认没有指定"); + + b.Property("IoTPlatformProductId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("物联网平台中对应的产品Id"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("OSACreatorId") + .HasColumnType("integer") + .HasComment("旧系统授权创建者Id"); + + b.Property("OSADeleterId") + .HasColumnType("integer") + .HasComment("旧系统授权最后删除者Id"); + + b.Property("OSALastModifierId") + .HasColumnType("integer") + .HasComment("旧系统授权最后修改者Id"); + + b.Property("Remark") + .HasColumnType("text") + .HasComment("备注"); + + b.Property("ScriptName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasComment("脚本函数名称"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId") + .HasComment("租户ID"); + + b.HasKey("Id"); + + b.HasIndex("CreationTime"); + + b.HasIndex("IoTPlatformProductId"); + + b.HasIndex(new[] { "Id", "DeviceModelName", "IoTPlatformProductId", "CreationTime" }, "IX_ServiceProIoTPlatformThingModelInfo_IsNotUniqueKey") + .IsDescending() + .HasDatabaseName("IX_ServiceProIoTPlatformThingModelInfo_IsNotUniqueKey1"); + + b.ToTable("ServiceProDeviceThingModelManagement", null, t => + { + t.HasComment("设备端物模型管理"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.ThingModelInfos.DeviceThingModelPropertyInfo", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("DeviceThingModelId") + .HasColumnType("uuid") + .HasComment("设备端物模型Id"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties") + .HasComment("扩展属性,用于存储自定义字段,JSON格式"); + + b.Property("FiledType") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("物联网平台中对应产品物模型属性或者事件类型"); + + b.Property("IoTPlatform") + .HasColumnType("integer") + .HasComment("物联网平台类型"); + + b.Property("IoTPlatformProductId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("物联网平台中对应的产品Id"); + + b.Property("IoTPlatformRawFieldDataType") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasComment("物联网平台中对应的产品物模型属性或者事件数据类型"); + + b.Property("IoTPlatformRawFieldName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasComment("物联网平台中对应的产品物模型属性或者事件名称"); + + b.Property("IoTPlatformThingModelDataId") + .HasColumnType("uuid") + .HasComment("系统中平台端物模型数据Id"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsValueNeedConvert") + .HasColumnType("boolean") + .HasComment("是否需要值类型转换"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("NativeSkipNumber") + .HasColumnType("integer") + .HasComment("正序跳过数量"); + + b.Property("NativeTakeNumber") + .HasColumnType("integer") + .HasComment("正序获取数量"); + + b.Property("OSACreatorId") + .HasColumnType("integer") + .HasComment("旧系统授权创建者Id"); + + b.Property("OSADeleterId") + .HasColumnType("integer") + .HasComment("旧系统授权最后删除者Id"); + + b.Property("OSALastModifierId") + .HasColumnType("integer") + .HasComment("旧系统授权最后修改者Id"); + + b.Property("ParsingSequence") + .HasColumnType("integer") + .HasComment("解析顺序,1234或者3412(高低反转)"); + + b.Property("Remark") + .HasColumnType("text") + .HasComment("备注"); + + b.Property("ReversalSkipNumber") + .HasColumnType("integer") + .HasComment("反转跳过数量"); + + b.Property("ReversalTakeNumber") + .HasColumnType("integer") + .HasComment("反转获取数量"); + + b.Property("StandardFieldDisplayName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasComment("管理后台产品标准的物模型属性或者事件名称"); + + b.Property("StandardFieldName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasComment("管理后台产品标准的物模型属性或者事件名称"); + + b.Property("StandardFieldValueType") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasComment("标准物模型字段值类型"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId") + .HasComment("租户ID"); + + b.HasKey("Id"); + + b.HasIndex("CreationTime"); + + b.HasIndex("IoTPlatformProductId"); + + b.HasIndex(new[] { "Id", "IoTPlatformProductId", "IoTPlatformRawFieldName", "StandardFieldName", "CreationTime" }, "IX_ServiceProIoTPlatformThingModelInfo_IsNotUniqueKey") + .IsDescending() + .HasDatabaseName("IX_ServiceProIoTPlatformThingModelInfo_IsNotUniqueKey2"); + + b.ToTable("ServiceProDeviceThingModelPropertylInfo", null, t => + { + t.HasComment("设备端物模型属性信息,是指设备端支持的属性或者事件"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.ThingModelInfos.IoTPlatformThingModelInfo", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AccessMode") + .IsRequired() + .ValueGeneratedOnAdd() + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasDefaultValue("r") + .HasComment("物模型标识符访问模式"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties") + .HasComment("扩展属性,用于存储自定义字段,JSON格式"); + + b.Property("FiledType") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("物联网平台中对应产品物模型属性或者事件类型"); + + b.Property("IdentifierType") + .HasColumnType("integer") + .HasComment("物模型标识符类型"); + + b.Property("IoTPlatform") + .HasColumnType("integer") + .HasComment("物联网平台类型,默认没有指定"); + + b.Property("IoTPlatformProductId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("物联网平台中对应的产品Id"); + + b.Property("IoTPlatformRawFieldDataType") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasComment("物联网平台中对应的产品物模型属性或者事件数据类型"); + + b.Property("IoTPlatformRawFieldExtension") + .HasColumnType("text") + .HasComment("物联网平台中对应产品物模型标识符扩展,结构体或者数组的时候,是参数的名称与长度的键值对,其他类型就是长度或者值范围"); + + b.Property("IoTPlatformRawFieldName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasComment("物联网平台中对应的产品物模型属性或者事件名称"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsOperableIdentifier") + .HasColumnType("boolean") + .HasComment("是否可操作物模型标识符"); + + b.Property("IsSpecialIdentifier") + .HasColumnType("boolean") + .HasComment("是否是特殊物模型标识符"); + + b.Property("IsValueNeedConvert") + .HasColumnType("boolean") + .HasComment("是否需要值类型转换"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("OSACreatorId") + .HasColumnType("integer") + .HasComment("旧系统授权创建者Id"); + + b.Property("OSADeleterId") + .HasColumnType("integer") + .HasComment("旧系统授权最后删除者Id"); + + b.Property("OSALastModifierId") + .HasColumnType("integer") + .HasComment("旧系统授权最后修改者Id"); + + b.Property("Remark") + .HasColumnType("text") + .HasComment("备注"); + + b.Property("StandardFieldDisplayName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasComment("管理后台产品标准的物模型属性或者事件名称"); + + b.Property("StandardFieldName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasComment("管理后台产品标准的物模型属性或者事件名称"); + + b.Property("StandardFieldValueType") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasComment("标准物模型字段值类型"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId") + .HasComment("租户ID"); + + b.HasKey("Id"); + + b.HasIndex("CreationTime"); + + b.HasIndex("IoTPlatformProductId"); + + b.HasIndex(new[] { "Id", "IoTPlatformProductId", "IoTPlatformRawFieldName", "StandardFieldName", "CreationTime" }, "IX_ServiceProIoTPlatformThingModelInfo_IsNotUniqueKey") + .IsDescending() + .HasDatabaseName("IX_ServiceProIoTPlatformThingModelInfo_IsNotUniqueKey3"); + + b.ToTable("ServiceProIoTPlatformThingModelInfo", null, t => + { + t.HasComment("平台端物模型信息"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.DynamicMenuManagement.Menus.Menu", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Component") + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasComment("组件地址"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("DisplayTitle") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("标准多语言"); + + b.Property("Enabled") + .HasColumnType("boolean"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("HideInMenu") + .HasColumnType("boolean") + .HasComment("是否显示"); + + b.Property("Icon") + .HasColumnType("text") + .HasComment("图标"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KeepAlive") + .HasColumnType("boolean") + .HasComment("是否缓存"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MenuType") + .HasColumnType("integer") + .HasComment("菜单类型"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("唯一编码"); + + b.Property("OpenType") + .HasColumnType("integer") + .HasComment("打开类型"); + + b.Property("Order") + .HasColumnType("integer") + .HasComment("排序"); + + b.Property("ParentId") + .HasColumnType("uuid"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasComment("路由/接口地址"); + + b.Property("Policy") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("授权策略名称"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("标题"); + + b.Property("Url") + .HasColumnType("text") + .HasComment("内外链地址"); + + b.HasKey("Id"); + + b.HasIndex("CreationTime"); + + b.HasIndex("Name"); + + b.HasIndex(new[] { "Id", "Name", "Path", "MenuType", "CreationTime" }, "IX_Menus_IsNotUniqueKey") + .IsDescending(); + + b.ToTable("ServiceProMenus", null, t => + { + t.HasComment("动态菜单管理"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.FileManagement.Files.FileObject", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContentType") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("文件名称"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("文件名称"); + + b.Property("FileSize") + .HasColumnType("bigint") + .HasComment("文件大小"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Md5Hash") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("文件MD5"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("FileName"); + + b.ToTable("AbpFileObjects", null, t => + { + t.HasComment("文件管理"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.LanguageManagement.LanguageTexts.Aggregates.LanguageText", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CultureName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("语言名称"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasComment("名称"); + + b.Property("ResourceName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("资源名称"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasComment("值"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "ResourceName", "CultureName"); + + b.ToTable("AbpLanguageTexts", null, t => + { + t.HasComment("语言文本管理"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.LanguageManagement.Languages.Aggregates.Language", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CultureName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("语言名称"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("显示名称"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("FlagIcon") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("图标"); + + b.Property("IsDefault") + .HasColumnType("boolean"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsEnabled") + .HasColumnType("boolean"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("UiCultureName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("Ui语言名称"); + + b.HasKey("Id"); + + b.HasIndex("CultureName"); + + b.ToTable("AbpLanguages", null, t => + { + t.HasComment("语言管理"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.NotificationManagement.Notifications.Aggregates.Notification", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MessageLevel") + .HasColumnType("integer"); + + b.Property("MessageType") + .HasColumnType("integer"); + + b.Property("Read") + .HasColumnType("boolean"); + + b.Property("ReadTime") + .HasColumnType("timestamp with time zone"); + + b.Property("ReceiveUserId") + .HasColumnType("uuid"); + + b.Property("ReceiveUserName") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("SenderUserId") + .HasColumnType("uuid"); + + b.Property("SenderUserName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.HasKey("Id"); + + b.ToTable("AbpNotifications", null, t => + { + t.HasComment("消息通知管理"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.NotificationManagement.Notifications.Aggregates.NotificationSubscription", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("NotificationId") + .HasColumnType("uuid"); + + b.Property("Read") + .HasColumnType("boolean"); + + b.Property("ReadTime") + .HasColumnType("timestamp with time zone"); + + b.Property("ReceiveUserId") + .HasColumnType("uuid"); + + b.Property("ReceiveUserName") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("NotificationId"); + + b.HasIndex("ReceiveUserId"); + + b.ToTable("AbpNotificationSubscriptions", null, t => + { + t.HasComment("消息订阅者"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.OneNETManagement.OneNETAccounts.OneNETAccountInfos", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AccountAccesskey") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)") + .HasComment("账户通信密钥,平台可以重置密钥"); + + b.Property("AccountName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("账号名称"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties") + .HasComment("扩展属性,用于存储自定义字段,JSON格式"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("OSACreatorId") + .HasColumnType("integer") + .HasComment("旧系统授权创建者Id"); + + b.Property("OSADeleterId") + .HasColumnType("integer") + .HasComment("旧系统授权最后删除者Id"); + + b.Property("OSALastModifierId") + .HasColumnType("integer") + .HasComment("旧系统授权最后修改者Id"); + + b.Property("OneNETAccountId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("账户Id"); + + b.Property("PhoneNumber") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("手机号码"); + + b.Property("ProductCount") + .HasColumnType("integer") + .HasComment("产品数量"); + + b.Property("Remark") + .HasColumnType("text") + .HasComment("备注"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId") + .HasComment("租户ID"); + + b.HasKey("Id"); + + b.HasIndex("CreationTime"); + + b.HasIndex(new[] { "Id", "OneNETAccountId", "AccountName", "PhoneNumber", "CreationTime" }, "IX_ServiceProOneNETAccountInfo_IsNotUniqueKey") + .IsDescending(); + + b.ToTable("ServiceProOneNETAccountInfo", null, t => + { + t.HasComment("OneNET账号管理"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.OneNETManagement.OneNETProducts.OneNETProductInfos", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AccessProtocol") + .HasColumnType("integer") + .HasComment("接入协议"); + + b.Property("AccountPhoneNumber") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("账户手机号"); + + b.Property("Brand") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasComment("产品品牌"); + + b.Property("CommunicationAddress") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasComment("通讯服务地址"); + + b.Property("CommunicationAddressTLS") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasComment("TLS通讯服务地址"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DataProtocol") + .HasColumnType("integer") + .HasComment("数据协议"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties") + .HasComment("扩展属性,用于存储自定义字段,JSON格式"); + + b.Property("IoTPlatformProductId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("物联网平台对应的产品Id"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsEnabled") + .HasColumnType("boolean"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Manufacturer") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasComment("产品厂商"); + + b.Property("Model") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasComment("产品型号"); + + b.Property("Network") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasComment("联网方式"); + + b.Property("NodeType") + .HasColumnType("integer") + .HasComment("节点类型"); + + b.Property("NotActiveDeviceCount") + .HasColumnType("integer") + .HasComment("未激活设备数"); + + b.Property("OSACreatorId") + .HasColumnType("integer") + .HasComment("旧系统授权创建者Id"); + + b.Property("OSADeleterId") + .HasColumnType("integer") + .HasComment("旧系统授权最后删除者Id"); + + b.Property("OSALastModifierId") + .HasColumnType("integer") + .HasComment("旧系统授权最后修改者Id"); + + b.Property("OfflineDeviceCount") + .HasColumnType("integer") + .HasComment("离线设备数"); + + b.Property("OneNETAccountId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("账户Id"); + + b.Property("OnlineDeviceCount") + .HasColumnType("integer") + .HasComment("在线设备总数"); + + b.Property("OwnDeviceCount") + .HasColumnType("integer") + .HasComment("自有设备总数"); + + b.Property("ProductAccesskey") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)") + .HasComment("产品访问密钥"); + + b.Property("ProductCreateTime") + .HasColumnType("timestamp with time zone") + .HasComment("产品创建时间"); + + b.Property("ProductName") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("产品名称"); + + b.Property("ProductUpdateTime") + .HasColumnType("timestamp with time zone") + .HasComment("最近修改时间"); + + b.Property("Remark") + .HasColumnType("text") + .HasComment("备注"); + + b.Property("Status") + .HasColumnType("integer") + .HasComment("开发状态"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId") + .HasComment("租户ID"); + + b.Property("ThingModelFileId") + .HasColumnType("uuid") + .HasComment("物模型文件Id"); + + b.Property("ThingModelFileName") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasComment("物模型文件名称"); + + b.Property("ThingModelInfos") + .HasColumnType("text") + .HasComment("平台物模型信息"); + + b.HasKey("Id"); + + b.HasIndex("CreationTime"); + + b.HasIndex("IoTPlatformProductId") + .IsUnique(); + + b.HasIndex(new[] { "Id", "IoTPlatformProductId", "ProductName", "CreationTime" }, "IX_ServiceProOneNETProductInfo_IsNotUniqueKey") + .IsDescending(); + + b.ToTable("ServiceProOneNETProductInfo", null, t => + { + t.HasComment("OneNET产品管理"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.TemplateManagement.TextTemplates.TextTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("编码"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)") + .HasComment("内容"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CultureName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("语言"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("名称"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code"); + + b.ToTable("ServiceProTextTemplates", null, t => + { + t.HasComment("模板管理"); + }); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("character varying(96)") + .HasColumnName("ApplicationName"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("BrowserInfo"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("ClientId"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("ClientIpAddress"); + + b.Property("ClientName") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("ClientName"); + + b.Property("Comments") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("Comments"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("CorrelationId"); + + b.Property("Exceptions") + .HasColumnType("text"); + + b.Property("ExecutionDuration") + .HasColumnType("integer") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime") + .HasColumnType("timestamp with time zone"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("HttpMethod") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("HttpMethod"); + + b.Property("HttpStatusCode") + .HasColumnType("integer") + .HasColumnName("HttpStatusCode"); + + b.Property("ImpersonatorTenantId") + .HasColumnType("uuid") + .HasColumnName("ImpersonatorTenantId"); + + b.Property("ImpersonatorTenantName") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("ImpersonatorTenantName"); + + b.Property("ImpersonatorUserId") + .HasColumnType("uuid") + .HasColumnName("ImpersonatorUserId"); + + b.Property("ImpersonatorUserName") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("ImpersonatorUserName"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("TenantName"); + + b.Property("Url") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("Url"); + + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("UserId"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "ExecutionTime"); + + b.HasIndex("TenantId", "UserId", "ExecutionTime"); + + b.ToTable("AbpAuditLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AuditLogId") + .HasColumnType("uuid") + .HasColumnName("AuditLogId"); + + b.Property("ExecutionDuration") + .HasColumnType("integer") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("ExecutionTime"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("MethodName") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("MethodName"); + + b.Property("Parameters") + .HasMaxLength(2000) + .HasColumnType("character varying(2000)") + .HasColumnName("Parameters"); + + b.Property("ServiceName") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("ServiceName"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime"); + + b.ToTable("AbpAuditLogActions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogExcelFile", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("FileName") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("FileName"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AbpAuditLogExcelFiles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AuditLogId") + .HasColumnType("uuid") + .HasColumnName("AuditLogId"); + + b.Property("ChangeTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("ChangeTime"); + + b.Property("ChangeType") + .HasColumnType("smallint") + .HasColumnName("ChangeType"); + + b.Property("EntityId") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("EntityId"); + + b.Property("EntityTenantId") + .HasColumnType("uuid"); + + b.Property("EntityTypeFullName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("EntityTypeFullName"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "EntityTypeFullName", "EntityId"); + + b.ToTable("AbpEntityChanges", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("EntityChangeId") + .HasColumnType("uuid"); + + b.Property("NewValue") + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("NewValue"); + + b.Property("OriginalValue") + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("OriginalValue"); + + b.Property("PropertyName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("PropertyName"); + + b.Property("PropertyTypeFullName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("PropertyTypeFullName"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("EntityChangeId"); + + b.ToTable("AbpEntityPropertyChanges", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("character varying(96)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsAbandoned") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false); + + b.Property("JobArgs") + .IsRequired() + .HasMaxLength(1048576) + .HasColumnType("character varying(1048576)"); + + b.Property("JobName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("LastTryTime") + .HasColumnType("timestamp with time zone"); + + b.Property("NextTryTime") + .HasColumnType("timestamp with time zone"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasDefaultValue((byte)15); + + b.Property("TryCount") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasDefaultValue((short)0); + + b.HasKey("Id"); + + b.HasIndex("IsAbandoned", "NextTryTime"); + + b.ToTable("AbpBackgroundJobs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureDefinitionRecord", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AllowedProviders") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("DefaultValue") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("IsAvailableToHost") + .HasColumnType("boolean"); + + b.Property("IsVisibleToClients") + .HasColumnType("boolean"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ValueType") + .HasMaxLength(2048) + .HasColumnType("character varying(2048)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatures", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureGroupDefinitionRecord", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatureGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpFeatureValues", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsStatic") + .HasColumnType("boolean"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("Regex") + .HasMaxLength(512) + .HasColumnType("character varying(512)"); + + b.Property("RegexDescription") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("Required") + .HasColumnType("boolean"); + + b.Property("ValueType") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.ToTable("AbpClaimTypes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("SourceTenantId") + .HasColumnType("uuid"); + + b.Property("SourceUserId") + .HasColumnType("uuid"); + + b.Property("TargetTenantId") + .HasColumnType("uuid"); + + b.Property("TargetUserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") + .IsUnique(); + + b.ToTable("AbpLinkUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("EntityVersion") + .HasColumnType("integer"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDefault") + .HasColumnType("boolean") + .HasColumnName("IsDefault"); + + b.Property("IsPublic") + .HasColumnType("boolean") + .HasColumnName("IsPublic"); + + b.Property("IsStatic") + .HasColumnType("boolean") + .HasColumnName("IsStatic"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("NormalizedName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b.Property("RoleId") + .HasColumnType("uuid"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AbpRoleClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Action") + .HasMaxLength(96) + .HasColumnType("character varying(96)"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("character varying(96)"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("character varying(512)"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("Identity") + .HasMaxLength(96) + .HasColumnType("character varying(96)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Action"); + + b.HasIndex("TenantId", "ApplicationName"); + + b.HasIndex("TenantId", "Identity"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSecurityLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySession", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Device") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("DeviceInfo") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IpAddresses") + .HasMaxLength(2048) + .HasColumnType("character varying(2048)"); + + b.Property("LastAccessed") + .HasColumnType("timestamp with time zone"); + + b.Property("SessionId") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("SignedIn") + .HasColumnType("timestamp with time zone"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("Device"); + + b.HasIndex("SessionId"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSessions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AccessFailedCount") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasDefaultValue(0) + .HasColumnName("AccessFailedCount"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("Email"); + + b.Property("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); + + b.Property("EntityVersion") + .HasColumnType("integer"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsActive") + .HasColumnType("boolean") + .HasColumnName("IsActive"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsExternal") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsExternal"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LastPasswordChangeTime") + .HasColumnType("timestamp with time zone"); + + b.Property("LockoutEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("LockoutEnabled"); + + b.Property("LockoutEnd") + .HasColumnType("timestamp with time zone"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("Name"); + + b.Property("NormalizedEmail") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("NormalizedEmail"); + + b.Property("NormalizedUserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("NormalizedUserName"); + + b.Property("PasswordHash") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("PasswordHash"); + + b.Property("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("PhoneNumber"); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); + + b.Property("SecurityStamp") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("SecurityStamp"); + + b.Property("ShouldChangePasswordOnNextLogin") + .HasColumnType("boolean"); + + b.Property("Surname") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("Surname"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("TwoFactorEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("TwoFactorEnabled"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("Email"); + + b.HasIndex("NormalizedEmail"); + + b.HasIndex("NormalizedUserName"); + + b.HasIndex("UserName"); + + b.ToTable("AbpUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AbpUserClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserDelegation", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("EndTime") + .HasColumnType("timestamp with time zone"); + + b.Property("SourceUserId") + .HasColumnType("uuid"); + + b.Property("StartTime") + .HasColumnType("timestamp with time zone"); + + b.Property("TargetUserId") + .HasColumnType("uuid"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AbpUserDelegations", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ProviderDisplayName") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(196) + .HasColumnType("character varying(196)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "LoginProvider"); + + b.HasIndex("LoginProvider", "ProviderKey"); + + b.ToTable("AbpUserLogins", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("uuid"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "UserId"); + + b.HasIndex("UserId", "OrganizationUnitId"); + + b.ToTable("AbpUserOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("RoleId") + .HasColumnType("uuid"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId", "UserId"); + + b.ToTable("AbpUserRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Name") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("Value") + .HasColumnType("text"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AbpUserTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(95) + .HasColumnType("character varying(95)") + .HasColumnName("Code"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("DisplayName"); + + b.Property("EntityVersion") + .HasColumnType("integer"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("uuid"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code"); + + b.HasIndex("ParentId"); + + b.ToTable("AbpOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("uuid"); + + b.Property("RoleId") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "RoleId"); + + b.HasIndex("RoleId", "OrganizationUnitId"); + + b.ToTable("AbpOrganizationUnitRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("IsEnabled") + .HasColumnType("boolean"); + + b.Property("MultiTenancySide") + .HasColumnType("smallint"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("Providers") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("StateCheckers") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ProviderName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpPermissionGrants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissionGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2048) + .HasColumnType("character varying(2048)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpSettings", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.SettingDefinitionRecord", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("DefaultValue") + .HasMaxLength(2048) + .HasColumnType("character varying(2048)"); + + b.Property("Description") + .HasMaxLength(512) + .HasColumnType("character varying(512)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsEncrypted") + .HasColumnType("boolean"); + + b.Property("IsInherited") + .HasColumnType("boolean"); + + b.Property("IsVisibleToClients") + .HasColumnType("boolean"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("Providers") + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpSettingDefinitions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("EntityVersion") + .HasColumnType("integer"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("NormalizedName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpTenants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + { + b.Property("TenantId") + .HasColumnType("uuid"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b.HasKey("TenantId", "Name"); + + b.ToTable("AbpTenantConnectionStrings", (string)null); + }); + + modelBuilder.Entity("JiShe.ServicePro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionaryDetail", b => + { + b.HasOne("JiShe.ServicePro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionary", null) + .WithMany("Details") + .HasForeignKey("DataDictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => + { + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) + .WithMany("Actions") + .HasForeignKey("AuditLogId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) + .WithMany("EntityChanges") + .HasForeignKey("AuditLogId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => + { + b.HasOne("Volo.Abp.AuditLogging.EntityChange", null) + .WithMany("PropertyChanges") + .HasForeignKey("EntityChangeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany("Claims") + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Claims") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Logins") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("OrganizationUnits") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Roles") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Tokens") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("ParentId"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany("Roles") + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + { + b.HasOne("Volo.Abp.TenantManagement.Tenant", null) + .WithMany("ConnectionStrings") + .HasForeignKey("TenantId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("JiShe.ServicePro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionary", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Navigation("Actions"); + + b.Navigation("EntityChanges"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Navigation("PropertyChanges"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Navigation("Claims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Navigation("Claims"); + + b.Navigation("Logins"); + + b.Navigation("OrganizationUnits"); + + b.Navigation("Roles"); + + b.Navigation("Tokens"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Navigation("Roles"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Navigation("ConnectionStrings"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/JiShe.IoT.EntityFrameworkCore/Migrations/20260128012938_updatedevicethingmodel.cs b/src/JiShe.IoT.EntityFrameworkCore/Migrations/20260128012938_updatedevicethingmodel.cs new file mode 100644 index 0000000..e5bf615 --- /dev/null +++ b/src/JiShe.IoT.EntityFrameworkCore/Migrations/20260128012938_updatedevicethingmodel.cs @@ -0,0 +1,30 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace JiShe.IoT.Migrations +{ + /// + public partial class updatedevicethingmodel : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "IsEnable", + table: "ServiceProDeviceThingModelCommandInfo", + type: "boolean", + nullable: false, + defaultValue: false, + comment: "是否启用"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "IsEnable", + table: "ServiceProDeviceThingModelCommandInfo"); + } + } +} diff --git a/src/JiShe.IoT.EntityFrameworkCore/Migrations/20260128015625_updatedeviceinfo20260128.Designer.cs b/src/JiShe.IoT.EntityFrameworkCore/Migrations/20260128015625_updatedeviceinfo20260128.Designer.cs new file mode 100644 index 0000000..026b230 --- /dev/null +++ b/src/JiShe.IoT.EntityFrameworkCore/Migrations/20260128015625_updatedeviceinfo20260128.Designer.cs @@ -0,0 +1,4309 @@ +// +using System; +using JiShe.IoT.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace JiShe.IoT.Migrations +{ + [DbContext(typeof(IoTDbContext))] + [Migration("20260128015625_updatedeviceinfo20260128")] + partial class updatedeviceinfo20260128 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.PostgreSql) + .HasAnnotation("ProductVersion", "10.0.2") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + + modelBuilder.Entity("JiShe.ServicePro.BasicManagement.UserRefreshTokens.UserRefreshToken", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExpirationTime") + .HasColumnType("timestamp with time zone") + .HasComment("过期时间"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsUsed") + .HasColumnType("boolean") + .HasComment("是否使用"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("RefreshToken") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("刷新token"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("Token") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)") + .HasComment("Token"); + + b.Property("UserId") + .HasColumnType("uuid") + .HasComment("用户id"); + + b.HasKey("Id"); + + b.HasIndex("RefreshToken"); + + b.ToTable("ServiceProUserRefreshTokens", null, t => + { + t.HasComment("刷新Token"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.CTWingManagement.CTWingAccount.CTWingAccountInfo", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AccountId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("账号ID"); + + b.Property("AccountName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("账号名称"); + + b.Property("AppId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("应用 ID"); + + b.Property("AppKey") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("应用 AppKey"); + + b.Property("AppSecret") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("应用 AppSecret"); + + b.Property("CommunicationAddress") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("通讯服务地址"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties") + .HasComment("扩展属性,用于存储自定义字段,JSON格式"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("OSACreatorId") + .HasColumnType("integer") + .HasComment("旧系统授权创建者Id"); + + b.Property("OSADeleterId") + .HasColumnType("integer") + .HasComment("旧系统授权最后删除者Id"); + + b.Property("OSALastModifierId") + .HasColumnType("integer") + .HasComment("旧系统授权最后修改者Id"); + + b.Property("PhoneNumber") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("手机号码"); + + b.Property("PlatformTenantId") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("平台租户ID"); + + b.Property("ProductCount") + .HasColumnType("integer"); + + b.Property("Remark") + .HasColumnType("text") + .HasComment("备注"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId") + .HasComment("租户ID"); + + b.HasKey("Id"); + + b.HasIndex("CreationTime"); + + b.HasIndex(new[] { "Id", "AccountId", "AccountName", "CreationTime" }, "IX_ServiceProCTWingAccountInfo_IsNotUniqueKey") + .IsDescending(); + + b.ToTable("ServiceProCTWingAccountInfo", null, t => + { + t.HasComment("CTWing账号信息"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.CTWingManagement.CTWingProduct.CTWingPrivateProductInfo", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AccessType") + .HasColumnType("integer"); + + b.Property("AccountPhoneNumber") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("账户手机号"); + + b.Property("AuthType") + .HasColumnType("integer"); + + b.Property("CTWingAccountId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("账号ID"); + + b.Property("CommunicationAddress") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("通讯服务地址"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DataEncryption") + .HasColumnType("integer"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("DeviceCount") + .HasColumnType("integer"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties") + .HasComment("扩展属性,用于存储自定义字段,JSON格式"); + + b.Property("FeatureAccesskey") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasComment("设备访问密钥"); + + b.Property("IoTPlatformProductId") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("产品ID"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsEnabled") + .HasColumnType("boolean") + .HasComment("是否启用"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MasterKey") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasComment("OpenAPI 通信主密钥"); + + b.Property("NetworkType") + .HasColumnType("integer"); + + b.Property("NodeType") + .HasColumnType("integer"); + + b.Property("OSACreatorId") + .HasColumnType("integer") + .HasComment("旧系统授权创建者Id"); + + b.Property("OSADeleterId") + .HasColumnType("integer") + .HasComment("旧系统授权最后删除者Id"); + + b.Property("OSALastModifierId") + .HasColumnType("integer") + .HasComment("旧系统授权最后修改者Id"); + + b.Property("ProductDesc") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("必填,产品描述"); + + b.Property("ProductName") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("产品名称"); + + b.Property("ProductProtocol") + .HasColumnType("integer"); + + b.Property("ProductType") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("一级分类名"); + + b.Property("Protocol") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasComment("通讯协议"); + + b.Property("Remark") + .HasColumnType("text") + .HasComment("备注"); + + b.Property("SecondaryType") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("二级分类名"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId") + .HasComment("租户ID"); + + b.Property("ThingModelFileId") + .HasColumnType("uuid") + .HasComment("物模型文件Id"); + + b.Property("ThingModelFileName") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasComment("物模型文件名称"); + + b.Property("ThirdType") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("三级分类名"); + + b.Property("TupDeviceModel") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("设备型号"); + + b.Property("TupIsThrough") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.HasIndex("CreationTime"); + + b.HasIndex(new[] { "Id", "IoTPlatformProductId", "ProductName", "CreationTime" }, "IX_ServiceProCTWingPrivateProductInfo_IsNotUniqueKey") + .IsDescending(); + + b.ToTable("ServiceProCTWingPrivateProductInfo", null, t => + { + t.HasComment("CTWing产品信息"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionary", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b.Property("DisplayText") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AbpDataDictionaries", null, t => + { + t.HasComment("数据字典"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionaryDetail", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DataDictionaryId") + .HasColumnType("uuid"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b.Property("DisplayText") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ExtendedAttribute") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("IsEnabled") + .HasColumnType("boolean"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Order") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.HasIndex("DataDictionaryId"); + + b.ToTable("AbpDataDictionaryDetails", null, t => + { + t.HasComment("数据字典详情"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.DeviceInfos.DeviceFirmwareInfo", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties") + .HasComment("扩展属性,用于存储自定义字段,JSON格式"); + + b.Property("FirmwareFileId") + .HasColumnType("uuid") + .HasComment("固件文件Id"); + + b.Property("FirmwareFileName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasComment("固件文件名称"); + + b.Property("FirmwareHashCode") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasComment("固件哈希值"); + + b.Property("FirmwareLength") + .HasColumnType("bigint"); + + b.Property("FirmwareVersion") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("固件版本"); + + b.Property("IoTPlatform") + .HasColumnType("integer") + .HasComment("物联网平台类型"); + + b.Property("IoTPlatformProductId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("物联网平台中对应的产品Id"); + + b.Property("IoTPlatformProductName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasComment("物联网平台中对应的产品名称"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsEnable") + .HasColumnType("boolean") + .HasComment("是否启用"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("OSACreatorId") + .HasColumnType("integer") + .HasComment("旧系统授权创建者Id"); + + b.Property("OSADeleterId") + .HasColumnType("integer") + .HasComment("旧系统授权最后删除者Id"); + + b.Property("OSALastModifierId") + .HasColumnType("integer") + .HasComment("旧系统授权最后修改者Id"); + + b.Property("Remark") + .HasColumnType("text") + .HasComment("备注"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId") + .HasComment("租户ID"); + + b.HasKey("Id"); + + b.HasIndex("CreationTime"); + + b.HasIndex("IoTPlatformProductId"); + + b.HasIndex(new[] { "Id", "IoTPlatformProductId", "FirmwareVersion", "CreationTime" }, "IX_ServiceProDeviceFirmwareInfo_IsNotUniqueKey") + .IsDescending(); + + b.ToTable("ServiceProDeviceFirmwareInfo", null, t => + { + t.HasComment("设备固件信息"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.DeviceInfos.DeviceManagementInfo", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AccountPhoneNumber") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("账户手机号"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("DeviceAddress") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasComment("设备地址"); + + b.Property("DeviceName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("设备名称"); + + b.Property("DeviceOnlineStatus") + .HasColumnType("integer") + .HasComment("设备在线状态"); + + b.Property("DeviceSource") + .HasColumnType("integer") + .HasComment("设备来源类型"); + + b.Property("DeviceThingModelDataId") + .HasColumnType("uuid") + .HasComment("设备物模型数据Id"); + + b.Property("DeviceType") + .HasColumnType("integer") + .HasComment("设备类型,与业务系统无关,主要区分是网关设备、直连设备"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties") + .HasComment("扩展属性,用于存储自定义字段,JSON格式"); + + b.Property("FirmwareVersion") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("固件版本"); + + b.Property("IoTPlatform") + .HasColumnType("integer") + .HasComment("物联网平台类型,默认没有指定"); + + b.Property("IoTPlatformAccountId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("物联网平台中对应的账号Id"); + + b.Property("IoTPlatformDeviceOpenInfo") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("物联网平台中对应的设备Id或者名称"); + + b.Property("IoTPlatformProductId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("物联网平台中对应的产品Id"); + + b.Property("IoTPlatformProductName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("物联网平台中对应的产品Name"); + + b.Property("IoTPlatformResponse") + .HasColumnType("text") + .HasComment("物联网平台返回的响应信息"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsNeedConfigDevicMdoel") + .HasColumnType("boolean") + .HasComment("是否需要配置设备模型"); + + b.Property("IsPlatformPushSuccess") + .HasColumnType("boolean") + .HasComment("物联网平台推送是否成功"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LastOfflineTime") + .HasColumnType("timestamp with time zone") + .HasComment("最后离线时间"); + + b.Property("LastOnlineTime") + .HasColumnType("timestamp with time zone") + .HasComment("最后在线时间"); + + b.Property("OSACreatorId") + .HasColumnType("integer") + .HasComment("旧系统授权创建者Id"); + + b.Property("OSADeleterId") + .HasColumnType("integer") + .HasComment("旧系统授权最后删除者Id"); + + b.Property("OSALastModifierId") + .HasColumnType("integer") + .HasComment("旧系统授权最后修改者Id"); + + b.Property("PlatformPassword") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("物联网平台设备密码"); + + b.Property("ReadingMode") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasDefaultValue(1) + .HasComment("抄读模式"); + + b.Property("Remark") + .HasColumnType("text") + .HasComment("备注"); + + b.Property("SubDeviceCapacity") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasDefaultValue(64) + .HasComment("子设备容量"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId") + .HasComment("租户ID"); + + b.Property("UpgradeDate") + .HasColumnType("timestamp with time zone") + .HasComment("升级日期"); + + b.HasKey("Id"); + + b.HasIndex("CreationTime"); + + b.HasIndex("DeviceAddress"); + + b.HasIndex(new[] { "Id", "DeviceName", "DeviceAddress", "IoTPlatformProductId", "CreationTime" }, "IX_ServiceProDeviceInfo_IsNotUniqueKey") + .IsDescending(); + + b.ToTable("ServiceProDeviceInfo", null, t => + { + t.HasComment("设备信息"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.DeviceInfos.DeviceUpgradeRecord", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("DeviceAddress") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("设备地址"); + + b.Property("DeviceDataId") + .HasColumnType("uuid") + .HasComment("设备数据Id"); + + b.Property("DeviceName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("设备名称"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties") + .HasComment("扩展属性,用于存储自定义字段,JSON格式"); + + b.Property("FirmwareSignature") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("签名校验值"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("NowFirmwareVersion") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("当前固件版本"); + + b.Property("OSACreatorId") + .HasColumnType("integer") + .HasComment("旧系统授权创建者Id"); + + b.Property("OSADeleterId") + .HasColumnType("integer") + .HasComment("旧系统授权最后删除者Id"); + + b.Property("OSALastModifierId") + .HasColumnType("integer") + .HasComment("旧系统授权最后修改者Id"); + + b.Property("OldFirmwareVersion") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("旧的固件版本"); + + b.Property("Remark") + .HasColumnType("text") + .HasComment("备注"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId") + .HasComment("租户ID"); + + b.Property("UpgradeDate") + .HasColumnType("timestamp with time zone") + .HasComment("升级日期"); + + b.Property("UpgradeDescription") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasComment("升级描述"); + + b.Property("UpgradeIdentifier") + .HasColumnType("bigint") + .HasComment("升级标识符号"); + + b.Property("UpgradeMessage") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasComment("升级信息"); + + b.Property("UpgradeResult") + .HasColumnType("integer") + .HasComment("升级结果"); + + b.Property("UpgradeSource") + .HasColumnType("integer") + .HasComment("升级来源"); + + b.Property("UpgradeStatus") + .HasColumnType("integer") + .HasComment("升级状态"); + + b.HasKey("Id"); + + b.HasIndex("CreationTime"); + + b.HasIndex("DeviceAddress"); + + b.HasIndex("UpgradeIdentifier") + .IsUnique(); + + b.HasIndex(new[] { "Id", "DeviceAddress", "UpgradeIdentifier", "NowFirmwareVersion", "CreationTime" }, "IX_ServiceProDeviceUpgradeRecord_IsNotUniqueKey") + .IsDescending(); + + b.ToTable("ServiceProDeviceUpgradeRecord", null, t => + { + t.HasComment("设备升级记录"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.DeviceInfos.SubDeviceManagementInfo", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("DeviceAddress") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasComment("网关设备或直连设备地址"); + + b.Property("DeviceDataId") + .HasColumnType("uuid") + .HasComment("网关设备或直连设备数据Id"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties") + .HasComment("扩展属性,用于存储自定义字段,JSON格式"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsSynced") + .HasColumnType("boolean") + .HasComment("是否同步"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("OSACreatorId") + .HasColumnType("integer") + .HasComment("旧系统授权创建者Id"); + + b.Property("OSADeleterId") + .HasColumnType("integer") + .HasComment("旧系统授权最后删除者Id"); + + b.Property("OSALastModifierId") + .HasColumnType("integer") + .HasComment("旧系统授权最后修改者Id"); + + b.Property("Remark") + .HasColumnType("text") + .HasComment("备注"); + + b.Property("SubDeviceAddress") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasComment("子设备地址"); + + b.Property("SubDeviceBrandCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("子设备品牌编码"); + + b.Property("SubDeviceIndex") + .HasColumnType("integer") + .HasComment("子设备索引,抑或是主设备下唯一标识符、计量代码"); + + b.Property("SubDeviceName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("子设备名称"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId") + .HasComment("租户ID"); + + b.HasKey("Id"); + + b.HasIndex("CreationTime"); + + b.HasIndex("DeviceAddress"); + + b.HasIndex("SubDeviceAddress"); + + b.HasIndex("SubDeviceIndex"); + + b.HasIndex(new[] { "Id", "DeviceAddress", "SubDeviceIndex", "SubDeviceAddress", "CreationTime" }, "IX_ServiceProSubDeviceManagementInfo_IsNotUniqueKey") + .IsDescending(); + + b.ToTable("ServiceProSubDeviceManagementInfo", null, t => + { + t.HasComment("子设备信息,需要下发配置的网关设备才用到"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.ThingModelInfos.DeviceThingModelCommandInfo", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CommandName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasComment("指令名称"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("DeviceThingModelId") + .HasColumnType("uuid") + .HasComment("设备端物模型Id"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties") + .HasComment("扩展属性,用于存储自定义字段,JSON格式"); + + b.Property("IoTPlatform") + .HasColumnType("integer") + .HasComment("物联网平台类型"); + + b.Property("IoTPlatformProductId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("物联网平台中对应的产品Id"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsEnable") + .HasColumnType("boolean") + .HasComment("是否启用"); + + b.Property("IssueCommand") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasComment("完整的单个下发指令"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("OSACreatorId") + .HasColumnType("integer") + .HasComment("旧系统授权创建者Id"); + + b.Property("OSADeleterId") + .HasColumnType("integer") + .HasComment("旧系统授权最后删除者Id"); + + b.Property("OSALastModifierId") + .HasColumnType("integer") + .HasComment("旧系统授权最后修改者Id"); + + b.Property("PropertyArray") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)") + .HasComment("指令设备端物模型的属性名称集合,JSON格式字符串数组"); + + b.Property("Remark") + .HasColumnType("text") + .HasComment("备注"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId") + .HasComment("租户ID"); + + b.HasKey("Id"); + + b.HasIndex("CreationTime"); + + b.HasIndex("DeviceThingModelId"); + + b.HasIndex(new[] { "Id", "DeviceThingModelId", "IoTPlatformProductId", "CreationTime" }, "IX_ServiceProIoTPlatformThingModelInfo_IsNotUniqueKey") + .IsDescending(); + + b.ToTable("ServiceProDeviceThingModelCommandInfo", null, t => + { + t.HasComment("设备端透传指令详情"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.ThingModelInfos.DeviceThingModelManagement", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("DeviceModelName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("设备端物模型名称"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties") + .HasComment("扩展属性,用于存储自定义字段,JSON格式"); + + b.Property("FunctionAnalysisFlag") + .HasColumnType("boolean") + .HasComment("函数解析标记,默认为false, 不能解析"); + + b.Property("FunctionScript") + .HasColumnType("text") + .HasComment("脚本函数体"); + + b.Property("IoTPlatform") + .HasColumnType("integer") + .HasComment("物联网平台类型,默认没有指定"); + + b.Property("IoTPlatformProductId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("物联网平台中对应的产品Id"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("OSACreatorId") + .HasColumnType("integer") + .HasComment("旧系统授权创建者Id"); + + b.Property("OSADeleterId") + .HasColumnType("integer") + .HasComment("旧系统授权最后删除者Id"); + + b.Property("OSALastModifierId") + .HasColumnType("integer") + .HasComment("旧系统授权最后修改者Id"); + + b.Property("Remark") + .HasColumnType("text") + .HasComment("备注"); + + b.Property("ScriptName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasComment("脚本函数名称"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId") + .HasComment("租户ID"); + + b.HasKey("Id"); + + b.HasIndex("CreationTime"); + + b.HasIndex("IoTPlatformProductId"); + + b.HasIndex(new[] { "Id", "DeviceModelName", "IoTPlatformProductId", "CreationTime" }, "IX_ServiceProIoTPlatformThingModelInfo_IsNotUniqueKey") + .IsDescending() + .HasDatabaseName("IX_ServiceProIoTPlatformThingModelInfo_IsNotUniqueKey1"); + + b.ToTable("ServiceProDeviceThingModelManagement", null, t => + { + t.HasComment("设备端物模型管理"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.ThingModelInfos.DeviceThingModelPropertyInfo", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("DeviceThingModelId") + .HasColumnType("uuid") + .HasComment("设备端物模型Id"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties") + .HasComment("扩展属性,用于存储自定义字段,JSON格式"); + + b.Property("FiledType") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("物联网平台中对应产品物模型属性或者事件类型"); + + b.Property("IoTPlatform") + .HasColumnType("integer") + .HasComment("物联网平台类型"); + + b.Property("IoTPlatformProductId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("物联网平台中对应的产品Id"); + + b.Property("IoTPlatformRawFieldDataType") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasComment("物联网平台中对应的产品物模型属性或者事件数据类型"); + + b.Property("IoTPlatformRawFieldName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasComment("物联网平台中对应的产品物模型属性或者事件名称"); + + b.Property("IoTPlatformThingModelDataId") + .HasColumnType("uuid") + .HasComment("系统中平台端物模型数据Id"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsValueNeedConvert") + .HasColumnType("boolean") + .HasComment("是否需要值类型转换"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("NativeSkipNumber") + .HasColumnType("integer") + .HasComment("正序跳过数量"); + + b.Property("NativeTakeNumber") + .HasColumnType("integer") + .HasComment("正序获取数量"); + + b.Property("OSACreatorId") + .HasColumnType("integer") + .HasComment("旧系统授权创建者Id"); + + b.Property("OSADeleterId") + .HasColumnType("integer") + .HasComment("旧系统授权最后删除者Id"); + + b.Property("OSALastModifierId") + .HasColumnType("integer") + .HasComment("旧系统授权最后修改者Id"); + + b.Property("ParsingSequence") + .HasColumnType("integer") + .HasComment("解析顺序,1234或者3412(高低反转)"); + + b.Property("Remark") + .HasColumnType("text") + .HasComment("备注"); + + b.Property("ReversalSkipNumber") + .HasColumnType("integer") + .HasComment("反转跳过数量"); + + b.Property("ReversalTakeNumber") + .HasColumnType("integer") + .HasComment("反转获取数量"); + + b.Property("StandardFieldDisplayName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasComment("管理后台产品标准的物模型属性或者事件名称"); + + b.Property("StandardFieldName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasComment("管理后台产品标准的物模型属性或者事件名称"); + + b.Property("StandardFieldValueType") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasComment("标准物模型字段值类型"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId") + .HasComment("租户ID"); + + b.HasKey("Id"); + + b.HasIndex("CreationTime"); + + b.HasIndex("IoTPlatformProductId"); + + b.HasIndex(new[] { "Id", "IoTPlatformProductId", "IoTPlatformRawFieldName", "StandardFieldName", "CreationTime" }, "IX_ServiceProIoTPlatformThingModelInfo_IsNotUniqueKey") + .IsDescending() + .HasDatabaseName("IX_ServiceProIoTPlatformThingModelInfo_IsNotUniqueKey2"); + + b.ToTable("ServiceProDeviceThingModelPropertylInfo", null, t => + { + t.HasComment("设备端物模型属性信息,是指设备端支持的属性或者事件"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.ThingModelInfos.IoTPlatformThingModelInfo", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AccessMode") + .IsRequired() + .ValueGeneratedOnAdd() + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasDefaultValue("r") + .HasComment("物模型标识符访问模式"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties") + .HasComment("扩展属性,用于存储自定义字段,JSON格式"); + + b.Property("FiledType") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("物联网平台中对应产品物模型属性或者事件类型"); + + b.Property("IdentifierType") + .HasColumnType("integer") + .HasComment("物模型标识符类型"); + + b.Property("IoTPlatform") + .HasColumnType("integer") + .HasComment("物联网平台类型,默认没有指定"); + + b.Property("IoTPlatformProductId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("物联网平台中对应的产品Id"); + + b.Property("IoTPlatformRawFieldDataType") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasComment("物联网平台中对应的产品物模型属性或者事件数据类型"); + + b.Property("IoTPlatformRawFieldExtension") + .HasColumnType("text") + .HasComment("物联网平台中对应产品物模型标识符扩展,结构体或者数组的时候,是参数的名称与长度的键值对,其他类型就是长度或者值范围"); + + b.Property("IoTPlatformRawFieldName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasComment("物联网平台中对应的产品物模型属性或者事件名称"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsOperableIdentifier") + .HasColumnType("boolean") + .HasComment("是否可操作物模型标识符"); + + b.Property("IsSpecialIdentifier") + .HasColumnType("boolean") + .HasComment("是否是特殊物模型标识符"); + + b.Property("IsValueNeedConvert") + .HasColumnType("boolean") + .HasComment("是否需要值类型转换"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("OSACreatorId") + .HasColumnType("integer") + .HasComment("旧系统授权创建者Id"); + + b.Property("OSADeleterId") + .HasColumnType("integer") + .HasComment("旧系统授权最后删除者Id"); + + b.Property("OSALastModifierId") + .HasColumnType("integer") + .HasComment("旧系统授权最后修改者Id"); + + b.Property("Remark") + .HasColumnType("text") + .HasComment("备注"); + + b.Property("StandardFieldDisplayName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasComment("管理后台产品标准的物模型属性或者事件名称"); + + b.Property("StandardFieldName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasComment("管理后台产品标准的物模型属性或者事件名称"); + + b.Property("StandardFieldValueType") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasComment("标准物模型字段值类型"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId") + .HasComment("租户ID"); + + b.HasKey("Id"); + + b.HasIndex("CreationTime"); + + b.HasIndex("IoTPlatformProductId"); + + b.HasIndex(new[] { "Id", "IoTPlatformProductId", "IoTPlatformRawFieldName", "StandardFieldName", "CreationTime" }, "IX_ServiceProIoTPlatformThingModelInfo_IsNotUniqueKey") + .IsDescending() + .HasDatabaseName("IX_ServiceProIoTPlatformThingModelInfo_IsNotUniqueKey3"); + + b.ToTable("ServiceProIoTPlatformThingModelInfo", null, t => + { + t.HasComment("平台端物模型信息"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.DynamicMenuManagement.Menus.Menu", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Component") + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasComment("组件地址"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("DisplayTitle") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("标准多语言"); + + b.Property("Enabled") + .HasColumnType("boolean"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("HideInMenu") + .HasColumnType("boolean") + .HasComment("是否显示"); + + b.Property("Icon") + .HasColumnType("text") + .HasComment("图标"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KeepAlive") + .HasColumnType("boolean") + .HasComment("是否缓存"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MenuType") + .HasColumnType("integer") + .HasComment("菜单类型"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("唯一编码"); + + b.Property("OpenType") + .HasColumnType("integer") + .HasComment("打开类型"); + + b.Property("Order") + .HasColumnType("integer") + .HasComment("排序"); + + b.Property("ParentId") + .HasColumnType("uuid"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasComment("路由/接口地址"); + + b.Property("Policy") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("授权策略名称"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("标题"); + + b.Property("Url") + .HasColumnType("text") + .HasComment("内外链地址"); + + b.HasKey("Id"); + + b.HasIndex("CreationTime"); + + b.HasIndex("Name"); + + b.HasIndex(new[] { "Id", "Name", "Path", "MenuType", "CreationTime" }, "IX_Menus_IsNotUniqueKey") + .IsDescending(); + + b.ToTable("ServiceProMenus", null, t => + { + t.HasComment("动态菜单管理"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.FileManagement.Files.FileObject", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContentType") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("文件名称"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("文件名称"); + + b.Property("FileSize") + .HasColumnType("bigint") + .HasComment("文件大小"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Md5Hash") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("文件MD5"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("FileName"); + + b.ToTable("AbpFileObjects", null, t => + { + t.HasComment("文件管理"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.LanguageManagement.LanguageTexts.Aggregates.LanguageText", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CultureName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("语言名称"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasComment("名称"); + + b.Property("ResourceName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("资源名称"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasComment("值"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "ResourceName", "CultureName"); + + b.ToTable("AbpLanguageTexts", null, t => + { + t.HasComment("语言文本管理"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.LanguageManagement.Languages.Aggregates.Language", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CultureName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("语言名称"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("显示名称"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("FlagIcon") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("图标"); + + b.Property("IsDefault") + .HasColumnType("boolean"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsEnabled") + .HasColumnType("boolean"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("UiCultureName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("Ui语言名称"); + + b.HasKey("Id"); + + b.HasIndex("CultureName"); + + b.ToTable("AbpLanguages", null, t => + { + t.HasComment("语言管理"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.NotificationManagement.Notifications.Aggregates.Notification", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MessageLevel") + .HasColumnType("integer"); + + b.Property("MessageType") + .HasColumnType("integer"); + + b.Property("Read") + .HasColumnType("boolean"); + + b.Property("ReadTime") + .HasColumnType("timestamp with time zone"); + + b.Property("ReceiveUserId") + .HasColumnType("uuid"); + + b.Property("ReceiveUserName") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("SenderUserId") + .HasColumnType("uuid"); + + b.Property("SenderUserName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.HasKey("Id"); + + b.ToTable("AbpNotifications", null, t => + { + t.HasComment("消息通知管理"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.NotificationManagement.Notifications.Aggregates.NotificationSubscription", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("NotificationId") + .HasColumnType("uuid"); + + b.Property("Read") + .HasColumnType("boolean"); + + b.Property("ReadTime") + .HasColumnType("timestamp with time zone"); + + b.Property("ReceiveUserId") + .HasColumnType("uuid"); + + b.Property("ReceiveUserName") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("NotificationId"); + + b.HasIndex("ReceiveUserId"); + + b.ToTable("AbpNotificationSubscriptions", null, t => + { + t.HasComment("消息订阅者"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.OneNETManagement.OneNETAccounts.OneNETAccountInfos", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AccountAccesskey") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)") + .HasComment("账户通信密钥,平台可以重置密钥"); + + b.Property("AccountName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("账号名称"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties") + .HasComment("扩展属性,用于存储自定义字段,JSON格式"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("OSACreatorId") + .HasColumnType("integer") + .HasComment("旧系统授权创建者Id"); + + b.Property("OSADeleterId") + .HasColumnType("integer") + .HasComment("旧系统授权最后删除者Id"); + + b.Property("OSALastModifierId") + .HasColumnType("integer") + .HasComment("旧系统授权最后修改者Id"); + + b.Property("OneNETAccountId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("账户Id"); + + b.Property("PhoneNumber") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("手机号码"); + + b.Property("ProductCount") + .HasColumnType("integer") + .HasComment("产品数量"); + + b.Property("Remark") + .HasColumnType("text") + .HasComment("备注"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId") + .HasComment("租户ID"); + + b.HasKey("Id"); + + b.HasIndex("CreationTime"); + + b.HasIndex(new[] { "Id", "OneNETAccountId", "AccountName", "PhoneNumber", "CreationTime" }, "IX_ServiceProOneNETAccountInfo_IsNotUniqueKey") + .IsDescending(); + + b.ToTable("ServiceProOneNETAccountInfo", null, t => + { + t.HasComment("OneNET账号管理"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.OneNETManagement.OneNETProducts.OneNETProductInfos", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AccessProtocol") + .HasColumnType("integer") + .HasComment("接入协议"); + + b.Property("AccountPhoneNumber") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("账户手机号"); + + b.Property("Brand") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasComment("产品品牌"); + + b.Property("CommunicationAddress") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasComment("通讯服务地址"); + + b.Property("CommunicationAddressTLS") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasComment("TLS通讯服务地址"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DataProtocol") + .HasColumnType("integer") + .HasComment("数据协议"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties") + .HasComment("扩展属性,用于存储自定义字段,JSON格式"); + + b.Property("IoTPlatformProductId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("物联网平台对应的产品Id"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsEnabled") + .HasColumnType("boolean"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Manufacturer") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasComment("产品厂商"); + + b.Property("Model") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasComment("产品型号"); + + b.Property("Network") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasComment("联网方式"); + + b.Property("NodeType") + .HasColumnType("integer") + .HasComment("节点类型"); + + b.Property("NotActiveDeviceCount") + .HasColumnType("integer") + .HasComment("未激活设备数"); + + b.Property("OSACreatorId") + .HasColumnType("integer") + .HasComment("旧系统授权创建者Id"); + + b.Property("OSADeleterId") + .HasColumnType("integer") + .HasComment("旧系统授权最后删除者Id"); + + b.Property("OSALastModifierId") + .HasColumnType("integer") + .HasComment("旧系统授权最后修改者Id"); + + b.Property("OfflineDeviceCount") + .HasColumnType("integer") + .HasComment("离线设备数"); + + b.Property("OneNETAccountId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("账户Id"); + + b.Property("OnlineDeviceCount") + .HasColumnType("integer") + .HasComment("在线设备总数"); + + b.Property("OwnDeviceCount") + .HasColumnType("integer") + .HasComment("自有设备总数"); + + b.Property("ProductAccesskey") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)") + .HasComment("产品访问密钥"); + + b.Property("ProductCreateTime") + .HasColumnType("timestamp with time zone") + .HasComment("产品创建时间"); + + b.Property("ProductName") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("产品名称"); + + b.Property("ProductUpdateTime") + .HasColumnType("timestamp with time zone") + .HasComment("最近修改时间"); + + b.Property("Remark") + .HasColumnType("text") + .HasComment("备注"); + + b.Property("Status") + .HasColumnType("integer") + .HasComment("开发状态"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId") + .HasComment("租户ID"); + + b.Property("ThingModelFileId") + .HasColumnType("uuid") + .HasComment("物模型文件Id"); + + b.Property("ThingModelFileName") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasComment("物模型文件名称"); + + b.Property("ThingModelInfos") + .HasColumnType("text") + .HasComment("平台物模型信息"); + + b.HasKey("Id"); + + b.HasIndex("CreationTime"); + + b.HasIndex("IoTPlatformProductId") + .IsUnique(); + + b.HasIndex(new[] { "Id", "IoTPlatformProductId", "ProductName", "CreationTime" }, "IX_ServiceProOneNETProductInfo_IsNotUniqueKey") + .IsDescending(); + + b.ToTable("ServiceProOneNETProductInfo", null, t => + { + t.HasComment("OneNET产品管理"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.TemplateManagement.TextTemplates.TextTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("编码"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)") + .HasComment("内容"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CultureName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("语言"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("名称"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code"); + + b.ToTable("ServiceProTextTemplates", null, t => + { + t.HasComment("模板管理"); + }); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("character varying(96)") + .HasColumnName("ApplicationName"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("BrowserInfo"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("ClientId"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("ClientIpAddress"); + + b.Property("ClientName") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("ClientName"); + + b.Property("Comments") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("Comments"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("CorrelationId"); + + b.Property("Exceptions") + .HasColumnType("text"); + + b.Property("ExecutionDuration") + .HasColumnType("integer") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime") + .HasColumnType("timestamp with time zone"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("HttpMethod") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("HttpMethod"); + + b.Property("HttpStatusCode") + .HasColumnType("integer") + .HasColumnName("HttpStatusCode"); + + b.Property("ImpersonatorTenantId") + .HasColumnType("uuid") + .HasColumnName("ImpersonatorTenantId"); + + b.Property("ImpersonatorTenantName") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("ImpersonatorTenantName"); + + b.Property("ImpersonatorUserId") + .HasColumnType("uuid") + .HasColumnName("ImpersonatorUserId"); + + b.Property("ImpersonatorUserName") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("ImpersonatorUserName"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("TenantName"); + + b.Property("Url") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("Url"); + + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("UserId"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "ExecutionTime"); + + b.HasIndex("TenantId", "UserId", "ExecutionTime"); + + b.ToTable("AbpAuditLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AuditLogId") + .HasColumnType("uuid") + .HasColumnName("AuditLogId"); + + b.Property("ExecutionDuration") + .HasColumnType("integer") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("ExecutionTime"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("MethodName") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("MethodName"); + + b.Property("Parameters") + .HasMaxLength(2000) + .HasColumnType("character varying(2000)") + .HasColumnName("Parameters"); + + b.Property("ServiceName") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("ServiceName"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime"); + + b.ToTable("AbpAuditLogActions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogExcelFile", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("FileName") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("FileName"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AbpAuditLogExcelFiles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AuditLogId") + .HasColumnType("uuid") + .HasColumnName("AuditLogId"); + + b.Property("ChangeTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("ChangeTime"); + + b.Property("ChangeType") + .HasColumnType("smallint") + .HasColumnName("ChangeType"); + + b.Property("EntityId") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("EntityId"); + + b.Property("EntityTenantId") + .HasColumnType("uuid"); + + b.Property("EntityTypeFullName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("EntityTypeFullName"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "EntityTypeFullName", "EntityId"); + + b.ToTable("AbpEntityChanges", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("EntityChangeId") + .HasColumnType("uuid"); + + b.Property("NewValue") + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("NewValue"); + + b.Property("OriginalValue") + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("OriginalValue"); + + b.Property("PropertyName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("PropertyName"); + + b.Property("PropertyTypeFullName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("PropertyTypeFullName"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("EntityChangeId"); + + b.ToTable("AbpEntityPropertyChanges", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("character varying(96)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsAbandoned") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false); + + b.Property("JobArgs") + .IsRequired() + .HasMaxLength(1048576) + .HasColumnType("character varying(1048576)"); + + b.Property("JobName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("LastTryTime") + .HasColumnType("timestamp with time zone"); + + b.Property("NextTryTime") + .HasColumnType("timestamp with time zone"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasDefaultValue((byte)15); + + b.Property("TryCount") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasDefaultValue((short)0); + + b.HasKey("Id"); + + b.HasIndex("IsAbandoned", "NextTryTime"); + + b.ToTable("AbpBackgroundJobs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureDefinitionRecord", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AllowedProviders") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("DefaultValue") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("IsAvailableToHost") + .HasColumnType("boolean"); + + b.Property("IsVisibleToClients") + .HasColumnType("boolean"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ValueType") + .HasMaxLength(2048) + .HasColumnType("character varying(2048)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatures", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureGroupDefinitionRecord", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatureGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpFeatureValues", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsStatic") + .HasColumnType("boolean"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("Regex") + .HasMaxLength(512) + .HasColumnType("character varying(512)"); + + b.Property("RegexDescription") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("Required") + .HasColumnType("boolean"); + + b.Property("ValueType") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.ToTable("AbpClaimTypes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("SourceTenantId") + .HasColumnType("uuid"); + + b.Property("SourceUserId") + .HasColumnType("uuid"); + + b.Property("TargetTenantId") + .HasColumnType("uuid"); + + b.Property("TargetUserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") + .IsUnique(); + + b.ToTable("AbpLinkUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("EntityVersion") + .HasColumnType("integer"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDefault") + .HasColumnType("boolean") + .HasColumnName("IsDefault"); + + b.Property("IsPublic") + .HasColumnType("boolean") + .HasColumnName("IsPublic"); + + b.Property("IsStatic") + .HasColumnType("boolean") + .HasColumnName("IsStatic"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("NormalizedName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b.Property("RoleId") + .HasColumnType("uuid"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AbpRoleClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Action") + .HasMaxLength(96) + .HasColumnType("character varying(96)"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("character varying(96)"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("character varying(512)"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("Identity") + .HasMaxLength(96) + .HasColumnType("character varying(96)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Action"); + + b.HasIndex("TenantId", "ApplicationName"); + + b.HasIndex("TenantId", "Identity"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSecurityLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySession", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Device") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("DeviceInfo") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IpAddresses") + .HasMaxLength(2048) + .HasColumnType("character varying(2048)"); + + b.Property("LastAccessed") + .HasColumnType("timestamp with time zone"); + + b.Property("SessionId") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("SignedIn") + .HasColumnType("timestamp with time zone"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("Device"); + + b.HasIndex("SessionId"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSessions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AccessFailedCount") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasDefaultValue(0) + .HasColumnName("AccessFailedCount"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("Email"); + + b.Property("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); + + b.Property("EntityVersion") + .HasColumnType("integer"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsActive") + .HasColumnType("boolean") + .HasColumnName("IsActive"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsExternal") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsExternal"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LastPasswordChangeTime") + .HasColumnType("timestamp with time zone"); + + b.Property("LockoutEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("LockoutEnabled"); + + b.Property("LockoutEnd") + .HasColumnType("timestamp with time zone"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("Name"); + + b.Property("NormalizedEmail") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("NormalizedEmail"); + + b.Property("NormalizedUserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("NormalizedUserName"); + + b.Property("PasswordHash") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("PasswordHash"); + + b.Property("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("PhoneNumber"); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); + + b.Property("SecurityStamp") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("SecurityStamp"); + + b.Property("ShouldChangePasswordOnNextLogin") + .HasColumnType("boolean"); + + b.Property("Surname") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("Surname"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("TwoFactorEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("TwoFactorEnabled"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("Email"); + + b.HasIndex("NormalizedEmail"); + + b.HasIndex("NormalizedUserName"); + + b.HasIndex("UserName"); + + b.ToTable("AbpUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AbpUserClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserDelegation", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("EndTime") + .HasColumnType("timestamp with time zone"); + + b.Property("SourceUserId") + .HasColumnType("uuid"); + + b.Property("StartTime") + .HasColumnType("timestamp with time zone"); + + b.Property("TargetUserId") + .HasColumnType("uuid"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AbpUserDelegations", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ProviderDisplayName") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(196) + .HasColumnType("character varying(196)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "LoginProvider"); + + b.HasIndex("LoginProvider", "ProviderKey"); + + b.ToTable("AbpUserLogins", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("uuid"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "UserId"); + + b.HasIndex("UserId", "OrganizationUnitId"); + + b.ToTable("AbpUserOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("RoleId") + .HasColumnType("uuid"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId", "UserId"); + + b.ToTable("AbpUserRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Name") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("Value") + .HasColumnType("text"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AbpUserTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(95) + .HasColumnType("character varying(95)") + .HasColumnName("Code"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("DisplayName"); + + b.Property("EntityVersion") + .HasColumnType("integer"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("uuid"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code"); + + b.HasIndex("ParentId"); + + b.ToTable("AbpOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("uuid"); + + b.Property("RoleId") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "RoleId"); + + b.HasIndex("RoleId", "OrganizationUnitId"); + + b.ToTable("AbpOrganizationUnitRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("IsEnabled") + .HasColumnType("boolean"); + + b.Property("MultiTenancySide") + .HasColumnType("smallint"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("Providers") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("StateCheckers") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ProviderName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpPermissionGrants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissionGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2048) + .HasColumnType("character varying(2048)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpSettings", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.SettingDefinitionRecord", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("DefaultValue") + .HasMaxLength(2048) + .HasColumnType("character varying(2048)"); + + b.Property("Description") + .HasMaxLength(512) + .HasColumnType("character varying(512)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsEncrypted") + .HasColumnType("boolean"); + + b.Property("IsInherited") + .HasColumnType("boolean"); + + b.Property("IsVisibleToClients") + .HasColumnType("boolean"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("Providers") + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpSettingDefinitions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("EntityVersion") + .HasColumnType("integer"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("NormalizedName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpTenants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + { + b.Property("TenantId") + .HasColumnType("uuid"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b.HasKey("TenantId", "Name"); + + b.ToTable("AbpTenantConnectionStrings", (string)null); + }); + + modelBuilder.Entity("JiShe.ServicePro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionaryDetail", b => + { + b.HasOne("JiShe.ServicePro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionary", null) + .WithMany("Details") + .HasForeignKey("DataDictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => + { + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) + .WithMany("Actions") + .HasForeignKey("AuditLogId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) + .WithMany("EntityChanges") + .HasForeignKey("AuditLogId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => + { + b.HasOne("Volo.Abp.AuditLogging.EntityChange", null) + .WithMany("PropertyChanges") + .HasForeignKey("EntityChangeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany("Claims") + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Claims") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Logins") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("OrganizationUnits") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Roles") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Tokens") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("ParentId"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany("Roles") + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + { + b.HasOne("Volo.Abp.TenantManagement.Tenant", null) + .WithMany("ConnectionStrings") + .HasForeignKey("TenantId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("JiShe.ServicePro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionary", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Navigation("Actions"); + + b.Navigation("EntityChanges"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Navigation("PropertyChanges"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Navigation("Claims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Navigation("Claims"); + + b.Navigation("Logins"); + + b.Navigation("OrganizationUnits"); + + b.Navigation("Roles"); + + b.Navigation("Tokens"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Navigation("Roles"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Navigation("ConnectionStrings"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/JiShe.IoT.EntityFrameworkCore/Migrations/20260128015625_updatedeviceinfo20260128.cs b/src/JiShe.IoT.EntityFrameworkCore/Migrations/20260128015625_updatedeviceinfo20260128.cs new file mode 100644 index 0000000..a76ae8b --- /dev/null +++ b/src/JiShe.IoT.EntityFrameworkCore/Migrations/20260128015625_updatedeviceinfo20260128.cs @@ -0,0 +1,30 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace JiShe.IoT.Migrations +{ + /// + public partial class updatedeviceinfo20260128 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "ReadingMode", + table: "ServiceProDeviceInfo", + type: "integer", + nullable: false, + defaultValue: 1, + comment: "抄读模式"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "ReadingMode", + table: "ServiceProDeviceInfo"); + } + } +} diff --git a/src/JiShe.IoT.EntityFrameworkCore/Migrations/20260128020928_updatedeviceinfo202601281007.Designer.cs b/src/JiShe.IoT.EntityFrameworkCore/Migrations/20260128020928_updatedeviceinfo202601281007.Designer.cs new file mode 100644 index 0000000..8cbae9f --- /dev/null +++ b/src/JiShe.IoT.EntityFrameworkCore/Migrations/20260128020928_updatedeviceinfo202601281007.Designer.cs @@ -0,0 +1,4309 @@ +// +using System; +using JiShe.IoT.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace JiShe.IoT.Migrations +{ + [DbContext(typeof(IoTDbContext))] + [Migration("20260128020928_updatedeviceinfo202601281007")] + partial class updatedeviceinfo202601281007 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.PostgreSql) + .HasAnnotation("ProductVersion", "10.0.2") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + + modelBuilder.Entity("JiShe.ServicePro.BasicManagement.UserRefreshTokens.UserRefreshToken", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExpirationTime") + .HasColumnType("timestamp with time zone") + .HasComment("过期时间"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsUsed") + .HasColumnType("boolean") + .HasComment("是否使用"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("RefreshToken") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("刷新token"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("Token") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)") + .HasComment("Token"); + + b.Property("UserId") + .HasColumnType("uuid") + .HasComment("用户id"); + + b.HasKey("Id"); + + b.HasIndex("RefreshToken"); + + b.ToTable("ServiceProUserRefreshTokens", null, t => + { + t.HasComment("刷新Token"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.CTWingManagement.CTWingAccount.CTWingAccountInfo", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AccountId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("账号ID"); + + b.Property("AccountName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("账号名称"); + + b.Property("AppId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("应用 ID"); + + b.Property("AppKey") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("应用 AppKey"); + + b.Property("AppSecret") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("应用 AppSecret"); + + b.Property("CommunicationAddress") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("通讯服务地址"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties") + .HasComment("扩展属性,用于存储自定义字段,JSON格式"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("OSACreatorId") + .HasColumnType("integer") + .HasComment("旧系统授权创建者Id"); + + b.Property("OSADeleterId") + .HasColumnType("integer") + .HasComment("旧系统授权最后删除者Id"); + + b.Property("OSALastModifierId") + .HasColumnType("integer") + .HasComment("旧系统授权最后修改者Id"); + + b.Property("PhoneNumber") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("手机号码"); + + b.Property("PlatformTenantId") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("平台租户ID"); + + b.Property("ProductCount") + .HasColumnType("integer"); + + b.Property("Remark") + .HasColumnType("text") + .HasComment("备注"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId") + .HasComment("租户ID"); + + b.HasKey("Id"); + + b.HasIndex("CreationTime"); + + b.HasIndex(new[] { "Id", "AccountId", "AccountName", "CreationTime" }, "IX_ServiceProCTWingAccountInfo_IsNotUniqueKey") + .IsDescending(); + + b.ToTable("ServiceProCTWingAccountInfo", null, t => + { + t.HasComment("CTWing账号信息"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.CTWingManagement.CTWingProduct.CTWingPrivateProductInfo", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AccessType") + .HasColumnType("integer"); + + b.Property("AccountPhoneNumber") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("账户手机号"); + + b.Property("AuthType") + .HasColumnType("integer"); + + b.Property("CTWingAccountId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("账号ID"); + + b.Property("CommunicationAddress") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("通讯服务地址"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DataEncryption") + .HasColumnType("integer"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("DeviceCount") + .HasColumnType("integer"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties") + .HasComment("扩展属性,用于存储自定义字段,JSON格式"); + + b.Property("FeatureAccesskey") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasComment("设备访问密钥"); + + b.Property("IoTPlatformProductId") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("产品ID"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsEnabled") + .HasColumnType("boolean") + .HasComment("是否启用"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MasterKey") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasComment("OpenAPI 通信主密钥"); + + b.Property("NetworkType") + .HasColumnType("integer"); + + b.Property("NodeType") + .HasColumnType("integer"); + + b.Property("OSACreatorId") + .HasColumnType("integer") + .HasComment("旧系统授权创建者Id"); + + b.Property("OSADeleterId") + .HasColumnType("integer") + .HasComment("旧系统授权最后删除者Id"); + + b.Property("OSALastModifierId") + .HasColumnType("integer") + .HasComment("旧系统授权最后修改者Id"); + + b.Property("ProductDesc") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("必填,产品描述"); + + b.Property("ProductName") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("产品名称"); + + b.Property("ProductProtocol") + .HasColumnType("integer"); + + b.Property("ProductType") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("一级分类名"); + + b.Property("Protocol") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasComment("通讯协议"); + + b.Property("Remark") + .HasColumnType("text") + .HasComment("备注"); + + b.Property("SecondaryType") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("二级分类名"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId") + .HasComment("租户ID"); + + b.Property("ThingModelFileId") + .HasColumnType("uuid") + .HasComment("物模型文件Id"); + + b.Property("ThingModelFileName") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasComment("物模型文件名称"); + + b.Property("ThirdType") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("三级分类名"); + + b.Property("TupDeviceModel") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("设备型号"); + + b.Property("TupIsThrough") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.HasIndex("CreationTime"); + + b.HasIndex(new[] { "Id", "IoTPlatformProductId", "ProductName", "CreationTime" }, "IX_ServiceProCTWingPrivateProductInfo_IsNotUniqueKey") + .IsDescending(); + + b.ToTable("ServiceProCTWingPrivateProductInfo", null, t => + { + t.HasComment("CTWing产品信息"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionary", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b.Property("DisplayText") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AbpDataDictionaries", null, t => + { + t.HasComment("数据字典"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionaryDetail", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DataDictionaryId") + .HasColumnType("uuid"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b.Property("DisplayText") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ExtendedAttribute") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("IsEnabled") + .HasColumnType("boolean"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Order") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.HasIndex("DataDictionaryId"); + + b.ToTable("AbpDataDictionaryDetails", null, t => + { + t.HasComment("数据字典详情"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.DeviceInfos.DeviceFirmwareInfo", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties") + .HasComment("扩展属性,用于存储自定义字段,JSON格式"); + + b.Property("FirmwareFileId") + .HasColumnType("uuid") + .HasComment("固件文件Id"); + + b.Property("FirmwareFileName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasComment("固件文件名称"); + + b.Property("FirmwareHashCode") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasComment("固件哈希值"); + + b.Property("FirmwareLength") + .HasColumnType("bigint"); + + b.Property("FirmwareVersion") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("固件版本"); + + b.Property("IoTPlatform") + .HasColumnType("integer") + .HasComment("物联网平台类型"); + + b.Property("IoTPlatformProductId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("物联网平台中对应的产品Id"); + + b.Property("IoTPlatformProductName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasComment("物联网平台中对应的产品名称"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsEnable") + .HasColumnType("boolean") + .HasComment("是否启用"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("OSACreatorId") + .HasColumnType("integer") + .HasComment("旧系统授权创建者Id"); + + b.Property("OSADeleterId") + .HasColumnType("integer") + .HasComment("旧系统授权最后删除者Id"); + + b.Property("OSALastModifierId") + .HasColumnType("integer") + .HasComment("旧系统授权最后修改者Id"); + + b.Property("Remark") + .HasColumnType("text") + .HasComment("备注"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId") + .HasComment("租户ID"); + + b.HasKey("Id"); + + b.HasIndex("CreationTime"); + + b.HasIndex("IoTPlatformProductId"); + + b.HasIndex(new[] { "Id", "IoTPlatformProductId", "FirmwareVersion", "CreationTime" }, "IX_ServiceProDeviceFirmwareInfo_IsNotUniqueKey") + .IsDescending(); + + b.ToTable("ServiceProDeviceFirmwareInfo", null, t => + { + t.HasComment("设备固件信息"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.DeviceInfos.DeviceManagementInfo", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AccountPhoneNumber") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("账户手机号"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("DeviceAddress") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasComment("设备地址"); + + b.Property("DeviceName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("设备名称"); + + b.Property("DeviceOnlineStatus") + .HasColumnType("integer") + .HasComment("设备在线状态"); + + b.Property("DeviceSource") + .HasColumnType("integer") + .HasComment("设备来源类型"); + + b.Property("DeviceThingModelDataId") + .HasColumnType("uuid") + .HasComment("设备物模型数据Id"); + + b.Property("DeviceType") + .HasColumnType("integer") + .HasComment("设备类型,与业务系统无关,主要区分是网关设备、直连设备"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties") + .HasComment("扩展属性,用于存储自定义字段,JSON格式"); + + b.Property("FirmwareVersion") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("固件版本"); + + b.Property("IoTPlatform") + .HasColumnType("integer") + .HasComment("物联网平台类型,默认没有指定"); + + b.Property("IoTPlatformAccountId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("物联网平台中对应的账号Id"); + + b.Property("IoTPlatformDeviceOpenInfo") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("物联网平台中对应的设备Id或者名称"); + + b.Property("IoTPlatformProductId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("物联网平台中对应的产品Id"); + + b.Property("IoTPlatformProductName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("物联网平台中对应的产品Name"); + + b.Property("IoTPlatformResponse") + .HasColumnType("text") + .HasComment("物联网平台返回的响应信息"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsNeedConfigDeviceModel") + .HasColumnType("boolean") + .HasComment("是否需要配置设备模型"); + + b.Property("IsPlatformPushSuccess") + .HasColumnType("boolean") + .HasComment("物联网平台推送是否成功"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LastOfflineTime") + .HasColumnType("timestamp with time zone") + .HasComment("最后离线时间"); + + b.Property("LastOnlineTime") + .HasColumnType("timestamp with time zone") + .HasComment("最后在线时间"); + + b.Property("OSACreatorId") + .HasColumnType("integer") + .HasComment("旧系统授权创建者Id"); + + b.Property("OSADeleterId") + .HasColumnType("integer") + .HasComment("旧系统授权最后删除者Id"); + + b.Property("OSALastModifierId") + .HasColumnType("integer") + .HasComment("旧系统授权最后修改者Id"); + + b.Property("PlatformPassword") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("物联网平台设备密码"); + + b.Property("ReadingMode") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasDefaultValue(1) + .HasComment("抄读模式"); + + b.Property("Remark") + .HasColumnType("text") + .HasComment("备注"); + + b.Property("SubDeviceCapacity") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasDefaultValue(64) + .HasComment("子设备容量"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId") + .HasComment("租户ID"); + + b.Property("UpgradeDate") + .HasColumnType("timestamp with time zone") + .HasComment("升级日期"); + + b.HasKey("Id"); + + b.HasIndex("CreationTime"); + + b.HasIndex("DeviceAddress"); + + b.HasIndex(new[] { "Id", "DeviceName", "DeviceAddress", "IoTPlatformProductId", "CreationTime" }, "IX_ServiceProDeviceInfo_IsNotUniqueKey") + .IsDescending(); + + b.ToTable("ServiceProDeviceInfo", null, t => + { + t.HasComment("设备信息"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.DeviceInfos.DeviceUpgradeRecord", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("DeviceAddress") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("设备地址"); + + b.Property("DeviceDataId") + .HasColumnType("uuid") + .HasComment("设备数据Id"); + + b.Property("DeviceName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("设备名称"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties") + .HasComment("扩展属性,用于存储自定义字段,JSON格式"); + + b.Property("FirmwareSignature") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("签名校验值"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("NowFirmwareVersion") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("当前固件版本"); + + b.Property("OSACreatorId") + .HasColumnType("integer") + .HasComment("旧系统授权创建者Id"); + + b.Property("OSADeleterId") + .HasColumnType("integer") + .HasComment("旧系统授权最后删除者Id"); + + b.Property("OSALastModifierId") + .HasColumnType("integer") + .HasComment("旧系统授权最后修改者Id"); + + b.Property("OldFirmwareVersion") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("旧的固件版本"); + + b.Property("Remark") + .HasColumnType("text") + .HasComment("备注"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId") + .HasComment("租户ID"); + + b.Property("UpgradeDate") + .HasColumnType("timestamp with time zone") + .HasComment("升级日期"); + + b.Property("UpgradeDescription") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasComment("升级描述"); + + b.Property("UpgradeIdentifier") + .HasColumnType("bigint") + .HasComment("升级标识符号"); + + b.Property("UpgradeMessage") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasComment("升级信息"); + + b.Property("UpgradeResult") + .HasColumnType("integer") + .HasComment("升级结果"); + + b.Property("UpgradeSource") + .HasColumnType("integer") + .HasComment("升级来源"); + + b.Property("UpgradeStatus") + .HasColumnType("integer") + .HasComment("升级状态"); + + b.HasKey("Id"); + + b.HasIndex("CreationTime"); + + b.HasIndex("DeviceAddress"); + + b.HasIndex("UpgradeIdentifier") + .IsUnique(); + + b.HasIndex(new[] { "Id", "DeviceAddress", "UpgradeIdentifier", "NowFirmwareVersion", "CreationTime" }, "IX_ServiceProDeviceUpgradeRecord_IsNotUniqueKey") + .IsDescending(); + + b.ToTable("ServiceProDeviceUpgradeRecord", null, t => + { + t.HasComment("设备升级记录"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.DeviceInfos.SubDeviceManagementInfo", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("DeviceAddress") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasComment("网关设备或直连设备地址"); + + b.Property("DeviceDataId") + .HasColumnType("uuid") + .HasComment("网关设备或直连设备数据Id"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties") + .HasComment("扩展属性,用于存储自定义字段,JSON格式"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsSynced") + .HasColumnType("boolean") + .HasComment("是否同步"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("OSACreatorId") + .HasColumnType("integer") + .HasComment("旧系统授权创建者Id"); + + b.Property("OSADeleterId") + .HasColumnType("integer") + .HasComment("旧系统授权最后删除者Id"); + + b.Property("OSALastModifierId") + .HasColumnType("integer") + .HasComment("旧系统授权最后修改者Id"); + + b.Property("Remark") + .HasColumnType("text") + .HasComment("备注"); + + b.Property("SubDeviceAddress") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasComment("子设备地址"); + + b.Property("SubDeviceBrandCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("子设备品牌编码"); + + b.Property("SubDeviceIndex") + .HasColumnType("integer") + .HasComment("子设备索引,抑或是主设备下唯一标识符、计量代码"); + + b.Property("SubDeviceName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("子设备名称"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId") + .HasComment("租户ID"); + + b.HasKey("Id"); + + b.HasIndex("CreationTime"); + + b.HasIndex("DeviceAddress"); + + b.HasIndex("SubDeviceAddress"); + + b.HasIndex("SubDeviceIndex"); + + b.HasIndex(new[] { "Id", "DeviceAddress", "SubDeviceIndex", "SubDeviceAddress", "CreationTime" }, "IX_ServiceProSubDeviceManagementInfo_IsNotUniqueKey") + .IsDescending(); + + b.ToTable("ServiceProSubDeviceManagementInfo", null, t => + { + t.HasComment("子设备信息,需要下发配置的网关设备才用到"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.ThingModelInfos.DeviceThingModelCommandInfo", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CommandName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasComment("指令名称"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("DeviceThingModelId") + .HasColumnType("uuid") + .HasComment("设备端物模型Id"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties") + .HasComment("扩展属性,用于存储自定义字段,JSON格式"); + + b.Property("IoTPlatform") + .HasColumnType("integer") + .HasComment("物联网平台类型"); + + b.Property("IoTPlatformProductId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("物联网平台中对应的产品Id"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsEnable") + .HasColumnType("boolean") + .HasComment("是否启用"); + + b.Property("IssueCommand") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasComment("完整的单个下发指令"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("OSACreatorId") + .HasColumnType("integer") + .HasComment("旧系统授权创建者Id"); + + b.Property("OSADeleterId") + .HasColumnType("integer") + .HasComment("旧系统授权最后删除者Id"); + + b.Property("OSALastModifierId") + .HasColumnType("integer") + .HasComment("旧系统授权最后修改者Id"); + + b.Property("PropertyArray") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)") + .HasComment("指令设备端物模型的属性名称集合,JSON格式字符串数组"); + + b.Property("Remark") + .HasColumnType("text") + .HasComment("备注"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId") + .HasComment("租户ID"); + + b.HasKey("Id"); + + b.HasIndex("CreationTime"); + + b.HasIndex("DeviceThingModelId"); + + b.HasIndex(new[] { "Id", "DeviceThingModelId", "IoTPlatformProductId", "CreationTime" }, "IX_ServiceProIoTPlatformThingModelInfo_IsNotUniqueKey") + .IsDescending(); + + b.ToTable("ServiceProDeviceThingModelCommandInfo", null, t => + { + t.HasComment("设备端透传指令详情"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.ThingModelInfos.DeviceThingModelManagement", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("DeviceModelName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("设备端物模型名称"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties") + .HasComment("扩展属性,用于存储自定义字段,JSON格式"); + + b.Property("FunctionAnalysisFlag") + .HasColumnType("boolean") + .HasComment("函数解析标记,默认为false, 不能解析"); + + b.Property("FunctionScript") + .HasColumnType("text") + .HasComment("脚本函数体"); + + b.Property("IoTPlatform") + .HasColumnType("integer") + .HasComment("物联网平台类型,默认没有指定"); + + b.Property("IoTPlatformProductId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("物联网平台中对应的产品Id"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("OSACreatorId") + .HasColumnType("integer") + .HasComment("旧系统授权创建者Id"); + + b.Property("OSADeleterId") + .HasColumnType("integer") + .HasComment("旧系统授权最后删除者Id"); + + b.Property("OSALastModifierId") + .HasColumnType("integer") + .HasComment("旧系统授权最后修改者Id"); + + b.Property("Remark") + .HasColumnType("text") + .HasComment("备注"); + + b.Property("ScriptName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasComment("脚本函数名称"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId") + .HasComment("租户ID"); + + b.HasKey("Id"); + + b.HasIndex("CreationTime"); + + b.HasIndex("IoTPlatformProductId"); + + b.HasIndex(new[] { "Id", "DeviceModelName", "IoTPlatformProductId", "CreationTime" }, "IX_ServiceProIoTPlatformThingModelInfo_IsNotUniqueKey") + .IsDescending() + .HasDatabaseName("IX_ServiceProIoTPlatformThingModelInfo_IsNotUniqueKey1"); + + b.ToTable("ServiceProDeviceThingModelManagement", null, t => + { + t.HasComment("设备端物模型管理"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.ThingModelInfos.DeviceThingModelPropertyInfo", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("DeviceThingModelId") + .HasColumnType("uuid") + .HasComment("设备端物模型Id"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties") + .HasComment("扩展属性,用于存储自定义字段,JSON格式"); + + b.Property("FiledType") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("物联网平台中对应产品物模型属性或者事件类型"); + + b.Property("IoTPlatform") + .HasColumnType("integer") + .HasComment("物联网平台类型"); + + b.Property("IoTPlatformProductId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("物联网平台中对应的产品Id"); + + b.Property("IoTPlatformRawFieldDataType") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasComment("物联网平台中对应的产品物模型属性或者事件数据类型"); + + b.Property("IoTPlatformRawFieldName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasComment("物联网平台中对应的产品物模型属性或者事件名称"); + + b.Property("IoTPlatformThingModelDataId") + .HasColumnType("uuid") + .HasComment("系统中平台端物模型数据Id"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsValueNeedConvert") + .HasColumnType("boolean") + .HasComment("是否需要值类型转换"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("NativeSkipNumber") + .HasColumnType("integer") + .HasComment("正序跳过数量"); + + b.Property("NativeTakeNumber") + .HasColumnType("integer") + .HasComment("正序获取数量"); + + b.Property("OSACreatorId") + .HasColumnType("integer") + .HasComment("旧系统授权创建者Id"); + + b.Property("OSADeleterId") + .HasColumnType("integer") + .HasComment("旧系统授权最后删除者Id"); + + b.Property("OSALastModifierId") + .HasColumnType("integer") + .HasComment("旧系统授权最后修改者Id"); + + b.Property("ParsingSequence") + .HasColumnType("integer") + .HasComment("解析顺序,1234或者3412(高低反转)"); + + b.Property("Remark") + .HasColumnType("text") + .HasComment("备注"); + + b.Property("ReversalSkipNumber") + .HasColumnType("integer") + .HasComment("反转跳过数量"); + + b.Property("ReversalTakeNumber") + .HasColumnType("integer") + .HasComment("反转获取数量"); + + b.Property("StandardFieldDisplayName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasComment("管理后台产品标准的物模型属性或者事件名称"); + + b.Property("StandardFieldName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasComment("管理后台产品标准的物模型属性或者事件名称"); + + b.Property("StandardFieldValueType") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasComment("标准物模型字段值类型"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId") + .HasComment("租户ID"); + + b.HasKey("Id"); + + b.HasIndex("CreationTime"); + + b.HasIndex("IoTPlatformProductId"); + + b.HasIndex(new[] { "Id", "IoTPlatformProductId", "IoTPlatformRawFieldName", "StandardFieldName", "CreationTime" }, "IX_ServiceProIoTPlatformThingModelInfo_IsNotUniqueKey") + .IsDescending() + .HasDatabaseName("IX_ServiceProIoTPlatformThingModelInfo_IsNotUniqueKey2"); + + b.ToTable("ServiceProDeviceThingModelPropertylInfo", null, t => + { + t.HasComment("设备端物模型属性信息,是指设备端支持的属性或者事件"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.ThingModelInfos.IoTPlatformThingModelInfo", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AccessMode") + .IsRequired() + .ValueGeneratedOnAdd() + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasDefaultValue("r") + .HasComment("物模型标识符访问模式"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties") + .HasComment("扩展属性,用于存储自定义字段,JSON格式"); + + b.Property("FiledType") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("物联网平台中对应产品物模型属性或者事件类型"); + + b.Property("IdentifierType") + .HasColumnType("integer") + .HasComment("物模型标识符类型"); + + b.Property("IoTPlatform") + .HasColumnType("integer") + .HasComment("物联网平台类型,默认没有指定"); + + b.Property("IoTPlatformProductId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("物联网平台中对应的产品Id"); + + b.Property("IoTPlatformRawFieldDataType") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasComment("物联网平台中对应的产品物模型属性或者事件数据类型"); + + b.Property("IoTPlatformRawFieldExtension") + .HasColumnType("text") + .HasComment("物联网平台中对应产品物模型标识符扩展,结构体或者数组的时候,是参数的名称与长度的键值对,其他类型就是长度或者值范围"); + + b.Property("IoTPlatformRawFieldName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasComment("物联网平台中对应的产品物模型属性或者事件名称"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsOperableIdentifier") + .HasColumnType("boolean") + .HasComment("是否可操作物模型标识符"); + + b.Property("IsSpecialIdentifier") + .HasColumnType("boolean") + .HasComment("是否是特殊物模型标识符"); + + b.Property("IsValueNeedConvert") + .HasColumnType("boolean") + .HasComment("是否需要值类型转换"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("OSACreatorId") + .HasColumnType("integer") + .HasComment("旧系统授权创建者Id"); + + b.Property("OSADeleterId") + .HasColumnType("integer") + .HasComment("旧系统授权最后删除者Id"); + + b.Property("OSALastModifierId") + .HasColumnType("integer") + .HasComment("旧系统授权最后修改者Id"); + + b.Property("Remark") + .HasColumnType("text") + .HasComment("备注"); + + b.Property("StandardFieldDisplayName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasComment("管理后台产品标准的物模型属性或者事件名称"); + + b.Property("StandardFieldName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasComment("管理后台产品标准的物模型属性或者事件名称"); + + b.Property("StandardFieldValueType") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasComment("标准物模型字段值类型"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId") + .HasComment("租户ID"); + + b.HasKey("Id"); + + b.HasIndex("CreationTime"); + + b.HasIndex("IoTPlatformProductId"); + + b.HasIndex(new[] { "Id", "IoTPlatformProductId", "IoTPlatformRawFieldName", "StandardFieldName", "CreationTime" }, "IX_ServiceProIoTPlatformThingModelInfo_IsNotUniqueKey") + .IsDescending() + .HasDatabaseName("IX_ServiceProIoTPlatformThingModelInfo_IsNotUniqueKey3"); + + b.ToTable("ServiceProIoTPlatformThingModelInfo", null, t => + { + t.HasComment("平台端物模型信息"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.DynamicMenuManagement.Menus.Menu", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Component") + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasComment("组件地址"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("DisplayTitle") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("标准多语言"); + + b.Property("Enabled") + .HasColumnType("boolean"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("HideInMenu") + .HasColumnType("boolean") + .HasComment("是否显示"); + + b.Property("Icon") + .HasColumnType("text") + .HasComment("图标"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KeepAlive") + .HasColumnType("boolean") + .HasComment("是否缓存"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MenuType") + .HasColumnType("integer") + .HasComment("菜单类型"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("唯一编码"); + + b.Property("OpenType") + .HasColumnType("integer") + .HasComment("打开类型"); + + b.Property("Order") + .HasColumnType("integer") + .HasComment("排序"); + + b.Property("ParentId") + .HasColumnType("uuid"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasComment("路由/接口地址"); + + b.Property("Policy") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("授权策略名称"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("标题"); + + b.Property("Url") + .HasColumnType("text") + .HasComment("内外链地址"); + + b.HasKey("Id"); + + b.HasIndex("CreationTime"); + + b.HasIndex("Name"); + + b.HasIndex(new[] { "Id", "Name", "Path", "MenuType", "CreationTime" }, "IX_Menus_IsNotUniqueKey") + .IsDescending(); + + b.ToTable("ServiceProMenus", null, t => + { + t.HasComment("动态菜单管理"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.FileManagement.Files.FileObject", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContentType") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("文件名称"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("文件名称"); + + b.Property("FileSize") + .HasColumnType("bigint") + .HasComment("文件大小"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Md5Hash") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("文件MD5"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("FileName"); + + b.ToTable("AbpFileObjects", null, t => + { + t.HasComment("文件管理"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.LanguageManagement.LanguageTexts.Aggregates.LanguageText", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CultureName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("语言名称"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasComment("名称"); + + b.Property("ResourceName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("资源名称"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasComment("值"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "ResourceName", "CultureName"); + + b.ToTable("AbpLanguageTexts", null, t => + { + t.HasComment("语言文本管理"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.LanguageManagement.Languages.Aggregates.Language", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CultureName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("语言名称"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("显示名称"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("FlagIcon") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("图标"); + + b.Property("IsDefault") + .HasColumnType("boolean"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsEnabled") + .HasColumnType("boolean"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("UiCultureName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("Ui语言名称"); + + b.HasKey("Id"); + + b.HasIndex("CultureName"); + + b.ToTable("AbpLanguages", null, t => + { + t.HasComment("语言管理"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.NotificationManagement.Notifications.Aggregates.Notification", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MessageLevel") + .HasColumnType("integer"); + + b.Property("MessageType") + .HasColumnType("integer"); + + b.Property("Read") + .HasColumnType("boolean"); + + b.Property("ReadTime") + .HasColumnType("timestamp with time zone"); + + b.Property("ReceiveUserId") + .HasColumnType("uuid"); + + b.Property("ReceiveUserName") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("SenderUserId") + .HasColumnType("uuid"); + + b.Property("SenderUserName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.HasKey("Id"); + + b.ToTable("AbpNotifications", null, t => + { + t.HasComment("消息通知管理"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.NotificationManagement.Notifications.Aggregates.NotificationSubscription", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("NotificationId") + .HasColumnType("uuid"); + + b.Property("Read") + .HasColumnType("boolean"); + + b.Property("ReadTime") + .HasColumnType("timestamp with time zone"); + + b.Property("ReceiveUserId") + .HasColumnType("uuid"); + + b.Property("ReceiveUserName") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("NotificationId"); + + b.HasIndex("ReceiveUserId"); + + b.ToTable("AbpNotificationSubscriptions", null, t => + { + t.HasComment("消息订阅者"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.OneNETManagement.OneNETAccounts.OneNETAccountInfos", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AccountAccesskey") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)") + .HasComment("账户通信密钥,平台可以重置密钥"); + + b.Property("AccountName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("账号名称"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties") + .HasComment("扩展属性,用于存储自定义字段,JSON格式"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("OSACreatorId") + .HasColumnType("integer") + .HasComment("旧系统授权创建者Id"); + + b.Property("OSADeleterId") + .HasColumnType("integer") + .HasComment("旧系统授权最后删除者Id"); + + b.Property("OSALastModifierId") + .HasColumnType("integer") + .HasComment("旧系统授权最后修改者Id"); + + b.Property("OneNETAccountId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("账户Id"); + + b.Property("PhoneNumber") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("手机号码"); + + b.Property("ProductCount") + .HasColumnType("integer") + .HasComment("产品数量"); + + b.Property("Remark") + .HasColumnType("text") + .HasComment("备注"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId") + .HasComment("租户ID"); + + b.HasKey("Id"); + + b.HasIndex("CreationTime"); + + b.HasIndex(new[] { "Id", "OneNETAccountId", "AccountName", "PhoneNumber", "CreationTime" }, "IX_ServiceProOneNETAccountInfo_IsNotUniqueKey") + .IsDescending(); + + b.ToTable("ServiceProOneNETAccountInfo", null, t => + { + t.HasComment("OneNET账号管理"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.OneNETManagement.OneNETProducts.OneNETProductInfos", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AccessProtocol") + .HasColumnType("integer") + .HasComment("接入协议"); + + b.Property("AccountPhoneNumber") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("账户手机号"); + + b.Property("Brand") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasComment("产品品牌"); + + b.Property("CommunicationAddress") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasComment("通讯服务地址"); + + b.Property("CommunicationAddressTLS") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasComment("TLS通讯服务地址"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DataProtocol") + .HasColumnType("integer") + .HasComment("数据协议"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties") + .HasComment("扩展属性,用于存储自定义字段,JSON格式"); + + b.Property("IoTPlatformProductId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("物联网平台对应的产品Id"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsEnabled") + .HasColumnType("boolean"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Manufacturer") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasComment("产品厂商"); + + b.Property("Model") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasComment("产品型号"); + + b.Property("Network") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasComment("联网方式"); + + b.Property("NodeType") + .HasColumnType("integer") + .HasComment("节点类型"); + + b.Property("NotActiveDeviceCount") + .HasColumnType("integer") + .HasComment("未激活设备数"); + + b.Property("OSACreatorId") + .HasColumnType("integer") + .HasComment("旧系统授权创建者Id"); + + b.Property("OSADeleterId") + .HasColumnType("integer") + .HasComment("旧系统授权最后删除者Id"); + + b.Property("OSALastModifierId") + .HasColumnType("integer") + .HasComment("旧系统授权最后修改者Id"); + + b.Property("OfflineDeviceCount") + .HasColumnType("integer") + .HasComment("离线设备数"); + + b.Property("OneNETAccountId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("账户Id"); + + b.Property("OnlineDeviceCount") + .HasColumnType("integer") + .HasComment("在线设备总数"); + + b.Property("OwnDeviceCount") + .HasColumnType("integer") + .HasComment("自有设备总数"); + + b.Property("ProductAccesskey") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)") + .HasComment("产品访问密钥"); + + b.Property("ProductCreateTime") + .HasColumnType("timestamp with time zone") + .HasComment("产品创建时间"); + + b.Property("ProductName") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("产品名称"); + + b.Property("ProductUpdateTime") + .HasColumnType("timestamp with time zone") + .HasComment("最近修改时间"); + + b.Property("Remark") + .HasColumnType("text") + .HasComment("备注"); + + b.Property("Status") + .HasColumnType("integer") + .HasComment("开发状态"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId") + .HasComment("租户ID"); + + b.Property("ThingModelFileId") + .HasColumnType("uuid") + .HasComment("物模型文件Id"); + + b.Property("ThingModelFileName") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasComment("物模型文件名称"); + + b.Property("ThingModelInfos") + .HasColumnType("text") + .HasComment("平台物模型信息"); + + b.HasKey("Id"); + + b.HasIndex("CreationTime"); + + b.HasIndex("IoTPlatformProductId") + .IsUnique(); + + b.HasIndex(new[] { "Id", "IoTPlatformProductId", "ProductName", "CreationTime" }, "IX_ServiceProOneNETProductInfo_IsNotUniqueKey") + .IsDescending(); + + b.ToTable("ServiceProOneNETProductInfo", null, t => + { + t.HasComment("OneNET产品管理"); + }); + }); + + modelBuilder.Entity("JiShe.ServicePro.TemplateManagement.TextTemplates.TextTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("编码"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)") + .HasComment("内容"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CultureName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("语言"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("名称"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code"); + + b.ToTable("ServiceProTextTemplates", null, t => + { + t.HasComment("模板管理"); + }); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("character varying(96)") + .HasColumnName("ApplicationName"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("BrowserInfo"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("ClientId"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("ClientIpAddress"); + + b.Property("ClientName") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("ClientName"); + + b.Property("Comments") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("Comments"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("CorrelationId"); + + b.Property("Exceptions") + .HasColumnType("text"); + + b.Property("ExecutionDuration") + .HasColumnType("integer") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime") + .HasColumnType("timestamp with time zone"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("HttpMethod") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("HttpMethod"); + + b.Property("HttpStatusCode") + .HasColumnType("integer") + .HasColumnName("HttpStatusCode"); + + b.Property("ImpersonatorTenantId") + .HasColumnType("uuid") + .HasColumnName("ImpersonatorTenantId"); + + b.Property("ImpersonatorTenantName") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("ImpersonatorTenantName"); + + b.Property("ImpersonatorUserId") + .HasColumnType("uuid") + .HasColumnName("ImpersonatorUserId"); + + b.Property("ImpersonatorUserName") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("ImpersonatorUserName"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("TenantName"); + + b.Property("Url") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("Url"); + + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("UserId"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "ExecutionTime"); + + b.HasIndex("TenantId", "UserId", "ExecutionTime"); + + b.ToTable("AbpAuditLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AuditLogId") + .HasColumnType("uuid") + .HasColumnName("AuditLogId"); + + b.Property("ExecutionDuration") + .HasColumnType("integer") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("ExecutionTime"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("MethodName") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("MethodName"); + + b.Property("Parameters") + .HasMaxLength(2000) + .HasColumnType("character varying(2000)") + .HasColumnName("Parameters"); + + b.Property("ServiceName") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("ServiceName"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime"); + + b.ToTable("AbpAuditLogActions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogExcelFile", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("FileName") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("FileName"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AbpAuditLogExcelFiles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AuditLogId") + .HasColumnType("uuid") + .HasColumnName("AuditLogId"); + + b.Property("ChangeTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("ChangeTime"); + + b.Property("ChangeType") + .HasColumnType("smallint") + .HasColumnName("ChangeType"); + + b.Property("EntityId") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("EntityId"); + + b.Property("EntityTenantId") + .HasColumnType("uuid"); + + b.Property("EntityTypeFullName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("EntityTypeFullName"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "EntityTypeFullName", "EntityId"); + + b.ToTable("AbpEntityChanges", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("EntityChangeId") + .HasColumnType("uuid"); + + b.Property("NewValue") + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("NewValue"); + + b.Property("OriginalValue") + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("OriginalValue"); + + b.Property("PropertyName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("PropertyName"); + + b.Property("PropertyTypeFullName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("PropertyTypeFullName"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("EntityChangeId"); + + b.ToTable("AbpEntityPropertyChanges", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("character varying(96)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsAbandoned") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false); + + b.Property("JobArgs") + .IsRequired() + .HasMaxLength(1048576) + .HasColumnType("character varying(1048576)"); + + b.Property("JobName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("LastTryTime") + .HasColumnType("timestamp with time zone"); + + b.Property("NextTryTime") + .HasColumnType("timestamp with time zone"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasDefaultValue((byte)15); + + b.Property("TryCount") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasDefaultValue((short)0); + + b.HasKey("Id"); + + b.HasIndex("IsAbandoned", "NextTryTime"); + + b.ToTable("AbpBackgroundJobs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureDefinitionRecord", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AllowedProviders") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("DefaultValue") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("IsAvailableToHost") + .HasColumnType("boolean"); + + b.Property("IsVisibleToClients") + .HasColumnType("boolean"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ValueType") + .HasMaxLength(2048) + .HasColumnType("character varying(2048)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatures", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureGroupDefinitionRecord", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatureGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpFeatureValues", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsStatic") + .HasColumnType("boolean"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("Regex") + .HasMaxLength(512) + .HasColumnType("character varying(512)"); + + b.Property("RegexDescription") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("Required") + .HasColumnType("boolean"); + + b.Property("ValueType") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.ToTable("AbpClaimTypes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("SourceTenantId") + .HasColumnType("uuid"); + + b.Property("SourceUserId") + .HasColumnType("uuid"); + + b.Property("TargetTenantId") + .HasColumnType("uuid"); + + b.Property("TargetUserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") + .IsUnique(); + + b.ToTable("AbpLinkUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("EntityVersion") + .HasColumnType("integer"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDefault") + .HasColumnType("boolean") + .HasColumnName("IsDefault"); + + b.Property("IsPublic") + .HasColumnType("boolean") + .HasColumnName("IsPublic"); + + b.Property("IsStatic") + .HasColumnType("boolean") + .HasColumnName("IsStatic"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("NormalizedName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b.Property("RoleId") + .HasColumnType("uuid"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AbpRoleClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Action") + .HasMaxLength(96) + .HasColumnType("character varying(96)"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("character varying(96)"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("character varying(512)"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("Identity") + .HasMaxLength(96) + .HasColumnType("character varying(96)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Action"); + + b.HasIndex("TenantId", "ApplicationName"); + + b.HasIndex("TenantId", "Identity"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSecurityLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySession", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Device") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("DeviceInfo") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IpAddresses") + .HasMaxLength(2048) + .HasColumnType("character varying(2048)"); + + b.Property("LastAccessed") + .HasColumnType("timestamp with time zone"); + + b.Property("SessionId") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("SignedIn") + .HasColumnType("timestamp with time zone"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("Device"); + + b.HasIndex("SessionId"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSessions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AccessFailedCount") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasDefaultValue(0) + .HasColumnName("AccessFailedCount"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("Email"); + + b.Property("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); + + b.Property("EntityVersion") + .HasColumnType("integer"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsActive") + .HasColumnType("boolean") + .HasColumnName("IsActive"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsExternal") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsExternal"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LastPasswordChangeTime") + .HasColumnType("timestamp with time zone"); + + b.Property("LockoutEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("LockoutEnabled"); + + b.Property("LockoutEnd") + .HasColumnType("timestamp with time zone"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("Name"); + + b.Property("NormalizedEmail") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("NormalizedEmail"); + + b.Property("NormalizedUserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("NormalizedUserName"); + + b.Property("PasswordHash") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("PasswordHash"); + + b.Property("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("PhoneNumber"); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); + + b.Property("SecurityStamp") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("SecurityStamp"); + + b.Property("ShouldChangePasswordOnNextLogin") + .HasColumnType("boolean"); + + b.Property("Surname") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("Surname"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("TwoFactorEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("TwoFactorEnabled"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("Email"); + + b.HasIndex("NormalizedEmail"); + + b.HasIndex("NormalizedUserName"); + + b.HasIndex("UserName"); + + b.ToTable("AbpUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AbpUserClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserDelegation", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("EndTime") + .HasColumnType("timestamp with time zone"); + + b.Property("SourceUserId") + .HasColumnType("uuid"); + + b.Property("StartTime") + .HasColumnType("timestamp with time zone"); + + b.Property("TargetUserId") + .HasColumnType("uuid"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AbpUserDelegations", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ProviderDisplayName") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(196) + .HasColumnType("character varying(196)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "LoginProvider"); + + b.HasIndex("LoginProvider", "ProviderKey"); + + b.ToTable("AbpUserLogins", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("uuid"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "UserId"); + + b.HasIndex("UserId", "OrganizationUnitId"); + + b.ToTable("AbpUserOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("RoleId") + .HasColumnType("uuid"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId", "UserId"); + + b.ToTable("AbpUserRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Name") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("Value") + .HasColumnType("text"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AbpUserTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(95) + .HasColumnType("character varying(95)") + .HasColumnName("Code"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("DisplayName"); + + b.Property("EntityVersion") + .HasColumnType("integer"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("uuid"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code"); + + b.HasIndex("ParentId"); + + b.ToTable("AbpOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("uuid"); + + b.Property("RoleId") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "RoleId"); + + b.HasIndex("RoleId", "OrganizationUnitId"); + + b.ToTable("AbpOrganizationUnitRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("IsEnabled") + .HasColumnType("boolean"); + + b.Property("MultiTenancySide") + .HasColumnType("smallint"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("Providers") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("StateCheckers") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ProviderName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpPermissionGrants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissionGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2048) + .HasColumnType("character varying(2048)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpSettings", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.SettingDefinitionRecord", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("DefaultValue") + .HasMaxLength(2048) + .HasColumnType("character varying(2048)"); + + b.Property("Description") + .HasMaxLength(512) + .HasColumnType("character varying(512)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsEncrypted") + .HasColumnType("boolean"); + + b.Property("IsInherited") + .HasColumnType("boolean"); + + b.Property("IsVisibleToClients") + .HasColumnType("boolean"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("Providers") + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpSettingDefinitions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("EntityVersion") + .HasColumnType("integer"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("NormalizedName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpTenants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + { + b.Property("TenantId") + .HasColumnType("uuid"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b.HasKey("TenantId", "Name"); + + b.ToTable("AbpTenantConnectionStrings", (string)null); + }); + + modelBuilder.Entity("JiShe.ServicePro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionaryDetail", b => + { + b.HasOne("JiShe.ServicePro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionary", null) + .WithMany("Details") + .HasForeignKey("DataDictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => + { + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) + .WithMany("Actions") + .HasForeignKey("AuditLogId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) + .WithMany("EntityChanges") + .HasForeignKey("AuditLogId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => + { + b.HasOne("Volo.Abp.AuditLogging.EntityChange", null) + .WithMany("PropertyChanges") + .HasForeignKey("EntityChangeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany("Claims") + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Claims") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Logins") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("OrganizationUnits") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Roles") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Tokens") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("ParentId"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany("Roles") + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + { + b.HasOne("Volo.Abp.TenantManagement.Tenant", null) + .WithMany("ConnectionStrings") + .HasForeignKey("TenantId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("JiShe.ServicePro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionary", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Navigation("Actions"); + + b.Navigation("EntityChanges"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Navigation("PropertyChanges"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Navigation("Claims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Navigation("Claims"); + + b.Navigation("Logins"); + + b.Navigation("OrganizationUnits"); + + b.Navigation("Roles"); + + b.Navigation("Tokens"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Navigation("Roles"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Navigation("ConnectionStrings"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/JiShe.IoT.EntityFrameworkCore/Migrations/20260128020928_updatedeviceinfo202601281007.cs b/src/JiShe.IoT.EntityFrameworkCore/Migrations/20260128020928_updatedeviceinfo202601281007.cs new file mode 100644 index 0000000..6d02313 --- /dev/null +++ b/src/JiShe.IoT.EntityFrameworkCore/Migrations/20260128020928_updatedeviceinfo202601281007.cs @@ -0,0 +1,28 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace JiShe.IoT.Migrations +{ + /// + public partial class updatedeviceinfo202601281007 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.RenameColumn( + name: "IsNeedConfigDevicMdoel", + table: "ServiceProDeviceInfo", + newName: "IsNeedConfigDeviceModel"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.RenameColumn( + name: "IsNeedConfigDeviceModel", + table: "ServiceProDeviceInfo", + newName: "IsNeedConfigDevicMdoel"); + } + } +} diff --git a/src/JiShe.IoT.EntityFrameworkCore/Migrations/IoTDbContextModelSnapshot.cs b/src/JiShe.IoT.EntityFrameworkCore/Migrations/IoTDbContextModelSnapshot.cs index 7732d2d..e5234cc 100644 --- a/src/JiShe.IoT.EntityFrameworkCore/Migrations/IoTDbContextModelSnapshot.cs +++ b/src/JiShe.IoT.EntityFrameworkCore/Migrations/IoTDbContextModelSnapshot.cs @@ -794,7 +794,7 @@ namespace JiShe.IoT.Migrations .HasDefaultValue(false) .HasColumnName("IsDeleted"); - b.Property("IsNeedConfigDevicMdoel") + b.Property("IsNeedConfigDeviceModel") .HasColumnType("boolean") .HasComment("是否需要配置设备模型"); @@ -836,6 +836,12 @@ namespace JiShe.IoT.Migrations .HasColumnType("character varying(128)") .HasComment("物联网平台设备密码"); + b.Property("ReadingMode") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasDefaultValue(1) + .HasComment("抄读模式"); + b.Property("Remark") .HasColumnType("text") .HasComment("备注"); @@ -1204,6 +1210,10 @@ namespace JiShe.IoT.Migrations .HasDefaultValue(false) .HasColumnName("IsDeleted"); + b.Property("IsEnable") + .HasColumnType("boolean") + .HasComment("是否启用"); + b.Property("IssueCommand") .IsRequired() .HasMaxLength(512)