设备端物模型管理接口对接

This commit is contained in:
ChenYi 2025-12-19 16:35:31 +08:00
parent c324a12f75
commit 0bc946d1e9
5 changed files with 7812 additions and 1 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,32 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace JiShe.IoT.Migrations
{
/// <inheritdoc />
public partial class udpate202512191140 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<Guid>(
name: "IoTPlatformThingModelDataId",
table: "ServiceProDeviceThingModelPropertylInfo",
type: "char(36)",
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
comment: "系统中平台端物模型数据Id",
collation: "ascii_general_ci");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "IoTPlatformThingModelDataId",
table: "ServiceProDeviceThingModelPropertylInfo");
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,67 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace JiShe.IoT.Migrations
{
/// <inheritdoc />
public partial class udpate202512191347 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "IoTPlatformRawFieldDataType",
table: "ServiceProIoTPlatformThingModelInfo",
type: "varchar(64)",
maxLength: 64,
nullable: true,
comment: "物联网平台中对应的产品物模型属性或者事件数据类型")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AlterColumn<string>(
name: "IoTPlatformRawFieldDataType",
table: "ServiceProDeviceThingModelPropertylInfo",
type: "varchar(20)",
maxLength: 20,
nullable: true,
comment: "物联网平台中对应的产品物模型属性或者事件数据类型",
oldClrType: typeof(string),
oldType: "varchar(20)",
oldMaxLength: 20,
oldComment: "物联网平台中对应的产品物模型属性或者事件数据类型")
.Annotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("MySql:CharSet", "utf8mb4");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "IoTPlatformRawFieldDataType",
table: "ServiceProIoTPlatformThingModelInfo");
migrationBuilder.UpdateData(
table: "ServiceProDeviceThingModelPropertylInfo",
keyColumn: "IoTPlatformRawFieldDataType",
keyValue: null,
column: "IoTPlatformRawFieldDataType",
value: "");
migrationBuilder.AlterColumn<string>(
name: "IoTPlatformRawFieldDataType",
table: "ServiceProDeviceThingModelPropertylInfo",
type: "varchar(20)",
maxLength: 20,
nullable: false,
comment: "物联网平台中对应的产品物模型属性或者事件数据类型",
oldClrType: typeof(string),
oldType: "varchar(20)",
oldMaxLength: 20,
oldNullable: true,
oldComment: "物联网平台中对应的产品物模型属性或者事件数据类型")
.Annotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("MySql:CharSet", "utf8mb4");
}
}
}

View File

@ -1008,7 +1008,6 @@ namespace JiShe.IoT.Migrations
.HasComment("物联网平台中对应的产品Id");
b.Property<string>("IoTPlatformRawFieldDataType")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("varchar(20)")
.HasComment("物联网平台中对应的产品物模型属性或者事件数据类型");
@ -1019,6 +1018,10 @@ namespace JiShe.IoT.Migrations
.HasColumnType("varchar(64)")
.HasComment("物联网平台中对应的产品物模型属性或者事件名称");
b.Property<Guid>("IoTPlatformThingModelDataId")
.HasColumnType("char(36)")
.HasComment("系统中平台端物模型数据Id");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("bit(1)")
@ -1161,6 +1164,11 @@ namespace JiShe.IoT.Migrations
.HasColumnType("varchar(50)")
.HasComment("物联网平台中对应的产品Id");
b.Property<string>("IoTPlatformRawFieldDataType")
.HasMaxLength(64)
.HasColumnType("varchar(64)")
.HasComment("物联网平台中对应的产品物模型属性或者事件数据类型");
b.Property<string>("IoTPlatformRawFieldExtension")
.HasColumnType("text")
.HasComment("物联网平台中对应产品物模型标识符扩展,用于扩展结构体类型");