Compare commits

..

No commits in common. "8bddc3749a2e01b60ae4b2b9bd201ad17813ef1f" and "4a3df734ed4d4af7308ea2ceb1ee919a04336833" have entirely different histories.

8 changed files with 373 additions and 380 deletions

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
"CorsOrigins": "https://*.IoT.com,http://localhost:4200,http://localhost:3100,http://localhost:80,http://10.10.90.3:4200"
},
"ConnectionStrings": {
"Default": "Data Source=192.168.111.174;Port=13306;Database=JiSheIoTProDB;uid=root;pwd=JiShe!aqG#5kGgh&0;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true;TreatTinyAsBoolean=false;SslMode=None;Pooling=true;"
"Default": "Data Source=192.168.111.174;Port=13306;Database=JiSheIoTProDB2;uid=root;pwd=JiShe!aqG#5kGgh&0;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true;TreatTinyAsBoolean=false;SslMode=None;Pooling=true;"
},
"Hangfire": {
"Redis": {

View File

@ -270,6 +270,7 @@ namespace JiShe.IoT.DeviceAggregation
//设备数据缓存到Redis
DeviceCacheInfos deviceCacheInfos = input.Adapt<DeviceCacheInfos>();
deviceCacheInfos.IoTPlatformResponse = null;
deviceCacheInfos.PlatformPassword = null;
FreeRedisProvider.Instance.HSet<DeviceCacheInfos>(RedisConst.CacheAllDeviceInfoHashKey, input.DeviceAddress, deviceCacheInfos);

View File

@ -107,6 +107,7 @@ namespace JiShe.ServicePro.OneNETManagement.Subscribers
//更新设备数据缓存到Redis
DeviceCacheInfos deviceCacheInfos = deviceEntity.Adapt<DeviceCacheInfos>();
deviceCacheInfos.IoTPlatformResponse = null;
deviceCacheInfos.PlatformPassword = null;
callbackFreeRedisProvider.Instance.HSet<DeviceCacheInfos>(RedisConst.CacheAllDeviceInfoHashKey, deviceEntity.DeviceAddress, deviceCacheInfos);

View File

@ -70,7 +70,7 @@ namespace JiShe.IoT.EntityFrameworkCore
public DbSet<DeviceThingModelManagement> DeviceThingModelManagement { get; set; }
public DbSet<DeviceThingModelPropertyInfo> DeviceThingModelDetailInfo { get; set; }
public DbSet<DeviceThingModelDetailInfo> DeviceThingModelDetailInfo { get; set; }
public DbSet<DeviceThingModelCommandInfo> DeviceThingModelCommandInfo { get; set; }
/// <summary>

View File

@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
namespace JiShe.IoT.Migrations
{
[DbContext(typeof(IoTDbContext))]
[Migration("20251205064351_InitialCreate")]
[Migration("20251204073801_InitialCreate")]
partial class InitialCreate
{
/// <inheritdoc />
@ -813,7 +813,7 @@ namespace JiShe.IoT.Migrations
.HasColumnType("int")
.HasComment("旧系统授权最后修改者Id");
b.PrimitiveCollection<string>("PropertyArray")
b.Property<string>("PropertyArray")
.IsRequired()
.HasMaxLength(1024)
.HasColumnType("varchar(1024)")
@ -843,126 +843,7 @@ namespace JiShe.IoT.Migrations
});
});
modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.ThingModelInfos.DeviceThingModelManagement", b =>
{
b.Property<Guid>("Id")
.HasColumnType("char(36)");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime(6)")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("char(36)")
.HasColumnName("CreatorId");
b.Property<Guid?>("DeleterId")
.HasColumnType("char(36)")
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnType("datetime(6)")
.HasColumnName("DeletionTime");
b.Property<string>("DeviceModelName")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("varchar(50)")
.HasComment("设备端物模型名称");
b.Property<string>("ExtraProperties")
.HasColumnType("longtext")
.HasColumnName("ExtraProperties")
.HasComment("扩展属性,用于存储自定义字段,JSON格式");
b.Property<sbyte>("FunctionAnalysisFlag")
.HasColumnType("tinyint(1)")
.HasComment("函数解析标记默认为false 不能解析");
b.Property<string>("FunctionScript")
.IsRequired()
.HasColumnType("text")
.HasComment("脚本函数体");
b.Property<int>("IoTPlatform")
.HasColumnType("int")
.HasComment("物联网平台类型,默认没有指定");
b.Property<string>("IoTPlatformProductId")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("varchar(50)")
.HasComment("物联网平台中对应的产品Id");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("bit(1)")
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("datetime(6)")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("char(36)")
.HasColumnName("LastModifierId");
b.Property<int?>("OSACreatorId")
.HasColumnType("int")
.HasComment("旧系统授权创建者Id");
b.Property<int?>("OSADeleterId")
.HasColumnType("int")
.HasComment("旧系统授权最后删除者Id");
b.Property<int?>("OSALastModifierId")
.HasColumnType("int")
.HasComment("旧系统授权最后修改者Id");
b.Property<int>("ParsingSequence")
.HasColumnType("int")
.HasComment("解析顺序1234或者3412(高低位反转)");
b.Property<string>("Remark")
.HasColumnType("longtext")
.HasComment("备注");
b.Property<string>("ScriptName")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("varchar(64)")
.HasComment("脚本函数名称");
b.Property<Guid?>("TenantId")
.HasColumnType("char(36)")
.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 =>
modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.ThingModelInfos.DeviceThingModelDetailInfo", b =>
{
b.Property<Guid>("Id")
.HasColumnType("char(36)");
@ -1099,12 +980,127 @@ namespace JiShe.IoT.Migrations
b.HasIndex("IoTPlatformProductId");
b.HasIndex(new[] { "Id", "IoTPlatformProductId", "IoTPlatformRawFieldName", "StandardFieldName", "CreationTime" }, "IX_ServiceProIoTPlatformThingModelInfo_IsNotUniqueKey")
.IsDescending()
.HasDatabaseName("IX_ServiceProIoTPlatformThingModelInfo_IsNotUniqueKey1");
b.ToTable("ServiceProDeviceThingModelDetailInfo", null, t =>
{
t.HasComment("设备端物模型详情信息,是指设备端支持的属性或者事件");
});
});
modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.ThingModelInfos.DeviceThingModelManagement", b =>
{
b.Property<Guid>("Id")
.HasColumnType("char(36)");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime(6)")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("char(36)")
.HasColumnName("CreatorId");
b.Property<Guid?>("DeleterId")
.HasColumnType("char(36)")
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnType("datetime(6)")
.HasColumnName("DeletionTime");
b.Property<string>("DeviceModelName")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("varchar(50)")
.HasComment("设备端物模型名称");
b.Property<string>("ExtraProperties")
.HasColumnType("longtext")
.HasColumnName("ExtraProperties")
.HasComment("扩展属性,用于存储自定义字段,JSON格式");
b.Property<string>("FunctionScript")
.IsRequired()
.HasColumnType("text")
.HasComment("脚本函数体");
b.Property<int>("IoTPlatform")
.HasColumnType("int")
.HasComment("物联网平台类型,默认没有指定");
b.Property<string>("IoTPlatformProductId")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("varchar(50)")
.HasComment("物联网平台中对应的产品Id");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("bit(1)")
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("datetime(6)")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("char(36)")
.HasColumnName("LastModifierId");
b.Property<int?>("OSACreatorId")
.HasColumnType("int")
.HasComment("旧系统授权创建者Id");
b.Property<int?>("OSADeleterId")
.HasColumnType("int")
.HasComment("旧系统授权最后删除者Id");
b.Property<int?>("OSALastModifierId")
.HasColumnType("int")
.HasComment("旧系统授权最后修改者Id");
b.Property<int>("ParsingSequence")
.HasColumnType("int")
.HasComment("解析顺序1234或者3412(高低位反转)");
b.Property<string>("Remark")
.HasColumnType("longtext")
.HasComment("备注");
b.Property<string>("ScriptName")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("varchar(64)")
.HasComment("脚本函数名称");
b.Property<Guid?>("TenantId")
.HasColumnType("char(36)")
.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_IsNotUniqueKey2");
b.ToTable("ServiceProDeviceThingModelPropertylInfo", null, t =>
b.ToTable("ServiceProDeviceThingModelManagement", null, t =>
{
t.HasComment("设备端物模型属性信息,是指设备端支持的属性或者事件");
t.HasComment("设备端物模型管理");
});
});

