From 233c23cbb1e19c2f9c2b86bb8c74fed473283d23 Mon Sep 17 00:00:00 2001 From: iioter <535915157@qq.com> Date: Fri, 19 Jul 2024 09:23:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=B3=A8=E9=87=8A=E5=92=8C=E7=B4=A2=E5=BC=95=EF=BC=9B=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=BA=93=E8=BD=AC=E7=A7=BB=E5=88=B0data=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=A4=B9=E4=B8=8B=E6=96=B9=E4=BE=BFdocker=E6=8C=82?= =?UTF-8?q?=E8=BD=BD=E5=8D=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IoTGateway.DataAccess/DataContext.cs | 2 +- ...20240719011950_CommentAndIndex.Designer.cs | 951 +++++++++++++++ .../20240719011950_CommentAndIndex.cs | 1045 +++++++++++++++++ .../Migrations/DataContextModelSnapshot.cs | 171 ++- IoTGateway.Model/Device.cs | 15 + IoTGateway.Model/DeviceConfig.cs | 18 +- IoTGateway.Model/DeviceVariable.cs | 31 + IoTGateway.Model/Driver.cs | 11 +- IoTGateway.Model/RpcLog.cs | 14 +- IoTGateway.Model/SystemConfig.cs | 17 +- IoTGateway/IoTGateway.csproj | 2 +- IoTGateway/appsettings.json | 2 +- IoTGateway/{ => data}/iotgateway.db | Bin 360448 -> 475136 bytes 13 files changed, 2224 insertions(+), 55 deletions(-) create mode 100644 IoTGateway.DataAccess/Migrations/20240719011950_CommentAndIndex.Designer.cs create mode 100644 IoTGateway.DataAccess/Migrations/20240719011950_CommentAndIndex.cs rename IoTGateway/{ => data}/iotgateway.db (69%) diff --git a/IoTGateway.DataAccess/DataContext.cs b/IoTGateway.DataAccess/DataContext.cs index 9a3bc71..c722276 100644 --- a/IoTGateway.DataAccess/DataContext.cs +++ b/IoTGateway.DataAccess/DataContext.cs @@ -80,7 +80,7 @@ namespace IoTGateway.DataAccess { public DataContext CreateDbContext(string[] args) { - return new DataContext("Data Source = ../IoTGateway/iotgateway.db", DBTypeEnum.SQLite); + return new DataContext("Data Source = ../IoTGateway/data/iotgateway.db", DBTypeEnum.SQLite); } } diff --git a/IoTGateway.DataAccess/Migrations/20240719011950_CommentAndIndex.Designer.cs b/IoTGateway.DataAccess/Migrations/20240719011950_CommentAndIndex.Designer.cs new file mode 100644 index 0000000..38a2f94 --- /dev/null +++ b/IoTGateway.DataAccess/Migrations/20240719011950_CommentAndIndex.Designer.cs @@ -0,0 +1,951 @@ +// +using System; +using IoTGateway.DataAccess; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace IoTGateway.DataAccess.Migrations +{ + [DbContext(typeof(DataContext))] + [Migration("20240719011950_CommentAndIndex")] + partial class CommentAndIndex + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder.HasAnnotation("ProductVersion", "6.0.10"); + + modelBuilder.Entity("IoTGateway.Model.Device", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("AutoStart") + .HasColumnType("INTEGER") + .HasComment("启动"); + + b.Property("CgUpload") + .HasColumnType("INTEGER") + .HasComment("变化上传"); + + b.Property("CmdPeriod") + .HasColumnType("INTEGER") + .HasComment("指令间隔ms"); + + b.Property("CreateBy") + .HasColumnType("TEXT"); + + b.Property("CreateTime") + .HasColumnType("TEXT"); + + b.Property("Description") + .HasColumnType("TEXT") + .HasComment("描述"); + + b.Property("DeviceName") + .HasColumnType("TEXT") + .HasComment("名称"); + + b.Property("DeviceTypeEnum") + .HasColumnType("INTEGER") + .HasComment("类型(组或设备)"); + + b.Property("DriverId") + .HasColumnType("TEXT") + .HasComment("驱动"); + + b.Property("EnforcePeriod") + .HasColumnType("INTEGER") + .HasComment("归档周期ms"); + + b.Property("Index") + .HasColumnType("INTEGER") + .HasComment("排序"); + + b.Property("ParentId") + .HasColumnType("TEXT"); + + b.Property("UpdateBy") + .HasColumnType("TEXT"); + + b.Property("UpdateTime") + .HasColumnType("TEXT"); + + b.HasKey("ID"); + + b.HasIndex("AutoStart"); + + b.HasIndex("DeviceName"); + + b.HasIndex("DeviceTypeEnum"); + + b.HasIndex("DriverId"); + + b.HasIndex("ParentId"); + + b.ToTable("Devices"); + + b.HasComment("设备维护"); + }); + + modelBuilder.Entity("IoTGateway.Model.DeviceConfig", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("CreateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("CreateTime") + .HasColumnType("TEXT"); + + b.Property("DataSide") + .HasColumnType("INTEGER") + .HasComment("属性侧"); + + b.Property("Description") + .HasColumnType("TEXT") + .HasComment("描述"); + + b.Property("DeviceConfigName") + .HasColumnType("TEXT") + .HasComment("名称"); + + b.Property("DeviceId") + .HasColumnType("TEXT") + .HasComment("所属设备"); + + b.Property("EnumInfo") + .HasColumnType("TEXT") + .HasComment("备注"); + + b.Property("UpdateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("UpdateTime") + .HasColumnType("TEXT"); + + b.Property("Value") + .HasColumnType("TEXT") + .HasComment("值"); + + b.HasKey("ID"); + + b.HasIndex("DeviceConfigName"); + + b.HasIndex("DeviceId"); + + b.HasIndex("Value"); + + b.ToTable("DeviceConfigs"); + + b.HasComment("通讯配置"); + }); + + modelBuilder.Entity("IoTGateway.Model.DeviceVariable", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("Alias") + .HasColumnType("TEXT") + .HasComment("别名"); + + b.Property("DataType") + .HasColumnType("INTEGER") + .HasComment("数据类型"); + + b.Property("Description") + .HasColumnType("TEXT") + .HasComment("描述"); + + b.Property("DeviceAddress") + .HasColumnType("TEXT") + .HasComment("地址"); + + b.Property("DeviceId") + .HasColumnType("TEXT") + .HasComment("所属设备"); + + b.Property("EndianType") + .HasColumnType("INTEGER") + .HasComment("大小端"); + + b.Property("Expressions") + .HasColumnType("TEXT") + .HasComment("表达式"); + + b.Property("Index") + .HasColumnType("INTEGER") + .HasComment("排序"); + + b.Property("IsTrigger") + .HasColumnType("INTEGER") + .HasComment("触发"); + + b.Property("IsUpload") + .HasColumnType("INTEGER") + .HasComment("上传"); + + b.Property("Method") + .HasColumnType("TEXT") + .HasComment("方法"); + + b.Property("Name") + .HasColumnType("TEXT") + .HasComment("变量名"); + + b.Property("ProtectType") + .HasColumnType("INTEGER") + .HasComment("权限"); + + b.HasKey("ID"); + + b.HasIndex("DataType"); + + b.HasIndex("DeviceAddress"); + + b.HasIndex("DeviceId"); + + b.HasIndex("Method"); + + b.HasIndex("Name"); + + b.ToTable("DeviceVariables"); + + b.HasComment("变量配置"); + }); + + modelBuilder.Entity("IoTGateway.Model.Driver", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("AssembleName") + .HasColumnType("TEXT") + .HasComment("程序集名"); + + b.Property("AuthorizesNum") + .HasColumnType("INTEGER") + .HasComment("剩余授权数"); + + b.Property("CreateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("CreateTime") + .HasColumnType("TEXT"); + + b.Property("DriverName") + .HasColumnType("TEXT") + .HasComment("驱动名"); + + b.Property("FileName") + .HasColumnType("TEXT") + .HasComment("文件名"); + + b.Property("UpdateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("UpdateTime") + .HasColumnType("TEXT"); + + b.HasKey("ID"); + + b.ToTable("Drivers"); + + b.HasComment("驱动管理"); + }); + + modelBuilder.Entity("IoTGateway.Model.RpcLog", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("Description") + .HasColumnType("TEXT") + .HasComment("描述"); + + b.Property("DeviceId") + .HasColumnType("TEXT") + .HasComment("所属设备"); + + b.Property("EndTime") + .HasColumnType("TEXT") + .HasComment("结束时间"); + + b.Property("IsSuccess") + .HasColumnType("INTEGER") + .HasComment("是否成功"); + + b.Property("Method") + .HasColumnType("TEXT") + .HasComment("方法"); + + b.Property("Params") + .HasColumnType("TEXT") + .HasComment("请求参数"); + + b.Property("RpcSide") + .HasColumnType("INTEGER") + .HasComment("发起方"); + + b.Property("StartTime") + .HasColumnType("TEXT") + .HasComment("开始时间"); + + b.HasKey("ID"); + + b.HasIndex("DeviceId"); + + b.ToTable("RpcLogs"); + + b.HasComment("RPC日志"); + }); + + modelBuilder.Entity("IoTGateway.Model.SystemConfig", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("ClientId") + .HasColumnType("TEXT") + .HasComment("ClientId"); + + b.Property("CreateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("CreateTime") + .HasColumnType("TEXT"); + + b.Property("GatewayName") + .HasColumnType("TEXT") + .HasComment("网关名称"); + + b.Property("IoTPlatformType") + .HasColumnType("INTEGER") + .HasComment("输出平台"); + + b.Property("MqttIp") + .HasColumnType("TEXT") + .HasComment("Mqtt服务器"); + + b.Property("MqttPort") + .HasColumnType("INTEGER") + .HasComment("Mqtt端口"); + + b.Property("MqttUName") + .HasColumnType("TEXT") + .HasComment("Mqtt用户名"); + + b.Property("MqttUPwd") + .HasColumnType("TEXT") + .HasComment("Mqtt密码"); + + b.Property("UpdateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("UpdateTime") + .HasColumnType("TEXT"); + + b.HasKey("ID"); + + b.ToTable("SystemConfig"); + + b.HasComment("传输配置"); + }); + + modelBuilder.Entity("WalkingTec.Mvvm.Core.ActionLog", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("ActionName") + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("ActionTime") + .HasColumnType("TEXT"); + + b.Property("ActionUrl") + .HasMaxLength(250) + .HasColumnType("TEXT"); + + b.Property("CreateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("CreateTime") + .HasColumnType("TEXT"); + + b.Property("Duration") + .HasColumnType("REAL"); + + b.Property("IP") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("ITCode") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("LogType") + .HasColumnType("INTEGER"); + + b.Property("ModuleName") + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("Remark") + .HasColumnType("TEXT"); + + b.Property("UpdateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("UpdateTime") + .HasColumnType("TEXT"); + + b.HasKey("ID"); + + b.ToTable("ActionLogs"); + }); + + modelBuilder.Entity("WalkingTec.Mvvm.Core.DataPrivilege", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("CreateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("CreateTime") + .HasColumnType("TEXT"); + + b.Property("Domain") + .HasColumnType("TEXT"); + + b.Property("GroupCode") + .HasColumnType("TEXT"); + + b.Property("RelateId") + .HasColumnType("TEXT"); + + b.Property("TableName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("UpdateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("UpdateTime") + .HasColumnType("TEXT"); + + b.Property("UserCode") + .HasColumnType("TEXT"); + + b.HasKey("ID"); + + b.ToTable("DataPrivileges"); + }); + + modelBuilder.Entity("WalkingTec.Mvvm.Core.FileAttachment", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("ExtraInfo") + .HasColumnType("TEXT"); + + b.Property("FileData") + .HasColumnType("BLOB"); + + b.Property("FileExt") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("TEXT"); + + b.Property("FileName") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("HandlerInfo") + .HasColumnType("TEXT"); + + b.Property("Length") + .HasColumnType("INTEGER"); + + b.Property("Path") + .HasColumnType("TEXT"); + + b.Property("SaveMode") + .HasColumnType("TEXT"); + + b.Property("UploadTime") + .HasColumnType("TEXT"); + + b.HasKey("ID"); + + b.ToTable("FileAttachments"); + }); + + modelBuilder.Entity("WalkingTec.Mvvm.Core.FrameworkGroup", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("CreateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("CreateTime") + .HasColumnType("TEXT"); + + b.Property("GroupCode") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("GroupRemark") + .HasColumnType("TEXT"); + + b.Property("TenantCode") + .HasColumnType("TEXT"); + + b.Property("UpdateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("UpdateTime") + .HasColumnType("TEXT"); + + b.HasKey("ID"); + + b.ToTable("FrameworkGroups"); + }); + + modelBuilder.Entity("WalkingTec.Mvvm.Core.FrameworkMenu", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("ActionName") + .HasColumnType("TEXT"); + + b.Property("ClassName") + .HasColumnType("TEXT"); + + b.Property("DisplayOrder") + .IsRequired() + .HasColumnType("INTEGER"); + + b.Property("Domain") + .HasColumnType("TEXT"); + + b.Property("FolderOnly") + .HasColumnType("INTEGER"); + + b.Property("Icon") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("IsInherit") + .HasColumnType("INTEGER"); + + b.Property("IsInside") + .IsRequired() + .HasColumnType("INTEGER"); + + b.Property("IsPublic") + .HasColumnType("INTEGER"); + + b.Property("MethodName") + .HasColumnType("TEXT"); + + b.Property("ModuleName") + .HasColumnType("TEXT"); + + b.Property("PageName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("ParentId") + .HasColumnType("TEXT"); + + b.Property("ShowOnMenu") + .HasColumnType("INTEGER"); + + b.Property("Url") + .HasColumnType("TEXT"); + + b.HasKey("ID"); + + b.HasIndex("ParentId"); + + b.ToTable("FrameworkMenus"); + }); + + modelBuilder.Entity("WalkingTec.Mvvm.Core.FrameworkRole", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("CreateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("CreateTime") + .HasColumnType("TEXT"); + + b.Property("RoleCode") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("RoleName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("RoleRemark") + .HasColumnType("TEXT"); + + b.Property("TenantCode") + .HasColumnType("TEXT"); + + b.Property("UpdateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("UpdateTime") + .HasColumnType("TEXT"); + + b.HasKey("ID"); + + b.ToTable("FrameworkRoles"); + }); + + modelBuilder.Entity("WalkingTec.Mvvm.Core.FrameworkUser", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("Address") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("CellPhone") + .HasColumnType("TEXT"); + + b.Property("CreateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("CreateTime") + .HasColumnType("TEXT"); + + b.Property("Email") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("Gender") + .HasColumnType("INTEGER"); + + b.Property("HomePhone") + .HasMaxLength(30) + .HasColumnType("TEXT"); + + b.Property("ITCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("IsValid") + .HasColumnType("INTEGER"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("PhotoId") + .HasColumnType("TEXT"); + + b.Property("TenantCode") + .HasColumnType("TEXT"); + + b.Property("UpdateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("UpdateTime") + .HasColumnType("TEXT"); + + b.Property("ZipCode") + .HasColumnType("TEXT"); + + b.HasKey("ID"); + + b.HasIndex("PhotoId"); + + b.ToTable("FrameworkUsers"); + }); + + modelBuilder.Entity("WalkingTec.Mvvm.Core.FrameworkUserGroup", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("CreateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("CreateTime") + .HasColumnType("TEXT"); + + b.Property("GroupCode") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("UpdateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("UpdateTime") + .HasColumnType("TEXT"); + + b.Property("UserCode") + .IsRequired() + .HasColumnType("TEXT"); + + b.HasKey("ID"); + + b.ToTable("FrameworkUserGroups"); + }); + + modelBuilder.Entity("WalkingTec.Mvvm.Core.FrameworkUserRole", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("CreateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("CreateTime") + .HasColumnType("TEXT"); + + b.Property("RoleCode") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("UpdateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("UpdateTime") + .HasColumnType("TEXT"); + + b.Property("UserCode") + .IsRequired() + .HasColumnType("TEXT"); + + b.HasKey("ID"); + + b.ToTable("FrameworkUserRoles"); + }); + + modelBuilder.Entity("WalkingTec.Mvvm.Core.FunctionPrivilege", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("Allowed") + .IsRequired() + .HasColumnType("INTEGER"); + + b.Property("CreateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("CreateTime") + .HasColumnType("TEXT"); + + b.Property("MenuItemId") + .HasColumnType("TEXT"); + + b.Property("RoleCode") + .HasColumnType("TEXT"); + + b.Property("UpdateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("UpdateTime") + .HasColumnType("TEXT"); + + b.HasKey("ID"); + + b.HasIndex("MenuItemId"); + + b.ToTable("FunctionPrivileges"); + }); + + modelBuilder.Entity("WalkingTec.Mvvm.Core.PersistedGrant", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("CreationTime") + .HasColumnType("TEXT"); + + b.Property("Expiration") + .HasColumnType("TEXT"); + + b.Property("RefreshToken") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("UserCode") + .HasColumnType("TEXT"); + + b.HasKey("ID"); + + b.ToTable("PersistedGrants"); + }); + + modelBuilder.Entity("IoTGateway.Model.Device", b => + { + b.HasOne("IoTGateway.Model.Driver", "Driver") + .WithMany() + .HasForeignKey("DriverId"); + + b.HasOne("IoTGateway.Model.Device", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId"); + + b.Navigation("Driver"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("IoTGateway.Model.DeviceConfig", b => + { + b.HasOne("IoTGateway.Model.Device", "Device") + .WithMany("DeviceConfigs") + .HasForeignKey("DeviceId"); + + b.Navigation("Device"); + }); + + modelBuilder.Entity("IoTGateway.Model.DeviceVariable", b => + { + b.HasOne("IoTGateway.Model.Device", "Device") + .WithMany("DeviceVariables") + .HasForeignKey("DeviceId"); + + b.Navigation("Device"); + }); + + modelBuilder.Entity("IoTGateway.Model.RpcLog", b => + { + b.HasOne("IoTGateway.Model.Device", "Device") + .WithMany() + .HasForeignKey("DeviceId"); + + b.Navigation("Device"); + }); + + modelBuilder.Entity("WalkingTec.Mvvm.Core.FrameworkMenu", b => + { + b.HasOne("WalkingTec.Mvvm.Core.FrameworkMenu", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("WalkingTec.Mvvm.Core.FrameworkUser", b => + { + b.HasOne("WalkingTec.Mvvm.Core.FileAttachment", "Photo") + .WithMany() + .HasForeignKey("PhotoId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Photo"); + }); + + modelBuilder.Entity("WalkingTec.Mvvm.Core.FunctionPrivilege", b => + { + b.HasOne("WalkingTec.Mvvm.Core.FrameworkMenu", "MenuItem") + .WithMany("Privileges") + .HasForeignKey("MenuItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("MenuItem"); + }); + + modelBuilder.Entity("IoTGateway.Model.Device", b => + { + b.Navigation("Children"); + + b.Navigation("DeviceConfigs"); + + b.Navigation("DeviceVariables"); + }); + + modelBuilder.Entity("WalkingTec.Mvvm.Core.FrameworkMenu", b => + { + b.Navigation("Children"); + + b.Navigation("Privileges"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/IoTGateway.DataAccess/Migrations/20240719011950_CommentAndIndex.cs b/IoTGateway.DataAccess/Migrations/20240719011950_CommentAndIndex.cs new file mode 100644 index 0000000..8fb850e --- /dev/null +++ b/IoTGateway.DataAccess/Migrations/20240719011950_CommentAndIndex.cs @@ -0,0 +1,1045 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace IoTGateway.DataAccess.Migrations +{ + public partial class CommentAndIndex : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterTable( + name: "SystemConfig", + comment: "传输配置"); + + migrationBuilder.AlterTable( + name: "RpcLogs", + comment: "RPC日志"); + + migrationBuilder.AlterTable( + name: "Drivers", + comment: "驱动管理"); + + migrationBuilder.AlterTable( + name: "DeviceVariables", + comment: "变量配置"); + + migrationBuilder.AlterTable( + name: "Devices", + comment: "设备维护"); + + migrationBuilder.AlterTable( + name: "DeviceConfigs", + comment: "通讯配置"); + + migrationBuilder.AlterColumn( + name: "MqttUPwd", + table: "SystemConfig", + type: "TEXT", + nullable: true, + comment: "Mqtt密码", + oldClrType: typeof(string), + oldType: "TEXT", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "MqttUName", + table: "SystemConfig", + type: "TEXT", + nullable: true, + comment: "Mqtt用户名", + oldClrType: typeof(string), + oldType: "TEXT", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "MqttPort", + table: "SystemConfig", + type: "INTEGER", + nullable: false, + comment: "Mqtt端口", + oldClrType: typeof(int), + oldType: "INTEGER"); + + migrationBuilder.AlterColumn( + name: "MqttIp", + table: "SystemConfig", + type: "TEXT", + nullable: true, + comment: "Mqtt服务器", + oldClrType: typeof(string), + oldType: "TEXT", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "IoTPlatformType", + table: "SystemConfig", + type: "INTEGER", + nullable: false, + comment: "输出平台", + oldClrType: typeof(int), + oldType: "INTEGER"); + + migrationBuilder.AlterColumn( + name: "GatewayName", + table: "SystemConfig", + type: "TEXT", + nullable: true, + comment: "网关名称", + oldClrType: typeof(string), + oldType: "TEXT", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ClientId", + table: "SystemConfig", + type: "TEXT", + nullable: true, + comment: "ClientId", + oldClrType: typeof(string), + oldType: "TEXT", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "StartTime", + table: "RpcLogs", + type: "TEXT", + nullable: false, + comment: "开始时间", + oldClrType: typeof(DateTime), + oldType: "TEXT"); + + migrationBuilder.AlterColumn( + name: "RpcSide", + table: "RpcLogs", + type: "INTEGER", + nullable: false, + comment: "发起方", + oldClrType: typeof(int), + oldType: "INTEGER"); + + migrationBuilder.AlterColumn( + name: "Params", + table: "RpcLogs", + type: "TEXT", + nullable: true, + comment: "请求参数", + oldClrType: typeof(string), + oldType: "TEXT", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Method", + table: "RpcLogs", + type: "TEXT", + nullable: true, + comment: "方法", + oldClrType: typeof(string), + oldType: "TEXT", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "IsSuccess", + table: "RpcLogs", + type: "INTEGER", + nullable: false, + comment: "是否成功", + oldClrType: typeof(bool), + oldType: "INTEGER"); + + migrationBuilder.AlterColumn( + name: "EndTime", + table: "RpcLogs", + type: "TEXT", + nullable: false, + comment: "结束时间", + oldClrType: typeof(DateTime), + oldType: "TEXT"); + + migrationBuilder.AlterColumn( + name: "DeviceId", + table: "RpcLogs", + type: "TEXT", + nullable: true, + comment: "所属设备", + oldClrType: typeof(Guid), + oldType: "TEXT", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Description", + table: "RpcLogs", + type: "TEXT", + nullable: true, + comment: "描述", + oldClrType: typeof(string), + oldType: "TEXT", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "FileName", + table: "Drivers", + type: "TEXT", + nullable: true, + comment: "文件名", + oldClrType: typeof(string), + oldType: "TEXT", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "DriverName", + table: "Drivers", + type: "TEXT", + nullable: true, + comment: "驱动名", + oldClrType: typeof(string), + oldType: "TEXT", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "AuthorizesNum", + table: "Drivers", + type: "INTEGER", + nullable: false, + comment: "剩余授权数", + oldClrType: typeof(int), + oldType: "INTEGER"); + + migrationBuilder.AlterColumn( + name: "AssembleName", + table: "Drivers", + type: "TEXT", + nullable: true, + comment: "程序集名", + oldClrType: typeof(string), + oldType: "TEXT", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ProtectType", + table: "DeviceVariables", + type: "INTEGER", + nullable: false, + comment: "权限", + oldClrType: typeof(int), + oldType: "INTEGER"); + + migrationBuilder.AlterColumn( + name: "Name", + table: "DeviceVariables", + type: "TEXT", + nullable: true, + comment: "变量名", + oldClrType: typeof(string), + oldType: "TEXT", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Method", + table: "DeviceVariables", + type: "TEXT", + nullable: true, + comment: "方法", + oldClrType: typeof(string), + oldType: "TEXT", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "IsUpload", + table: "DeviceVariables", + type: "INTEGER", + nullable: false, + comment: "上传", + oldClrType: typeof(bool), + oldType: "INTEGER"); + + migrationBuilder.AlterColumn( + name: "IsTrigger", + table: "DeviceVariables", + type: "INTEGER", + nullable: false, + comment: "触发", + oldClrType: typeof(bool), + oldType: "INTEGER"); + + migrationBuilder.AlterColumn( + name: "Index", + table: "DeviceVariables", + type: "INTEGER", + nullable: false, + comment: "排序", + oldClrType: typeof(uint), + oldType: "INTEGER"); + + migrationBuilder.AlterColumn( + name: "Expressions", + table: "DeviceVariables", + type: "TEXT", + nullable: true, + comment: "表达式", + oldClrType: typeof(string), + oldType: "TEXT", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "EndianType", + table: "DeviceVariables", + type: "INTEGER", + nullable: false, + comment: "大小端", + oldClrType: typeof(int), + oldType: "INTEGER"); + + migrationBuilder.AlterColumn( + name: "DeviceId", + table: "DeviceVariables", + type: "TEXT", + nullable: true, + comment: "所属设备", + oldClrType: typeof(Guid), + oldType: "TEXT", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "DeviceAddress", + table: "DeviceVariables", + type: "TEXT", + nullable: true, + comment: "地址", + oldClrType: typeof(string), + oldType: "TEXT", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Description", + table: "DeviceVariables", + type: "TEXT", + nullable: true, + comment: "描述", + oldClrType: typeof(string), + oldType: "TEXT", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "DataType", + table: "DeviceVariables", + type: "INTEGER", + nullable: false, + comment: "数据类型", + oldClrType: typeof(int), + oldType: "INTEGER"); + + migrationBuilder.AlterColumn( + name: "Alias", + table: "DeviceVariables", + type: "TEXT", + nullable: true, + comment: "别名", + oldClrType: typeof(string), + oldType: "TEXT", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Index", + table: "Devices", + type: "INTEGER", + nullable: false, + comment: "排序", + oldClrType: typeof(uint), + oldType: "INTEGER"); + + migrationBuilder.AlterColumn( + name: "EnforcePeriod", + table: "Devices", + type: "INTEGER", + nullable: false, + comment: "归档周期ms", + oldClrType: typeof(uint), + oldType: "INTEGER"); + + migrationBuilder.AlterColumn( + name: "DriverId", + table: "Devices", + type: "TEXT", + nullable: true, + comment: "驱动", + oldClrType: typeof(Guid), + oldType: "TEXT", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "DeviceTypeEnum", + table: "Devices", + type: "INTEGER", + nullable: false, + comment: "类型(组或设备)", + oldClrType: typeof(int), + oldType: "INTEGER"); + + migrationBuilder.AlterColumn( + name: "DeviceName", + table: "Devices", + type: "TEXT", + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "TEXT", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Description", + table: "Devices", + type: "TEXT", + nullable: true, + comment: "描述", + oldClrType: typeof(string), + oldType: "TEXT", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "CmdPeriod", + table: "Devices", + type: "INTEGER", + nullable: false, + comment: "指令间隔ms", + oldClrType: typeof(uint), + oldType: "INTEGER"); + + migrationBuilder.AlterColumn( + name: "CgUpload", + table: "Devices", + type: "INTEGER", + nullable: false, + comment: "变化上传", + oldClrType: typeof(bool), + oldType: "INTEGER"); + + migrationBuilder.AlterColumn( + name: "AutoStart", + table: "Devices", + type: "INTEGER", + nullable: false, + comment: "启动", + oldClrType: typeof(bool), + oldType: "INTEGER"); + + migrationBuilder.AlterColumn( + name: "Value", + table: "DeviceConfigs", + type: "TEXT", + nullable: true, + comment: "值", + oldClrType: typeof(string), + oldType: "TEXT", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "EnumInfo", + table: "DeviceConfigs", + type: "TEXT", + nullable: true, + comment: "备注", + oldClrType: typeof(string), + oldType: "TEXT", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "DeviceId", + table: "DeviceConfigs", + type: "TEXT", + nullable: true, + comment: "所属设备", + oldClrType: typeof(Guid), + oldType: "TEXT", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "DeviceConfigName", + table: "DeviceConfigs", + type: "TEXT", + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "TEXT", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Description", + table: "DeviceConfigs", + type: "TEXT", + nullable: true, + comment: "描述", + oldClrType: typeof(string), + oldType: "TEXT", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "DataSide", + table: "DeviceConfigs", + type: "INTEGER", + nullable: false, + comment: "属性侧", + oldClrType: typeof(int), + oldType: "INTEGER"); + + migrationBuilder.CreateIndex( + name: "IX_DeviceVariables_DataType", + table: "DeviceVariables", + column: "DataType"); + + migrationBuilder.CreateIndex( + name: "IX_DeviceVariables_DeviceAddress", + table: "DeviceVariables", + column: "DeviceAddress"); + + migrationBuilder.CreateIndex( + name: "IX_DeviceVariables_Method", + table: "DeviceVariables", + column: "Method"); + + migrationBuilder.CreateIndex( + name: "IX_DeviceVariables_Name", + table: "DeviceVariables", + column: "Name"); + + migrationBuilder.CreateIndex( + name: "IX_Devices_AutoStart", + table: "Devices", + column: "AutoStart"); + + migrationBuilder.CreateIndex( + name: "IX_Devices_DeviceName", + table: "Devices", + column: "DeviceName"); + + migrationBuilder.CreateIndex( + name: "IX_Devices_DeviceTypeEnum", + table: "Devices", + column: "DeviceTypeEnum"); + + migrationBuilder.CreateIndex( + name: "IX_DeviceConfigs_DeviceConfigName", + table: "DeviceConfigs", + column: "DeviceConfigName"); + + migrationBuilder.CreateIndex( + name: "IX_DeviceConfigs_Value", + table: "DeviceConfigs", + column: "Value"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropIndex( + name: "IX_DeviceVariables_DataType", + table: "DeviceVariables"); + + migrationBuilder.DropIndex( + name: "IX_DeviceVariables_DeviceAddress", + table: "DeviceVariables"); + + migrationBuilder.DropIndex( + name: "IX_DeviceVariables_Method", + table: "DeviceVariables"); + + migrationBuilder.DropIndex( + name: "IX_DeviceVariables_Name", + table: "DeviceVariables"); + + migrationBuilder.DropIndex( + name: "IX_Devices_AutoStart", + table: "Devices"); + + migrationBuilder.DropIndex( + name: "IX_Devices_DeviceName", + table: "Devices"); + + migrationBuilder.DropIndex( + name: "IX_Devices_DeviceTypeEnum", + table: "Devices"); + + migrationBuilder.DropIndex( + name: "IX_DeviceConfigs_DeviceConfigName", + table: "DeviceConfigs"); + + migrationBuilder.DropIndex( + name: "IX_DeviceConfigs_Value", + table: "DeviceConfigs"); + + migrationBuilder.AlterTable( + name: "SystemConfig", + oldComment: "传输配置"); + + migrationBuilder.AlterTable( + name: "RpcLogs", + oldComment: "RPC日志"); + + migrationBuilder.AlterTable( + name: "Drivers", + oldComment: "驱动管理"); + + migrationBuilder.AlterTable( + name: "DeviceVariables", + oldComment: "变量配置"); + + migrationBuilder.AlterTable( + name: "Devices", + oldComment: "设备维护"); + + migrationBuilder.AlterTable( + name: "DeviceConfigs", + oldComment: "通讯配置"); + + migrationBuilder.AlterColumn( + name: "MqttUPwd", + table: "SystemConfig", + type: "TEXT", + nullable: true, + oldClrType: typeof(string), + oldType: "TEXT", + oldNullable: true, + oldComment: "Mqtt密码"); + + migrationBuilder.AlterColumn( + name: "MqttUName", + table: "SystemConfig", + type: "TEXT", + nullable: true, + oldClrType: typeof(string), + oldType: "TEXT", + oldNullable: true, + oldComment: "Mqtt用户名"); + + migrationBuilder.AlterColumn( + name: "MqttPort", + table: "SystemConfig", + type: "INTEGER", + nullable: false, + oldClrType: typeof(int), + oldType: "INTEGER", + oldComment: "Mqtt端口"); + + migrationBuilder.AlterColumn( + name: "MqttIp", + table: "SystemConfig", + type: "TEXT", + nullable: true, + oldClrType: typeof(string), + oldType: "TEXT", + oldNullable: true, + oldComment: "Mqtt服务器"); + + migrationBuilder.AlterColumn( + name: "IoTPlatformType", + table: "SystemConfig", + type: "INTEGER", + nullable: false, + oldClrType: typeof(int), + oldType: "INTEGER", + oldComment: "输出平台"); + + migrationBuilder.AlterColumn( + name: "GatewayName", + table: "SystemConfig", + type: "TEXT", + nullable: true, + oldClrType: typeof(string), + oldType: "TEXT", + oldNullable: true, + oldComment: "网关名称"); + + migrationBuilder.AlterColumn( + name: "ClientId", + table: "SystemConfig", + type: "TEXT", + nullable: true, + oldClrType: typeof(string), + oldType: "TEXT", + oldNullable: true, + oldComment: "ClientId"); + + migrationBuilder.AlterColumn( + name: "StartTime", + table: "RpcLogs", + type: "TEXT", + nullable: false, + oldClrType: typeof(DateTime), + oldType: "TEXT", + oldComment: "开始时间"); + + migrationBuilder.AlterColumn( + name: "RpcSide", + table: "RpcLogs", + type: "INTEGER", + nullable: false, + oldClrType: typeof(int), + oldType: "INTEGER", + oldComment: "发起方"); + + migrationBuilder.AlterColumn( + name: "Params", + table: "RpcLogs", + type: "TEXT", + nullable: true, + oldClrType: typeof(string), + oldType: "TEXT", + oldNullable: true, + oldComment: "请求参数"); + + migrationBuilder.AlterColumn( + name: "Method", + table: "RpcLogs", + type: "TEXT", + nullable: true, + oldClrType: typeof(string), + oldType: "TEXT", + oldNullable: true, + oldComment: "方法"); + + migrationBuilder.AlterColumn( + name: "IsSuccess", + table: "RpcLogs", + type: "INTEGER", + nullable: false, + oldClrType: typeof(bool), + oldType: "INTEGER", + oldComment: "是否成功"); + + migrationBuilder.AlterColumn( + name: "EndTime", + table: "RpcLogs", + type: "TEXT", + nullable: false, + oldClrType: typeof(DateTime), + oldType: "TEXT", + oldComment: "结束时间"); + + migrationBuilder.AlterColumn( + name: "DeviceId", + table: "RpcLogs", + type: "TEXT", + nullable: true, + oldClrType: typeof(Guid), + oldType: "TEXT", + oldNullable: true, + oldComment: "所属设备"); + + migrationBuilder.AlterColumn( + name: "Description", + table: "RpcLogs", + type: "TEXT", + nullable: true, + oldClrType: typeof(string), + oldType: "TEXT", + oldNullable: true, + oldComment: "描述"); + + migrationBuilder.AlterColumn( + name: "FileName", + table: "Drivers", + type: "TEXT", + nullable: true, + oldClrType: typeof(string), + oldType: "TEXT", + oldNullable: true, + oldComment: "文件名"); + + migrationBuilder.AlterColumn( + name: "DriverName", + table: "Drivers", + type: "TEXT", + nullable: true, + oldClrType: typeof(string), + oldType: "TEXT", + oldNullable: true, + oldComment: "驱动名"); + + migrationBuilder.AlterColumn( + name: "AuthorizesNum", + table: "Drivers", + type: "INTEGER", + nullable: false, + oldClrType: typeof(int), + oldType: "INTEGER", + oldComment: "剩余授权数"); + + migrationBuilder.AlterColumn( + name: "AssembleName", + table: "Drivers", + type: "TEXT", + nullable: true, + oldClrType: typeof(string), + oldType: "TEXT", + oldNullable: true, + oldComment: "程序集名"); + + migrationBuilder.AlterColumn( + name: "ProtectType", + table: "DeviceVariables", + type: "INTEGER", + nullable: false, + oldClrType: typeof(int), + oldType: "INTEGER", + oldComment: "权限"); + + migrationBuilder.AlterColumn( + name: "Name", + table: "DeviceVariables", + type: "TEXT", + nullable: true, + oldClrType: typeof(string), + oldType: "TEXT", + oldNullable: true, + oldComment: "变量名"); + + migrationBuilder.AlterColumn( + name: "Method", + table: "DeviceVariables", + type: "TEXT", + nullable: true, + oldClrType: typeof(string), + oldType: "TEXT", + oldNullable: true, + oldComment: "方法"); + + migrationBuilder.AlterColumn( + name: "IsUpload", + table: "DeviceVariables", + type: "INTEGER", + nullable: false, + oldClrType: typeof(bool), + oldType: "INTEGER", + oldComment: "上传"); + + migrationBuilder.AlterColumn( + name: "IsTrigger", + table: "DeviceVariables", + type: "INTEGER", + nullable: false, + oldClrType: typeof(bool), + oldType: "INTEGER", + oldComment: "触发"); + + migrationBuilder.AlterColumn( + name: "Index", + table: "DeviceVariables", + type: "INTEGER", + nullable: false, + oldClrType: typeof(uint), + oldType: "INTEGER", + oldComment: "排序"); + + migrationBuilder.AlterColumn( + name: "Expressions", + table: "DeviceVariables", + type: "TEXT", + nullable: true, + oldClrType: typeof(string), + oldType: "TEXT", + oldNullable: true, + oldComment: "表达式"); + + migrationBuilder.AlterColumn( + name: "EndianType", + table: "DeviceVariables", + type: "INTEGER", + nullable: false, + oldClrType: typeof(int), + oldType: "INTEGER", + oldComment: "大小端"); + + migrationBuilder.AlterColumn( + name: "DeviceId", + table: "DeviceVariables", + type: "TEXT", + nullable: true, + oldClrType: typeof(Guid), + oldType: "TEXT", + oldNullable: true, + oldComment: "所属设备"); + + migrationBuilder.AlterColumn( + name: "DeviceAddress", + table: "DeviceVariables", + type: "TEXT", + nullable: true, + oldClrType: typeof(string), + oldType: "TEXT", + oldNullable: true, + oldComment: "地址"); + + migrationBuilder.AlterColumn( + name: "Description", + table: "DeviceVariables", + type: "TEXT", + nullable: true, + oldClrType: typeof(string), + oldType: "TEXT", + oldNullable: true, + oldComment: "描述"); + + migrationBuilder.AlterColumn( + name: "DataType", + table: "DeviceVariables", + type: "INTEGER", + nullable: false, + oldClrType: typeof(int), + oldType: "INTEGER", + oldComment: "数据类型"); + + migrationBuilder.AlterColumn( + name: "Alias", + table: "DeviceVariables", + type: "TEXT", + nullable: true, + oldClrType: typeof(string), + oldType: "TEXT", + oldNullable: true, + oldComment: "别名"); + + migrationBuilder.AlterColumn( + name: "Index", + table: "Devices", + type: "INTEGER", + nullable: false, + oldClrType: typeof(uint), + oldType: "INTEGER", + oldComment: "排序"); + + migrationBuilder.AlterColumn( + name: "EnforcePeriod", + table: "Devices", + type: "INTEGER", + nullable: false, + oldClrType: typeof(uint), + oldType: "INTEGER", + oldComment: "归档周期ms"); + + migrationBuilder.AlterColumn( + name: "DriverId", + table: "Devices", + type: "TEXT", + nullable: true, + oldClrType: typeof(Guid), + oldType: "TEXT", + oldNullable: true, + oldComment: "驱动"); + + migrationBuilder.AlterColumn( + name: "DeviceTypeEnum", + table: "Devices", + type: "INTEGER", + nullable: false, + oldClrType: typeof(int), + oldType: "INTEGER", + oldComment: "类型(组或设备)"); + + migrationBuilder.AlterColumn( + name: "DeviceName", + table: "Devices", + type: "TEXT", + nullable: true, + oldClrType: typeof(string), + oldType: "TEXT", + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "Description", + table: "Devices", + type: "TEXT", + nullable: true, + oldClrType: typeof(string), + oldType: "TEXT", + oldNullable: true, + oldComment: "描述"); + + migrationBuilder.AlterColumn( + name: "CmdPeriod", + table: "Devices", + type: "INTEGER", + nullable: false, + oldClrType: typeof(uint), + oldType: "INTEGER", + oldComment: "指令间隔ms"); + + migrationBuilder.AlterColumn( + name: "CgUpload", + table: "Devices", + type: "INTEGER", + nullable: false, + oldClrType: typeof(bool), + oldType: "INTEGER", + oldComment: "变化上传"); + + migrationBuilder.AlterColumn( + name: "AutoStart", + table: "Devices", + type: "INTEGER", + nullable: false, + oldClrType: typeof(bool), + oldType: "INTEGER", + oldComment: "启动"); + + migrationBuilder.AlterColumn( + name: "Value", + table: "DeviceConfigs", + type: "TEXT", + nullable: true, + oldClrType: typeof(string), + oldType: "TEXT", + oldNullable: true, + oldComment: "值"); + + migrationBuilder.AlterColumn( + name: "EnumInfo", + table: "DeviceConfigs", + type: "TEXT", + nullable: true, + oldClrType: typeof(string), + oldType: "TEXT", + oldNullable: true, + oldComment: "备注"); + + migrationBuilder.AlterColumn( + name: "DeviceId", + table: "DeviceConfigs", + type: "TEXT", + nullable: true, + oldClrType: typeof(Guid), + oldType: "TEXT", + oldNullable: true, + oldComment: "所属设备"); + + migrationBuilder.AlterColumn( + name: "DeviceConfigName", + table: "DeviceConfigs", + type: "TEXT", + nullable: true, + oldClrType: typeof(string), + oldType: "TEXT", + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "Description", + table: "DeviceConfigs", + type: "TEXT", + nullable: true, + oldClrType: typeof(string), + oldType: "TEXT", + oldNullable: true, + oldComment: "描述"); + + migrationBuilder.AlterColumn( + name: "DataSide", + table: "DeviceConfigs", + type: "INTEGER", + nullable: false, + oldClrType: typeof(int), + oldType: "INTEGER", + oldComment: "属性侧"); + } + } +} diff --git a/IoTGateway.DataAccess/Migrations/DataContextModelSnapshot.cs b/IoTGateway.DataAccess/Migrations/DataContextModelSnapshot.cs index dc79ac7..ff5b1bd 100644 --- a/IoTGateway.DataAccess/Migrations/DataContextModelSnapshot.cs +++ b/IoTGateway.DataAccess/Migrations/DataContextModelSnapshot.cs @@ -24,13 +24,16 @@ namespace IoTGateway.DataAccess.Migrations .HasColumnType("TEXT"); b.Property("AutoStart") - .HasColumnType("INTEGER"); + .HasColumnType("INTEGER") + .HasComment("启动"); b.Property("CgUpload") - .HasColumnType("INTEGER"); + .HasColumnType("INTEGER") + .HasComment("变化上传"); b.Property("CmdPeriod") - .HasColumnType("INTEGER"); + .HasColumnType("INTEGER") + .HasComment("指令间隔ms"); b.Property("CreateBy") .HasColumnType("TEXT"); @@ -39,22 +42,28 @@ namespace IoTGateway.DataAccess.Migrations .HasColumnType("TEXT"); b.Property("Description") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .HasComment("描述"); b.Property("DeviceName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .HasComment("名称"); b.Property("DeviceTypeEnum") - .HasColumnType("INTEGER"); + .HasColumnType("INTEGER") + .HasComment("类型(组或设备)"); b.Property("DriverId") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .HasComment("驱动"); b.Property("EnforcePeriod") - .HasColumnType("INTEGER"); + .HasColumnType("INTEGER") + .HasComment("归档周期ms"); b.Property("Index") - .HasColumnType("INTEGER"); + .HasColumnType("INTEGER") + .HasComment("排序"); b.Property("ParentId") .HasColumnType("TEXT"); @@ -67,11 +76,19 @@ namespace IoTGateway.DataAccess.Migrations b.HasKey("ID"); + b.HasIndex("AutoStart"); + + b.HasIndex("DeviceName"); + + b.HasIndex("DeviceTypeEnum"); + b.HasIndex("DriverId"); b.HasIndex("ParentId"); b.ToTable("Devices"); + + b.HasComment("设备维护"); }); modelBuilder.Entity("IoTGateway.Model.DeviceConfig", b => @@ -88,19 +105,24 @@ namespace IoTGateway.DataAccess.Migrations .HasColumnType("TEXT"); b.Property("DataSide") - .HasColumnType("INTEGER"); + .HasColumnType("INTEGER") + .HasComment("属性侧"); b.Property("Description") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .HasComment("描述"); b.Property("DeviceConfigName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .HasComment("名称"); b.Property("DeviceId") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .HasComment("所属设备"); b.Property("EnumInfo") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .HasComment("备注"); b.Property("UpdateBy") .HasMaxLength(50) @@ -110,13 +132,20 @@ namespace IoTGateway.DataAccess.Migrations .HasColumnType("TEXT"); b.Property("Value") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .HasComment("值"); b.HasKey("ID"); + b.HasIndex("DeviceConfigName"); + b.HasIndex("DeviceId"); + b.HasIndex("Value"); + b.ToTable("DeviceConfigs"); + + b.HasComment("通讯配置"); }); modelBuilder.Entity("IoTGateway.Model.DeviceVariable", b => @@ -126,49 +155,72 @@ namespace IoTGateway.DataAccess.Migrations .HasColumnType("TEXT"); b.Property("Alias") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .HasComment("别名"); b.Property("DataType") - .HasColumnType("INTEGER"); + .HasColumnType("INTEGER") + .HasComment("数据类型"); b.Property("Description") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .HasComment("描述"); b.Property("DeviceAddress") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .HasComment("地址"); b.Property("DeviceId") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .HasComment("所属设备"); b.Property("EndianType") - .HasColumnType("INTEGER"); + .HasColumnType("INTEGER") + .HasComment("大小端"); b.Property("Expressions") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .HasComment("表达式"); b.Property("Index") - .HasColumnType("INTEGER"); + .HasColumnType("INTEGER") + .HasComment("排序"); b.Property("IsTrigger") - .HasColumnType("INTEGER"); + .HasColumnType("INTEGER") + .HasComment("触发"); b.Property("IsUpload") - .HasColumnType("INTEGER"); + .HasColumnType("INTEGER") + .HasComment("上传"); b.Property("Method") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .HasComment("方法"); b.Property("Name") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .HasComment("变量名"); b.Property("ProtectType") - .HasColumnType("INTEGER"); + .HasColumnType("INTEGER") + .HasComment("权限"); b.HasKey("ID"); + b.HasIndex("DataType"); + + b.HasIndex("DeviceAddress"); + b.HasIndex("DeviceId"); + b.HasIndex("Method"); + + b.HasIndex("Name"); + b.ToTable("DeviceVariables"); + + b.HasComment("变量配置"); }); modelBuilder.Entity("IoTGateway.Model.Driver", b => @@ -178,10 +230,12 @@ namespace IoTGateway.DataAccess.Migrations .HasColumnType("TEXT"); b.Property("AssembleName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .HasComment("程序集名"); b.Property("AuthorizesNum") - .HasColumnType("INTEGER"); + .HasColumnType("INTEGER") + .HasComment("剩余授权数"); b.Property("CreateBy") .HasMaxLength(50) @@ -191,10 +245,12 @@ namespace IoTGateway.DataAccess.Migrations .HasColumnType("TEXT"); b.Property("DriverName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .HasComment("驱动名"); b.Property("FileName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .HasComment("文件名"); b.Property("UpdateBy") .HasMaxLength(50) @@ -206,6 +262,8 @@ namespace IoTGateway.DataAccess.Migrations b.HasKey("ID"); b.ToTable("Drivers"); + + b.HasComment("驱动管理"); }); modelBuilder.Entity("IoTGateway.Model.RpcLog", b => @@ -215,34 +273,44 @@ namespace IoTGateway.DataAccess.Migrations .HasColumnType("TEXT"); b.Property("Description") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .HasComment("描述"); b.Property("DeviceId") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .HasComment("所属设备"); b.Property("EndTime") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .HasComment("结束时间"); b.Property("IsSuccess") - .HasColumnType("INTEGER"); + .HasColumnType("INTEGER") + .HasComment("是否成功"); b.Property("Method") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .HasComment("方法"); b.Property("Params") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .HasComment("请求参数"); b.Property("RpcSide") - .HasColumnType("INTEGER"); + .HasColumnType("INTEGER") + .HasComment("发起方"); b.Property("StartTime") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .HasComment("开始时间"); b.HasKey("ID"); b.HasIndex("DeviceId"); b.ToTable("RpcLogs"); + + b.HasComment("RPC日志"); }); modelBuilder.Entity("IoTGateway.Model.SystemConfig", b => @@ -252,7 +320,8 @@ namespace IoTGateway.DataAccess.Migrations .HasColumnType("TEXT"); b.Property("ClientId") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .HasComment("ClientId"); b.Property("CreateBy") .HasMaxLength(50) @@ -262,22 +331,28 @@ namespace IoTGateway.DataAccess.Migrations .HasColumnType("TEXT"); b.Property("GatewayName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .HasComment("网关名称"); b.Property("IoTPlatformType") - .HasColumnType("INTEGER"); + .HasColumnType("INTEGER") + .HasComment("输出平台"); b.Property("MqttIp") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .HasComment("Mqtt服务器"); b.Property("MqttPort") - .HasColumnType("INTEGER"); + .HasColumnType("INTEGER") + .HasComment("Mqtt端口"); b.Property("MqttUName") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .HasComment("Mqtt用户名"); b.Property("MqttUPwd") - .HasColumnType("TEXT"); + .HasColumnType("TEXT") + .HasComment("Mqtt密码"); b.Property("UpdateBy") .HasMaxLength(50) @@ -289,6 +364,8 @@ namespace IoTGateway.DataAccess.Migrations b.HasKey("ID"); b.ToTable("SystemConfig"); + + b.HasComment("传输配置"); }); modelBuilder.Entity("WalkingTec.Mvvm.Core.ActionLog", b => diff --git a/IoTGateway.Model/Device.cs b/IoTGateway.Model/Device.cs index 65a5b3e..e050dd2 100644 --- a/IoTGateway.Model/Device.cs +++ b/IoTGateway.Model/Device.cs @@ -1,37 +1,52 @@ using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore; using WalkingTec.Mvvm.Core; namespace IoTGateway.Model { + [Comment("设备维护")] + [Index(nameof(DeviceName))] + [Index(nameof(AutoStart))] + [Index(nameof(DeviceTypeEnum))] public class Device : TreePoco, IBasePoco { + [Comment("名称")] [Display(Name = "DeviceName")] public string DeviceName { get; set; } + [Comment("排序")] [Display(Name = "Sort")] public uint Index { get; set; } + [Comment("描述")] [Display(Name = "Description")] public string Description { get; set; } public Driver Driver { get; set; } + [Comment("驱动")] [Display(Name = "Driver")] public Guid? DriverId { get; set; } + [Comment("启动")] [Display(Name = "AutoStart")] public bool AutoStart { get; set; } + [Comment("变化上传")] [Display(Name = "ChangeUpload")] public bool CgUpload { get; set; } + [Comment("归档周期ms")] [Display(Name = "EnforcePeriodms")] public uint EnforcePeriod { get; set; } + [Comment("指令间隔ms")] [Display(Name = "CmdPeriodms")] public uint CmdPeriod { get; set; } + [Comment("类型(组或设备)")] [Display(Name = "Type")] public DeviceTypeEnum DeviceTypeEnum { get; set; } diff --git a/IoTGateway.Model/DeviceConfig.cs b/IoTGateway.Model/DeviceConfig.cs index 2821689..08d7733 100644 --- a/IoTGateway.Model/DeviceConfig.cs +++ b/IoTGateway.Model/DeviceConfig.cs @@ -1,22 +1,38 @@ -using System; +using Microsoft.EntityFrameworkCore; +using System; using System.ComponentModel.DataAnnotations; using WalkingTec.Mvvm.Core; namespace IoTGateway.Model { + [Comment("通讯配置")] + [Index(nameof(DeviceConfigName))] + [Index(nameof(Value))] public class DeviceConfig : BasePoco { + [Comment("名称")] [Display(Name = "ConfigName")] public string DeviceConfigName { get; set; } + + [Comment("属性侧")] [Display(Name = "DataSide")] public DataSide DataSide { get; set; } + + [Comment("描述")] [Display(Name = "Description")] public string Description { get; set; } + + [Comment("值")] [Display(Name = "Value")] public string Value { get; set; } + + [Comment("备注")] [Display(Name = "Remark")] public string EnumInfo { get; set; } + public Device Device { get; set; } + + [Comment("所属设备")] [Display(Name = "Device")] public Guid? DeviceId { get; set; } } diff --git a/IoTGateway.Model/DeviceVariable.cs b/IoTGateway.Model/DeviceVariable.cs index 78d29dd..27dfdae 100644 --- a/IoTGateway.Model/DeviceVariable.cs +++ b/IoTGateway.Model/DeviceVariable.cs @@ -5,70 +5,101 @@ using System.ComponentModel.DataAnnotations.Schema; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using WalkingTec.Mvvm.Core; +using Microsoft.EntityFrameworkCore; namespace IoTGateway.Model { + [Comment("变量配置")] + [Index(nameof(Name))] + [Index(nameof(Method))] + [Index(nameof(DeviceAddress))] + [Index(nameof(DataType))] public class DeviceVariable : TopBasePoco, IVariable { + [Comment("变量名")] [Display(Name = "VariableName")] public string Name { get; set; } + [Comment("描述")] [Display(Name = "Description")] public string Description { get; set; } + [Comment("方法")] [Display(Name = "Method")] public string Method { get; set; } + [Comment("地址")] [Display(Name = "Address")] public string DeviceAddress { get; set; } + [Comment("数据类型")] [Display(Name = "DataType")] public DataTypeEnum DataType { get; set; } + [Comment("触发")] [Display(Name = "IsTrigger")] public bool IsTrigger { get; set; } + [Comment("大小端")] [Display(Name = "EndianType")] public EndianEnum EndianType { get; set; } + [Comment("表达式")] [Display(Name = "Expressions")] public string Expressions { get; set; } + [Comment("上传")] [Display(Name = "Upload")] public bool IsUpload { get; set; } + [Comment("权限")] [Display(Name = "Permissions")] public ProtectTypeEnum ProtectType { get; set; } + [Comment("排序")] [Display(Name = "Sort")] public uint Index { get; set; } [Newtonsoft.Json.JsonIgnore] public Device Device { get; set; } + [Comment("所属设备")] [Display(Name = "Device")] public Guid? DeviceId { get; set; } + [Comment("别名")] [Display(Name = "Alias")] public string Alias { get; set; } + [Comment("原值")] [NotMapped] [Display(Name = "RawValue")] public object Value { get; set; } + + [Comment("计算后的值")] [NotMapped] [Display(Name = "CookedValue")] public object CookedValue { get; set; } + + [Comment("错误信息")] [NotMapped] [Display(Name = "Message")] public string Message { get; set; } + + [Comment("更新时间")] [NotMapped] [Display(Name = "Timestamp")] public DateTime Timestamp { get; set; } + + [Comment("状态")] [NotMapped] [Display(Name = "Status")] [JsonConverter(typeof(StringEnumConverter))] public VaribaleStatusTypeEnum StatusType { get; set; } = VaribaleStatusTypeEnum.UnKnow; + [Comment("最新三次原值")] [NotMapped][Display(Name = "MostRecentValues")] public object[] Values { get; set; } = new object[3]; + + [Comment("最新三次计算后的值")] [NotMapped][Display(Name = "MostRecentCookedValues")] public object[] CookedValues { get; set; } = new object[3]; public void EnqueueVariable(object value) { diff --git a/IoTGateway.Model/Driver.cs b/IoTGateway.Model/Driver.cs index 24a80db..142188c 100644 --- a/IoTGateway.Model/Driver.cs +++ b/IoTGateway.Model/Driver.cs @@ -1,17 +1,26 @@ -using System.Collections.Generic; +using Microsoft.EntityFrameworkCore; +using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using WalkingTec.Mvvm.Core; namespace IoTGateway.Model { + [Comment("驱动管理")] public class Driver : BasePoco { + [Comment("驱动名")] [Display(Name = "DriverName")] public string DriverName { get; set; } + + [Comment("文件名")] [Display(Name = "FileName")] public string FileName { get; set; } + + [Comment("程序集名")] [Display(Name = "AssembleName")] public string AssembleName { get; set; } + + [Comment("剩余授权数")] [Display(Name = "Remains")] public int AuthorizesNum { get; set; } } diff --git a/IoTGateway.Model/RpcLog.cs b/IoTGateway.Model/RpcLog.cs index a2a3e32..b431ad2 100644 --- a/IoTGateway.Model/RpcLog.cs +++ b/IoTGateway.Model/RpcLog.cs @@ -1,4 +1,5 @@ -using System; +using Microsoft.EntityFrameworkCore; +using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; @@ -8,31 +9,40 @@ using WalkingTec.Mvvm.Core; namespace IoTGateway.Model { + [Comment("RPC日志")] public class RpcLog:TopBasePoco { + [Comment("发起方")] [Display(Name = "RpcSide")] - public RpcSide RpcSide { get; set; } + public RpcSide RpcSide { get; set; } + [Comment("开始时间")] [Display(Name = "StartTime")] public DateTime StartTime { get; set; } public Device Device { get; set; } + [Comment("所属设备")] [Display(Name = "Device")] public Guid? DeviceId { get; set; } + [Comment("方法")] [Display(Name = "Method")] public string Method { get; set; } + [Comment("请求参数")] [Display(Name = "Parameters")] public string Params { get; set; } + [Comment("结束时间")] [Display(Name = "EndTime")] public DateTime EndTime { get; set; } + [Comment("是否成功")] [Display(Name = "IsSuccess")] public bool IsSuccess { get; set; } + [Comment("描述")] [Display(Name = "Description")] public string Description { get; set; } } diff --git a/IoTGateway.Model/SystemConfig.cs b/IoTGateway.Model/SystemConfig.cs index 0d6f2c9..f056949 100644 --- a/IoTGateway.Model/SystemConfig.cs +++ b/IoTGateway.Model/SystemConfig.cs @@ -1,22 +1,37 @@ -using System.ComponentModel.DataAnnotations; +using Microsoft.EntityFrameworkCore; +using System.ComponentModel.DataAnnotations; using WalkingTec.Mvvm.Core; namespace IoTGateway.Model { + [Comment("传输配置")] public class SystemConfig : BasePoco { + [Comment("网关名称")] [Display(Name = "GatewayName")] public string GatewayName { get; set; } + + [Comment("ClientId")] [Display(Name = "ClientId")] public string ClientId { get; set; } + + [Comment("Mqtt服务器")] [Display(Name = "MqttServer ")] public string MqttIp { get; set; } + + [Comment("Mqtt端口")] [Display(Name = "MqttPort")] public int MqttPort { get; set; } + + [Comment("Mqtt用户名")] [Display(Name = "UserName")] public string MqttUName { get; set; } + + [Comment("Mqtt密码")] [Display(Name = "Password")] public string MqttUPwd { get; set; } + + [Comment("输出平台")] [Display(Name = "OutputPlatform")] public IoTPlatformType IoTPlatformType { get; set; } } diff --git a/IoTGateway/IoTGateway.csproj b/IoTGateway/IoTGateway.csproj index 2b5fed3..04bd479 100644 --- a/IoTGateway/IoTGateway.csproj +++ b/IoTGateway/IoTGateway.csproj @@ -33,7 +33,7 @@ - + Always diff --git a/IoTGateway/appsettings.json b/IoTGateway/appsettings.json index fe47841..d455cf1 100644 --- a/IoTGateway/appsettings.json +++ b/IoTGateway/appsettings.json @@ -29,7 +29,7 @@ "Connections": [ { "Key": "default", - "Value": "Data Source = iotgateway.db", + "Value": "Data Source = ./data/iotgateway.db", "DbContext": "DataContext", "DBType": "SQLite" //DataBase, you can choose mysql,sqlserver,pgsql,sqlite,oracle } diff --git a/IoTGateway/iotgateway.db b/IoTGateway/data/iotgateway.db similarity index 69% rename from IoTGateway/iotgateway.db rename to IoTGateway/data/iotgateway.db index 851daa36452d4aef941b760441fc81bd7bda1e2e..d538f510388ac0a7521542ce84e08ca845659ef4 100644 GIT binary patch delta 25209 zcmeHv33yaRws7CuxA)vz>4c_}bdpXwYXb@0*#iW~f*K&~!Ch$S1{$)FMP-qu$3X;z zpv_RY<1&JdvWOayMSU~x%{-qQv#9fQMx93|;LPtlX8!+;qw|mdId%K?l4TrcdH?_3 zpYHG0t>x6IQ&p#`PMxZAw{4raZCln}o4G=zQuV@PgC_-^Wp__0Pp?pwF1%GkE~(Vy zR}iP_BwvvKAipBNI(|zpsey?6S>R|euca8A2}A@}lG0S ztiNZapy$a^6?u;wJz-w-7zyp&Bhc_%KA*lD5S;tFcwxDdq^ekbFF}om$S=sx0Q!gI z4f1`c+9~opIZB=+kC6unC3llM$#xPT8%YmoCu@j@TuWNXLefkcNgb&sZZeq^5IadH zsZiQUDWFkvT&fvesff8r=o<2w>tL>xxf9XV6*D)Jx#`SRqpNkIt4U?90bQYxxw*{E zVXmFI+04yiu1(W{pcyPMfw{@dCCrtWD>B!_Ts?EO%;g0&XAscK>jbrdD?rDHjz&=H zxjb~z(6OMCf{yU)UhZI#VW~>wa#Yd}$umhuqz8@Rqz$@Fh6$R_HK+J@_jgJudD_UR4)b$=43#xVdt@KtAK{8Mv~RdrDiRc|#?tPN>LtrB10h>8DBiOzTXO z`AhtBsuRXR-L2X$<$uVXbD5xdQZ3!O`j#RkPZp-Q2Kwv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