完善初始化

This commit is contained in:
ChenYi 2025-10-28 17:22:09 +08:00
parent 123eb6cdcb
commit ec3003acea
9 changed files with 49 additions and 6950 deletions

File diff suppressed because one or more lines are too long

@ -1 +1 @@
Subproject commit bebd41984adbf6ce1e722ce804b0a6922083e059 Subproject commit 0cfb757132e4407206950fcb862879b266738aa8

View File

@ -1,6 +1,6 @@
{ {
"ConnectionStrings": { "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;"
}, },
"IoTDBOptions": { "IoTDBOptions": {
"UserName": "root", "UserName": "root",

View File

@ -1,88 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace JiShe.IoT.Migrations
{
/// <inheritdoc />
public partial class updateThingModel : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "StandardFieldName",
table: "ServiceProDeviceThingModelInfo",
type: "varchar(64)",
maxLength: 64,
nullable: false,
comment: "管理后台产品标准的物模型属性或者事件名称",
oldClrType: typeof(string),
oldType: "varchar(50)",
oldMaxLength: 50,
oldComment: "管理后台产品标准的物模型属性或者事件名称")
.Annotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AlterColumn<string>(
name: "RawFieldName",
table: "ServiceProDeviceThingModelInfo",
type: "varchar(64)",
maxLength: 64,
nullable: false,
comment: "物联网平台中对应的产品物模型属性或者事件名称",
oldClrType: typeof(string),
oldType: "varchar(50)",
oldMaxLength: 50,
oldComment: "物联网平台中对应的产品物模型属性或者事件名称")
.Annotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "StandardFieldDisplayName",
table: "ServiceProDeviceThingModelInfo",
type: "varchar(64)",
maxLength: 64,
nullable: false,
defaultValue: "",
comment: "管理后台产品标准的物模型属性或者事件名称")
.Annotation("MySql:CharSet", "utf8mb4");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "StandardFieldDisplayName",
table: "ServiceProDeviceThingModelInfo");
migrationBuilder.AlterColumn<string>(
name: "StandardFieldName",
table: "ServiceProDeviceThingModelInfo",
type: "varchar(50)",
maxLength: 50,
nullable: false,
comment: "管理后台产品标准的物模型属性或者事件名称",
oldClrType: typeof(string),
oldType: "varchar(64)",
oldMaxLength: 64,
oldComment: "管理后台产品标准的物模型属性或者事件名称")
.Annotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AlterColumn<string>(
name: "RawFieldName",
table: "ServiceProDeviceThingModelInfo",
type: "varchar(50)",
maxLength: 50,
nullable: false,
comment: "物联网平台中对应的产品物模型属性或者事件名称",
oldClrType: typeof(string),
oldType: "varchar(64)",
oldMaxLength: 64,
oldComment: "物联网平台中对应的产品物模型属性或者事件名称")
.Annotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("MySql:CharSet", "utf8mb4");
}
}
}

View File

@ -1,28 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace JiShe.IoT.Migrations
{
/// <inheritdoc />
public partial class updateThingModel2 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameColumn(
name: "RawFieldName",
table: "ServiceProDeviceThingModelInfo",
newName: "IoTPlatformRawFieldName");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameColumn(
name: "IoTPlatformRawFieldName",
table: "ServiceProDeviceThingModelInfo",
newName: "RawFieldName");
}
}
}

View File

@ -13,8 +13,8 @@ using Volo.Abp.EntityFrameworkCore;
namespace JiShe.IoT.Migrations namespace JiShe.IoT.Migrations
{ {
[DbContext(typeof(IoTDbContext))] [DbContext(typeof(IoTDbContext))]
[Migration("20251022063641_updateThingModel2")] [Migration("20251028091552_InitialCreate")]
partial class updateThingModel2 partial class InitialCreate
{ {
/// <inheritdoc /> /// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder) protected override void BuildTargetModel(ModelBuilder modelBuilder)

View File

@ -922,12 +922,14 @@ namespace JiShe.IoT.Migrations
.Annotation("MySql:CharSet", "utf8mb4"), .Annotation("MySql:CharSet", "utf8mb4"),
FiledType = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false, comment: "物联网平台中对应产品物模型属性或者事件类型") FiledType = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false, comment: "物联网平台中对应产品物模型属性或者事件类型")
.Annotation("MySql:CharSet", "utf8mb4"), .Annotation("MySql:CharSet", "utf8mb4"),
RawFieldName = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "物联网平台中对应的产品物模型属性或者事件名称") IoTPlatformRawFieldName = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false, comment: "物联网平台中对应的产品物模型属性或者事件名称")
.Annotation("MySql:CharSet", "utf8mb4"), .Annotation("MySql:CharSet", "utf8mb4"),
StandardFieldName = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "管理后台产品标准的物模型属性或者事件名称") StandardFieldName = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false, comment: "管理后台产品标准的物模型属性或者事件名称")
.Annotation("MySql:CharSet", "utf8mb4"), .Annotation("MySql:CharSet", "utf8mb4"),
StandardFieldValueType = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false, comment: "标准物模型字段值类型") StandardFieldValueType = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false, comment: "标准物模型字段值类型")
.Annotation("MySql:CharSet", "utf8mb4"), .Annotation("MySql:CharSet", "utf8mb4"),
StandardFieldDisplayName = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false, comment: "管理后台产品标准的物模型属性或者事件名称")
.Annotation("MySql:CharSet", "utf8mb4"),
IsValueNeedConvert = table.Column<sbyte>(type: "tinyint(1)", nullable: false, comment: "是否需要值类型转换"), IsValueNeedConvert = table.Column<sbyte>(type: "tinyint(1)", nullable: false, comment: "是否需要值类型转换"),
ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false) ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"), .Annotation("MySql:CharSet", "utf8mb4"),
@ -1791,7 +1793,7 @@ namespace JiShe.IoT.Migrations
migrationBuilder.CreateIndex( migrationBuilder.CreateIndex(
name: "IX_ServiceProDeviceThingModelInfo_IsNotUniqueKey", name: "IX_ServiceProDeviceThingModelInfo_IsNotUniqueKey",
table: "ServiceProDeviceThingModelInfo", table: "ServiceProDeviceThingModelInfo",
columns: new[] { "Id", "IoTPlatformProductId", "RawFieldName", "StandardFieldName", "CreationTime" }, columns: new[] { "Id", "IoTPlatformProductId", "IoTPlatformRawFieldName", "StandardFieldName", "CreationTime" },
descending: new bool[0]); descending: new bool[0]);
migrationBuilder.CreateIndex( migrationBuilder.CreateIndex(