View File

@ -956,48 +956,7 @@ namespace JiShe.IoT.Migrations
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "ServiceProDeviceThingModelManagement",
columns: table => new
{
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
DeviceModelName = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "设备端物模型名称")
.Annotation("MySql:CharSet", "utf8mb4"),
IoTPlatform = table.Column<int>(type: "int", nullable: false, comment: "物联网平台类型,默认没有指定"),
IoTPlatformProductId = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "物联网平台中对应的产品Id")
.Annotation("MySql:CharSet", "utf8mb4"),
ScriptName = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false, comment: "脚本函数名称")
.Annotation("MySql:CharSet", "utf8mb4"),
FunctionScript = table.Column<string>(type: "text", nullable: false, comment: "脚本函数体")
.Annotation("MySql:CharSet", "utf8mb4"),
ParsingSequence = table.Column<int>(type: "int", nullable: false, comment: "解析顺序1234或者3412(高低位反转)"),
FunctionAnalysisFlag = table.Column<sbyte>(type: "tinyint(1)", nullable: false, comment: "函数解析标记默认为false 不能解析"),
ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
CreatorId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
LastModificationTime = table.Column<DateTime>(type: "datetime(6)", nullable: true),
LastModifierId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
IsDeleted = table.Column<bool>(type: "bit(1)", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
DeletionTime = table.Column<DateTime>(type: "datetime(6)", nullable: true),
TenantId = table.Column<Guid>(type: "char(36)", nullable: true, comment: "租户ID", collation: "ascii_general_ci"),
Remark = table.Column<string>(type: "longtext", nullable: true, comment: "备注")
.Annotation("MySql:CharSet", "utf8mb4"),
OSACreatorId = table.Column<int>(type: "int", nullable: true, comment: "旧系统授权创建者Id"),
OSALastModifierId = table.Column<int>(type: "int", nullable: true, comment: "旧系统授权最后修改者Id"),
OSADeleterId = table.Column<int>(type: "int", nullable: true, comment: "旧系统授权最后删除者Id"),
ExtraProperties = table.Column<string>(type: "longtext", nullable: true, comment: "扩展属性,用于存储自定义字段,JSON格式")
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_ServiceProDeviceThingModelManagement", x => x.Id);
},
comment: "设备端物模型管理")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "ServiceProDeviceThingModelPropertylInfo",
name: "ServiceProDeviceThingModelDetailInfo",
columns: table => new
{
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
@ -1040,9 +999,49 @@ namespace JiShe.IoT.Migrations
},
constraints: table =>
{
table.PrimaryKey("PK_ServiceProDeviceThingModelPropertylInfo", x => x.Id);
table.PrimaryKey("PK_ServiceProDeviceThingModelDetailInfo", x => x.Id);
},
comment: "设备端物模型属性信息,是指设备端支持的属性或者事件")
comment: "设备端物模型详情信息,是指设备端支持的属性或者事件")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "ServiceProDeviceThingModelManagement",
columns: table => new
{
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
DeviceModelName = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "设备端物模型名称")
.Annotation("MySql:CharSet", "utf8mb4"),
IoTPlatform = table.Column<int>(type: "int", nullable: false, comment: "物联网平台类型,默认没有指定"),
IoTPlatformProductId = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "物联网平台中对应的产品Id")
.Annotation("MySql:CharSet", "utf8mb4"),
ScriptName = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false, comment: "脚本函数名称")
.Annotation("MySql:CharSet", "utf8mb4"),
FunctionScript = table.Column<string>(type: "text", nullable: false, comment: "脚本函数体")
.Annotation("MySql:CharSet", "utf8mb4"),
ParsingSequence = table.Column<int>(type: "int", nullable: false, comment: "解析顺序1234或者3412(高低位反转)"),
ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
CreatorId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
LastModificationTime = table.Column<DateTime>(type: "datetime(6)", nullable: true),
LastModifierId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
IsDeleted = table.Column<bool>(type: "bit(1)", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
DeletionTime = table.Column<DateTime>(type: "datetime(6)", nullable: true),
TenantId = table.Column<Guid>(type: "char(36)", nullable: true, comment: "租户ID", collation: "ascii_general_ci"),
Remark = table.Column<string>(type: "longtext", nullable: true, comment: "备注")
.Annotation("MySql:CharSet", "utf8mb4"),
OSACreatorId = table.Column<int>(type: "int", nullable: true, comment: "旧系统授权创建者Id"),
OSALastModifierId = table.Column<int>(type: "int", nullable: true, comment: "旧系统授权最后修改者Id"),
OSADeleterId = table.Column<int>(type: "int", nullable: true, comment: "旧系统授权最后删除者Id"),
ExtraProperties = table.Column<string>(type: "longtext", nullable: true, comment: "扩展属性,用于存储自定义字段,JSON格式")
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_ServiceProDeviceThingModelManagement", x => x.Id);
},
comment: "设备端物模型管理")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
@ -1931,6 +1930,22 @@ namespace JiShe.IoT.Migrations
columns: new[] { "Id", "DeviceThingModelId", "IoTPlatformProductId", "CreationTime" },
descending: new bool[0]);
migrationBuilder.CreateIndex(
name: "IX_ServiceProDeviceThingModelDetailInfo_CreationTime",
table: "ServiceProDeviceThingModelDetailInfo",
column: "CreationTime");
migrationBuilder.CreateIndex(
name: "IX_ServiceProDeviceThingModelDetailInfo_IoTPlatformProductId",
table: "ServiceProDeviceThingModelDetailInfo",
column: "IoTPlatformProductId");
migrationBuilder.CreateIndex(
name: "IX_ServiceProIoTPlatformThingModelInfo_IsNotUniqueKey1",
table: "ServiceProDeviceThingModelDetailInfo",
columns: new[] { "Id", "IoTPlatformProductId", "IoTPlatformRawFieldName", "StandardFieldName", "CreationTime" },
descending: new bool[0]);
migrationBuilder.CreateIndex(
name: "IX_ServiceProDeviceThingModelManagement_CreationTime",
table: "ServiceProDeviceThingModelManagement",
@ -1942,27 +1957,11 @@ namespace JiShe.IoT.Migrations
column: "IoTPlatformProductId");
migrationBuilder.CreateIndex(
name: "IX_ServiceProIoTPlatformThingModelInfo_IsNotUniqueKey1",
name: "IX_ServiceProIoTPlatformThingModelInfo_IsNotUniqueKey2",
table: "ServiceProDeviceThingModelManagement",
columns: new[] { "Id", "DeviceModelName", "IoTPlatformProductId", "CreationTime" },
descending: new bool[0]);
migrationBuilder.CreateIndex(
name: "IX_ServiceProDeviceThingModelPropertylInfo_CreationTime",
table: "ServiceProDeviceThingModelPropertylInfo",
column: "CreationTime");
migrationBuilder.CreateIndex(
name: "IX_ServiceProDeviceThingModelPropertylInfo_IoTPlatformProductId",
table: "ServiceProDeviceThingModelPropertylInfo",
column: "IoTPlatformProductId");
migrationBuilder.CreateIndex(
name: "IX_ServiceProIoTPlatformThingModelInfo_IsNotUniqueKey2",
table: "ServiceProDeviceThingModelPropertylInfo",
columns: new[] { "Id", "IoTPlatformProductId", "IoTPlatformRawFieldName", "StandardFieldName", "CreationTime" },
descending: new bool[0]);
migrationBuilder.CreateIndex(
name: "IX_ServiceProIoTPlatformThingModelInfo_CreationTime",
table: "ServiceProIoTPlatformThingModelInfo",
@ -2140,10 +2139,10 @@ namespace JiShe.IoT.Migrations
name: "ServiceProDeviceThingModelCommandInfo");
migrationBuilder.DropTable(
name: "ServiceProDeviceThingModelManagement");
name: "ServiceProDeviceThingModelDetailInfo");
migrationBuilder.DropTable(
name: "ServiceProDeviceThingModelPropertylInfo");
name: "ServiceProDeviceThingModelManagement");
migrationBuilder.DropTable(
name: "ServiceProIoTPlatformThingModelInfo");

