Compare commits
2 Commits
4a3df734ed
...
8bddc3749a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8bddc3749a | ||
|
|
27da5050ce |
File diff suppressed because one or more lines are too long
@ -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=JiSheIoTProDB2;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=JiSheIoTProDB;uid=root;pwd=JiShe!aqG#5kGgh&0;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true;TreatTinyAsBoolean=false;SslMode=None;Pooling=true;"
|
||||
},
|
||||
"Hangfire": {
|
||||
"Redis": {
|
||||
|
||||
@ -270,7 +270,6 @@ 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);
|
||||
|
||||
@ -107,7 +107,6 @@ 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);
|
||||
|
||||
@ -70,7 +70,7 @@ namespace JiShe.IoT.EntityFrameworkCore
|
||||
|
||||
public DbSet<DeviceThingModelManagement> DeviceThingModelManagement { get; set; }
|
||||
|
||||
public DbSet<DeviceThingModelDetailInfo> DeviceThingModelDetailInfo { get; set; }
|
||||
public DbSet<DeviceThingModelPropertyInfo> DeviceThingModelDetailInfo { get; set; }
|
||||
public DbSet<DeviceThingModelCommandInfo> DeviceThingModelCommandInfo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
|
||||
namespace JiShe.IoT.Migrations
|
||||
{
|
||||
[DbContext(typeof(IoTDbContext))]
|
||||
[Migration("20251204073801_InitialCreate")]
|
||||
[Migration("20251205064351_InitialCreate")]
|
||||
partial class InitialCreate
|
||||
{
|
||||
/// <inheritdoc />
|
||||
@ -813,7 +813,7 @@ namespace JiShe.IoT.Migrations
|
||||
.HasColumnType("int")
|
||||
.HasComment("旧系统授权最后修改者Id");
|
||||
|
||||
b.Property<string>("PropertyArray")
|
||||
b.PrimitiveCollection<string>("PropertyArray")
|
||||
.IsRequired()
|
||||
.HasMaxLength(1024)
|
||||
.HasColumnType("varchar(1024)")
|
||||
@ -843,7 +843,126 @@ namespace JiShe.IoT.Migrations
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.ThingModelInfos.DeviceThingModelDetailInfo", b =>
|
||||
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 =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("char(36)");
|
||||
@ -980,127 +1099,12 @@ 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("ServiceProDeviceThingModelManagement", null, t =>
|
||||
b.ToTable("ServiceProDeviceThingModelPropertylInfo", null, t =>
|
||||
{
|
||||
t.HasComment("设备端物模型管理");
|
||||
t.HasComment("设备端物模型属性信息,是指设备端支持的属性或者事件");
|
||||
});
|
||||
});
|
||||
|
||||
@ -956,7 +956,48 @@ namespace JiShe.IoT.Migrations
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ServiceProDeviceThingModelDetailInfo",
|
||||
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",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
@ -999,49 +1040,9 @@ namespace JiShe.IoT.Migrations
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ServiceProDeviceThingModelDetailInfo", x => x.Id);
|
||||
table.PrimaryKey("PK_ServiceProDeviceThingModelPropertylInfo", x => x.Id);
|
||||
},
|
||||
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: "设备端物模型管理")
|
||||
comment: "设备端物模型属性信息,是指设备端支持的属性或者事件")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
@ -1930,22 +1931,6 @@ 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",
|
||||
@ -1957,11 +1942,27 @@ namespace JiShe.IoT.Migrations
|
||||
column: "IoTPlatformProductId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ServiceProIoTPlatformThingModelInfo_IsNotUniqueKey2",
|
||||
name: "IX_ServiceProIoTPlatformThingModelInfo_IsNotUniqueKey1",
|
||||
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",
|
||||
@ -2139,10 +2140,10 @@ namespace JiShe.IoT.Migrations
|
||||
name: "ServiceProDeviceThingModelCommandInfo");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "ServiceProDeviceThingModelDetailInfo");
|
||||
name: "ServiceProDeviceThingModelManagement");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "ServiceProDeviceThingModelManagement");
|
||||
name: "ServiceProDeviceThingModelPropertylInfo");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "ServiceProIoTPlatformThingModelInfo");
|
||||
@ -810,7 +810,7 @@ namespace JiShe.IoT.Migrations
|
||||
.HasColumnType("int")
|
||||
.HasComment("旧系统授权最后修改者Id");
|
||||
|
||||
b.Property<string>("PropertyArray")
|
||||
b.PrimitiveCollection<string>("PropertyArray")
|
||||
.IsRequired()
|
||||
.HasMaxLength(1024)
|
||||
.HasColumnType("varchar(1024)")
|
||||
@ -840,7 +840,126 @@ namespace JiShe.IoT.Migrations
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.ThingModelInfos.DeviceThingModelDetailInfo", b =>
|
||||
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 =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("char(36)");
|
||||
@ -977,127 +1096,12 @@ 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("ServiceProDeviceThingModelManagement", null, t =>
|
||||
b.ToTable("ServiceProDeviceThingModelPropertylInfo", null, t =>
|
||||
{
|
||||
t.HasComment("设备端物模型管理");
|
||||
t.HasComment("设备端物模型属性信息,是指设备端支持的属性或者事件");
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user