diff --git a/src/JiShe.IoT.DbMigrator/appsettings.json b/src/JiShe.IoT.DbMigrator/appsettings.json index 4b7791b..dc7a490 100644 --- a/src/JiShe.IoT.DbMigrator/appsettings.json +++ b/src/JiShe.IoT.DbMigrator/appsettings.json @@ -13,5 +13,9 @@ "DataBaseName": "jisheiotdata", "OpenDebugMode": true, "UseTableSessionPoolByDefault": false + }, + "FreeRedisOptions": { + "ConnectionString": "47.110.53.196:6379,password=1q3J@BGf!yhTaD46nS#,abortConnect=false,connectTimeout=30000,allowAdmin=true,maxPoolSize=500,defaultdatabase=14", + "UseDistributedCache": true } } \ No newline at end of file diff --git a/src/JiShe.IoT.EntityFrameworkCore/Migrations/20250723054349_InitialCreate.Designer.cs b/src/JiShe.IoT.EntityFrameworkCore/Migrations/20250724092610_InitialCreate.Designer.cs similarity index 89% rename from src/JiShe.IoT.EntityFrameworkCore/Migrations/20250723054349_InitialCreate.Designer.cs rename to src/JiShe.IoT.EntityFrameworkCore/Migrations/20250724092610_InitialCreate.Designer.cs index 00ed29c..cb24e82 100644 --- a/src/JiShe.IoT.EntityFrameworkCore/Migrations/20250723054349_InitialCreate.Designer.cs +++ b/src/JiShe.IoT.EntityFrameworkCore/Migrations/20250724092610_InitialCreate.Designer.cs @@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore; namespace JiShe.IoT.Migrations { [DbContext(typeof(IoTDbContext))] - [Migration("20250723054349_InitialCreate")] + [Migration("20250724092610_InitialCreate")] partial class InitialCreate { /// @@ -106,7 +106,10 @@ namespace JiShe.IoT.Migrations b.HasIndex("RefreshToken"); - b.ToTable("ServiceProUserRefreshTokens", (string)null); + b.ToTable("ServiceProUserRefreshTokens", null, t => + { + t.HasComment("刷新Token"); + }); }); modelBuilder.Entity("JiShe.ServicePro.CTWingManagement.CTWingAccount.CTWingAccountInfo", b => @@ -215,7 +218,10 @@ namespace JiShe.IoT.Migrations b.HasIndex(new[] { "Id", "AccountId", "AccountName", "CreationTime" }, "IX_ServiceProCTWingAccountInfo_IsNotUniqueKey") .IsDescending(); - b.ToTable("ServiceProCTWingAccountInfo", (string)null); + b.ToTable("ServiceProCTWingAccountInfo", null, t => + { + t.HasComment("CTWing账号信息"); + }); }); modelBuilder.Entity("JiShe.ServicePro.CTWingManagement.CTWingProduct.CTWingPrivateProductInfo", b => @@ -380,7 +386,10 @@ namespace JiShe.IoT.Migrations b.HasIndex(new[] { "Id", "IoTPlatformProductId", "ProductName", "CreationTime" }, "IX_ServiceProCTWingPrivateProductInfo_IsNotUniqueKey") .IsDescending(); - b.ToTable("ServiceProCTWingPrivateProductInfo", (string)null); + b.ToTable("ServiceProCTWingPrivateProductInfo", null, t => + { + t.HasComment("CTWing产品信息"); + }); }); modelBuilder.Entity("JiShe.ServicePro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionary", b => @@ -451,7 +460,10 @@ namespace JiShe.IoT.Migrations b.HasKey("Id"); - b.ToTable("AbpDataDictionaries", (string)null); + b.ToTable("AbpDataDictionaries", null, t => + { + t.HasComment("数据字典"); + }); }); modelBuilder.Entity("JiShe.ServicePro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionaryDetail", b => @@ -497,19 +509,17 @@ namespace JiShe.IoT.Migrations b.HasIndex("DataDictionaryId"); - b.ToTable("AbpDataDictionaryDetails", (string)null); + b.ToTable("AbpDataDictionaryDetails", null, t => + { + t.HasComment("数据字典详情"); + }); }); - modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.Focuses.FocusInfo", b => + modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.DeivceInfos.DeviceManagementInfo", b => { b.Property("Id") .HasColumnType("char(36)"); - b.Property("APN") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("APN"); - b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() @@ -533,58 +543,50 @@ namespace JiShe.IoT.Migrations .HasColumnType("datetime(6)") .HasColumnName("DeletionTime"); - b.Property("DeviceNo") - .HasMaxLength(80) - .HasColumnType("varchar(80)") - .HasComment("设备编号"); + b.Property("DeviceAddress") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasComment("设备地址"); - b.Property("Enabled") - .HasColumnType("tinyint(1)") - .HasComment("是否启用"); + b.Property("DeviceName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasComment("设备名称"); b.Property("ExtraProperties") .HasColumnType("longtext") .HasColumnName("ExtraProperties") .HasComment("扩展属性,用于存储自定义字段,JSON格式"); - b.Property("FocusAddress") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("集中器地址"); - - b.Property("FocusCode") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasComment("集中器型号"); - - b.Property("HardwareReleaseDate") - .HasMaxLength(80) - .HasColumnType("varchar(80)") - .HasComment("硬件软件发布日期:日月年"); - - b.Property("HardwareVersion") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasComment("硬件软件版本号"); - - b.Property("HeartbeatInterval") - .HasColumnType("int") - .HasComment("心跳间隔"); - b.Property("IoTPlatform") .HasColumnType("int") - .HasComment("物联网平台类型,默认没有指定"); + .HasComment("物联网平台类型,默认没有指定"); + + b.Property("IoTPlatformAccountId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("物联网平台中对应的账号Id"); b.Property("IoTPlatformDeviceOpenInfo") + .IsRequired() .HasMaxLength(128) .HasColumnType("varchar(128)") - .HasComment("集中器在物联网平台中的设备ID"); + .HasComment("物联网平台中对应的设备Id或者名称"); b.Property("IoTPlatformProductId") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasComment("集中器在物联网平台中对应的产品Id"); + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("物联网平台中对应的产品Id"); + + b.Property("IoTPlatformResponse") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasComment("物联网平台返回的响应信息"); b.Property("IsDeleted") .ValueGeneratedOnAdd() @@ -600,26 +602,6 @@ namespace JiShe.IoT.Migrations .HasColumnType("char(36)") .HasColumnName("LastModifierId"); - b.Property("LastRefreshTime") - .HasColumnType("datetime(6)") - .HasComment("最后刷新时间"); - - b.Property("MakerNo") - .HasMaxLength(80) - .HasColumnType("varchar(80)") - .HasComment("厂商代号"); - - b.Property("MasterStation") - .HasMaxLength(80) - .HasColumnType("varchar(80)") - .HasComment("主站"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasComment("集中器名称"); - b.Property("OSACreatorId") .HasColumnType("int") .HasComment("旧系统授权创建者Id"); @@ -633,275 +615,33 @@ namespace JiShe.IoT.Migrations .HasComment("旧系统授权最后修改者Id"); b.Property("PlatformPassword") - .HasMaxLength(256) - .HasColumnType("varchar(256)") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") .HasComment("物联网平台设备密码"); b.Property("Remark") .HasColumnType("longtext") .HasComment("备注"); - b.Property("SelfDevelop") - .HasColumnType("tinyint(1)") - .HasComment("是否自研"); - - b.Property("SimCard") - .HasMaxLength(80) - .HasColumnType("varchar(80)") - .HasComment("通讯SIM卡卡号"); - - b.Property("SoftwareReleaseDate") - .HasMaxLength(80) - .HasColumnType("varchar(80)") - .HasComment("终端软件发布日期:日月年"); - - b.Property("SoftwareVersion") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasComment("终端软件版本号"); - - b.Property("Status") - .HasColumnType("tinyint(1)") - .HasComment("是否在线状态"); - b.Property("TenantId") .HasColumnType("char(36)") .HasColumnName("TenantId") .HasComment("租户ID"); - b.Property("TimeDensity") - .HasColumnType("int") - .HasComment("采集密度"); - - b.Property("UpLink") - .HasMaxLength(20) - .HasColumnType("int") - .HasComment("上行链路"); - b.HasKey("Id"); b.HasIndex("CreationTime"); - b.HasIndex(new[] { "Id", "FocusAddress", "CreationTime" }, "IX_ServiceProFocusInfo_IsNotUniqueKey") + b.HasIndex("DeviceAddress"); + + b.HasIndex(new[] { "Id", "DeviceName", "DeviceAddress", "IoTPlatformProductId", "CreationTime" }, "IX_ServiceProDeviceInfo_IsNotUniqueKey") .IsDescending(); - b.ToTable("ServiceProFocusInfo", (string)null); - }); - - modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.Meters.MeterInfo", b => - { - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("Address") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("表计地址"); - - b.Property("ArchiveStatus") - .HasColumnType("tinyint(1)") - .HasComment("归档状态"); - - b.Property("AreaCode") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("表计区域编码"); - - b.Property("AutomaticReport") - .HasColumnType("int") - .HasComment("是否自动采集"); - - b.Property("Baudrate") - .HasColumnType("int") - .HasComment("波特率"); - - b.Property("BrandType") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasComment("品牌类型"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DynamicPassword") - .HasColumnType("tinyint(1)") - .HasComment("是否动态密码"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)") - .HasComment("是否启用"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties") - .HasComment("扩展属性,用于存储自定义字段,JSON格式"); - - b.Property("FocusAddress") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("集中器地址"); - - b.Property("FunctionCount") - .HasColumnType("int") - .HasComment("功能数量(包含采集项和阀控等)"); - - b.Property("GatherCount") - .HasColumnType("int") - .HasComment("采集项数量"); - - b.Property("HaveValve") - .HasColumnType("tinyint(1)") - .HasComment("是否带阀控"); - - b.Property("IoTPlatformDeviceOpenInfo") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasComment("集中器在物联网平台中对应的设备Id或者名称"); - - b.Property("IoTPlatformProductId") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasComment("集中器在物联网平台中对应的产品Id"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LinkType") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasComment("水表通讯方案"); - - b.Property("MeterAddress") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasComment("表计地址"); - - b.Property("MeterName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasComment("表计名称"); - - b.Property("MeterType") - .HasColumnType("int") - .HasComment("表计类型"); - - b.Property("MeterTypeName") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasComment("水表设备类型"); - - b.Property("MeteringCode") - .HasColumnType("int") - .HasComment("表计编码"); - - b.Property("MeteringPort") - .HasColumnType("int") - .HasComment("表计端口"); - - b.Property("OSACreatorId") - .HasColumnType("int") - .HasComment("旧系统授权创建者Id"); - - b.Property("OSADeleterId") - .HasColumnType("int") - .HasComment("旧系统授权最后删除者Id"); - - b.Property("OSALastModifierId") - .HasColumnType("int") - .HasComment("旧系统授权最后修改者Id"); - - b.Property("Password") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasComment("密码"); - - b.Property("Protocol") - .HasColumnType("int") - .HasComment("协议类型"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("备注"); - - b.Property("SelfDevelop") - .HasColumnType("tinyint(1)") - .HasComment("是否自研"); - - b.Property("Special") - .HasColumnType("int") - .HasComment("是否特殊表"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId") - .HasComment("租户ID"); - - b.Property("TimesA") - .HasColumnType("decimal(18,4)") - .HasComment("倍率A"); - - b.Property("Timev") - .HasColumnType("decimal(18,4)") - .HasComment("倍率V"); - - b.Property("TripState") - .HasColumnType("tinyint(1)") - .HasComment("是否跳闸"); - - b.Property("TypeName") - .HasMaxLength(128) - .HasColumnType("int") - .HasComment("表计类型名称"); - - b.HasKey("Id"); - - b.HasIndex("CreationTime"); - - b.HasIndex("FocusAddress"); - - b.HasIndex("MeterAddress"); - - b.HasIndex(new[] { "Id", "MeterAddress", "FocusAddress", "CreationTime" }, "IX_ServiceProMeterInfo_IsNotUniqueKey") - .IsDescending(); - - b.ToTable("ServiceProMeterInfo", (string)null); + b.ToTable("ServiceProDeviceInfo", null, t => + { + t.HasComment("设备信息"); + }); }); modelBuilder.Entity("JiShe.ServicePro.DynamicMenuManagement.Menus.Menu", b => @@ -1024,7 +764,10 @@ namespace JiShe.IoT.Migrations b.HasKey("Id"); - b.ToTable("ServiceProMenus", (string)null); + b.ToTable("ServiceProMenus", null, t => + { + t.HasComment("动态菜单管理"); + }); }); modelBuilder.Entity("JiShe.ServicePro.FileManagement.Files.FileObject", b => @@ -1098,7 +841,10 @@ namespace JiShe.IoT.Migrations b.HasIndex("FileName"); - b.ToTable("AbpFileObjects", (string)null); + b.ToTable("AbpFileObjects", null, t => + { + t.HasComment("文件管理"); + }); }); modelBuilder.Entity("JiShe.ServicePro.LanguageManagement.LanguageTexts.Aggregates.LanguageText", b => @@ -1180,7 +926,10 @@ namespace JiShe.IoT.Migrations b.HasIndex("TenantId", "ResourceName", "CultureName"); - b.ToTable("AbpLanguageTexts", (string)null); + b.ToTable("AbpLanguageTexts", null, t => + { + t.HasComment("语言文本管理"); + }); }); modelBuilder.Entity("JiShe.ServicePro.LanguageManagement.Languages.Aggregates.Language", b => @@ -1267,7 +1016,10 @@ namespace JiShe.IoT.Migrations b.HasIndex("CultureName"); - b.ToTable("AbpLanguages", (string)null); + b.ToTable("AbpLanguages", null, t => + { + t.HasComment("语言管理"); + }); }); modelBuilder.Entity("JiShe.ServicePro.NotificationManagement.Notifications.Aggregates.Notification", b => @@ -1360,7 +1112,10 @@ namespace JiShe.IoT.Migrations b.HasKey("Id"); - b.ToTable("AbpNotifications", (string)null); + b.ToTable("AbpNotifications", null, t => + { + t.HasComment("消息通知管理"); + }); }); modelBuilder.Entity("JiShe.ServicePro.NotificationManagement.Notifications.Aggregates.NotificationSubscription", b => @@ -1436,7 +1191,10 @@ namespace JiShe.IoT.Migrations b.HasIndex("ReceiveUserId"); - b.ToTable("AbpNotificationSubscriptions", (string)null); + b.ToTable("AbpNotificationSubscriptions", null, t => + { + t.HasComment("消息订阅者"); + }); }); modelBuilder.Entity("JiShe.ServicePro.OneNETManagement.OneNETAccounts.OneNETAccountInfos", b => @@ -1541,7 +1299,10 @@ namespace JiShe.IoT.Migrations b.HasIndex(new[] { "Id", "OneNETAccountId", "AccountName", "PhoneNumber", "CreationTime" }, "IX_ServiceProOneNETAccountInfo_IsNotUniqueKey") .IsDescending(); - b.ToTable("ServiceProOneNETAccountInfo", (string)null); + b.ToTable("ServiceProOneNETAccountInfo", null, t => + { + t.HasComment("OneNET账号管理"); + }); }); modelBuilder.Entity("JiShe.ServicePro.OneNETManagement.OneNETProducts.OneNETProductInfos", b => @@ -1705,7 +1466,10 @@ namespace JiShe.IoT.Migrations b.HasIndex(new[] { "Id", "IoTPlatformProductId", "ProductName", "CreationTime" }, "IX_ServiceProOneNETProductInfo_IsNotUniqueKey") .IsDescending(); - b.ToTable("ServiceProOneNETProductInfo", (string)null); + b.ToTable("ServiceProOneNETProductInfo", null, t => + { + t.HasComment("OneNET产品管理"); + }); }); modelBuilder.Entity("JiShe.ServicePro.TemplateManagement.TextTemplates.TextTemplate", b => @@ -1787,7 +1551,10 @@ namespace JiShe.IoT.Migrations b.HasIndex("Code"); - b.ToTable("ServiceProTextTemplates", (string)null); + b.ToTable("ServiceProTextTemplates", null, t => + { + t.HasComment("模板管理"); + }); }); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => diff --git a/src/JiShe.IoT.EntityFrameworkCore/Migrations/20250723054349_InitialCreate.cs b/src/JiShe.IoT.EntityFrameworkCore/Migrations/20250724092610_InitialCreate.cs similarity index 90% rename from src/JiShe.IoT.EntityFrameworkCore/Migrations/20250723054349_InitialCreate.cs rename to src/JiShe.IoT.EntityFrameworkCore/Migrations/20250724092610_InitialCreate.cs index 0c09568..0e7ac94 100644 --- a/src/JiShe.IoT.EntityFrameworkCore/Migrations/20250723054349_InitialCreate.cs +++ b/src/JiShe.IoT.EntityFrameworkCore/Migrations/20250724092610_InitialCreate.cs @@ -146,7 +146,8 @@ namespace JiShe.IoT.Migrations constraints: table => { table.PrimaryKey("PK_AbpDataDictionaries", x => x.Id); - }) + }, + comment: "数据字典") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( @@ -245,7 +246,8 @@ namespace JiShe.IoT.Migrations constraints: table => { table.PrimaryKey("PK_AbpFileObjects", x => x.Id); - }) + }, + comment: "文件管理") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( @@ -279,7 +281,8 @@ namespace JiShe.IoT.Migrations constraints: table => { table.PrimaryKey("PK_AbpLanguages", x => x.Id); - }) + }, + comment: "语言管理") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( @@ -311,7 +314,8 @@ namespace JiShe.IoT.Migrations constraints: table => { table.PrimaryKey("PK_AbpLanguageTexts", x => x.Id); - }) + }, + comment: "语言文本管理") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( @@ -365,7 +369,8 @@ namespace JiShe.IoT.Migrations constraints: table => { table.PrimaryKey("PK_AbpNotifications", x => x.Id); - }) + }, + comment: "消息通知管理") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( @@ -395,7 +400,8 @@ namespace JiShe.IoT.Migrations constraints: table => { table.PrimaryKey("PK_AbpNotificationSubscriptions", x => x.Id); - }) + }, + comment: "消息订阅者") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( @@ -771,7 +777,8 @@ namespace JiShe.IoT.Migrations constraints: table => { table.PrimaryKey("PK_ServiceProCTWingAccountInfo", x => x.Id); - }) + }, + comment: "CTWing账号信息") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( @@ -832,51 +839,29 @@ namespace JiShe.IoT.Migrations constraints: table => { table.PrimaryKey("PK_ServiceProCTWingPrivateProductInfo", x => x.Id); - }) + }, + comment: "CTWing产品信息") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( - name: "ServiceProFocusInfo", + name: "ServiceProDeviceInfo", columns: table => new { Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "集中器名称") + DeviceName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "设备名称") .Annotation("MySql:CharSet", "utf8mb4"), - FocusAddress = table.Column(type: "varchar(20)", maxLength: 20, nullable: false, comment: "集中器地址") + DeviceAddress = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "设备地址") .Annotation("MySql:CharSet", "utf8mb4"), - FocusCode = table.Column(type: "varchar(128)", maxLength: 128, nullable: true, comment: "集中器型号") + IoTPlatform = table.Column(type: "int", nullable: false, comment: "物联网平台类型,默认没有指定"), + IoTPlatformDeviceOpenInfo = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "物联网平台中对应的设备Id或者名称") .Annotation("MySql:CharSet", "utf8mb4"), - SelfDevelop = table.Column(type: "tinyint(1)", nullable: false, comment: "是否自研"), - UpLink = table.Column(type: "int", maxLength: 20, nullable: false, comment: "上行链路"), - APN = table.Column(type: "varchar(20)", maxLength: 20, nullable: true, comment: "APN") + PlatformPassword = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "物联网平台设备密码") .Annotation("MySql:CharSet", "utf8mb4"), - MasterStation = table.Column(type: "varchar(80)", maxLength: 80, nullable: true, comment: "主站") + IoTPlatformProductId = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "物联网平台中对应的产品Id") .Annotation("MySql:CharSet", "utf8mb4"), - Status = table.Column(type: "tinyint(1)", nullable: false, comment: "是否在线状态"), - HeartbeatInterval = table.Column(type: "int", nullable: false, comment: "心跳间隔"), - LastRefreshTime = table.Column(type: "datetime(6)", nullable: true, comment: "最后刷新时间"), - TimeDensity = table.Column(type: "int", nullable: false, comment: "采集密度"), - Enabled = table.Column(type: "tinyint(1)", nullable: false, comment: "是否启用"), - SimCard = table.Column(type: "varchar(80)", maxLength: 80, nullable: true, comment: "通讯SIM卡卡号") + IoTPlatformAccountId = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "物联网平台中对应的账号Id") .Annotation("MySql:CharSet", "utf8mb4"), - MakerNo = table.Column(type: "varchar(80)", maxLength: 80, nullable: true, comment: "厂商代号") - .Annotation("MySql:CharSet", "utf8mb4"), - DeviceNo = table.Column(type: "varchar(80)", maxLength: 80, nullable: true, comment: "设备编号") - .Annotation("MySql:CharSet", "utf8mb4"), - SoftwareVersion = table.Column(type: "varchar(40)", maxLength: 40, nullable: true, comment: "终端软件版本号") - .Annotation("MySql:CharSet", "utf8mb4"), - SoftwareReleaseDate = table.Column(type: "varchar(80)", maxLength: 80, nullable: true, comment: "终端软件发布日期:日月年") - .Annotation("MySql:CharSet", "utf8mb4"), - HardwareVersion = table.Column(type: "varchar(40)", maxLength: 40, nullable: true, comment: "硬件软件版本号") - .Annotation("MySql:CharSet", "utf8mb4"), - HardwareReleaseDate = table.Column(type: "varchar(80)", maxLength: 80, nullable: true, comment: "硬件软件发布日期:日月年") - .Annotation("MySql:CharSet", "utf8mb4"), - IoTPlatformDeviceOpenInfo = table.Column(type: "varchar(128)", maxLength: 128, nullable: true, comment: "集中器在物联网平台中的设备ID") - .Annotation("MySql:CharSet", "utf8mb4"), - IoTPlatform = table.Column(type: "int", nullable: false, comment: "物联网平台类型,默认没有指定"), - PlatformPassword = table.Column(type: "varchar(256)", maxLength: 256, nullable: true, comment: "物联网平台设备密码") - .Annotation("MySql:CharSet", "utf8mb4"), - IoTPlatformProductId = table.Column(type: "varchar(128)", maxLength: 128, nullable: true, comment: "集中器在物联网平台中对应的产品Id") + IoTPlatformResponse = table.Column(type: "varchar(512)", maxLength: 512, nullable: false, comment: "物联网平台返回的响应信息") .Annotation("MySql:CharSet", "utf8mb4"), ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), @@ -898,8 +883,9 @@ namespace JiShe.IoT.Migrations }, constraints: table => { - table.PrimaryKey("PK_ServiceProFocusInfo", x => x.Id); - }) + table.PrimaryKey("PK_ServiceProDeviceInfo", x => x.Id); + }, + comment: "设备信息") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( @@ -946,76 +932,8 @@ namespace JiShe.IoT.Migrations constraints: table => { table.PrimaryKey("PK_ServiceProMenus", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "ServiceProMeterInfo", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - MeterName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "表计名称") - .Annotation("MySql:CharSet", "utf8mb4"), - MeterAddress = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "表计地址") - .Annotation("MySql:CharSet", "utf8mb4"), - FocusAddress = table.Column(type: "varchar(20)", maxLength: 20, nullable: false, comment: "集中器地址") - .Annotation("MySql:CharSet", "utf8mb4"), - MeterType = table.Column(type: "int", nullable: false, comment: "表计类型"), - Protocol = table.Column(type: "int", nullable: false, comment: "协议类型"), - Baudrate = table.Column(type: "int", nullable: false, comment: "波特率"), - MeteringCode = table.Column(type: "int", nullable: false, comment: "表计编码"), - MeteringPort = table.Column(type: "int", nullable: false, comment: "表计端口"), - Password = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "密码") - .Annotation("MySql:CharSet", "utf8mb4"), - DynamicPassword = table.Column(type: "tinyint(1)", nullable: false, comment: "是否动态密码"), - TypeName = table.Column(type: "int", maxLength: 128, nullable: false, comment: "表计类型名称"), - SelfDevelop = table.Column(type: "tinyint(1)", nullable: false, comment: "是否自研"), - BrandType = table.Column(type: "varchar(128)", maxLength: 128, nullable: true, comment: "品牌类型") - .Annotation("MySql:CharSet", "utf8mb4"), - ArchiveStatus = table.Column(type: "tinyint(1)", nullable: false, comment: "归档状态"), - TripState = table.Column(type: "tinyint(1)", nullable: false, comment: "是否跳闸"), - TimesA = table.Column(type: "decimal(18,4)", nullable: false, comment: "倍率A"), - Timev = table.Column(type: "decimal(18,4)", nullable: false, comment: "倍率V"), - HaveValve = table.Column(type: "tinyint(1)", nullable: true, comment: "是否带阀控"), - Enabled = table.Column(type: "tinyint(1)", nullable: false, comment: "是否启用"), - GatherCount = table.Column(type: "int", nullable: false, comment: "采集项数量"), - FunctionCount = table.Column(type: "int", nullable: false, comment: "功能数量(包含采集项和阀控等)"), - Address = table.Column(type: "varchar(20)", maxLength: 20, nullable: true, comment: "表计地址") - .Annotation("MySql:CharSet", "utf8mb4"), - AreaCode = table.Column(type: "varchar(20)", maxLength: 20, nullable: true, comment: "表计区域编码") - .Annotation("MySql:CharSet", "utf8mb4"), - LinkType = table.Column(type: "varchar(128)", maxLength: 128, nullable: true, comment: "水表通讯方案") - .Annotation("MySql:CharSet", "utf8mb4"), - MeterTypeName = table.Column(type: "varchar(128)", maxLength: 128, nullable: true, comment: "水表设备类型") - .Annotation("MySql:CharSet", "utf8mb4"), - Special = table.Column(type: "int", nullable: false, comment: "是否特殊表"), - AutomaticReport = table.Column(type: "int", nullable: false, comment: "是否自动采集"), - IoTPlatformProductId = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "集中器在物联网平台中对应的产品Id") - .Annotation("MySql:CharSet", "utf8mb4"), - IoTPlatformDeviceOpenInfo = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "集中器在物联网平台中对应的设备Id或者名称") - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true), - TenantId = table.Column(type: "char(36)", nullable: true, comment: "租户ID", collation: "ascii_general_ci"), - Remark = table.Column(type: "longtext", nullable: true, comment: "备注") - .Annotation("MySql:CharSet", "utf8mb4"), - OSACreatorId = table.Column(type: "int", nullable: true, comment: "旧系统授权创建者Id"), - OSALastModifierId = table.Column(type: "int", nullable: true, comment: "旧系统授权最后修改者Id"), - OSADeleterId = table.Column(type: "int", nullable: true, comment: "旧系统授权最后删除者Id"), - ExtraProperties = table.Column(type: "longtext", nullable: true, comment: "扩展属性,用于存储自定义字段,JSON格式") - .Annotation("MySql:CharSet", "utf8mb4") }, - constraints: table => - { - table.PrimaryKey("PK_ServiceProMeterInfo", x => x.Id); - }) + comment: "动态菜单管理") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( @@ -1053,7 +971,8 @@ namespace JiShe.IoT.Migrations constraints: table => { table.PrimaryKey("PK_ServiceProOneNETAccountInfo", x => x.Id); - }) + }, + comment: "OneNET账号管理") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( @@ -1116,7 +1035,8 @@ namespace JiShe.IoT.Migrations constraints: table => { table.PrimaryKey("PK_ServiceProOneNETProductInfo", x => x.Id); - }) + }, + comment: "OneNET产品管理") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( @@ -1148,7 +1068,8 @@ namespace JiShe.IoT.Migrations constraints: table => { table.PrimaryKey("PK_ServiceProTextTemplates", x => x.Id); - }) + }, + comment: "模板管理") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( @@ -1179,7 +1100,8 @@ namespace JiShe.IoT.Migrations constraints: table => { table.PrimaryKey("PK_ServiceProUserRefreshTokens", x => x.Id); - }) + }, + comment: "刷新Token") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( @@ -1269,7 +1191,8 @@ namespace JiShe.IoT.Migrations principalTable: "AbpDataDictionaries", principalColumn: "Id", onDelete: ReferentialAction.Cascade); - }) + }, + comment: "数据字典详情") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( @@ -1769,37 +1692,21 @@ namespace JiShe.IoT.Migrations descending: new bool[0]); migrationBuilder.CreateIndex( - name: "IX_ServiceProFocusInfo_CreationTime", - table: "ServiceProFocusInfo", + name: "IX_ServiceProDeviceInfo_CreationTime", + table: "ServiceProDeviceInfo", column: "CreationTime"); migrationBuilder.CreateIndex( - name: "IX_ServiceProFocusInfo_IsNotUniqueKey", - table: "ServiceProFocusInfo", - columns: new[] { "Id", "FocusAddress", "CreationTime" }, + name: "IX_ServiceProDeviceInfo_DeviceAddress", + table: "ServiceProDeviceInfo", + column: "DeviceAddress"); + + migrationBuilder.CreateIndex( + name: "IX_ServiceProDeviceInfo_IsNotUniqueKey", + table: "ServiceProDeviceInfo", + columns: new[] { "Id", "DeviceName", "DeviceAddress", "IoTPlatformProductId", "CreationTime" }, descending: new bool[0]); - migrationBuilder.CreateIndex( - name: "IX_ServiceProMeterInfo_CreationTime", - table: "ServiceProMeterInfo", - column: "CreationTime"); - - migrationBuilder.CreateIndex( - name: "IX_ServiceProMeterInfo_FocusAddress", - table: "ServiceProMeterInfo", - column: "FocusAddress"); - - migrationBuilder.CreateIndex( - name: "IX_ServiceProMeterInfo_IsNotUniqueKey", - table: "ServiceProMeterInfo", - columns: new[] { "Id", "MeterAddress", "FocusAddress", "CreationTime" }, - descending: new bool[0]); - - migrationBuilder.CreateIndex( - name: "IX_ServiceProMeterInfo_MeterAddress", - table: "ServiceProMeterInfo", - column: "MeterAddress"); - migrationBuilder.CreateIndex( name: "IX_ServiceProOneNETAccountInfo_CreationTime", table: "ServiceProOneNETAccountInfo", @@ -1933,14 +1840,11 @@ namespace JiShe.IoT.Migrations name: "ServiceProCTWingPrivateProductInfo"); migrationBuilder.DropTable( - name: "ServiceProFocusInfo"); + name: "ServiceProDeviceInfo"); migrationBuilder.DropTable( name: "ServiceProMenus"); - migrationBuilder.DropTable( - name: "ServiceProMeterInfo"); - migrationBuilder.DropTable( name: "ServiceProOneNETAccountInfo"); diff --git a/src/JiShe.IoT.EntityFrameworkCore/Migrations/IoTDbContextModelSnapshot.cs b/src/JiShe.IoT.EntityFrameworkCore/Migrations/IoTDbContextModelSnapshot.cs index beb3e71..908a7f5 100644 --- a/src/JiShe.IoT.EntityFrameworkCore/Migrations/IoTDbContextModelSnapshot.cs +++ b/src/JiShe.IoT.EntityFrameworkCore/Migrations/IoTDbContextModelSnapshot.cs @@ -103,7 +103,10 @@ namespace JiShe.IoT.Migrations b.HasIndex("RefreshToken"); - b.ToTable("ServiceProUserRefreshTokens", (string)null); + b.ToTable("ServiceProUserRefreshTokens", null, t => + { + t.HasComment("刷新Token"); + }); }); modelBuilder.Entity("JiShe.ServicePro.CTWingManagement.CTWingAccount.CTWingAccountInfo", b => @@ -212,7 +215,10 @@ namespace JiShe.IoT.Migrations b.HasIndex(new[] { "Id", "AccountId", "AccountName", "CreationTime" }, "IX_ServiceProCTWingAccountInfo_IsNotUniqueKey") .IsDescending(); - b.ToTable("ServiceProCTWingAccountInfo", (string)null); + b.ToTable("ServiceProCTWingAccountInfo", null, t => + { + t.HasComment("CTWing账号信息"); + }); }); modelBuilder.Entity("JiShe.ServicePro.CTWingManagement.CTWingProduct.CTWingPrivateProductInfo", b => @@ -377,7 +383,10 @@ namespace JiShe.IoT.Migrations b.HasIndex(new[] { "Id", "IoTPlatformProductId", "ProductName", "CreationTime" }, "IX_ServiceProCTWingPrivateProductInfo_IsNotUniqueKey") .IsDescending(); - b.ToTable("ServiceProCTWingPrivateProductInfo", (string)null); + b.ToTable("ServiceProCTWingPrivateProductInfo", null, t => + { + t.HasComment("CTWing产品信息"); + }); }); modelBuilder.Entity("JiShe.ServicePro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionary", b => @@ -448,7 +457,10 @@ namespace JiShe.IoT.Migrations b.HasKey("Id"); - b.ToTable("AbpDataDictionaries", (string)null); + b.ToTable("AbpDataDictionaries", null, t => + { + t.HasComment("数据字典"); + }); }); modelBuilder.Entity("JiShe.ServicePro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionaryDetail", b => @@ -494,19 +506,17 @@ namespace JiShe.IoT.Migrations b.HasIndex("DataDictionaryId"); - b.ToTable("AbpDataDictionaryDetails", (string)null); + b.ToTable("AbpDataDictionaryDetails", null, t => + { + t.HasComment("数据字典详情"); + }); }); - modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.Focuses.FocusInfo", b => + modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.DeivceInfos.DeviceManagementInfo", b => { b.Property("Id") .HasColumnType("char(36)"); - b.Property("APN") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("APN"); - b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() @@ -530,58 +540,50 @@ namespace JiShe.IoT.Migrations .HasColumnType("datetime(6)") .HasColumnName("DeletionTime"); - b.Property("DeviceNo") - .HasMaxLength(80) - .HasColumnType("varchar(80)") - .HasComment("设备编号"); + b.Property("DeviceAddress") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasComment("设备地址"); - b.Property("Enabled") - .HasColumnType("tinyint(1)") - .HasComment("是否启用"); + b.Property("DeviceName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasComment("设备名称"); b.Property("ExtraProperties") .HasColumnType("longtext") .HasColumnName("ExtraProperties") .HasComment("扩展属性,用于存储自定义字段,JSON格式"); - b.Property("FocusAddress") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("集中器地址"); - - b.Property("FocusCode") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasComment("集中器型号"); - - b.Property("HardwareReleaseDate") - .HasMaxLength(80) - .HasColumnType("varchar(80)") - .HasComment("硬件软件发布日期:日月年"); - - b.Property("HardwareVersion") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasComment("硬件软件版本号"); - - b.Property("HeartbeatInterval") - .HasColumnType("int") - .HasComment("心跳间隔"); - b.Property("IoTPlatform") .HasColumnType("int") - .HasComment("物联网平台类型,默认没有指定"); + .HasComment("物联网平台类型,默认没有指定"); + + b.Property("IoTPlatformAccountId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("物联网平台中对应的账号Id"); b.Property("IoTPlatformDeviceOpenInfo") + .IsRequired() .HasMaxLength(128) .HasColumnType("varchar(128)") - .HasComment("集中器在物联网平台中的设备ID"); + .HasComment("物联网平台中对应的设备Id或者名称"); b.Property("IoTPlatformProductId") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasComment("集中器在物联网平台中对应的产品Id"); + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasComment("物联网平台中对应的产品Id"); + + b.Property("IoTPlatformResponse") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasComment("物联网平台返回的响应信息"); b.Property("IsDeleted") .ValueGeneratedOnAdd() @@ -597,26 +599,6 @@ namespace JiShe.IoT.Migrations .HasColumnType("char(36)") .HasColumnName("LastModifierId"); - b.Property("LastRefreshTime") - .HasColumnType("datetime(6)") - .HasComment("最后刷新时间"); - - b.Property("MakerNo") - .HasMaxLength(80) - .HasColumnType("varchar(80)") - .HasComment("厂商代号"); - - b.Property("MasterStation") - .HasMaxLength(80) - .HasColumnType("varchar(80)") - .HasComment("主站"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasComment("集中器名称"); - b.Property("OSACreatorId") .HasColumnType("int") .HasComment("旧系统授权创建者Id"); @@ -630,275 +612,33 @@ namespace JiShe.IoT.Migrations .HasComment("旧系统授权最后修改者Id"); b.Property("PlatformPassword") - .HasMaxLength(256) - .HasColumnType("varchar(256)") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") .HasComment("物联网平台设备密码"); b.Property("Remark") .HasColumnType("longtext") .HasComment("备注"); - b.Property("SelfDevelop") - .HasColumnType("tinyint(1)") - .HasComment("是否自研"); - - b.Property("SimCard") - .HasMaxLength(80) - .HasColumnType("varchar(80)") - .HasComment("通讯SIM卡卡号"); - - b.Property("SoftwareReleaseDate") - .HasMaxLength(80) - .HasColumnType("varchar(80)") - .HasComment("终端软件发布日期:日月年"); - - b.Property("SoftwareVersion") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasComment("终端软件版本号"); - - b.Property("Status") - .HasColumnType("tinyint(1)") - .HasComment("是否在线状态"); - b.Property("TenantId") .HasColumnType("char(36)") .HasColumnName("TenantId") .HasComment("租户ID"); - b.Property("TimeDensity") - .HasColumnType("int") - .HasComment("采集密度"); - - b.Property("UpLink") - .HasMaxLength(20) - .HasColumnType("int") - .HasComment("上行链路"); - b.HasKey("Id"); b.HasIndex("CreationTime"); - b.HasIndex(new[] { "Id", "FocusAddress", "CreationTime" }, "IX_ServiceProFocusInfo_IsNotUniqueKey") + b.HasIndex("DeviceAddress"); + + b.HasIndex(new[] { "Id", "DeviceName", "DeviceAddress", "IoTPlatformProductId", "CreationTime" }, "IX_ServiceProDeviceInfo_IsNotUniqueKey") .IsDescending(); - b.ToTable("ServiceProFocusInfo", (string)null); - }); - - modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.Meters.MeterInfo", b => - { - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("Address") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("表计地址"); - - b.Property("ArchiveStatus") - .HasColumnType("tinyint(1)") - .HasComment("归档状态"); - - b.Property("AreaCode") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("表计区域编码"); - - b.Property("AutomaticReport") - .HasColumnType("int") - .HasComment("是否自动采集"); - - b.Property("Baudrate") - .HasColumnType("int") - .HasComment("波特率"); - - b.Property("BrandType") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasComment("品牌类型"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DynamicPassword") - .HasColumnType("tinyint(1)") - .HasComment("是否动态密码"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)") - .HasComment("是否启用"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties") - .HasComment("扩展属性,用于存储自定义字段,JSON格式"); - - b.Property("FocusAddress") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("集中器地址"); - - b.Property("FunctionCount") - .HasColumnType("int") - .HasComment("功能数量(包含采集项和阀控等)"); - - b.Property("GatherCount") - .HasColumnType("int") - .HasComment("采集项数量"); - - b.Property("HaveValve") - .HasColumnType("tinyint(1)") - .HasComment("是否带阀控"); - - b.Property("IoTPlatformDeviceOpenInfo") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasComment("集中器在物联网平台中对应的设备Id或者名称"); - - b.Property("IoTPlatformProductId") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasComment("集中器在物联网平台中对应的产品Id"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LinkType") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasComment("水表通讯方案"); - - b.Property("MeterAddress") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasComment("表计地址"); - - b.Property("MeterName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasComment("表计名称"); - - b.Property("MeterType") - .HasColumnType("int") - .HasComment("表计类型"); - - b.Property("MeterTypeName") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasComment("水表设备类型"); - - b.Property("MeteringCode") - .HasColumnType("int") - .HasComment("表计编码"); - - b.Property("MeteringPort") - .HasColumnType("int") - .HasComment("表计端口"); - - b.Property("OSACreatorId") - .HasColumnType("int") - .HasComment("旧系统授权创建者Id"); - - b.Property("OSADeleterId") - .HasColumnType("int") - .HasComment("旧系统授权最后删除者Id"); - - b.Property("OSALastModifierId") - .HasColumnType("int") - .HasComment("旧系统授权最后修改者Id"); - - b.Property("Password") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasComment("密码"); - - b.Property("Protocol") - .HasColumnType("int") - .HasComment("协议类型"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("备注"); - - b.Property("SelfDevelop") - .HasColumnType("tinyint(1)") - .HasComment("是否自研"); - - b.Property("Special") - .HasColumnType("int") - .HasComment("是否特殊表"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId") - .HasComment("租户ID"); - - b.Property("TimesA") - .HasColumnType("decimal(18,4)") - .HasComment("倍率A"); - - b.Property("Timev") - .HasColumnType("decimal(18,4)") - .HasComment("倍率V"); - - b.Property("TripState") - .HasColumnType("tinyint(1)") - .HasComment("是否跳闸"); - - b.Property("TypeName") - .HasMaxLength(128) - .HasColumnType("int") - .HasComment("表计类型名称"); - - b.HasKey("Id"); - - b.HasIndex("CreationTime"); - - b.HasIndex("FocusAddress"); - - b.HasIndex("MeterAddress"); - - b.HasIndex(new[] { "Id", "MeterAddress", "FocusAddress", "CreationTime" }, "IX_ServiceProMeterInfo_IsNotUniqueKey") - .IsDescending(); - - b.ToTable("ServiceProMeterInfo", (string)null); + b.ToTable("ServiceProDeviceInfo", null, t => + { + t.HasComment("设备信息"); + }); }); modelBuilder.Entity("JiShe.ServicePro.DynamicMenuManagement.Menus.Menu", b => @@ -1021,7 +761,10 @@ namespace JiShe.IoT.Migrations b.HasKey("Id"); - b.ToTable("ServiceProMenus", (string)null); + b.ToTable("ServiceProMenus", null, t => + { + t.HasComment("动态菜单管理"); + }); }); modelBuilder.Entity("JiShe.ServicePro.FileManagement.Files.FileObject", b => @@ -1095,7 +838,10 @@ namespace JiShe.IoT.Migrations b.HasIndex("FileName"); - b.ToTable("AbpFileObjects", (string)null); + b.ToTable("AbpFileObjects", null, t => + { + t.HasComment("文件管理"); + }); }); modelBuilder.Entity("JiShe.ServicePro.LanguageManagement.LanguageTexts.Aggregates.LanguageText", b => @@ -1177,7 +923,10 @@ namespace JiShe.IoT.Migrations b.HasIndex("TenantId", "ResourceName", "CultureName"); - b.ToTable("AbpLanguageTexts", (string)null); + b.ToTable("AbpLanguageTexts", null, t => + { + t.HasComment("语言文本管理"); + }); }); modelBuilder.Entity("JiShe.ServicePro.LanguageManagement.Languages.Aggregates.Language", b => @@ -1264,7 +1013,10 @@ namespace JiShe.IoT.Migrations b.HasIndex("CultureName"); - b.ToTable("AbpLanguages", (string)null); + b.ToTable("AbpLanguages", null, t => + { + t.HasComment("语言管理"); + }); }); modelBuilder.Entity("JiShe.ServicePro.NotificationManagement.Notifications.Aggregates.Notification", b => @@ -1357,7 +1109,10 @@ namespace JiShe.IoT.Migrations b.HasKey("Id"); - b.ToTable("AbpNotifications", (string)null); + b.ToTable("AbpNotifications", null, t => + { + t.HasComment("消息通知管理"); + }); }); modelBuilder.Entity("JiShe.ServicePro.NotificationManagement.Notifications.Aggregates.NotificationSubscription", b => @@ -1433,7 +1188,10 @@ namespace JiShe.IoT.Migrations b.HasIndex("ReceiveUserId"); - b.ToTable("AbpNotificationSubscriptions", (string)null); + b.ToTable("AbpNotificationSubscriptions", null, t => + { + t.HasComment("消息订阅者"); + }); }); modelBuilder.Entity("JiShe.ServicePro.OneNETManagement.OneNETAccounts.OneNETAccountInfos", b => @@ -1538,7 +1296,10 @@ namespace JiShe.IoT.Migrations b.HasIndex(new[] { "Id", "OneNETAccountId", "AccountName", "PhoneNumber", "CreationTime" }, "IX_ServiceProOneNETAccountInfo_IsNotUniqueKey") .IsDescending(); - b.ToTable("ServiceProOneNETAccountInfo", (string)null); + b.ToTable("ServiceProOneNETAccountInfo", null, t => + { + t.HasComment("OneNET账号管理"); + }); }); modelBuilder.Entity("JiShe.ServicePro.OneNETManagement.OneNETProducts.OneNETProductInfos", b => @@ -1702,7 +1463,10 @@ namespace JiShe.IoT.Migrations b.HasIndex(new[] { "Id", "IoTPlatformProductId", "ProductName", "CreationTime" }, "IX_ServiceProOneNETProductInfo_IsNotUniqueKey") .IsDescending(); - b.ToTable("ServiceProOneNETProductInfo", (string)null); + b.ToTable("ServiceProOneNETProductInfo", null, t => + { + t.HasComment("OneNET产品管理"); + }); }); modelBuilder.Entity("JiShe.ServicePro.TemplateManagement.TextTemplates.TextTemplate", b => @@ -1784,7 +1548,10 @@ namespace JiShe.IoT.Migrations b.HasIndex("Code"); - b.ToTable("ServiceProTextTemplates", (string)null); + b.ToTable("ServiceProTextTemplates", null, t => + { + t.HasComment("模板管理"); + }); }); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b =>