View File

@ -810,7 +810,7 @@ namespace JiShe.IoT.Migrations
.HasColumnType("int")
.HasComment("旧系统授权最后修改者Id");
b.PrimitiveCollection<string>("PropertyArray")
b.Property<string>("PropertyArray")
.IsRequired()
.HasMaxLength(1024)
.HasColumnType("varchar(1024)")
@ -840,126 +840,7 @@ namespace JiShe.IoT.Migrations
});
});
modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.ThingModelInfos.DeviceThingModelManagement", b =>
{
b.Property<Guid>("Id")
.HasColumnType("char(36)");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime(6)")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("char(36)")
.HasColumnName("CreatorId");
b.Property<Guid?>("DeleterId")
.HasColumnType("char(36)")
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnType("datetime(6)")
.HasColumnName("DeletionTime");
b.Property<string>("DeviceModelName")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("varchar(50)")
.HasComment("设备端物模型名称");
b.Property<string>("ExtraProperties")
.HasColumnType("longtext")
.HasColumnName("ExtraProperties")
.HasComment("扩展属性,用于存储自定义字段,JSON格式");
b.Property<sbyte>("FunctionAnalysisFlag")
.HasColumnType("tinyint(1)")
.HasComment("函数解析标记默认为false 不能解析");
b.Property<string>("FunctionScript")
.IsRequired()
.HasColumnType("text")
.HasComment("脚本函数体");
b.Property<int>("IoTPlatform")
.HasColumnType("int")
.HasComment("物联网平台类型,默认没有指定");
b.Property<string>("IoTPlatformProductId")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("varchar(50)")
.HasComment("物联网平台中对应的产品Id");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("bit(1)")
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("datetime(6)")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("char(36)")
.HasColumnName("LastModifierId");
b.Property<int?>("OSACreatorId")
.HasColumnType("int")
.HasComment("旧系统授权创建者Id");
b.Property<int?>("OSADeleterId")
.HasColumnType("int")
.HasComment("旧系统授权最后删除者Id");
b.Property<int?>("OSALastModifierId")
.HasColumnType("int")
.HasComment("旧系统授权最后修改者Id");
b.Property<int>("ParsingSequence")
.HasColumnType("int")
.HasComment("解析顺序1234或者3412(高低位反转)");
b.Property<string>("Remark")
.HasColumnType("longtext")
.HasComment("备注");
b.Property<string>("ScriptName")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("varchar(64)")
.HasComment("脚本函数名称");
b.Property<Guid?>("TenantId")
.HasColumnType("char(36)")
.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 =>
modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.ThingModelInfos.DeviceThingModelDetailInfo", b =>
{
b.Property<Guid>("Id")
.HasColumnType("char(36)");
@ -1096,12 +977,127 @@ namespace JiShe.IoT.Migrations
b.HasIndex("IoTPlatformProductId");
b.HasIndex(new[] { "Id", "IoTPlatformProductId", "IoTPlatformRawFieldName", "StandardFieldName", "CreationTime" }, "IX_ServiceProIoTPlatformThingModelInfo_IsNotUniqueKey")
.IsDescending()
.HasDatabaseName("IX_ServiceProIoTPlatformThingModelInfo_IsNotUniqueKey1");
b.ToTable("ServiceProDeviceThingModelDetailInfo", null, t =>
{
t.HasComment("设备端物模型详情信息,是指设备端支持的属性或者事件");
});
});
modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.ThingModelInfos.DeviceThingModelManagement", b =>
{
b.Property<Guid>("Id")
.HasColumnType("char(36)");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime(6)")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("char(36)")
.HasColumnName("CreatorId");
b.Property<Guid?>("DeleterId")
.HasColumnType("char(36)")
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnType("datetime(6)")
.HasColumnName("DeletionTime");
b.Property<string>("DeviceModelName")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("varchar(50)")
.HasComment("设备端物模型名称");
b.Property<string>("ExtraProperties")
.HasColumnType("longtext")
.HasColumnName("ExtraProperties")
.HasComment("扩展属性,用于存储自定义字段,JSON格式");
b.Property<string>("FunctionScript")
.IsRequired()
.HasColumnType("text")
.HasComment("脚本函数体");
b.Property<int>("IoTPlatform")
.HasColumnType("int")
.HasComment("物联网平台类型,默认没有指定");
b.Property<string>("IoTPlatformProductId")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("varchar(50)")
.HasComment("物联网平台中对应的产品Id");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("bit(1)")
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("datetime(6)")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("char(36)")
.HasColumnName("LastModifierId");
b.Property<int?>("OSACreatorId")
.HasColumnType("int")
.HasComment("旧系统授权创建者Id");
b.Property<int?>("OSADeleterId")
.HasColumnType("int")
.HasComment("旧系统授权最后删除者Id");
b.Property<int?>("OSALastModifierId")
.HasColumnType("int")
.HasComment("旧系统授权最后修改者Id");
b.Property<int>("ParsingSequence")
.HasColumnType("int")
.HasComment("解析顺序1234或者3412(高低位反转)");
b.Property<string>("Remark")
.HasColumnType("longtext")
.HasComment("备注");
b.Property<string>("ScriptName")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("varchar(64)")
.HasComment("脚本函数名称");
b.Property<Guid?>("TenantId")
.HasColumnType("char(36)")
.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_IsNotUniqueKey2");
b.ToTable("ServiceProDeviceThingModelPropertylInfo", null, t =>
b.ToTable("ServiceProDeviceThingModelManagement", null, t =>
{
t.HasComment("设备端物模型属性信息,是指设备端支持的属性或者事件");
t.HasComment("设备端物模型管理");
});
});