diff --git a/.gitignore b/.gitignore
index 120c66f..6005e40 100644
--- a/.gitignore
+++ b/.gitignore
@@ -58,18 +58,5 @@
/host/JiShe.IoT.HttpApi.Host/UploadFile/20250729/host/abp-file-management
/host/JiShe.IoT.HttpApi.Host/UploadFile/20250731/host/abp-file-management/3a1b7059-f930-8a33-5a5b-a67f48f2feec
/gateways/JiShe.IoT.WebGateway/bin/Debug/net10.0
-/src/JiShe.IoT.Application/bin/Debug/net10.0
-/src/JiShe.IoT.Application.Contracts/bin/Debug/net10.0
-/src/JiShe.IoT.DbMigrator/bin/Debug/net10.0
-/src/JiShe.IoT.DbMigrator/bin/Debug/net10.0/cs/Microsoft.CodeAnalysis.CSharp.resources.dll
-/src/JiShe.IoT.Domain/bin/Debug/net10.0
-/src/JiShe.IoT.Domain.Shared/bin/Debug/net10.0
-/src/JiShe.IoT.EntityFrameworkCore/bin/Debug/net10.0
-/src/JiShe.IoT.HttpApi/bin/Debug/net10.0
-/src/JiShe.IoT.HttpApi.Client/bin/Debug/net10.0
-/test/JiShe.IoT.Application.Tests/bin/Debug/net10.0
-/test/JiShe.IoT.Domain.Tests/bin/Debug/net10.0
-/test/JiShe.IoT.EntityFrameworkCore.Tests/bin/Debug/net10.0
-/test/JiShe.IoT.HttpApi.Client.ConsoleTestApp/bin/Debug/net10.0
-/test/JiShe.IoT.TestBase/bin/Debug/net10.0
/host/JiShe.IoT.HttpApi.Host/bin/Debug/net10.0
+/src/JiShe.IoT.Application/bin/Debug/net10.0
diff --git a/Directory.Build.Microsoft.targets b/Directory.Build.Microsoft.targets
index d5199b5..33e48c0 100644
--- a/Directory.Build.Microsoft.targets
+++ b/Directory.Build.Microsoft.targets
@@ -19,7 +19,8 @@
-
+
+
diff --git a/Directory.Build.Volo.targets b/Directory.Build.Volo.targets
index b1b5f23..4b4cf58 100644
--- a/Directory.Build.Volo.targets
+++ b/Directory.Build.Volo.targets
@@ -19,7 +19,7 @@
-
+
@@ -94,5 +94,6 @@
+
\ No newline at end of file
diff --git a/Directory.Build.props b/Directory.Build.props
index bb79079..2a080ed 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -3,15 +3,13 @@
1.0.5.40
-
- 10.0.1
+ 9.3.4
- 10.0.0
+ 9.0.6
- net10.0
-
+ net9.0
\ No newline at end of file
diff --git a/Directory.Build.targets b/Directory.Build.targets
index 6eddc80..3d137be 100644
--- a/Directory.Build.targets
+++ b/Directory.Build.targets
@@ -51,26 +51,26 @@
-
-
-
+
+
+
-
+
-
-
+
+
-
-
+
+
-
-
+
+
@@ -88,8 +88,8 @@
-
-
+
+
@@ -102,13 +102,11 @@
-
+
-
-
-
+
\ No newline at end of file
diff --git a/JiShe.IoT.Admin.sln b/JiShe.IoT.Admin.sln
index 3f1b0b8..8acee0c 100644
--- a/JiShe.IoT.Admin.sln
+++ b/JiShe.IoT.Admin.sln
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 18
-VisualStudioVersion = 18.0.11217.181
+VisualStudioVersion = 18.0.11217.181 d18.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.IoT.Domain", "src\JiShe.IoT.Domain\JiShe.IoT.Domain.csproj", "{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}"
EndProject
@@ -236,6 +236,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JiShe.ServicePro.CAP.Entity
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JiShe.ServicePro.CTWingAep.Provider", "JiShe.ServicePro\frameworks\src\JiShe.ServicePro.CTWingAep.Provider\JiShe.ServicePro.CTWingAep.Provider.csproj", "{4280ED21-7498-85F9-315F-BC1CB3458900}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JiShe.ServicePro.ElasticSearch", "JiShe.ServicePro\frameworks\src\JiShe.ServicePro.ElasticSearch\JiShe.ServicePro.ElasticSearch.csproj", "{9CB012D4-9905-6623-E78D-A6649660EDB1}"
+EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JiShe.ServicePro.HttpClient", "JiShe.ServicePro\frameworks\src\JiShe.ServicePro.HttpClient\JiShe.ServicePro.HttpClient.csproj", "{FCA448BF-8B4C-4932-654A-B942A3777E5C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JiShe.ServicePro.Localization", "JiShe.ServicePro\frameworks\src\JiShe.ServicePro.Localization\JiShe.ServicePro.Localization.csproj", "{08FCE8E5-2F1D-F04F-FD45-9693709C262A}"
@@ -679,6 +681,10 @@ Global
{4280ED21-7498-85F9-315F-BC1CB3458900}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4280ED21-7498-85F9-315F-BC1CB3458900}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4280ED21-7498-85F9-315F-BC1CB3458900}.Release|Any CPU.Build.0 = Release|Any CPU
+ {9CB012D4-9905-6623-E78D-A6649660EDB1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {9CB012D4-9905-6623-E78D-A6649660EDB1}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9CB012D4-9905-6623-E78D-A6649660EDB1}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {9CB012D4-9905-6623-E78D-A6649660EDB1}.Release|Any CPU.Build.0 = Release|Any CPU
{FCA448BF-8B4C-4932-654A-B942A3777E5C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FCA448BF-8B4C-4932-654A-B942A3777E5C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FCA448BF-8B4C-4932-654A-B942A3777E5C}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -857,6 +863,7 @@ Global
{DFC637A5-87AC-1C38-37B3-4077866E8258} = {72493AF2-CDAA-40A7-98AB-B8AA2B05965E}
{2267BD37-7F07-0AF0-CA18-7CE4D2D43A71} = {72493AF2-CDAA-40A7-98AB-B8AA2B05965E}
{4280ED21-7498-85F9-315F-BC1CB3458900} = {72493AF2-CDAA-40A7-98AB-B8AA2B05965E}
+ {9CB012D4-9905-6623-E78D-A6649660EDB1} = {72493AF2-CDAA-40A7-98AB-B8AA2B05965E}
{FCA448BF-8B4C-4932-654A-B942A3777E5C} = {72493AF2-CDAA-40A7-98AB-B8AA2B05965E}
{08FCE8E5-2F1D-F04F-FD45-9693709C262A} = {72493AF2-CDAA-40A7-98AB-B8AA2B05965E}
{29859269-BBC5-66F7-B18F-71FDA7A4493D} = {72493AF2-CDAA-40A7-98AB-B8AA2B05965E}
diff --git a/host/JiShe.IoT.HttpApi.Host/GlobalUsings.cs b/host/JiShe.IoT.HttpApi.Host/GlobalUsings.cs
index 12c56af..c55cd9d 100644
--- a/host/JiShe.IoT.HttpApi.Host/GlobalUsings.cs
+++ b/host/JiShe.IoT.HttpApi.Host/GlobalUsings.cs
@@ -36,7 +36,7 @@ global using Microsoft.Extensions.Logging;
global using Microsoft.Extensions.Logging.Abstractions;
global using Microsoft.Extensions.Options;
global using Microsoft.IdentityModel.Tokens;
-global using Microsoft.OpenApi;
+global using Microsoft.OpenApi.Models;
global using JiShe.IoT;
global using Serilog;
global using StackExchange.Redis;
diff --git a/host/JiShe.IoT.HttpApi.Host/IoTHttpApiHostModule.Configure.cs b/host/JiShe.IoT.HttpApi.Host/IoTHttpApiHostModule.Configure.cs
index 494afdb..8ef3811 100644
--- a/host/JiShe.IoT.HttpApi.Host/IoTHttpApiHostModule.Configure.cs
+++ b/host/JiShe.IoT.HttpApi.Host/IoTHttpApiHostModule.Configure.cs
@@ -149,12 +149,12 @@ public partial class IoTHttpApiHostModule
options =>
{
// 文件下载类型
- options.MapType(() => new OpenApiSchema() { Type = JsonSchemaType.String, Format = "binary" });
+ options.MapType(() => new OpenApiSchema() { Type = "file" });
options.SwaggerDoc("AbpPro", new OpenApiInfo { Title = "AbpPro API", Version = "v1" });
var configuration = context.Services.GetConfiguration();
- var groupNames = System.EnumExtensions.GetEnumTypeValueNameList();
+ var groupNames = EnumExtensions.GetEnumTypeValueNameList();
var excludeSwaggerGroups = configuration.GetSection("ExcludeSwaggerGroup").Get>() ?? new List();
groupNames.ForEach(group =>
@@ -207,12 +207,18 @@ public partial class IoTHttpApiHostModule
Scheme = JwtBearerDefaults.AuthenticationScheme,
BearerFormat = "JWT"
});
- options.AddSecurityRequirement(document => new OpenApiSecurityRequirement
+ options.AddSecurityRequirement(new OpenApiSecurityRequirement
{
- {
- new OpenApiSecuritySchemeReference(JwtBearerDefaults.AuthenticationScheme, document),
- new List()
- }
+ {
+ new OpenApiSecurityScheme
+ {
+ Reference = new OpenApiReference
+ {
+ Type = ReferenceType.SecurityScheme, Id = "Bearer"
+ }
+ },
+ new List()
+ }
});
options.AddSecurityDefinition("ApiKey", new OpenApiSecurityScheme()
@@ -223,11 +229,15 @@ public partial class IoTHttpApiHostModule
Description = "多语言设置,系统预设语言有zh-Hans、en,默认为zh-Hans",
});
- options.AddSecurityRequirement(document => new OpenApiSecurityRequirement
+ options.AddSecurityRequirement(new OpenApiSecurityRequirement
{
{
- new OpenApiSecuritySchemeReference("ApiKey", document),
- new List()
+ new OpenApiSecurityScheme
+ {
+ Reference = new OpenApiReference
+ { Type = ReferenceType.SecurityScheme, Id = "ApiKey" }
+ },
+ Array.Empty()
}
});
});
diff --git a/host/JiShe.IoT.HttpApi.Host/IoTHttpApiHostModule.cs b/host/JiShe.IoT.HttpApi.Host/IoTHttpApiHostModule.cs
index 1f1e67a..06b8ce0 100644
--- a/host/JiShe.IoT.HttpApi.Host/IoTHttpApiHostModule.cs
+++ b/host/JiShe.IoT.HttpApi.Host/IoTHttpApiHostModule.cs
@@ -88,7 +88,7 @@ namespace JiShe.IoT
app.UseSwagger();
app.UseAbpSwaggerUI(options =>
{
- var groupNames = System.EnumExtensions.GetEnumTypeValueNameList();
+ var groupNames = EnumExtensions.GetEnumTypeValueNameList();
var excludeSwaggerGroups = configuration.GetSection("ExcludeSwaggerGroup").Get>() ?? new List();
groupNames.ForEach(attr =>
{
diff --git a/host/JiShe.IoT.HttpApi.Host/JiShe.IoT.HttpApi.Host.csproj b/host/JiShe.IoT.HttpApi.Host/JiShe.IoT.HttpApi.Host.csproj
index b901aee..51a0094 100644
--- a/host/JiShe.IoT.HttpApi.Host/JiShe.IoT.HttpApi.Host.csproj
+++ b/host/JiShe.IoT.HttpApi.Host/JiShe.IoT.HttpApi.Host.csproj
@@ -29,10 +29,11 @@
-
+
+
diff --git a/host/JiShe.IoT.HttpApi.Host/configs/appsettings.Development.json b/host/JiShe.IoT.HttpApi.Host/configs/appsettings.Development.json
index 6ff0927..d898646 100644
--- a/host/JiShe.IoT.HttpApi.Host/configs/appsettings.Development.json
+++ b/host/JiShe.IoT.HttpApi.Host/configs/appsettings.Development.json
@@ -4,19 +4,19 @@
"CorsOrigins": "https://*.IoT.com,http://localhost:4200,http://localhost:3100,http://localhost:80,http://10.10.90.3:4200"
},
"ConnectionStrings": {
- "Default": "Data Source=192.168.111.174;Port=13306;Database=JiSheIoTProDB;uid=root;pwd=JiShe!aqG#5kGgh&0;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true;TreatTinyAsBoolean=false;SslMode=None;Pooling=true;"
+ "Default": "Data Source=localhost;Port=33306;Database=JiSheIoTProDB54;uid=root;pwd=123456789;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true;TreatTinyAsBoolean=false;SslMode=None;Pooling=true;"
},
"Hangfire": {
"Redis": {
- "Host": "192.168.111.174:30712,password=1q3J@BGf!yhTaD46nS#",
+ "Host": "47.110.53.196:30712,password=1q3J@BGf!yhTaD46nS#",
"DB": "2"
}
},
"Redis": {
- "Configuration": "192.168.111.174:30712,password=1q3J@BGf!yhTaD46nS#,defaultdatabase=5"
+ "Configuration": "47.110.53.196:30712,password=1q3J@BGf!yhTaD46nS#,defaultdatabase=5"
},
"Kafka": {
- "BootstrapServers": "47.110.62.104:9094,192.168.111.174:9094,47.110.60.222:9094",
+ "BootstrapServers": "47.110.62.104:9094,47.110.53.196:9094,47.110.60.222:9094",
"EnableFilter": true,
"EnableAuthorization": false,
"SaslUserName": "lixiao",
@@ -26,8 +26,8 @@
"TaskThreadCount": -1
},
"Pulsar": {
- "ServiceUrl": "pulsar+ssl://iot-north-mq.heclouds.com:6651", //pulsar+ssl://iot-north-mq.heclouds.com:6651 ,pulsar://192.168.111.174:26974
- "WebUrl": "http://192.168.111.174:9094",
+ "ServiceUrl": "pulsar+ssl://iot-north-mq.heclouds.com:6651", //pulsar+ssl://iot-north-mq.heclouds.com:6651 ,pulsar://47.110.53.196:26974
+ "WebUrl": "http://47.110.53.196:9094",
"UserName": "admin",
"TenantName": "1YMVZZkAkRArjxSD8457",
"Namespace": "OneNET",
@@ -57,10 +57,10 @@
"IoTDBOptions": {
"UserName": "root",
"Password": "Lixiao@1980",
- //"TreeModelClusterList": [ "192.168.111.174:6667", "47.110.60.222:6667", "47.110.62.104:6667" ],
- //"TableModelClusterList": [ "192.168.111.174:6667", "47.110.60.222:6667", "47.110.62.104:6667" ],
- "TreeModelClusterList": [ "192.168.111.174:30710" ],
- "TableModelClusterList": [ "192.168.111.174:30710" ],
+ //"TreeModelClusterList": [ "47.110.53.196:6667", "47.110.60.222:6667", "47.110.62.104:6667" ],
+ //"TableModelClusterList": [ "47.110.53.196:6667", "47.110.60.222:6667", "47.110.62.104:6667" ],
+ "TreeModelClusterList": [ "47.110.53.196:30710" ],
+ "TableModelClusterList": [ "47.110.53.196:30710" ],
"PoolSize": 32,
"DataBaseName": "jisheiotdata",
"OpenDebugMode": true,
@@ -97,7 +97,7 @@
}
},
"FreeRedisOptions": {
- "ConnectionString": "192.168.111.174:30712,password=1q3J@BGf!yhTaD46nS#,abortConnect=false,connectTimeout=30000,allowAdmin=true,maxPoolSize=500,defaultdatabase=14",
+ "ConnectionString": "47.110.53.196:30712,password=1q3J@BGf!yhTaD46nS#,abortConnect=false,connectTimeout=30000,allowAdmin=true,maxPoolSize=500,defaultdatabase=14",
"UseDistributedCache": true
},
"FreeSqlProviderOptions": {
diff --git a/src/JiShe.IoT.DbMigrator/appsettings.json b/src/JiShe.IoT.DbMigrator/appsettings.json
index 459df4f..7c0296d 100644
--- a/src/JiShe.IoT.DbMigrator/appsettings.json
+++ b/src/JiShe.IoT.DbMigrator/appsettings.json
@@ -1,6 +1,6 @@
{
"ConnectionStrings": {
- "Default": "Data Source=localhost;Port=33306;Database=JiSheIoTProDB3;uid=root;pwd=123456789;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true;TreatTinyAsBoolean=false;SslMode=Preferred;Pooling=true;"
+ "Default": "Data Source=localhost;Port=33306;Database=JiSheIoTProDB54;uid=root;pwd=123456789;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true;TreatTinyAsBoolean=false;SslMode=None;Pooling=true;"
},
"IoTDBOptions": {
"UserName": "root",
diff --git a/src/JiShe.IoT.EntityFrameworkCore/EntityFrameworkCore/IoTDbContext.cs b/src/JiShe.IoT.EntityFrameworkCore/EntityFrameworkCore/IoTDbContext.cs
index d3b897b..0e400af 100644
--- a/src/JiShe.IoT.EntityFrameworkCore/EntityFrameworkCore/IoTDbContext.cs
+++ b/src/JiShe.IoT.EntityFrameworkCore/EntityFrameworkCore/IoTDbContext.cs
@@ -50,6 +50,8 @@ namespace JiShe.IoT.EntityFrameworkCore
public DbSet TenantConnectionStrings { get; set; }
public DbSet BackgroundJobs { get; set; }
public DbSet AuditLogs { get; set; }
+ public DbSet AuditLogExcelFiles { get; set; }
+
public DbSet Notifications { get; set; }
public DbSet NotificationSubscriptions { get; set; }
public DbSet DataDictionaries { get; set; }
@@ -86,7 +88,7 @@ namespace JiShe.IoT.EntityFrameworkCore
public DbSet OneNETAccountInfo { get; set; }
public DbSet OneNETProductInfo { get; set; }
- public DbSet AuditLogExcelFiles { get; set; }
+
public IoTDbContext(DbContextOptions options)
: base(options)
diff --git a/src/JiShe.IoT.EntityFrameworkCore/EntityFrameworkCore/IoTEntityFrameworkCoreModule.cs b/src/JiShe.IoT.EntityFrameworkCore/EntityFrameworkCore/IoTEntityFrameworkCoreModule.cs
index 3ddb0c0..58b3cf7 100644
--- a/src/JiShe.IoT.EntityFrameworkCore/EntityFrameworkCore/IoTEntityFrameworkCoreModule.cs
+++ b/src/JiShe.IoT.EntityFrameworkCore/EntityFrameworkCore/IoTEntityFrameworkCoreModule.cs
@@ -4,7 +4,6 @@ using JiShe.ServicePro.DynamicMenuManagement.EntityFrameworkCore;
using JiShe.ServicePro.FileManagement.EntityFrameworkCore;
using JiShe.ServicePro.OneNETManagement.EntityFrameworkCore;
using JiShe.ServicePro.TemplateManagement.EntityFrameworkCore;
-using Volo.Abp.EntityFrameworkCore.MySQL;
using Volo.Abp.Guids;
namespace JiShe.IoT.EntityFrameworkCore
@@ -38,10 +37,6 @@ namespace JiShe.IoT.EntityFrameworkCore
* default repositories only for aggregate roots */
options.AddDefaultRepositories(includeAllEntities: true);
});
-
- //// 注册自定义的IdentityUserRepository以修复ABP 10.0.1与MySQL的兼容性问题
- //context.Services.AddTransient();
-
Configure(options =>
{
options.DefaultSequentialGuidType = SequentialGuidType.SequentialAsString;
diff --git a/src/JiShe.IoT.EntityFrameworkCore/EntityFrameworkCore/IoTIdentityUserRepository.cs b/src/JiShe.IoT.EntityFrameworkCore/EntityFrameworkCore/IoTIdentityUserRepository.cs
deleted file mode 100644
index bc46c85..0000000
--- a/src/JiShe.IoT.EntityFrameworkCore/EntityFrameworkCore/IoTIdentityUserRepository.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-using Microsoft.EntityFrameworkCore;
-using Volo.Abp.Domain.Repositories.EntityFrameworkCore;
-using Volo.Abp.EntityFrameworkCore;
-using Volo.Abp.Identity;
-
-namespace JiShe.IoT.EntityFrameworkCore
-{
- ///
- /// 自定义IdentityUserRepository,修复ABP 10.0.1与MySQL提供程序的兼容性问题
- /// 解决 "Expression '@organizationUnitIds' in the SQL tree does not have a type mapping assigned" 错误
- ///
- public class IoTIdentityUserRepository : Volo.Abp.Identity.EntityFrameworkCore.EfCoreIdentityUserRepository
- {
- public IoTIdentityUserRepository(
- IDbContextProvider dbContextProvider)
- : base((IDbContextProvider)dbContextProvider)
- {
- }
-
- public override async Task> GetRoleNamesAsync(Guid id, CancellationToken cancellationToken = default)
- {
- var dbContext = await GetDbContextAsync();
-
- // 使用Join查询来避免参数化集合查询的问题
- // 这样可以避免EF Core将集合参数转换为SQL参数时出现的类型映射问题
- var roleNames = await (from user in dbContext.Users
- join userRole in dbContext.Set() on user.Id equals userRole.UserId
- join role in dbContext.Roles on userRole.RoleId equals role.Id
- where user.Id == id
- select role.Name)
- .Distinct()
- .ToListAsync(GetCancellationToken(cancellationToken));
-
- return roleNames ?? new List();
- }
- }
-}
-
diff --git a/src/JiShe.IoT.EntityFrameworkCore/EntityFrameworkCore/IoTMigrationsDbContextFactory.cs b/src/JiShe.IoT.EntityFrameworkCore/EntityFrameworkCore/IoTMigrationsDbContextFactory.cs
index 9e310b5..b50a207 100644
--- a/src/JiShe.IoT.EntityFrameworkCore/EntityFrameworkCore/IoTMigrationsDbContextFactory.cs
+++ b/src/JiShe.IoT.EntityFrameworkCore/EntityFrameworkCore/IoTMigrationsDbContextFactory.cs
@@ -1,3 +1,5 @@
+using Microsoft.EntityFrameworkCore;
+
namespace JiShe.IoT.EntityFrameworkCore
{
/* This class is needed for EF Core console commands
@@ -10,9 +12,8 @@ namespace JiShe.IoT.EntityFrameworkCore
var configuration = BuildConfiguration();
var serverVersion = new MySqlServerVersion(new Version(8, 4, 6));
-
var builder = new DbContextOptionsBuilder()
- .UseMySql(configuration.GetConnectionString("Default"), serverVersion);
+ .UseMySql(configuration.GetConnectionString("Default") , serverVersion);
return new IoTDbContext(builder.Options);
}
diff --git a/src/JiShe.IoT.EntityFrameworkCore/JiShe.IoT.EntityFrameworkCore.csproj b/src/JiShe.IoT.EntityFrameworkCore/JiShe.IoT.EntityFrameworkCore.csproj
index d0e9c9e..c927580 100644
--- a/src/JiShe.IoT.EntityFrameworkCore/JiShe.IoT.EntityFrameworkCore.csproj
+++ b/src/JiShe.IoT.EntityFrameworkCore/JiShe.IoT.EntityFrameworkCore.csproj
@@ -3,16 +3,11 @@
$(DotnetTargetFrameworkVersion)
JiShe.IoT
-
-
-
-
-
-
-
+
+
diff --git a/src/JiShe.IoT.EntityFrameworkCore/Migrations/20251207055002_InitialCreate.Designer.cs b/src/JiShe.IoT.EntityFrameworkCore/Migrations/20251207055002_InitialCreate.Designer.cs
new file mode 100644
index 0000000..920b50e
--- /dev/null
+++ b/src/JiShe.IoT.EntityFrameworkCore/Migrations/20251207055002_InitialCreate.Designer.cs
@@ -0,0 +1,3831 @@
+//
+using System;
+using JiShe.IoT.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Volo.Abp.EntityFrameworkCore;
+
+#nullable disable
+
+namespace JiShe.IoT.Migrations
+{
+ [DbContext(typeof(IoTDbContext))]
+ [Migration("20251207055002_InitialCreate")]
+ partial class InitialCreate
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql)
+ .HasAnnotation("ProductVersion", "9.0.6")
+ .HasAnnotation("Relational:MaxIdentifierLength", 64);
+
+ MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
+
+ modelBuilder.Entity("JiShe.ServicePro.BasicManagement.UserRefreshTokens.UserRefreshToken", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("char(36)");
+
+ 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("ExpirationTime")
+ .HasColumnType("datetime(6)")
+ .HasComment("过期时间");
+
+ b.Property("ExtraProperties")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit(1)")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("IsUsed")
+ .HasColumnType("bit(1)")
+ .HasComment("是否使用");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("char(36)")
+ .HasColumnName("LastModifierId");
+
+ b.Property("RefreshToken")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)")
+ .HasComment("刷新token");
+
+ b.Property("TenantId")
+ .HasColumnType("char(36)")
+ .HasColumnName("TenantId");
+
+ b.Property("Token")
+ .IsRequired()
+ .HasMaxLength(1024)
+ .HasColumnType("varchar(1024)")
+ .HasComment("Token");
+
+ b.Property("UserId")
+ .HasColumnType("char(36)")
+ .HasComment("用户id");
+
+ b.HasKey("Id");
+
+ b.HasIndex("RefreshToken");
+
+ b.ToTable("ServiceProUserRefreshTokens", null, t =>
+ {
+ t.HasComment("刷新Token");
+ });
+ });
+
+ modelBuilder.Entity("JiShe.ServicePro.CTWingManagement.CTWingAccount.CTWingAccountInfo", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("char(36)");
+
+ b.Property("AccountId")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)")
+ .HasComment("账号ID");
+
+ b.Property("AccountName")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)")
+ .HasComment("账号名称");
+
+ b.Property("AppId")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)")
+ .HasComment("应用 ID");
+
+ b.Property("AppKey")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)")
+ .HasComment("应用 AppKey");
+
+ b.Property("AppSecret")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)")
+ .HasComment("应用 AppSecret");
+
+ b.Property("CommunicationAddress")
+ .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("ExtraProperties")
+ .HasColumnType("longtext")
+ .HasColumnName("ExtraProperties")
+ .HasComment("扩展属性,用于存储自定义字段,JSON格式");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit(1)")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("char(36)")
+ .HasColumnName("LastModifierId");
+
+ b.Property("OSACreatorId")
+ .HasColumnType("int")
+ .HasComment("旧系统授权创建者Id");
+
+ b.Property("OSADeleterId")
+ .HasColumnType("int")
+ .HasComment("旧系统授权最后删除者Id");
+
+ b.Property("OSALastModifierId")
+ .HasColumnType("int")
+ .HasComment("旧系统授权最后修改者Id");
+
+ b.Property("PhoneNumber")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)")
+ .HasComment("手机号码");
+
+ b.Property("PlatformTenantId")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)")
+ .HasComment("平台租户ID");
+
+ b.Property("ProductCount")
+ .HasColumnType("int");
+
+ b.Property("Remark")
+ .HasColumnType("longtext")
+ .HasComment("备注");
+
+ b.Property("TenantId")
+ .HasColumnType("char(36)")
+ .HasColumnName("TenantId")
+ .HasComment("租户ID");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CreationTime");
+
+ b.HasIndex(new[] { "Id", "AccountId", "AccountName", "CreationTime" }, "IX_ServiceProCTWingAccountInfo_IsNotUniqueKey")
+ .IsDescending();
+
+ b.ToTable("ServiceProCTWingAccountInfo", null, t =>
+ {
+ t.HasComment("CTWing账号信息");
+ });
+ });
+
+ modelBuilder.Entity("JiShe.ServicePro.CTWingManagement.CTWingProduct.CTWingPrivateProductInfo", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("char(36)");
+
+ b.Property("AccessType")
+ .HasColumnType("int");
+
+ b.Property("AccountPhoneNumber")
+ .HasColumnType("longtext");
+
+ b.Property("AuthType")
+ .HasColumnType("int");
+
+ b.Property("CTWingAccountId")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)")
+ .HasComment("账号ID");
+
+ b.Property("CommunicationAddress")
+ .IsRequired()
+ .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("DataEncryption")
+ .HasColumnType("int");
+
+ b.Property("DeleterId")
+ .HasColumnType("char(36)")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("DeletionTime");
+
+ b.Property("DeviceCount")
+ .HasColumnType("int");
+
+ b.Property("DeviceThingModelFileId")
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)")
+ .HasComment("设备物模型文件Id");
+
+ b.Property("DeviceThingModelFileName")
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)")
+ .HasComment("设备物模型文件名称");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("longtext")
+ .HasColumnName("ExtraProperties")
+ .HasComment("扩展属性,用于存储自定义字段,JSON格式");
+
+ b.Property("FeatureAccesskey")
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)")
+ .HasComment("设备访问密钥");
+
+ b.Property("IoTPlatformProductId")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)")
+ .HasComment("产品ID");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit(1)")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("IsEnabled")
+ .HasColumnType("bit(1)")
+ .HasComment("是否启用");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("char(36)")
+ .HasColumnName("LastModifierId");
+
+ b.Property("MasterKey")
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)")
+ .HasComment("OpenAPI 通信主密钥");
+
+ b.Property("NetworkType")
+ .HasColumnType("int");
+
+ b.Property("NodeType")
+ .HasColumnType("int");
+
+ b.Property("OSACreatorId")
+ .HasColumnType("int")
+ .HasComment("旧系统授权创建者Id");
+
+ b.Property("OSADeleterId")
+ .HasColumnType("int")
+ .HasComment("旧系统授权最后删除者Id");
+
+ b.Property("OSALastModifierId")
+ .HasColumnType("int")
+ .HasComment("旧系统授权最后修改者Id");
+
+ b.Property("ProductDesc")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)")
+ .HasComment("必填,产品描述");
+
+ b.Property("ProductName")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)")
+ .HasComment("产品名称");
+
+ b.Property("ProductProtocol")
+ .HasColumnType("int");
+
+ b.Property("ProductType")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)")
+ .HasComment("一级分类名");
+
+ b.Property("Protocol")
+ .HasMaxLength(20)
+ .HasColumnType("varchar(20)")
+ .HasComment("通讯协议");
+
+ b.Property("Remark")
+ .HasColumnType("longtext")
+ .HasComment("备注");
+
+ b.Property("SecondaryType")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)")
+ .HasComment("二级分类名");
+
+ b.Property("TenantId")
+ .HasColumnType("char(36)")
+ .HasColumnName("TenantId")
+ .HasComment("租户ID");
+
+ b.Property("ThirdType")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)")
+ .HasComment("三级分类名");
+
+ b.Property("TupDeviceModel")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)")
+ .HasComment("设备型号");
+
+ b.Property("TupIsThrough")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CreationTime");
+
+ b.HasIndex(new[] { "Id", "IoTPlatformProductId", "ProductName", "CreationTime" }, "IX_ServiceProCTWingPrivateProductInfo_IsNotUniqueKey")
+ .IsDescending();
+
+ b.ToTable("ServiceProCTWingPrivateProductInfo", null, t =>
+ {
+ t.HasComment("CTWing产品信息");
+ });
+ });
+
+ modelBuilder.Entity("JiShe.ServicePro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionary", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("char(36)");
+
+ b.Property("Code")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ 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("Description")
+ .IsRequired()
+ .HasMaxLength(1024)
+ .HasColumnType("varchar(1024)");
+
+ b.Property("DisplayText")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("ExtraProperties")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit(1)")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("char(36)")
+ .HasColumnName("LastModifierId");
+
+ b.Property("TenantId")
+ .HasColumnType("char(36)")
+ .HasColumnName("TenantId");
+
+ b.HasKey("Id");
+
+ b.ToTable("AbpDataDictionaries", null, t =>
+ {
+ t.HasComment("数据字典");
+ });
+ });
+
+ modelBuilder.Entity("JiShe.ServicePro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionaryDetail", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("char(36)");
+
+ b.Property("Code")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("char(36)")
+ .HasColumnName("CreatorId");
+
+ b.Property("DataDictionaryId")
+ .HasColumnType("char(36)");
+
+ b.Property("Description")
+ .HasMaxLength(1024)
+ .HasColumnType("varchar(1024)");
+
+ b.Property("DisplayText")
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("ExtendedAttribute")
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("IsEnabled")
+ .HasColumnType("bit(1)");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("char(36)")
+ .HasColumnName("LastModifierId");
+
+ b.Property("Order")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("DataDictionaryId");
+
+ b.ToTable("AbpDataDictionaryDetails", null, t =>
+ {
+ t.HasComment("数据字典详情");
+ });
+ });
+
+ modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.DeviceInfos.DeviceManagementInfo", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("char(36)");
+
+ b.Property("AccountPhoneNumber")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)")
+ .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("DeviceAddress")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasComment("设备地址");
+
+ b.Property("DeviceName")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)")
+ .HasComment("设备名称");
+
+ b.Property("DeviceOnlineStatus")
+ .HasColumnType("int")
+ .HasComment("设备在线状态");
+
+ b.Property("DeviceSource")
+ .HasColumnType("int")
+ .HasComment("设备来源类型");
+
+ b.Property("DeviceThingModelDataId")
+ .HasColumnType("char(36)")
+ .HasComment("设备物模型数据Id");
+
+ b.Property("DeviceType")
+ .HasColumnType("int")
+ .HasComment("设备类型,与业务系统无关,主要区分是网关设备、直连设备");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("longtext")
+ .HasColumnName("ExtraProperties")
+ .HasComment("扩展属性,用于存储自定义字段,JSON格式");
+
+ b.Property("IoTPlatform")
+ .HasColumnType("int")
+ .HasComment("物联网平台类型,默认没有指定");
+
+ b.Property("IoTPlatformAccountId")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)")
+ .HasComment("物联网平台中对应的账号Id");
+
+ b.Property("IoTPlatformDeviceOpenInfo")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)")
+ .HasComment("物联网平台中对应的设备Id或者名称");
+
+ b.Property("IoTPlatformProductId")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)")
+ .HasComment("物联网平台中对应的产品Id");
+
+ b.Property("IoTPlatformProductName")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)")
+ .HasComment("物联网平台中对应的产品Name");
+
+ b.Property("IoTPlatformResponse")
+ .HasColumnType("text")
+ .HasComment("物联网平台返回的响应信息");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit(1)")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("IsNeedConfigDevicMdoel")
+ .HasColumnType("bit(1)")
+ .HasComment("是否需要配置设备模型");
+
+ b.Property("IsPlatformPushSuccess")
+ .HasColumnType("tinyint(1)")
+ .HasComment("物联网平台推送是否成功");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("char(36)")
+ .HasColumnName("LastModifierId");
+
+ b.Property("LastOfflineTime")
+ .HasColumnType("datetime(6)")
+ .HasComment("最后离线时间");
+
+ b.Property("LastOnlineTime")
+ .HasColumnType("datetime(6)")
+ .HasComment("最后在线时间");
+
+ b.Property("OSACreatorId")
+ .HasColumnType("int")
+ .HasComment("旧系统授权创建者Id");
+
+ b.Property("OSADeleterId")
+ .HasColumnType("int")
+ .HasComment("旧系统授权最后删除者Id");
+
+ b.Property("OSALastModifierId")
+ .HasColumnType("int")
+ .HasComment("旧系统授权最后修改者Id");
+
+ b.Property("PlatformPassword")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)")
+ .HasComment("物联网平台设备密码");
+
+ b.Property("Remark")
+ .HasColumnType("longtext")
+ .HasComment("备注");
+
+ b.Property("TenantId")
+ .HasColumnType("char(36)")
+ .HasColumnName("TenantId")
+ .HasComment("租户ID");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CreationTime");
+
+ b.HasIndex("DeviceAddress");
+
+ b.HasIndex(new[] { "Id", "DeviceName", "DeviceAddress", "IoTPlatformProductId", "CreationTime" }, "IX_ServiceProDeviceInfo_IsNotUniqueKey")
+ .IsDescending();
+
+ b.ToTable("ServiceProDeviceInfo", null, t =>
+ {
+ t.HasComment("设备信息");
+ });
+ });
+
+ modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.ThingModelInfos.DeviceThingModelCommandInfo", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("char(36)");
+
+ b.Property("CommandName")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)")
+ .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("DeviceThingModelId")
+ .HasColumnType("char(36)")
+ .HasComment("设备端物模型Id");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("longtext")
+ .HasColumnName("ExtraProperties")
+ .HasComment("扩展属性,用于存储自定义字段,JSON格式");
+
+ b.Property("IoTPlatform")
+ .HasColumnType("int")
+ .HasComment("物联网平台类型");
+
+ b.Property("IoTPlatformProductId")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)")
+ .HasComment("物联网平台中对应的产品Id");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit(1)")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("IssueCommand")
+ .IsRequired()
+ .HasMaxLength(512)
+ .HasColumnType("varchar(512)")
+ .HasComment("完整的单个下发指令");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("char(36)")
+ .HasColumnName("LastModifierId");
+
+ b.Property("OSACreatorId")
+ .HasColumnType("int")
+ .HasComment("旧系统授权创建者Id");
+
+ b.Property("OSADeleterId")
+ .HasColumnType("int")
+ .HasComment("旧系统授权最后删除者Id");
+
+ b.Property("OSALastModifierId")
+ .HasColumnType("int")
+ .HasComment("旧系统授权最后修改者Id");
+
+ b.Property("PropertyArray")
+ .IsRequired()
+ .HasMaxLength(1024)
+ .HasColumnType("varchar(1024)")
+ .HasComment("指令设备端物模型的属性名称集合,JSON格式字符串数组");
+
+ b.Property("Remark")
+ .HasColumnType("longtext")
+ .HasComment("备注");
+
+ b.Property("TenantId")
+ .HasColumnType("char(36)")
+ .HasColumnName("TenantId")
+ .HasComment("租户ID");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CreationTime");
+
+ b.HasIndex("DeviceThingModelId");
+
+ b.HasIndex(new[] { "Id", "DeviceThingModelId", "IoTPlatformProductId", "CreationTime" }, "IX_ServiceProIoTPlatformThingModelInfo_IsNotUniqueKey")
+ .IsDescending();
+
+ b.ToTable("ServiceProDeviceThingModelCommandInfo", null, t =>
+ {
+ t.HasComment("设备端透传指令详情");
+ });
+ });
+
+ modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.ThingModelInfos.DeviceThingModelManagement", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("char(36)");
+
+ 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("DeviceModelName")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)")
+ .HasComment("设备端物模型名称");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("longtext")
+ .HasColumnName("ExtraProperties")
+ .HasComment("扩展属性,用于存储自定义字段,JSON格式");
+
+ b.Property("FunctionAnalysisFlag")
+ .HasColumnType("tinyint(1)")
+ .HasComment("函数解析标记,默认为false, 不能解析");
+
+ b.Property("FunctionScript")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasComment("脚本函数体");
+
+ b.Property("IoTPlatform")
+ .HasColumnType("int")
+ .HasComment("物联网平台类型,默认没有指定");
+
+ b.Property("IoTPlatformProductId")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)")
+ .HasComment("物联网平台中对应的产品Id");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit(1)")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("char(36)")
+ .HasColumnName("LastModifierId");
+
+ b.Property("OSACreatorId")
+ .HasColumnType("int")
+ .HasComment("旧系统授权创建者Id");
+
+ b.Property("OSADeleterId")
+ .HasColumnType("int")
+ .HasComment("旧系统授权最后删除者Id");
+
+ b.Property("OSALastModifierId")
+ .HasColumnType("int")
+ .HasComment("旧系统授权最后修改者Id");
+
+ b.Property("ParsingSequence")
+ .HasColumnType("int")
+ .HasComment("解析顺序,1234或者3412(高低位反转)");
+
+ b.Property("Remark")
+ .HasColumnType("longtext")
+ .HasComment("备注");
+
+ b.Property("ScriptName")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)")
+ .HasComment("脚本函数名称");
+
+ b.Property("TenantId")
+ .HasColumnType("char(36)")
+ .HasColumnName("TenantId")
+ .HasComment("租户ID");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CreationTime");
+
+ b.HasIndex("IoTPlatformProductId");
+
+ b.HasIndex(new[] { "Id", "DeviceModelName", "IoTPlatformProductId", "CreationTime" }, "IX_ServiceProIoTPlatformThingModelInfo_IsNotUniqueKey")
+ .IsDescending()
+ .HasDatabaseName("IX_ServiceProIoTPlatformThingModelInfo_IsNotUniqueKey1");
+
+ b.ToTable("ServiceProDeviceThingModelManagement", null, t =>
+ {
+ t.HasComment("设备端物模型管理");
+ });
+ });
+
+ modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.ThingModelInfos.DeviceThingModelPropertyInfo", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("char(36)");
+
+ 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("DeviceThingModelId")
+ .HasColumnType("char(36)")
+ .HasComment("设备端物模型Id");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("longtext")
+ .HasColumnName("ExtraProperties")
+ .HasComment("扩展属性,用于存储自定义字段,JSON格式");
+
+ b.Property("FiledType")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)")
+ .HasComment("物联网平台中对应产品物模型属性或者事件类型");
+
+ b.Property("IoTPlatform")
+ .HasColumnType("int")
+ .HasComment("物联网平台类型");
+
+ b.Property("IoTPlatformProductId")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)")
+ .HasComment("物联网平台中对应的产品Id");
+
+ b.Property("IoTPlatformRawFieldDataType")
+ .IsRequired()
+ .HasMaxLength(20)
+ .HasColumnType("varchar(20)")
+ .HasComment("物联网平台中对应的产品物模型属性或者事件数据类型");
+
+ b.Property("IoTPlatformRawFieldName")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)")
+ .HasComment("物联网平台中对应的产品物模型属性或者事件名称");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit(1)")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("IsValueNeedConvert")
+ .HasColumnType("tinyint(1)")
+ .HasComment("是否需要值类型转换");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("char(36)")
+ .HasColumnName("LastModifierId");
+
+ b.Property("OSACreatorId")
+ .HasColumnType("int")
+ .HasComment("旧系统授权创建者Id");
+
+ b.Property("OSADeleterId")
+ .HasColumnType("int")
+ .HasComment("旧系统授权最后删除者Id");
+
+ b.Property("OSALastModifierId")
+ .HasColumnType("int")
+ .HasComment("旧系统授权最后修改者Id");
+
+ b.Property("Remark")
+ .HasColumnType("longtext")
+ .HasComment("备注");
+
+ b.Property("SkipNumber")
+ .HasColumnType("int")
+ .HasComment("跳过数量");
+
+ b.Property("StandardFieldDisplayName")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)")
+ .HasComment("管理后台产品标准的物模型属性或者事件名称");
+
+ b.Property("StandardFieldName")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)")
+ .HasComment("管理后台产品标准的物模型属性或者事件名称");
+
+ b.Property("StandardFieldValueType")
+ .IsRequired()
+ .HasMaxLength(20)
+ .HasColumnType("varchar(20)")
+ .HasComment("标准物模型字段值类型");
+
+ b.Property("TakeNumber")
+ .HasColumnType("int")
+ .HasComment("获取数量");
+
+ b.Property("TenantId")
+ .HasColumnType("char(36)")
+ .HasColumnName("TenantId")
+ .HasComment("租户ID");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CreationTime");
+
+ b.HasIndex("IoTPlatformProductId");
+
+ b.HasIndex(new[] { "Id", "IoTPlatformProductId", "IoTPlatformRawFieldName", "StandardFieldName", "CreationTime" }, "IX_ServiceProIoTPlatformThingModelInfo_IsNotUniqueKey")
+ .IsDescending()
+ .HasDatabaseName("IX_ServiceProIoTPlatformThingModelInfo_IsNotUniqueKey2");
+
+ b.ToTable("ServiceProDeviceThingModelPropertylInfo", null, t =>
+ {
+ t.HasComment("设备端物模型属性信息,是指设备端支持的属性或者事件");
+ });
+ });
+
+ modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.ThingModelInfos.IoTPlatformThingModelInfo", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("char(36)");
+
+ 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("ExtraProperties")
+ .HasColumnType("longtext")
+ .HasColumnName("ExtraProperties")
+ .HasComment("扩展属性,用于存储自定义字段,JSON格式");
+
+ b.Property("FiledType")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)")
+ .HasComment("物联网平台中对应产品物模型属性或者事件类型");
+
+ b.Property("IoTPlatform")
+ .HasColumnType("int")
+ .HasComment("物联网平台类型,默认没有指定");
+
+ b.Property("IoTPlatformProductId")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)")
+ .HasComment("物联网平台中对应的产品Id");
+
+ b.Property("IoTPlatformRawFieldName")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)")
+ .HasComment("物联网平台中对应的产品物模型属性或者事件名称");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit(1)")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property