From 0db946724c96e3b4c7bc5a724f880c321a65c67f Mon Sep 17 00:00:00 2001 From: ChenYi <296215406@outlook.com> Date: Thu, 15 Jan 2026 15:37:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=87=E6=8D=A2=E6=95=B0=E6=8D=AE=E5=BA=93?= =?UTF-8?q?=E4=BD=8DPostgreSQL=2018.1=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Directory.Build.targets | 11 +- .../configs/appsettings.Development.json | 3 +- .../CommonServices/CommonService.cs | 41 +- src/JiShe.IoT.DbMigrator/appsettings.json | 3 +- src/JiShe.IoT.Domain/BasicEntiy.cs | 2 +- .../Data/IoTDbMigrationService.cs | 2 +- .../IoTEntityFrameworkCoreModule.cs | 17 +- .../IoTMigrationsDbContextFactory.cs | 3 +- .../GlobalUsings.cs | 1 - .../JiShe.IoT.EntityFrameworkCore.csproj | 2 +- .../20260104061132_InitialCreate.cs | 2358 ----------------- ... 20260115061417_InitialCreate.Designer.cs} | 1656 ++++++------ .../20260115061417_InitialCreate.cs | 2064 +++++++++++++++ .../Migrations/IoTDbContextModelSnapshot.cs | 1654 ++++++------ 14 files changed, 3929 insertions(+), 3888 deletions(-) delete mode 100644 src/JiShe.IoT.EntityFrameworkCore/Migrations/20260104061132_InitialCreate.cs rename src/JiShe.IoT.EntityFrameworkCore/Migrations/{20260104061132_InitialCreate.Designer.cs => 20260115061417_InitialCreate.Designer.cs} (72%) create mode 100644 src/JiShe.IoT.EntityFrameworkCore/Migrations/20260115061417_InitialCreate.cs diff --git a/Directory.Build.targets b/Directory.Build.targets index f3dd2d9..e90b41e 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -34,11 +34,12 @@ - - - - - + + + + + + diff --git a/host/JiShe.IoT.HttpApi.Host/configs/appsettings.Development.json b/host/JiShe.IoT.HttpApi.Host/configs/appsettings.Development.json index f91c8cd..8f19397 100644 --- a/host/JiShe.IoT.HttpApi.Host/configs/appsettings.Development.json +++ b/host/JiShe.IoT.HttpApi.Host/configs/appsettings.Development.json @@ -4,7 +4,8 @@ "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=JiSheIoTProDB386;uid=root;pwd=JiShe!aqG#5kGgh&0;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true;TreatTinyAsBoolean=false;SslMode=None;Pooling=true;" + //"Default": "Data Source=192.168.111.174;Port=13306;Database=JiSheIoTProDB386;uid=root;pwd=JiShe!aqG#5kGgh&0;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true;TreatTinyAsBoolean=false;SslMode=None;Pooling=true;" + "Default": "Host=192.168.111.174;Port=5432;Database=jisheiotprodb;Username=postgres;Password=JiShe!aqG#5kGgh&0;Encoding=UTF8;Pooling=true;Pooling=true;Minimum Pool Size=5;Maximum Pool Size=100;" }, "Hangfire": { "Redis": { diff --git a/src/JiShe.IoT.Application/CommonServices/CommonService.cs b/src/JiShe.IoT.Application/CommonServices/CommonService.cs index cb0c906..b82b50a 100644 --- a/src/JiShe.IoT.Application/CommonServices/CommonService.cs +++ b/src/JiShe.IoT.Application/CommonServices/CommonService.cs @@ -4,6 +4,7 @@ using JiShe.ServicePro.Core; using System.Collections.Concurrent; using System.Collections.Generic; using System.ComponentModel; +using System.Reflection; using static FreeSql.Internal.GlobalFilter; namespace JiShe.IoT.CommonServices @@ -19,7 +20,45 @@ namespace JiShe.IoT.CommonServices public void InitSelectTypetList() { var assemblies = AppDomain.CurrentDomain.GetAssemblies(); - var typeList = assemblies.SelectMany(x => x.GetTypes()).Where(x => x.IsDefined(typeof(SelectResultAttribute), false)); + + // 排除 Npgsql 和系统程序集 + var excludedAssemblies = new[] + { + "Npgsql", + "Npgsql.EntityFrameworkCore.PostgreSQL" + }; + + var typeList = assemblies + .Where(assembly => + { + var assemblyName = assembly.GetName().Name ?? ""; + // 排除 Npgsql 相关程序集 + return !excludedAssemblies.Any(excluded => + assemblyName.StartsWith(excluded, StringComparison.OrdinalIgnoreCase)); + }) + .SelectMany(assembly => + { + try + { + return assembly.GetTypes(); + } + catch (ReflectionTypeLoadException ex) + { + // 某些类型加载失败,只返回成功加载的类型 + return ex.Types.Where(t => t != null); + } + catch (TypeLoadException) + { + // 类型加载异常,跳过这个程序集 + return Enumerable.Empty(); + } + catch (Exception) + { + // 其他异常,跳过这个程序集 + return Enumerable.Empty(); + } + }) + .Where(t => t != null && t.IsDefined(typeof(SelectResultAttribute), false)); foreach (var typeInfoItem in typeList) { diff --git a/src/JiShe.IoT.DbMigrator/appsettings.json b/src/JiShe.IoT.DbMigrator/appsettings.json index 557c7c1..7a3fa0c 100644 --- a/src/JiShe.IoT.DbMigrator/appsettings.json +++ b/src/JiShe.IoT.DbMigrator/appsettings.json @@ -1,6 +1,7 @@ { "ConnectionStrings": { - "Default": "Data Source=192.168.111.174;Port=13306;Database=JiSheIoTProDB386;uid=root;pwd=JiShe!aqG#5kGgh&0;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true;TreatTinyAsBoolean=false;SslMode=None;Pooling=true;" + //"Default": "Data Source=192.168.111.174;Port=13306;Database=JiSheIoTProDB386;uid=root;pwd=JiShe!aqG#5kGgh&0;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true;TreatTinyAsBoolean=false;SslMode=None;Pooling=true;" + "Default": "Host=192.168.111.174;Port=5432;Database=jisheiotprodb;Username=postgres;Password=JiShe!aqG#5kGgh&0;Encoding=UTF8;Pooling=true;Pooling=true;Minimum Pool Size=5;Maximum Pool Size=100;" }, "IoTDBOptions": { "UserName": "root", diff --git a/src/JiShe.IoT.Domain/BasicEntiy.cs b/src/JiShe.IoT.Domain/BasicEntiy.cs index ac949f0..4e94827 100644 --- a/src/JiShe.IoT.Domain/BasicEntiy.cs +++ b/src/JiShe.IoT.Domain/BasicEntiy.cs @@ -49,7 +49,7 @@ namespace JiShe.IoT.Domain.Shared /// 扩展属性,用于存储自定义字段,JSON格式 /// [Comment("扩展属性,用于存储自定义字段,JSON格式")] - [JsonMap] + [JsonMap, Column(DbType = "jsonb")] public new ExtraPropertyDictionary ExtraProperties { get; set; } = new ExtraPropertyDictionary(); diff --git a/src/JiShe.IoT.Domain/Data/IoTDbMigrationService.cs b/src/JiShe.IoT.Domain/Data/IoTDbMigrationService.cs index 98f84da..953c8d5 100644 --- a/src/JiShe.IoT.Domain/Data/IoTDbMigrationService.cs +++ b/src/JiShe.IoT.Domain/Data/IoTDbMigrationService.cs @@ -42,7 +42,7 @@ namespace JiShe.IoT.Data await MigrateDatabaseSchemaAsync(); await SeedDataAsync(); - await InitIoTDBTable(); + //await InitIoTDBTable(); Logger.LogInformation($"Successfully completed host database migrations."); diff --git a/src/JiShe.IoT.EntityFrameworkCore/EntityFrameworkCore/IoTEntityFrameworkCoreModule.cs b/src/JiShe.IoT.EntityFrameworkCore/EntityFrameworkCore/IoTEntityFrameworkCoreModule.cs index 58b3cf7..da4ba4d 100644 --- a/src/JiShe.IoT.EntityFrameworkCore/EntityFrameworkCore/IoTEntityFrameworkCoreModule.cs +++ b/src/JiShe.IoT.EntityFrameworkCore/EntityFrameworkCore/IoTEntityFrameworkCoreModule.cs @@ -1,16 +1,18 @@ -using JiShe.ServicePro.CTWingManagement.EntityFrameworkCore; +using JiShe.ServicePro.CTWingManagement.EntityFrameworkCore; using JiShe.ServicePro.DeviceManagement.EntityFrameworkCore; using JiShe.ServicePro.DynamicMenuManagement.EntityFrameworkCore; using JiShe.ServicePro.FileManagement.EntityFrameworkCore; using JiShe.ServicePro.OneNETManagement.EntityFrameworkCore; using JiShe.ServicePro.TemplateManagement.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore.PostgreSql; using Volo.Abp.Guids; +using Volo.Abp.Timing; namespace JiShe.IoT.EntityFrameworkCore { [DependsOn( typeof(IoTDomainModule), - typeof(AbpEntityFrameworkCoreMySQLPomeloModule), + typeof(AbpEntityFrameworkCorePostgreSqlModule), typeof(BasicManagementEntityFrameworkCoreModule), typeof(DataDictionaryManagementEntityFrameworkCoreModule), typeof(NotificationManagementEntityFrameworkCoreModule), @@ -27,10 +29,19 @@ namespace JiShe.IoT.EntityFrameworkCore public override void PreConfigureServices(ServiceConfigurationContext context) { IoTEfCoreEntityExtensionMappings.Configure(); + + // ✅ 启用 Npgsql 旧版时间戳行为 + AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true); } public override void ConfigureServices(ServiceConfigurationContext context) { + // ✅ 配置 ABP 使用 UTC 时间 + Configure(options => + { + options.Kind = DateTimeKind.Utc; + }); + context.Services.AddAbpDbContext(options => { /* Remove "includeAllEntities: true" to create @@ -47,7 +58,7 @@ namespace JiShe.IoT.EntityFrameworkCore * See also HayoonKoreaDbContextFactory for EF Core tooling. * https://github.com/abpframework/abp/issues/21879 * */ - options.UseMySQL(builder => + options.UseNpgsql(builder => { builder.TranslateParameterizedCollectionsToConstants(); }); diff --git a/src/JiShe.IoT.EntityFrameworkCore/EntityFrameworkCore/IoTMigrationsDbContextFactory.cs b/src/JiShe.IoT.EntityFrameworkCore/EntityFrameworkCore/IoTMigrationsDbContextFactory.cs index b50a207..dc62996 100644 --- a/src/JiShe.IoT.EntityFrameworkCore/EntityFrameworkCore/IoTMigrationsDbContextFactory.cs +++ b/src/JiShe.IoT.EntityFrameworkCore/EntityFrameworkCore/IoTMigrationsDbContextFactory.cs @@ -11,9 +11,8 @@ namespace JiShe.IoT.EntityFrameworkCore IoTEfCoreEntityExtensionMappings.Configure(); var configuration = BuildConfiguration(); - var serverVersion = new MySqlServerVersion(new Version(8, 4, 6)); var builder = new DbContextOptionsBuilder() - .UseMySql(configuration.GetConnectionString("Default") , serverVersion); + .UseNpgsql(configuration.GetConnectionString("Default")); return new IoTDbContext(builder.Options); } diff --git a/src/JiShe.IoT.EntityFrameworkCore/GlobalUsings.cs b/src/JiShe.IoT.EntityFrameworkCore/GlobalUsings.cs index 3dbabfa..a66b245 100644 --- a/src/JiShe.IoT.EntityFrameworkCore/GlobalUsings.cs +++ b/src/JiShe.IoT.EntityFrameworkCore/GlobalUsings.cs @@ -30,7 +30,6 @@ global using Volo.Abp.BackgroundJobs; global using Volo.Abp.Data; global using Volo.Abp.DependencyInjection; global using Volo.Abp.EntityFrameworkCore; -global using Volo.Abp.EntityFrameworkCore.MySQL; global using Volo.Abp.FeatureManagement; global using Volo.Abp.Identity; global using Volo.Abp.Modularity; diff --git a/src/JiShe.IoT.EntityFrameworkCore/JiShe.IoT.EntityFrameworkCore.csproj b/src/JiShe.IoT.EntityFrameworkCore/JiShe.IoT.EntityFrameworkCore.csproj index 84a1793..68639f5 100644 --- a/src/JiShe.IoT.EntityFrameworkCore/JiShe.IoT.EntityFrameworkCore.csproj +++ b/src/JiShe.IoT.EntityFrameworkCore/JiShe.IoT.EntityFrameworkCore.csproj @@ -6,7 +6,7 @@ - + diff --git a/src/JiShe.IoT.EntityFrameworkCore/Migrations/20260104061132_InitialCreate.cs b/src/JiShe.IoT.EntityFrameworkCore/Migrations/20260104061132_InitialCreate.cs deleted file mode 100644 index 3f17e7e..0000000 --- a/src/JiShe.IoT.EntityFrameworkCore/Migrations/20260104061132_InitialCreate.cs +++ /dev/null @@ -1,2358 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace JiShe.IoT.Migrations -{ - /// - public partial class InitialCreate : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterDatabase() - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpAuditLogExcelFiles", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - FileName = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpAuditLogExcelFiles", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpAuditLogs", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - ApplicationName = table.Column(type: "varchar(96)", maxLength: 96, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - UserId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - UserName = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - TenantName = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ImpersonatorUserId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - ImpersonatorUserName = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ImpersonatorTenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - ImpersonatorTenantName = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ExecutionTime = table.Column(type: "datetime(6)", nullable: false), - ExecutionDuration = table.Column(type: "int", nullable: false), - ClientIpAddress = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ClientName = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ClientId = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - CorrelationId = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - BrowserInfo = table.Column(type: "varchar(512)", maxLength: 512, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - HttpMethod = table.Column(type: "varchar(16)", maxLength: 16, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Url = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Exceptions = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Comments = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - HttpStatusCode = table.Column(type: "int", nullable: true), - ExtraProperties = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpAuditLogs", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpBackgroundJobs", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - ApplicationName = table.Column(type: "varchar(96)", maxLength: 96, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - JobName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - JobArgs = table.Column(type: "longtext", maxLength: 1048576, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - TryCount = table.Column(type: "smallint", nullable: false, defaultValue: (short)0), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - NextTryTime = table.Column(type: "datetime(6)", nullable: false), - LastTryTime = table.Column(type: "datetime(6)", nullable: true), - IsAbandoned = table.Column(type: "bit(1)", nullable: false, defaultValue: false), - Priority = table.Column(type: "tinyint unsigned", nullable: false, defaultValue: (byte)15), - ExtraProperties = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpBackgroundJobs", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpClaimTypes", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Name = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Required = table.Column(type: "bit(1)", nullable: false), - IsStatic = table.Column(type: "bit(1)", nullable: false), - Regex = table.Column(type: "varchar(512)", maxLength: 512, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - RegexDescription = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Description = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ValueType = table.Column(type: "int", nullable: false), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpClaimTypes", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpDataDictionaries", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - Code = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - DisplayText = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Description = table.Column(type: "varchar(1024)", maxLength: 1024, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ExtraProperties = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - IsDeleted = table.Column(type: "bit(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpDataDictionaries", x => x.Id); - }, - comment: "数据字典") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpFeatureGroups", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - DisplayName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpFeatureGroups", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpFeatures", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - GroupName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ParentName = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - DisplayName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Description = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - DefaultValue = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - IsVisibleToClients = table.Column(type: "bit(1)", nullable: false), - IsAvailableToHost = table.Column(type: "bit(1)", nullable: false), - AllowedProviders = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ValueType = table.Column(type: "varchar(2048)", maxLength: 2048, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpFeatures", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpFeatureValues", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Value = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ProviderName = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ProviderKey = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpFeatureValues", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpFileObjects", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - FileName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "文件名称") - .Annotation("MySql:CharSet", "utf8mb4"), - FileSize = table.Column(type: "bigint", nullable: false, comment: "文件大小"), - ContentType = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "文件名称") - .Annotation("MySql:CharSet", "utf8mb4"), - Md5Hash = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "文件MD5") - .Annotation("MySql:CharSet", "utf8mb4"), - ExtraProperties = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - IsDeleted = table.Column(type: "bit(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpFileObjects", x => x.Id); - }, - comment: "文件管理") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpLanguages", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - CultureName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "语言名称") - .Annotation("MySql:CharSet", "utf8mb4"), - UiCultureName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "Ui语言名称") - .Annotation("MySql:CharSet", "utf8mb4"), - DisplayName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "显示名称") - .Annotation("MySql:CharSet", "utf8mb4"), - FlagIcon = table.Column(type: "varchar(128)", maxLength: 128, nullable: true, comment: "图标") - .Annotation("MySql:CharSet", "utf8mb4"), - IsEnabled = table.Column(type: "bit(1)", nullable: false), - IsDefault = table.Column(type: "bit(1)", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - IsDeleted = table.Column(type: "bit(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpLanguages", x => x.Id); - }, - comment: "语言管理") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpLanguageTexts", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - CultureName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "语言名称") - .Annotation("MySql:CharSet", "utf8mb4"), - ResourceName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "资源名称") - .Annotation("MySql:CharSet", "utf8mb4"), - Name = table.Column(type: "varchar(256)", maxLength: 256, nullable: false, comment: "名称") - .Annotation("MySql:CharSet", "utf8mb4"), - Value = table.Column(type: "varchar(256)", maxLength: 256, nullable: false, comment: "值") - .Annotation("MySql:CharSet", "utf8mb4"), - ExtraProperties = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - IsDeleted = table.Column(type: "bit(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpLanguageTexts", x => x.Id); - }, - comment: "语言文本管理") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpLinkUsers", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - SourceUserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - SourceTenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - TargetUserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TargetTenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpLinkUsers", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpNotifications", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - Title = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Content = table.Column(type: "varchar(1024)", maxLength: 1024, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - MessageType = table.Column(type: "int", nullable: false), - MessageLevel = table.Column(type: "int", nullable: false), - SenderUserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - SenderUserName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ReceiveUserId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - ReceiveUserName = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Read = table.Column(type: "bit(1)", nullable: false), - ReadTime = table.Column(type: "datetime(6)", nullable: true), - ExtraProperties = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - IsDeleted = table.Column(type: "bit(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpNotifications", x => x.Id); - }, - comment: "消息通知管理") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpNotificationSubscriptions", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - NotificationId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - ReceiveUserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - ReceiveUserName = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Read = table.Column(type: "bit(1)", nullable: false), - ReadTime = table.Column(type: "datetime(6)", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - IsDeleted = table.Column(type: "bit(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpNotificationSubscriptions", x => x.Id); - }, - comment: "消息订阅者") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpOrganizationUnits", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - ParentId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - Code = table.Column(type: "varchar(95)", maxLength: 95, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - DisplayName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - EntityVersion = table.Column(type: "int", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - IsDeleted = table.Column(type: "bit(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpOrganizationUnits", x => x.Id); - table.ForeignKey( - name: "FK_AbpOrganizationUnits_AbpOrganizationUnits_ParentId", - column: x => x.ParentId, - principalTable: "AbpOrganizationUnits", - principalColumn: "Id"); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpPermissionGrants", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ProviderName = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ProviderKey = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpPermissionGrants", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpPermissionGroups", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - DisplayName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpPermissionGroups", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpPermissions", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - GroupName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ParentName = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - DisplayName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - IsEnabled = table.Column(type: "bit(1)", nullable: false), - MultiTenancySide = table.Column(type: "tinyint unsigned", nullable: false), - Providers = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - StateCheckers = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpPermissions", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpRoles", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - Name = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - NormalizedName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - IsDefault = table.Column(type: "bit(1)", nullable: false), - IsStatic = table.Column(type: "bit(1)", nullable: false), - IsPublic = table.Column(type: "bit(1)", nullable: false), - EntityVersion = table.Column(type: "int", nullable: false), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpRoles", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpSecurityLogs", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - ApplicationName = table.Column(type: "varchar(96)", maxLength: 96, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Identity = table.Column(type: "varchar(96)", maxLength: 96, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Action = table.Column(type: "varchar(96)", maxLength: 96, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - UserId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - UserName = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - TenantName = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ClientId = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - CorrelationId = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ClientIpAddress = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - BrowserInfo = table.Column(type: "varchar(512)", maxLength: 512, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpSecurityLogs", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpSessions", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - SessionId = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Device = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - DeviceInfo = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - ClientId = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - IpAddresses = table.Column(type: "varchar(2048)", maxLength: 2048, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - SignedIn = table.Column(type: "datetime(6)", nullable: false), - LastAccessed = table.Column(type: "datetime(6)", nullable: true), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpSessions", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpSettingDefinitions", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - DisplayName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Description = table.Column(type: "varchar(512)", maxLength: 512, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - DefaultValue = table.Column(type: "varchar(2048)", maxLength: 2048, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - IsVisibleToClients = table.Column(type: "bit(1)", nullable: false), - Providers = table.Column(type: "varchar(1024)", maxLength: 1024, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - IsInherited = table.Column(type: "bit(1)", nullable: false), - IsEncrypted = table.Column(type: "bit(1)", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpSettingDefinitions", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpSettings", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Value = table.Column(type: "varchar(2048)", maxLength: 2048, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ProviderName = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ProviderKey = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpSettings", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpTenants", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Name = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - NormalizedName = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - EntityVersion = table.Column(type: "int", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - IsDeleted = table.Column(type: "bit(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpTenants", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpUserDelegations", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - SourceUserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TargetUserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - StartTime = table.Column(type: "datetime(6)", nullable: false), - EndTime = table.Column(type: "datetime(6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpUserDelegations", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpUsers", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - UserName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - NormalizedUserName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Name = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Surname = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Email = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - NormalizedEmail = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - EmailConfirmed = table.Column(type: "bit(1)", nullable: false, defaultValue: false), - PasswordHash = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - SecurityStamp = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - IsExternal = table.Column(type: "bit(1)", nullable: false, defaultValue: false), - PhoneNumber = table.Column(type: "varchar(16)", maxLength: 16, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - PhoneNumberConfirmed = table.Column(type: "bit(1)", nullable: false, defaultValue: false), - IsActive = table.Column(type: "bit(1)", nullable: false), - TwoFactorEnabled = table.Column(type: "bit(1)", nullable: false, defaultValue: false), - LockoutEnd = table.Column(type: "datetime(6)", nullable: true), - LockoutEnabled = table.Column(type: "bit(1)", nullable: false, defaultValue: false), - AccessFailedCount = table.Column(type: "int", nullable: false, defaultValue: 0), - ShouldChangePasswordOnNextLogin = table.Column(type: "bit(1)", nullable: false), - EntityVersion = table.Column(type: "int", nullable: false), - LastPasswordChangeTime = table.Column(type: "datetime(6)", nullable: true), - ExtraProperties = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - IsDeleted = table.Column(type: "bit(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpUsers", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "ServiceProCTWingAccountInfo", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - AccountName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "账号名称") - .Annotation("MySql:CharSet", "utf8mb4"), - AccountId = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "账号ID") - .Annotation("MySql:CharSet", "utf8mb4"), - AppId = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "应用 ID") - .Annotation("MySql:CharSet", "utf8mb4"), - AppKey = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "应用 AppKey") - .Annotation("MySql:CharSet", "utf8mb4"), - AppSecret = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "应用 AppSecret") - .Annotation("MySql:CharSet", "utf8mb4"), - PlatformTenantId = table.Column(type: "varchar(128)", maxLength: 128, nullable: true, comment: "平台租户ID") - .Annotation("MySql:CharSet", "utf8mb4"), - CommunicationAddress = table.Column(type: "varchar(128)", maxLength: 128, nullable: true, comment: "通讯服务地址") - .Annotation("MySql:CharSet", "utf8mb4"), - PhoneNumber = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "手机号码") - .Annotation("MySql:CharSet", "utf8mb4"), - ProductCount = table.Column(type: "int", nullable: false), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - IsDeleted = table.Column(type: "bit(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true), - TenantId = table.Column(type: "char(36)", nullable: true, comment: "租户ID", collation: "ascii_general_ci"), - Remark = table.Column(type: "longtext", nullable: true, comment: "备注") - .Annotation("MySql:CharSet", "utf8mb4"), - OSACreatorId = table.Column(type: "int", nullable: true, comment: "旧系统授权创建者Id"), - OSALastModifierId = table.Column(type: "int", nullable: true, comment: "旧系统授权最后修改者Id"), - OSADeleterId = table.Column(type: "int", nullable: true, comment: "旧系统授权最后删除者Id"), - ExtraProperties = table.Column(type: "longtext", nullable: true, comment: "扩展属性,用于存储自定义字段,JSON格式") - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_ServiceProCTWingAccountInfo", x => x.Id); - }, - comment: "CTWing账号信息") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "ServiceProCTWingPrivateProductInfo", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - CTWingAccountId = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "账号ID") - .Annotation("MySql:CharSet", "utf8mb4"), - AccountPhoneNumber = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - CommunicationAddress = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "通讯服务地址") - .Annotation("MySql:CharSet", "utf8mb4"), - MasterKey = table.Column(type: "varchar(256)", maxLength: 256, nullable: true, comment: "OpenAPI 通信主密钥") - .Annotation("MySql:CharSet", "utf8mb4"), - FeatureAccesskey = table.Column(type: "varchar(256)", maxLength: 256, nullable: true, comment: "设备访问密钥") - .Annotation("MySql:CharSet", "utf8mb4"), - IoTPlatformProductId = table.Column(type: "varchar(128)", maxLength: 128, nullable: true, comment: "产品ID") - .Annotation("MySql:CharSet", "utf8mb4"), - ProductName = table.Column(type: "varchar(128)", maxLength: 128, nullable: true, comment: "产品名称") - .Annotation("MySql:CharSet", "utf8mb4"), - Protocol = table.Column(type: "varchar(20)", maxLength: 20, nullable: true, comment: "通讯协议") - .Annotation("MySql:CharSet", "utf8mb4"), - ProductDesc = table.Column(type: "varchar(128)", maxLength: 128, nullable: true, comment: "必填,产品描述") - .Annotation("MySql:CharSet", "utf8mb4"), - ProductType = table.Column(type: "varchar(128)", maxLength: 128, nullable: true, comment: "一级分类名") - .Annotation("MySql:CharSet", "utf8mb4"), - SecondaryType = table.Column(type: "varchar(128)", maxLength: 128, nullable: true, comment: "二级分类名") - .Annotation("MySql:CharSet", "utf8mb4"), - ThirdType = table.Column(type: "varchar(128)", maxLength: 128, nullable: true, comment: "三级分类名") - .Annotation("MySql:CharSet", "utf8mb4"), - NodeType = table.Column(type: "int", nullable: false), - AccessType = table.Column(type: "int", nullable: false), - NetworkType = table.Column(type: "int", nullable: false), - ProductProtocol = table.Column(type: "int", nullable: false), - AuthType = table.Column(type: "int", nullable: false), - DataEncryption = table.Column(type: "int", nullable: false), - TupIsThrough = table.Column(type: "int", nullable: false), - TupDeviceModel = table.Column(type: "varchar(128)", maxLength: 128, nullable: true, comment: "设备型号") - .Annotation("MySql:CharSet", "utf8mb4"), - DeviceCount = table.Column(type: "int", nullable: false), - ThingModelFileId = table.Column(type: "char(36)", nullable: true, comment: "物模型文件Id", collation: "ascii_general_ci"), - ThingModelFileName = table.Column(type: "varchar(256)", maxLength: 256, nullable: true, comment: "物模型文件名称") - .Annotation("MySql:CharSet", "utf8mb4"), - IsEnabled = table.Column(type: "bit(1)", nullable: false, comment: "是否启用"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - IsDeleted = table.Column(type: "bit(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true), - TenantId = table.Column(type: "char(36)", nullable: true, comment: "租户ID", collation: "ascii_general_ci"), - Remark = table.Column(type: "longtext", nullable: true, comment: "备注") - .Annotation("MySql:CharSet", "utf8mb4"), - OSACreatorId = table.Column(type: "int", nullable: true, comment: "旧系统授权创建者Id"), - OSALastModifierId = table.Column(type: "int", nullable: true, comment: "旧系统授权最后修改者Id"), - OSADeleterId = table.Column(type: "int", nullable: true, comment: "旧系统授权最后删除者Id"), - ExtraProperties = table.Column(type: "longtext", nullable: true, comment: "扩展属性,用于存储自定义字段,JSON格式") - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_ServiceProCTWingPrivateProductInfo", x => x.Id); - }, - comment: "CTWing产品信息") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "ServiceProDeviceFirmwareInfo", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - IoTPlatform = table.Column(type: "int", nullable: false, comment: "物联网平台类型"), - IoTPlatformProductId = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "物联网平台中对应的产品Id") - .Annotation("MySql:CharSet", "utf8mb4"), - IoTPlatformProductName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false, comment: "物联网平台中对应的产品名称") - .Annotation("MySql:CharSet", "utf8mb4"), - FirmwareVersion = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "固件版本") - .Annotation("MySql:CharSet", "utf8mb4"), - FirmwareFileId = table.Column(type: "char(36)", nullable: false, comment: "固件文件Id", collation: "ascii_general_ci"), - FirmwareFileName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false, comment: "固件文件名称") - .Annotation("MySql:CharSet", "utf8mb4"), - FirmwareHashCode = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - FirmwareLength = table.Column(type: "bigint", nullable: false), - IsEnable = table.Column(type: "tinyint(1)", nullable: false, comment: "是否启用"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - IsDeleted = table.Column(type: "bit(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true), - TenantId = table.Column(type: "char(36)", nullable: true, comment: "租户ID", collation: "ascii_general_ci"), - Remark = table.Column(type: "longtext", nullable: true, comment: "备注") - .Annotation("MySql:CharSet", "utf8mb4"), - OSACreatorId = table.Column(type: "int", nullable: true, comment: "旧系统授权创建者Id"), - OSALastModifierId = table.Column(type: "int", nullable: true, comment: "旧系统授权最后修改者Id"), - OSADeleterId = table.Column(type: "int", nullable: true, comment: "旧系统授权最后删除者Id"), - ExtraProperties = table.Column(type: "longtext", nullable: true, comment: "扩展属性,用于存储自定义字段,JSON格式") - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_ServiceProDeviceFirmwareInfo", x => x.Id); - }, - comment: "设备固件信息") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "ServiceProDeviceInfo", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - DeviceName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "设备名称") - .Annotation("MySql:CharSet", "utf8mb4"), - DeviceAddress = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "设备地址") - .Annotation("MySql:CharSet", "utf8mb4"), - IoTPlatform = table.Column(type: "int", nullable: false, comment: "物联网平台类型,默认没有指定"), - DeviceType = table.Column(type: "int", nullable: false, comment: "设备类型,与业务系统无关,主要区分是网关设备、直连设备"), - IoTPlatformDeviceOpenInfo = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "物联网平台中对应的设备Id或者名称") - .Annotation("MySql:CharSet", "utf8mb4"), - PlatformPassword = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "物联网平台设备密码") - .Annotation("MySql:CharSet", "utf8mb4"), - IoTPlatformProductId = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "物联网平台中对应的产品Id") - .Annotation("MySql:CharSet", "utf8mb4"), - IoTPlatformProductName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "物联网平台中对应的产品Name") - .Annotation("MySql:CharSet", "utf8mb4"), - IoTPlatformAccountId = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "物联网平台中对应的账号Id") - .Annotation("MySql:CharSet", "utf8mb4"), - AccountPhoneNumber = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "账户手机号") - .Annotation("MySql:CharSet", "utf8mb4"), - IoTPlatformResponse = table.Column(type: "text", nullable: true, comment: "物联网平台返回的响应信息") - .Annotation("MySql:CharSet", "utf8mb4"), - IsPlatformPushSuccess = table.Column(type: "tinyint(1)", nullable: false, comment: "物联网平台推送是否成功"), - DeviceOnlineStatus = table.Column(type: "int", nullable: true, comment: "设备在线状态"), - LastOnlineTime = table.Column(type: "datetime(6)", nullable: true, comment: "最后在线时间"), - LastOfflineTime = table.Column(type: "datetime(6)", nullable: true, comment: "最后离线时间"), - DeviceSource = table.Column(type: "int", nullable: false, comment: "设备来源类型"), - IsNeedConfigDevicMdoel = table.Column(type: "bit(1)", nullable: false, comment: "是否需要配置设备模型"), - DeviceThingModelDataId = table.Column(type: "char(36)", nullable: true, comment: "设备物模型数据Id", collation: "ascii_general_ci"), - FirmwareVersion = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "固件版本") - .Annotation("MySql:CharSet", "utf8mb4"), - UpgradeDate = table.Column(type: "datetime(6)", nullable: true, comment: "升级日期"), - SecurityKey = table.Column(type: "varchar(256)", maxLength: 256, nullable: true, comment: "设备接入鉴权key") - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - IsDeleted = table.Column(type: "bit(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true), - TenantId = table.Column(type: "char(36)", nullable: true, comment: "租户ID", collation: "ascii_general_ci"), - Remark = table.Column(type: "longtext", nullable: true, comment: "备注") - .Annotation("MySql:CharSet", "utf8mb4"), - OSACreatorId = table.Column(type: "int", nullable: true, comment: "旧系统授权创建者Id"), - OSALastModifierId = table.Column(type: "int", nullable: true, comment: "旧系统授权最后修改者Id"), - OSADeleterId = table.Column(type: "int", nullable: true, comment: "旧系统授权最后删除者Id"), - ExtraProperties = table.Column(type: "longtext", nullable: true, comment: "扩展属性,用于存储自定义字段,JSON格式") - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_ServiceProDeviceInfo", x => x.Id); - }, - comment: "设备信息") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "ServiceProDeviceThingModelCommandInfo", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - DeviceThingModelId = table.Column(type: "char(36)", nullable: false, comment: "设备端物模型Id", collation: "ascii_general_ci"), - IoTPlatform = table.Column(type: "int", nullable: false, comment: "物联网平台类型"), - IoTPlatformProductId = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "物联网平台中对应的产品Id") - .Annotation("MySql:CharSet", "utf8mb4"), - CommandName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false, comment: "指令名称") - .Annotation("MySql:CharSet", "utf8mb4"), - IssueCommand = table.Column(type: "varchar(512)", maxLength: 512, nullable: false, comment: "完整的单个下发指令") - .Annotation("MySql:CharSet", "utf8mb4"), - PropertyArray = table.Column(type: "varchar(1024)", maxLength: 1024, nullable: false, comment: "指令设备端物模型的属性名称集合,JSON格式字符串数组") - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - IsDeleted = table.Column(type: "bit(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true), - TenantId = table.Column(type: "char(36)", nullable: true, comment: "租户ID", collation: "ascii_general_ci"), - Remark = table.Column(type: "longtext", nullable: true, comment: "备注") - .Annotation("MySql:CharSet", "utf8mb4"), - OSACreatorId = table.Column(type: "int", nullable: true, comment: "旧系统授权创建者Id"), - OSALastModifierId = table.Column(type: "int", nullable: true, comment: "旧系统授权最后修改者Id"), - OSADeleterId = table.Column(type: "int", nullable: true, comment: "旧系统授权最后删除者Id"), - ExtraProperties = table.Column(type: "longtext", nullable: true, comment: "扩展属性,用于存储自定义字段,JSON格式") - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_ServiceProDeviceThingModelCommandInfo", x => x.Id); - }, - comment: "设备端透传指令详情") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "ServiceProDeviceThingModelManagement", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - DeviceModelName = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "设备端物模型名称") - .Annotation("MySql:CharSet", "utf8mb4"), - IoTPlatform = table.Column(type: "int", nullable: false, comment: "物联网平台类型,默认没有指定"), - IoTPlatformProductId = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "物联网平台中对应的产品Id") - .Annotation("MySql:CharSet", "utf8mb4"), - ScriptName = table.Column(type: "varchar(64)", maxLength: 64, nullable: false, comment: "脚本函数名称") - .Annotation("MySql:CharSet", "utf8mb4"), - FunctionScript = table.Column(type: "text", nullable: true, comment: "脚本函数体") - .Annotation("MySql:CharSet", "utf8mb4"), - FunctionAnalysisFlag = table.Column(type: "tinyint(1)", nullable: false, comment: "函数解析标记,默认为false, 不能解析"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - IsDeleted = table.Column(type: "bit(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true), - TenantId = table.Column(type: "char(36)", nullable: true, comment: "租户ID", collation: "ascii_general_ci"), - Remark = table.Column(type: "longtext", nullable: true, comment: "备注") - .Annotation("MySql:CharSet", "utf8mb4"), - OSACreatorId = table.Column(type: "int", nullable: true, comment: "旧系统授权创建者Id"), - OSALastModifierId = table.Column(type: "int", nullable: true, comment: "旧系统授权最后修改者Id"), - OSADeleterId = table.Column(type: "int", nullable: true, comment: "旧系统授权最后删除者Id"), - ExtraProperties = table.Column(type: "longtext", nullable: true, comment: "扩展属性,用于存储自定义字段,JSON格式") - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_ServiceProDeviceThingModelManagement", x => x.Id); - }, - comment: "设备端物模型管理") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "ServiceProDeviceThingModelPropertylInfo", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - DeviceThingModelId = table.Column(type: "char(36)", nullable: false, comment: "设备端物模型Id", collation: "ascii_general_ci"), - IoTPlatform = table.Column(type: "int", nullable: false, comment: "物联网平台类型"), - IoTPlatformProductId = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "物联网平台中对应的产品Id") - .Annotation("MySql:CharSet", "utf8mb4"), - IoTPlatformThingModelDataId = table.Column(type: "char(36)", nullable: false, comment: "系统中平台端物模型数据Id", collation: "ascii_general_ci"), - FiledType = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "物联网平台中对应产品物模型属性或者事件类型") - .Annotation("MySql:CharSet", "utf8mb4"), - IoTPlatformRawFieldName = table.Column(type: "varchar(64)", maxLength: 64, nullable: false, comment: "物联网平台中对应的产品物模型属性或者事件名称") - .Annotation("MySql:CharSet", "utf8mb4"), - IoTPlatformRawFieldDataType = table.Column(type: "varchar(20)", maxLength: 20, nullable: true, comment: "物联网平台中对应的产品物模型属性或者事件数据类型") - .Annotation("MySql:CharSet", "utf8mb4"), - StandardFieldName = table.Column(type: "varchar(64)", maxLength: 64, nullable: false, comment: "管理后台产品标准的物模型属性或者事件名称") - .Annotation("MySql:CharSet", "utf8mb4"), - StandardFieldValueType = table.Column(type: "varchar(20)", maxLength: 20, nullable: false, comment: "标准物模型字段值类型") - .Annotation("MySql:CharSet", "utf8mb4"), - StandardFieldDisplayName = table.Column(type: "varchar(64)", maxLength: 64, nullable: false, comment: "管理后台产品标准的物模型属性或者事件名称") - .Annotation("MySql:CharSet", "utf8mb4"), - IsValueNeedConvert = table.Column(type: "tinyint(1)", nullable: false, comment: "是否需要值类型转换"), - NativeSkipNumber = table.Column(type: "int", nullable: false, comment: "正序跳过数量"), - NativeTakeNumber = table.Column(type: "int", nullable: false, comment: "正序获取数量"), - ParsingSequence = table.Column(type: "int", nullable: false, comment: "解析顺序,1234或者3412(高低反转)"), - ReversalSkipNumber = table.Column(type: "int", nullable: true, comment: "反转跳过数量"), - ReversalTakeNumber = table.Column(type: "int", nullable: true, comment: "反转获取数量"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - IsDeleted = table.Column(type: "bit(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true), - TenantId = table.Column(type: "char(36)", nullable: true, comment: "租户ID", collation: "ascii_general_ci"), - Remark = table.Column(type: "longtext", nullable: true, comment: "备注") - .Annotation("MySql:CharSet", "utf8mb4"), - OSACreatorId = table.Column(type: "int", nullable: true, comment: "旧系统授权创建者Id"), - OSALastModifierId = table.Column(type: "int", nullable: true, comment: "旧系统授权最后修改者Id"), - OSADeleterId = table.Column(type: "int", nullable: true, comment: "旧系统授权最后删除者Id"), - ExtraProperties = table.Column(type: "longtext", nullable: true, comment: "扩展属性,用于存储自定义字段,JSON格式") - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_ServiceProDeviceThingModelPropertylInfo", x => x.Id); - }, - comment: "设备端物模型属性信息,是指设备端支持的属性或者事件") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "ServiceProDeviceUpgradeRecord", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - DeviceName = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "设备名称") - .Annotation("MySql:CharSet", "utf8mb4"), - DeviceAddress = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "设备地址") - .Annotation("MySql:CharSet", "utf8mb4"), - OldFirmwareVersion = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "旧的固件版本") - .Annotation("MySql:CharSet", "utf8mb4"), - NowFirmwareVersion = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "当前固件版本") - .Annotation("MySql:CharSet", "utf8mb4"), - UpgradeDate = table.Column(type: "datetime(6)", nullable: false, comment: "升级日期"), - UpgradeSource = table.Column(type: "int", nullable: false, comment: "升级来源"), - UpgradeMessage = table.Column(type: "varchar(512)", maxLength: 512, nullable: false, comment: "升级信息") - .Annotation("MySql:CharSet", "utf8mb4"), - UpgradeStatus = table.Column(type: "int", nullable: false, comment: "升级状态"), - UpgradeIdentifier = table.Column(type: "bigint", nullable: false, comment: "升级标识符号"), - FirmwareSignature = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "签名校验值") - .Annotation("MySql:CharSet", "utf8mb4"), - UpgradeResult = table.Column(type: "int", nullable: true, comment: "升级结果"), - UpgradeDescription = table.Column(type: "varchar(512)", maxLength: 512, nullable: false, comment: "升级描述") - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - IsDeleted = table.Column(type: "bit(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true), - TenantId = table.Column(type: "char(36)", nullable: true, comment: "租户ID", collation: "ascii_general_ci"), - Remark = table.Column(type: "longtext", nullable: true, comment: "备注") - .Annotation("MySql:CharSet", "utf8mb4"), - OSACreatorId = table.Column(type: "int", nullable: true, comment: "旧系统授权创建者Id"), - OSALastModifierId = table.Column(type: "int", nullable: true, comment: "旧系统授权最后修改者Id"), - OSADeleterId = table.Column(type: "int", nullable: true, comment: "旧系统授权最后删除者Id"), - ExtraProperties = table.Column(type: "longtext", nullable: true, comment: "扩展属性,用于存储自定义字段,JSON格式") - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_ServiceProDeviceUpgradeRecord", x => x.Id); - }, - comment: "设备升级记录") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "ServiceProIoTPlatformThingModelInfo", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - IoTPlatform = table.Column(type: "int", nullable: false, comment: "物联网平台类型,默认没有指定"), - IoTPlatformProductId = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "物联网平台中对应的产品Id") - .Annotation("MySql:CharSet", "utf8mb4"), - FiledType = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "物联网平台中对应产品物模型属性或者事件类型") - .Annotation("MySql:CharSet", "utf8mb4"), - IoTPlatformRawFieldName = table.Column(type: "varchar(64)", maxLength: 64, nullable: false, comment: "物联网平台中对应的产品物模型属性或者事件名称") - .Annotation("MySql:CharSet", "utf8mb4"), - IoTPlatformRawFieldDataType = table.Column(type: "varchar(64)", maxLength: 64, nullable: true, comment: "物联网平台中对应的产品物模型属性或者事件数据类型") - .Annotation("MySql:CharSet", "utf8mb4"), - StandardFieldName = table.Column(type: "varchar(64)", maxLength: 64, nullable: false, comment: "管理后台产品标准的物模型属性或者事件名称") - .Annotation("MySql:CharSet", "utf8mb4"), - StandardFieldValueType = table.Column(type: "varchar(20)", maxLength: 20, nullable: false, comment: "标准物模型字段值类型") - .Annotation("MySql:CharSet", "utf8mb4"), - StandardFieldDisplayName = table.Column(type: "varchar(64)", maxLength: 64, nullable: false, comment: "管理后台产品标准的物模型属性或者事件名称") - .Annotation("MySql:CharSet", "utf8mb4"), - IsValueNeedConvert = table.Column(type: "tinyint(1)", nullable: false, comment: "是否需要值类型转换"), - IsSpecialIdentifier = table.Column(type: "tinyint(1)", nullable: false, comment: "是否是特殊物模型标识符"), - IoTPlatformRawFieldExtension = table.Column(type: "text", nullable: true, comment: "物联网平台中对应产品物模型标识符扩展,用于扩展结构体类型") - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - IsDeleted = table.Column(type: "bit(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true), - TenantId = table.Column(type: "char(36)", nullable: true, comment: "租户ID", collation: "ascii_general_ci"), - Remark = table.Column(type: "longtext", nullable: true, comment: "备注") - .Annotation("MySql:CharSet", "utf8mb4"), - OSACreatorId = table.Column(type: "int", nullable: true, comment: "旧系统授权创建者Id"), - OSALastModifierId = table.Column(type: "int", nullable: true, comment: "旧系统授权最后修改者Id"), - OSADeleterId = table.Column(type: "int", nullable: true, comment: "旧系统授权最后删除者Id"), - ExtraProperties = table.Column(type: "longtext", nullable: true, comment: "扩展属性,用于存储自定义字段,JSON格式") - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_ServiceProIoTPlatformThingModelInfo", x => x.Id); - }, - comment: "平台端物模型信息") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "ServiceProMenus", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - ParentId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "唯一编码") - .Annotation("MySql:CharSet", "utf8mb4"), - Title = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "标题") - .Annotation("MySql:CharSet", "utf8mb4"), - DisplayTitle = table.Column(type: "varchar(128)", maxLength: 128, nullable: true, comment: "标准多语言") - .Annotation("MySql:CharSet", "utf8mb4"), - Icon = table.Column(type: "longtext", nullable: true, comment: "图标") - .Annotation("MySql:CharSet", "utf8mb4"), - KeepAlive = table.Column(type: "bit(1)", nullable: false, comment: "是否缓存"), - HideInMenu = table.Column(type: "bit(1)", nullable: false, comment: "是否显示"), - Order = table.Column(type: "int", nullable: false, comment: "排序"), - Path = table.Column(type: "varchar(512)", maxLength: 512, nullable: false, comment: "路由/接口地址") - .Annotation("MySql:CharSet", "utf8mb4"), - MenuType = table.Column(type: "int", nullable: false, comment: "菜单类型"), - OpenType = table.Column(type: "int", nullable: false, comment: "打开类型"), - Url = table.Column(type: "longtext", nullable: true, comment: "内外链地址") - .Annotation("MySql:CharSet", "utf8mb4"), - Component = table.Column(type: "varchar(512)", maxLength: 512, nullable: true, comment: "组件地址") - .Annotation("MySql:CharSet", "utf8mb4"), - Policy = table.Column(type: "varchar(128)", maxLength: 128, nullable: true, comment: "授权策略名称") - .Annotation("MySql:CharSet", "utf8mb4"), - Enabled = table.Column(type: "bit(1)", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - IsDeleted = table.Column(type: "bit(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_ServiceProMenus", x => x.Id); - }, - comment: "动态菜单管理") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "ServiceProOneNETAccountInfo", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - AccountName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "账号名称") - .Annotation("MySql:CharSet", "utf8mb4"), - OneNETAccountId = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "账户Id") - .Annotation("MySql:CharSet", "utf8mb4"), - PhoneNumber = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "手机号码") - .Annotation("MySql:CharSet", "utf8mb4"), - AccountAccesskey = table.Column(type: "varchar(1024)", maxLength: 1024, nullable: false, comment: "账户通信密钥,平台可以重置密钥") - .Annotation("MySql:CharSet", "utf8mb4"), - ProductCount = table.Column(type: "int", nullable: false, comment: "产品数量"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - IsDeleted = table.Column(type: "bit(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true), - TenantId = table.Column(type: "char(36)", nullable: true, comment: "租户ID", collation: "ascii_general_ci"), - Remark = table.Column(type: "longtext", nullable: true, comment: "备注") - .Annotation("MySql:CharSet", "utf8mb4"), - OSACreatorId = table.Column(type: "int", nullable: true, comment: "旧系统授权创建者Id"), - OSALastModifierId = table.Column(type: "int", nullable: true, comment: "旧系统授权最后修改者Id"), - OSADeleterId = table.Column(type: "int", nullable: true, comment: "旧系统授权最后删除者Id"), - ExtraProperties = table.Column(type: "longtext", nullable: true, comment: "扩展属性,用于存储自定义字段,JSON格式") - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_ServiceProOneNETAccountInfo", x => x.Id); - }, - comment: "OneNET账号管理") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "ServiceProOneNETProductInfo", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - OneNETAccountId = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "账户Id") - .Annotation("MySql:CharSet", "utf8mb4"), - AccountPhoneNumber = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "账户手机号") - .Annotation("MySql:CharSet", "utf8mb4"), - IoTPlatformProductId = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "物联网平台对应的产品Id") - .Annotation("MySql:CharSet", "utf8mb4"), - ProductName = table.Column(type: "varchar(128)", maxLength: 128, nullable: true, comment: "产品名称") - .Annotation("MySql:CharSet", "utf8mb4"), - ProductAccesskey = table.Column(type: "varchar(1024)", maxLength: 1024, nullable: false, comment: "产品访问密钥") - .Annotation("MySql:CharSet", "utf8mb4"), - ThingModelFileId = table.Column(type: "char(36)", nullable: true, comment: "物模型文件Id", collation: "ascii_general_ci"), - ThingModelFileName = table.Column(type: "varchar(256)", maxLength: 256, nullable: true, comment: "物模型文件名称") - .Annotation("MySql:CharSet", "utf8mb4"), - IsEnabled = table.Column(type: "bit(1)", nullable: false), - AccessProtocol = table.Column(type: "int", nullable: false, comment: "接入协议"), - DataProtocol = table.Column(type: "int", nullable: false, comment: "数据协议"), - NodeType = table.Column(type: "int", nullable: false, comment: "节点类型"), - ProductCreateTime = table.Column(type: "datetime(6)", nullable: false, comment: "产品创建时间"), - ProductUpdateTime = table.Column(type: "datetime(6)", nullable: false, comment: "最近修改时间"), - Network = table.Column(type: "longtext", nullable: true, comment: "联网方式") - .Annotation("MySql:CharSet", "utf8mb4"), - Manufacturer = table.Column(type: "longtext", nullable: true, comment: "产品厂商") - .Annotation("MySql:CharSet", "utf8mb4"), - Model = table.Column(type: "longtext", nullable: true, comment: "产品型号") - .Annotation("MySql:CharSet", "utf8mb4"), - Brand = table.Column(type: "longtext", nullable: true, comment: "产品品牌") - .Annotation("MySql:CharSet", "utf8mb4"), - Status = table.Column(type: "int", nullable: false, comment: "开发状态"), - OwnDeviceCount = table.Column(type: "int", nullable: false, comment: "自有设备总数"), - OnlineDeviceCount = table.Column(type: "int", nullable: false, comment: "在线设备总数"), - OfflineDeviceCount = table.Column(type: "int", nullable: false, comment: "离线设备数"), - NotActiveDeviceCount = table.Column(type: "int", nullable: false, comment: "未激活设备数"), - CommunicationAddress = table.Column(type: "varchar(256)", maxLength: 256, nullable: true, comment: "通讯服务地址") - .Annotation("MySql:CharSet", "utf8mb4"), - CommunicationAddressTLS = table.Column(type: "varchar(256)", maxLength: 256, nullable: true, comment: "TLS通讯服务地址") - .Annotation("MySql:CharSet", "utf8mb4"), - ThingModelInfos = table.Column(type: "longtext", nullable: true, comment: "平台物模型信息") - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - IsDeleted = table.Column(type: "bit(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true), - TenantId = table.Column(type: "char(36)", nullable: true, comment: "租户ID", collation: "ascii_general_ci"), - Remark = table.Column(type: "longtext", nullable: true, comment: "备注") - .Annotation("MySql:CharSet", "utf8mb4"), - OSACreatorId = table.Column(type: "int", nullable: true, comment: "旧系统授权创建者Id"), - OSALastModifierId = table.Column(type: "int", nullable: true, comment: "旧系统授权最后修改者Id"), - OSADeleterId = table.Column(type: "int", nullable: true, comment: "旧系统授权最后删除者Id"), - ExtraProperties = table.Column(type: "longtext", nullable: true, comment: "扩展属性,用于存储自定义字段,JSON格式") - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_ServiceProOneNETProductInfo", x => x.Id); - }, - comment: "OneNET产品管理") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "ServiceProTextTemplates", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "名称") - .Annotation("MySql:CharSet", "utf8mb4"), - Code = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "编码") - .Annotation("MySql:CharSet", "utf8mb4"), - Content = table.Column(type: "varchar(1024)", maxLength: 1024, nullable: false, comment: "内容") - .Annotation("MySql:CharSet", "utf8mb4"), - CultureName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "语言") - .Annotation("MySql:CharSet", "utf8mb4"), - ExtraProperties = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - IsDeleted = table.Column(type: "bit(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_ServiceProTextTemplates", x => x.Id); - }, - comment: "模板管理") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "ServiceProUserRefreshTokens", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - UserId = table.Column(type: "char(36)", nullable: false, comment: "用户id", collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - RefreshToken = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "刷新token") - .Annotation("MySql:CharSet", "utf8mb4"), - Token = table.Column(type: "varchar(1024)", maxLength: 1024, nullable: false, comment: "Token") - .Annotation("MySql:CharSet", "utf8mb4"), - IsUsed = table.Column(type: "bit(1)", nullable: false, comment: "是否使用"), - ExpirationTime = table.Column(type: "datetime(6)", nullable: false, comment: "过期时间"), - ExtraProperties = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - IsDeleted = table.Column(type: "bit(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_ServiceProUserRefreshTokens", x => x.Id); - }, - comment: "刷新Token") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpAuditLogActions", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - AuditLogId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - ServiceName = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - MethodName = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Parameters = table.Column(type: "varchar(2000)", maxLength: 2000, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ExecutionTime = table.Column(type: "datetime(6)", nullable: false), - ExecutionDuration = table.Column(type: "int", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpAuditLogActions", x => x.Id); - table.ForeignKey( - name: "FK_AbpAuditLogActions_AbpAuditLogs_AuditLogId", - column: x => x.AuditLogId, - principalTable: "AbpAuditLogs", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpEntityChanges", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - AuditLogId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - ChangeTime = table.Column(type: "datetime(6)", nullable: false), - ChangeType = table.Column(type: "tinyint unsigned", nullable: false), - EntityTenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - EntityId = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - EntityTypeFullName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpEntityChanges", x => x.Id); - table.ForeignKey( - name: "FK_AbpEntityChanges_AbpAuditLogs_AuditLogId", - column: x => x.AuditLogId, - principalTable: "AbpAuditLogs", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpDataDictionaryDetails", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - DataDictionaryId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Code = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Order = table.Column(type: "int", nullable: false), - DisplayText = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Description = table.Column(type: "varchar(1024)", maxLength: 1024, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - IsEnabled = table.Column(type: "bit(1)", nullable: false), - ExtendedAttribute = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpDataDictionaryDetails", x => x.Id); - table.ForeignKey( - name: "FK_AbpDataDictionaryDetails_AbpDataDictionaries_DataDictionaryId", - column: x => x.DataDictionaryId, - principalTable: "AbpDataDictionaries", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }, - comment: "数据字典详情") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpOrganizationUnitRoles", - columns: table => new - { - RoleId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - OrganizationUnitId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpOrganizationUnitRoles", x => new { x.OrganizationUnitId, x.RoleId }); - table.ForeignKey( - name: "FK_AbpOrganizationUnitRoles_AbpOrganizationUnits_OrganizationUn~", - column: x => x.OrganizationUnitId, - principalTable: "AbpOrganizationUnits", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_AbpOrganizationUnitRoles_AbpRoles_RoleId", - column: x => x.RoleId, - principalTable: "AbpRoles", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpRoleClaims", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - RoleId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - ClaimType = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ClaimValue = table.Column(type: "varchar(1024)", maxLength: 1024, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpRoleClaims", x => x.Id); - table.ForeignKey( - name: "FK_AbpRoleClaims_AbpRoles_RoleId", - column: x => x.RoleId, - principalTable: "AbpRoles", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpTenantConnectionStrings", - columns: table => new - { - TenantId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Name = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Value = table.Column(type: "varchar(1024)", maxLength: 1024, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpTenantConnectionStrings", x => new { x.TenantId, x.Name }); - table.ForeignKey( - name: "FK_AbpTenantConnectionStrings_AbpTenants_TenantId", - column: x => x.TenantId, - principalTable: "AbpTenants", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpUserClaims", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - ClaimType = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ClaimValue = table.Column(type: "varchar(1024)", maxLength: 1024, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpUserClaims", x => x.Id); - table.ForeignKey( - name: "FK_AbpUserClaims_AbpUsers_UserId", - column: x => x.UserId, - principalTable: "AbpUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpUserLogins", - columns: table => new - { - UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - LoginProvider = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - ProviderKey = table.Column(type: "varchar(196)", maxLength: 196, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ProviderDisplayName = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpUserLogins", x => new { x.UserId, x.LoginProvider }); - table.ForeignKey( - name: "FK_AbpUserLogins_AbpUsers_UserId", - column: x => x.UserId, - principalTable: "AbpUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpUserOrganizationUnits", - columns: table => new - { - UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - OrganizationUnitId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpUserOrganizationUnits", x => new { x.OrganizationUnitId, x.UserId }); - table.ForeignKey( - name: "FK_AbpUserOrganizationUnits_AbpOrganizationUnits_OrganizationUn~", - column: x => x.OrganizationUnitId, - principalTable: "AbpOrganizationUnits", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_AbpUserOrganizationUnits_AbpUsers_UserId", - column: x => x.UserId, - principalTable: "AbpUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpUserRoles", - columns: table => new - { - UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - RoleId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpUserRoles", x => new { x.UserId, x.RoleId }); - table.ForeignKey( - name: "FK_AbpUserRoles_AbpRoles_RoleId", - column: x => x.RoleId, - principalTable: "AbpRoles", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_AbpUserRoles_AbpUsers_UserId", - column: x => x.UserId, - principalTable: "AbpUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpUserTokens", - columns: table => new - { - UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - LoginProvider = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - Value = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpUserTokens", x => new { x.UserId, x.LoginProvider, x.Name }); - table.ForeignKey( - name: "FK_AbpUserTokens_AbpUsers_UserId", - column: x => x.UserId, - principalTable: "AbpUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpEntityPropertyChanges", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - EntityChangeId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - NewValue = table.Column(type: "varchar(512)", maxLength: 512, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - OriginalValue = table.Column(type: "varchar(512)", maxLength: 512, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - PropertyName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - PropertyTypeFullName = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpEntityPropertyChanges", x => x.Id); - table.ForeignKey( - name: "FK_AbpEntityPropertyChanges_AbpEntityChanges_EntityChangeId", - column: x => x.EntityChangeId, - principalTable: "AbpEntityChanges", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "IX_AbpAuditLogActions_AuditLogId", - table: "AbpAuditLogActions", - column: "AuditLogId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpAuditLogActions_TenantId_ServiceName_MethodName_Execution~", - table: "AbpAuditLogActions", - columns: new[] { "TenantId", "ServiceName", "MethodName", "ExecutionTime" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpAuditLogs_TenantId_ExecutionTime", - table: "AbpAuditLogs", - columns: new[] { "TenantId", "ExecutionTime" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpAuditLogs_TenantId_UserId_ExecutionTime", - table: "AbpAuditLogs", - columns: new[] { "TenantId", "UserId", "ExecutionTime" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpBackgroundJobs_IsAbandoned_NextTryTime", - table: "AbpBackgroundJobs", - columns: new[] { "IsAbandoned", "NextTryTime" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpDataDictionaryDetails_DataDictionaryId", - table: "AbpDataDictionaryDetails", - column: "DataDictionaryId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpEntityChanges_AuditLogId", - table: "AbpEntityChanges", - column: "AuditLogId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpEntityChanges_TenantId_EntityTypeFullName_EntityId", - table: "AbpEntityChanges", - columns: new[] { "TenantId", "EntityTypeFullName", "EntityId" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpEntityPropertyChanges_EntityChangeId", - table: "AbpEntityPropertyChanges", - column: "EntityChangeId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpFeatureGroups_Name", - table: "AbpFeatureGroups", - column: "Name", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_AbpFeatures_GroupName", - table: "AbpFeatures", - column: "GroupName"); - - migrationBuilder.CreateIndex( - name: "IX_AbpFeatures_Name", - table: "AbpFeatures", - column: "Name", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_AbpFeatureValues_Name_ProviderName_ProviderKey", - table: "AbpFeatureValues", - columns: new[] { "Name", "ProviderName", "ProviderKey" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_AbpFileObjects_FileName", - table: "AbpFileObjects", - column: "FileName"); - - migrationBuilder.CreateIndex( - name: "IX_AbpLanguages_CultureName", - table: "AbpLanguages", - column: "CultureName"); - - migrationBuilder.CreateIndex( - name: "IX_AbpLanguageTexts_TenantId_ResourceName_CultureName", - table: "AbpLanguageTexts", - columns: new[] { "TenantId", "ResourceName", "CultureName" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpLinkUsers_SourceUserId_SourceTenantId_TargetUserId_Target~", - table: "AbpLinkUsers", - columns: new[] { "SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_AbpNotificationSubscriptions_NotificationId", - table: "AbpNotificationSubscriptions", - column: "NotificationId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpNotificationSubscriptions_ReceiveUserId", - table: "AbpNotificationSubscriptions", - column: "ReceiveUserId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpOrganizationUnitRoles_RoleId_OrganizationUnitId", - table: "AbpOrganizationUnitRoles", - columns: new[] { "RoleId", "OrganizationUnitId" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpOrganizationUnits_Code", - table: "AbpOrganizationUnits", - column: "Code"); - - migrationBuilder.CreateIndex( - name: "IX_AbpOrganizationUnits_ParentId", - table: "AbpOrganizationUnits", - column: "ParentId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpPermissionGrants_TenantId_Name_ProviderName_ProviderKey", - table: "AbpPermissionGrants", - columns: new[] { "TenantId", "Name", "ProviderName", "ProviderKey" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_AbpPermissionGroups_Name", - table: "AbpPermissionGroups", - column: "Name", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_AbpPermissions_GroupName", - table: "AbpPermissions", - column: "GroupName"); - - migrationBuilder.CreateIndex( - name: "IX_AbpPermissions_Name", - table: "AbpPermissions", - column: "Name", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_AbpRoleClaims_RoleId", - table: "AbpRoleClaims", - column: "RoleId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpRoles_NormalizedName", - table: "AbpRoles", - column: "NormalizedName"); - - migrationBuilder.CreateIndex( - name: "IX_AbpSecurityLogs_TenantId_Action", - table: "AbpSecurityLogs", - columns: new[] { "TenantId", "Action" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpSecurityLogs_TenantId_ApplicationName", - table: "AbpSecurityLogs", - columns: new[] { "TenantId", "ApplicationName" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpSecurityLogs_TenantId_Identity", - table: "AbpSecurityLogs", - columns: new[] { "TenantId", "Identity" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpSecurityLogs_TenantId_UserId", - table: "AbpSecurityLogs", - columns: new[] { "TenantId", "UserId" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpSessions_Device", - table: "AbpSessions", - column: "Device"); - - migrationBuilder.CreateIndex( - name: "IX_AbpSessions_SessionId", - table: "AbpSessions", - column: "SessionId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpSessions_TenantId_UserId", - table: "AbpSessions", - columns: new[] { "TenantId", "UserId" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpSettingDefinitions_Name", - table: "AbpSettingDefinitions", - column: "Name", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_AbpSettings_Name_ProviderName_ProviderKey", - table: "AbpSettings", - columns: new[] { "Name", "ProviderName", "ProviderKey" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_AbpTenants_Name", - table: "AbpTenants", - column: "Name"); - - migrationBuilder.CreateIndex( - name: "IX_AbpTenants_NormalizedName", - table: "AbpTenants", - column: "NormalizedName"); - - migrationBuilder.CreateIndex( - name: "IX_AbpUserClaims_UserId", - table: "AbpUserClaims", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpUserLogins_LoginProvider_ProviderKey", - table: "AbpUserLogins", - columns: new[] { "LoginProvider", "ProviderKey" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpUserOrganizationUnits_UserId_OrganizationUnitId", - table: "AbpUserOrganizationUnits", - columns: new[] { "UserId", "OrganizationUnitId" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpUserRoles_RoleId_UserId", - table: "AbpUserRoles", - columns: new[] { "RoleId", "UserId" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpUsers_Email", - table: "AbpUsers", - column: "Email"); - - migrationBuilder.CreateIndex( - name: "IX_AbpUsers_NormalizedEmail", - table: "AbpUsers", - column: "NormalizedEmail"); - - migrationBuilder.CreateIndex( - name: "IX_AbpUsers_NormalizedUserName", - table: "AbpUsers", - column: "NormalizedUserName"); - - migrationBuilder.CreateIndex( - name: "IX_AbpUsers_UserName", - table: "AbpUsers", - column: "UserName"); - - migrationBuilder.CreateIndex( - name: "IX_ServiceProCTWingAccountInfo_CreationTime", - table: "ServiceProCTWingAccountInfo", - column: "CreationTime"); - - migrationBuilder.CreateIndex( - name: "IX_ServiceProCTWingAccountInfo_IsNotUniqueKey", - table: "ServiceProCTWingAccountInfo", - columns: new[] { "Id", "AccountId", "AccountName", "CreationTime" }, - descending: new bool[0]); - - migrationBuilder.CreateIndex( - name: "IX_ServiceProCTWingPrivateProductInfo_CreationTime", - table: "ServiceProCTWingPrivateProductInfo", - column: "CreationTime"); - - migrationBuilder.CreateIndex( - name: "IX_ServiceProCTWingPrivateProductInfo_IsNotUniqueKey", - table: "ServiceProCTWingPrivateProductInfo", - columns: new[] { "Id", "IoTPlatformProductId", "ProductName", "CreationTime" }, - descending: new bool[0]); - - migrationBuilder.CreateIndex( - name: "IX_ServiceProDeviceFirmwareInfo_CreationTime", - table: "ServiceProDeviceFirmwareInfo", - column: "CreationTime"); - - migrationBuilder.CreateIndex( - name: "IX_ServiceProDeviceFirmwareInfo_IoTPlatformProductId", - table: "ServiceProDeviceFirmwareInfo", - column: "IoTPlatformProductId"); - - migrationBuilder.CreateIndex( - name: "IX_ServiceProDeviceFirmwareInfo_IsNotUniqueKey", - table: "ServiceProDeviceFirmwareInfo", - columns: new[] { "Id", "IoTPlatformProductId", "FirmwareVersion", "CreationTime" }, - descending: new bool[0]); - - migrationBuilder.CreateIndex( - name: "IX_ServiceProDeviceInfo_CreationTime", - table: "ServiceProDeviceInfo", - column: "CreationTime"); - - migrationBuilder.CreateIndex( - name: "IX_ServiceProDeviceInfo_DeviceAddress", - table: "ServiceProDeviceInfo", - column: "DeviceAddress"); - - migrationBuilder.CreateIndex( - name: "IX_ServiceProDeviceInfo_IsNotUniqueKey", - table: "ServiceProDeviceInfo", - columns: new[] { "Id", "DeviceName", "DeviceAddress", "IoTPlatformProductId", "CreationTime" }, - descending: new bool[0]); - - migrationBuilder.CreateIndex( - name: "IX_ServiceProDeviceThingModelCommandInfo_CreationTime", - table: "ServiceProDeviceThingModelCommandInfo", - column: "CreationTime"); - - migrationBuilder.CreateIndex( - name: "IX_ServiceProDeviceThingModelCommandInfo_DeviceThingModelId", - table: "ServiceProDeviceThingModelCommandInfo", - column: "DeviceThingModelId"); - - migrationBuilder.CreateIndex( - name: "IX_ServiceProIoTPlatformThingModelInfo_IsNotUniqueKey", - table: "ServiceProDeviceThingModelCommandInfo", - columns: new[] { "Id", "DeviceThingModelId", "IoTPlatformProductId", "CreationTime" }, - descending: new bool[0]); - - migrationBuilder.CreateIndex( - name: "IX_ServiceProDeviceThingModelManagement_CreationTime", - table: "ServiceProDeviceThingModelManagement", - column: "CreationTime"); - - migrationBuilder.CreateIndex( - name: "IX_ServiceProDeviceThingModelManagement_IoTPlatformProductId", - table: "ServiceProDeviceThingModelManagement", - column: "IoTPlatformProductId"); - - migrationBuilder.CreateIndex( - name: "IX_ServiceProIoTPlatformThingModelInfo_IsNotUniqueKey1", - table: "ServiceProDeviceThingModelManagement", - columns: new[] { "Id", "DeviceModelName", "IoTPlatformProductId", "CreationTime" }, - descending: new bool[0]); - - migrationBuilder.CreateIndex( - name: "IX_ServiceProDeviceThingModelPropertylInfo_CreationTime", - table: "ServiceProDeviceThingModelPropertylInfo", - column: "CreationTime"); - - migrationBuilder.CreateIndex( - name: "IX_ServiceProDeviceThingModelPropertylInfo_IoTPlatformProductId", - table: "ServiceProDeviceThingModelPropertylInfo", - column: "IoTPlatformProductId"); - - migrationBuilder.CreateIndex( - name: "IX_ServiceProIoTPlatformThingModelInfo_IsNotUniqueKey2", - table: "ServiceProDeviceThingModelPropertylInfo", - columns: new[] { "Id", "IoTPlatformProductId", "IoTPlatformRawFieldName", "StandardFieldName", "CreationTime" }, - descending: new bool[0]); - - migrationBuilder.CreateIndex( - name: "IX_ServiceProDeviceUpgradeRecord_CreationTime", - table: "ServiceProDeviceUpgradeRecord", - column: "CreationTime"); - - migrationBuilder.CreateIndex( - name: "IX_ServiceProDeviceUpgradeRecord_DeviceAddress", - table: "ServiceProDeviceUpgradeRecord", - column: "DeviceAddress"); - - migrationBuilder.CreateIndex( - name: "IX_ServiceProDeviceUpgradeRecord_IsNotUniqueKey", - table: "ServiceProDeviceUpgradeRecord", - columns: new[] { "Id", "DeviceAddress", "UpgradeIdentifier", "NowFirmwareVersion", "CreationTime" }, - descending: new bool[0]); - - migrationBuilder.CreateIndex( - name: "IX_ServiceProDeviceUpgradeRecord_UpgradeIdentifier", - table: "ServiceProDeviceUpgradeRecord", - column: "UpgradeIdentifier", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_ServiceProIoTPlatformThingModelInfo_CreationTime", - table: "ServiceProIoTPlatformThingModelInfo", - column: "CreationTime"); - - migrationBuilder.CreateIndex( - name: "IX_ServiceProIoTPlatformThingModelInfo_IoTPlatformProductId", - table: "ServiceProIoTPlatformThingModelInfo", - column: "IoTPlatformProductId"); - - migrationBuilder.CreateIndex( - name: "IX_ServiceProIoTPlatformThingModelInfo_IsNotUniqueKey3", - table: "ServiceProIoTPlatformThingModelInfo", - columns: new[] { "Id", "IoTPlatformProductId", "IoTPlatformRawFieldName", "StandardFieldName", "CreationTime" }, - descending: new bool[0]); - - migrationBuilder.CreateIndex( - name: "IX_Menus_IsNotUniqueKey", - table: "ServiceProMenus", - columns: new[] { "Id", "Name", "Path", "MenuType", "CreationTime" }, - descending: new bool[0]); - - migrationBuilder.CreateIndex( - name: "IX_ServiceProMenus_CreationTime", - table: "ServiceProMenus", - column: "CreationTime"); - - migrationBuilder.CreateIndex( - name: "IX_ServiceProMenus_Name", - table: "ServiceProMenus", - column: "Name"); - - migrationBuilder.CreateIndex( - name: "IX_ServiceProOneNETAccountInfo_CreationTime", - table: "ServiceProOneNETAccountInfo", - column: "CreationTime"); - - migrationBuilder.CreateIndex( - name: "IX_ServiceProOneNETAccountInfo_IsNotUniqueKey", - table: "ServiceProOneNETAccountInfo", - columns: new[] { "Id", "OneNETAccountId", "AccountName", "PhoneNumber", "CreationTime" }, - descending: new bool[0]); - - migrationBuilder.CreateIndex( - name: "IX_ServiceProOneNETProductInfo_CreationTime", - table: "ServiceProOneNETProductInfo", - column: "CreationTime"); - - migrationBuilder.CreateIndex( - name: "IX_ServiceProOneNETProductInfo_IoTPlatformProductId", - table: "ServiceProOneNETProductInfo", - column: "IoTPlatformProductId", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_ServiceProOneNETProductInfo_IsNotUniqueKey", - table: "ServiceProOneNETProductInfo", - columns: new[] { "Id", "IoTPlatformProductId", "ProductName", "CreationTime" }, - descending: new bool[0]); - - migrationBuilder.CreateIndex( - name: "IX_ServiceProTextTemplates_Code", - table: "ServiceProTextTemplates", - column: "Code"); - - migrationBuilder.CreateIndex( - name: "IX_ServiceProUserRefreshTokens_RefreshToken", - table: "ServiceProUserRefreshTokens", - column: "RefreshToken"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AbpAuditLogActions"); - - migrationBuilder.DropTable( - name: "AbpAuditLogExcelFiles"); - - migrationBuilder.DropTable( - name: "AbpBackgroundJobs"); - - migrationBuilder.DropTable( - name: "AbpClaimTypes"); - - migrationBuilder.DropTable( - name: "AbpDataDictionaryDetails"); - - migrationBuilder.DropTable( - name: "AbpEntityPropertyChanges"); - - migrationBuilder.DropTable( - name: "AbpFeatureGroups"); - - migrationBuilder.DropTable( - name: "AbpFeatures"); - - migrationBuilder.DropTable( - name: "AbpFeatureValues"); - - migrationBuilder.DropTable( - name: "AbpFileObjects"); - - migrationBuilder.DropTable( - name: "AbpLanguages"); - - migrationBuilder.DropTable( - name: "AbpLanguageTexts"); - - migrationBuilder.DropTable( - name: "AbpLinkUsers"); - - migrationBuilder.DropTable( - name: "AbpNotifications"); - - migrationBuilder.DropTable( - name: "AbpNotificationSubscriptions"); - - migrationBuilder.DropTable( - name: "AbpOrganizationUnitRoles"); - - migrationBuilder.DropTable( - name: "AbpPermissionGrants"); - - migrationBuilder.DropTable( - name: "AbpPermissionGroups"); - - migrationBuilder.DropTable( - name: "AbpPermissions"); - - migrationBuilder.DropTable( - name: "AbpRoleClaims"); - - migrationBuilder.DropTable( - name: "AbpSecurityLogs"); - - migrationBuilder.DropTable( - name: "AbpSessions"); - - migrationBuilder.DropTable( - name: "AbpSettingDefinitions"); - - migrationBuilder.DropTable( - name: "AbpSettings"); - - migrationBuilder.DropTable( - name: "AbpTenantConnectionStrings"); - - migrationBuilder.DropTable( - name: "AbpUserClaims"); - - migrationBuilder.DropTable( - name: "AbpUserDelegations"); - - migrationBuilder.DropTable( - name: "AbpUserLogins"); - - migrationBuilder.DropTable( - name: "AbpUserOrganizationUnits"); - - migrationBuilder.DropTable( - name: "AbpUserRoles"); - - migrationBuilder.DropTable( - name: "AbpUserTokens"); - - migrationBuilder.DropTable( - name: "ServiceProCTWingAccountInfo"); - - migrationBuilder.DropTable( - name: "ServiceProCTWingPrivateProductInfo"); - - migrationBuilder.DropTable( - name: "ServiceProDeviceFirmwareInfo"); - - migrationBuilder.DropTable( - name: "ServiceProDeviceInfo"); - - migrationBuilder.DropTable( - name: "ServiceProDeviceThingModelCommandInfo"); - - migrationBuilder.DropTable( - name: "ServiceProDeviceThingModelManagement"); - - migrationBuilder.DropTable( - name: "ServiceProDeviceThingModelPropertylInfo"); - - migrationBuilder.DropTable( - name: "ServiceProDeviceUpgradeRecord"); - - migrationBuilder.DropTable( - name: "ServiceProIoTPlatformThingModelInfo"); - - migrationBuilder.DropTable( - name: "ServiceProMenus"); - - migrationBuilder.DropTable( - name: "ServiceProOneNETAccountInfo"); - - migrationBuilder.DropTable( - name: "ServiceProOneNETProductInfo"); - - migrationBuilder.DropTable( - name: "ServiceProTextTemplates"); - - migrationBuilder.DropTable( - name: "ServiceProUserRefreshTokens"); - - migrationBuilder.DropTable( - name: "AbpDataDictionaries"); - - migrationBuilder.DropTable( - name: "AbpEntityChanges"); - - migrationBuilder.DropTable( - name: "AbpTenants"); - - migrationBuilder.DropTable( - name: "AbpOrganizationUnits"); - - migrationBuilder.DropTable( - name: "AbpRoles"); - - migrationBuilder.DropTable( - name: "AbpUsers"); - - migrationBuilder.DropTable( - name: "AbpAuditLogs"); - } - } -} diff --git a/src/JiShe.IoT.EntityFrameworkCore/Migrations/20260104061132_InitialCreate.Designer.cs b/src/JiShe.IoT.EntityFrameworkCore/Migrations/20260115061417_InitialCreate.Designer.cs similarity index 72% rename from src/JiShe.IoT.EntityFrameworkCore/Migrations/20260104061132_InitialCreate.Designer.cs rename to src/JiShe.IoT.EntityFrameworkCore/Migrations/20260115061417_InitialCreate.Designer.cs index 02699a8..c215534 100644 --- a/src/JiShe.IoT.EntityFrameworkCore/Migrations/20260104061132_InitialCreate.Designer.cs +++ b/src/JiShe.IoT.EntityFrameworkCore/Migrations/20260115061417_InitialCreate.Designer.cs @@ -3,9 +3,9 @@ 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 Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; using Volo.Abp.EntityFrameworkCore; #nullable disable @@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore; namespace JiShe.IoT.Migrations { [DbContext(typeof(IoTDbContext))] - [Migration("20260104061132_InitialCreate")] + [Migration("20260115061417_InitialCreate")] partial class InitialCreate { /// @@ -21,85 +21,85 @@ namespace JiShe.IoT.Migrations { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.PostgreSql) .HasAnnotation("ProductVersion", "9.0.11") - .HasAnnotation("Relational:MaxIdentifierLength", 64); + .HasAnnotation("Relational:MaxIdentifierLength", 63); - MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); modelBuilder.Entity("JiShe.ServicePro.BasicManagement.UserRefreshTokens.UserRefreshToken", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("ExpirationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasComment("过期时间"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("IsUsed") - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasComment("是否使用"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("RefreshToken") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("刷新token"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("Token") .IsRequired() .HasMaxLength(1024) - .HasColumnType("varchar(1024)") + .HasColumnType("character varying(1024)") .HasComment("Token"); b.Property("UserId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasComment("用户id"); b.HasKey("Id"); @@ -115,117 +115,117 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("JiShe.ServicePro.CTWingManagement.CTWingAccount.CTWingAccountInfo", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("AccountId") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("账号ID"); b.Property("AccountName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("账号名称"); b.Property("AppId") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("应用 ID"); b.Property("AppKey") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("应用 AppKey"); b.Property("AppSecret") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("应用 AppSecret"); b.Property("CommunicationAddress") .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("通讯服务地址"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("ExtraProperties") - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties") .HasComment("扩展属性,用于存储自定义字段,JSON格式"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("OSACreatorId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权创建者Id"); b.Property("OSADeleterId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权最后删除者Id"); b.Property("OSALastModifierId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权最后修改者Id"); b.Property("PhoneNumber") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("手机号码"); b.Property("PlatformTenantId") .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("平台租户ID"); b.Property("ProductCount") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("Remark") - .HasColumnType("longtext") + .HasColumnType("text") .HasComment("备注"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId") .HasComment("租户ID"); @@ -245,172 +245,175 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("JiShe.ServicePro.CTWingManagement.CTWingProduct.CTWingPrivateProductInfo", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("AccessType") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("AccountPhoneNumber") - .HasColumnType("longtext"); + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("账户手机号"); b.Property("AuthType") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("CTWingAccountId") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("账号ID"); b.Property("CommunicationAddress") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("通讯服务地址"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DataEncryption") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("DeviceCount") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("ExtraProperties") - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties") .HasComment("扩展属性,用于存储自定义字段,JSON格式"); b.Property("FeatureAccesskey") .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasComment("设备访问密钥"); b.Property("IoTPlatformProductId") .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("产品ID"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("IsEnabled") - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasComment("是否启用"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("MasterKey") .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasComment("OpenAPI 通信主密钥"); b.Property("NetworkType") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("NodeType") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("OSACreatorId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权创建者Id"); b.Property("OSADeleterId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权最后删除者Id"); b.Property("OSALastModifierId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权最后修改者Id"); b.Property("ProductDesc") .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("必填,产品描述"); b.Property("ProductName") .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("产品名称"); b.Property("ProductProtocol") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("ProductType") .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("一级分类名"); b.Property("Protocol") .HasMaxLength(20) - .HasColumnType("varchar(20)") + .HasColumnType("character varying(20)") .HasComment("通讯协议"); b.Property("Remark") - .HasColumnType("longtext") + .HasColumnType("text") .HasComment("备注"); b.Property("SecondaryType") .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("二级分类名"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId") .HasComment("租户ID"); b.Property("ThingModelFileId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasComment("物模型文件Id"); b.Property("ThingModelFileName") .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasComment("物模型文件名称"); b.Property("ThirdType") .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("三级分类名"); b.Property("TupDeviceModel") .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("设备型号"); b.Property("TupIsThrough") - .HasColumnType("int"); + .HasColumnType("integer"); b.HasKey("Id"); @@ -428,67 +431,67 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("JiShe.ServicePro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionary", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("Code") .IsRequired() .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("Description") .IsRequired() .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); + .HasColumnType("character varying(1024)"); b.Property("DisplayText") .IsRequired() .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -502,49 +505,49 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("JiShe.ServicePro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionaryDetail", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("Code") .IsRequired() .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DataDictionaryId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("Description") .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); + .HasColumnType("character varying(1024)"); b.Property("DisplayText") .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("ExtendedAttribute") .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("IsEnabled") - .HasColumnType("bit(1)"); + .HasColumnType("boolean"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("Order") - .HasColumnType("int"); + .HasColumnType("integer"); b.HasKey("Id"); @@ -559,48 +562,51 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.DeviceInfos.DeviceFirmwareInfo", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("ExtraProperties") - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties") .HasComment("扩展属性,用于存储自定义字段,JSON格式"); b.Property("FirmwareFileId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasComment("固件文件Id"); b.Property("FirmwareFileName") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasComment("固件文件名称"); b.Property("FirmwareHashCode") - .HasColumnType("longtext"); + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasComment("固件哈希值"); b.Property("FirmwareLength") .HasColumnType("bigint"); @@ -608,61 +614,61 @@ namespace JiShe.IoT.Migrations b.Property("FirmwareVersion") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("固件版本"); b.Property("IoTPlatform") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("物联网平台类型"); b.Property("IoTPlatformProductId") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("物联网平台中对应的产品Id"); b.Property("IoTPlatformProductName") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasComment("物联网平台中对应的产品名称"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); - b.Property("IsEnable") - .HasColumnType("tinyint(1)") + b.Property("IsEnable") + .HasColumnType("boolean") .HasComment("是否启用"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("OSACreatorId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权创建者Id"); b.Property("OSADeleterId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权最后删除者Id"); b.Property("OSALastModifierId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权最后修改者Id"); b.Property("Remark") - .HasColumnType("longtext") + .HasColumnType("text") .HasComment("备注"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId") .HasComment("租户ID"); @@ -684,101 +690,110 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.DeviceInfos.DeviceManagementInfo", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("AccountPhoneNumber") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("账户手机号"); + b.Property("BusinessSystemDeviceDataId") + .HasColumnType("bigint") + .HasComment("业务系统设备数据Id"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("DeviceAddress") .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasComment("设备地址"); + b.Property("DeviceBrandCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("设备品牌编码"); + b.Property("DeviceName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("设备名称"); b.Property("DeviceOnlineStatus") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("设备在线状态"); b.Property("DeviceSource") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("设备来源类型"); b.Property("DeviceThingModelDataId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasComment("设备物模型数据Id"); b.Property("DeviceType") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("设备类型,与业务系统无关,主要区分是网关设备、直连设备"); b.Property("ExtraProperties") - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties") .HasComment("扩展属性,用于存储自定义字段,JSON格式"); b.Property("FirmwareVersion") .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("固件版本"); b.Property("IoTPlatform") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("物联网平台类型,默认没有指定"); b.Property("IoTPlatformAccountId") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("物联网平台中对应的账号Id"); b.Property("IoTPlatformDeviceOpenInfo") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("物联网平台中对应的设备Id或者名称"); b.Property("IoTPlatformProductId") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("物联网平台中对应的产品Id"); b.Property("IoTPlatformProductName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("物联网平台中对应的产品Name"); b.Property("IoTPlatformResponse") @@ -787,68 +802,68 @@ namespace JiShe.IoT.Migrations b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("IsNeedConfigDevicMdoel") - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasComment("是否需要配置设备模型"); - b.Property("IsPlatformPushSuccess") - .HasColumnType("tinyint(1)") + b.Property("IsPlatformPushSuccess") + .HasColumnType("boolean") .HasComment("物联网平台推送是否成功"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("LastOfflineTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasComment("最后离线时间"); b.Property("LastOnlineTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasComment("最后在线时间"); b.Property("OSACreatorId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权创建者Id"); b.Property("OSADeleterId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权最后删除者Id"); b.Property("OSALastModifierId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权最后修改者Id"); b.Property("PlatformPassword") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("物联网平台设备密码"); b.Property("Remark") - .HasColumnType("longtext") + .HasColumnType("text") .HasComment("备注"); b.Property("SecurityKey") .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasComment("设备接入鉴权key"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId") .HasComment("租户ID"); b.Property("UpgradeDate") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasComment("升级日期"); b.HasKey("Id"); @@ -869,109 +884,109 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.DeviceInfos.DeviceUpgradeRecord", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("DeviceAddress") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("设备地址"); b.Property("DeviceName") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("设备名称"); b.Property("ExtraProperties") - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties") .HasComment("扩展属性,用于存储自定义字段,JSON格式"); b.Property("FirmwareSignature") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("签名校验值"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("NowFirmwareVersion") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("当前固件版本"); b.Property("OSACreatorId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权创建者Id"); b.Property("OSADeleterId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权最后删除者Id"); b.Property("OSALastModifierId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权最后修改者Id"); b.Property("OldFirmwareVersion") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("旧的固件版本"); b.Property("Remark") - .HasColumnType("longtext") + .HasColumnType("text") .HasComment("备注"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId") .HasComment("租户ID"); b.Property("UpgradeDate") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasComment("升级日期"); b.Property("UpgradeDescription") .IsRequired() .HasMaxLength(512) - .HasColumnType("varchar(512)") + .HasColumnType("character varying(512)") .HasComment("升级描述"); b.Property("UpgradeIdentifier") @@ -981,19 +996,19 @@ namespace JiShe.IoT.Migrations b.Property("UpgradeMessage") .IsRequired() .HasMaxLength(512) - .HasColumnType("varchar(512)") + .HasColumnType("character varying(512)") .HasComment("升级信息"); b.Property("UpgradeResult") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("升级结果"); b.Property("UpgradeSource") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("升级来源"); b.Property("UpgradeStatus") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("升级状态"); b.HasKey("Id"); @@ -1014,103 +1029,226 @@ namespace JiShe.IoT.Migrations }); }); + modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.DeviceInfos.SubDeviceManagementInfo", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("BusinessSystemSubDeviceDataId") + .HasColumnType("bigint") + .HasComment("业务系统子设备数据Id"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("DeviceAddress") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasComment("网关设备或直连设备地址"); + + b.Property("DeviceDataId") + .HasColumnType("uuid") + .HasComment("网关设备或直连设备数据Id"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties") + .HasComment("扩展属性,用于存储自定义字段,JSON格式"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("OSACreatorId") + .HasColumnType("integer") + .HasComment("旧系统授权创建者Id"); + + b.Property("OSADeleterId") + .HasColumnType("integer") + .HasComment("旧系统授权最后删除者Id"); + + b.Property("OSALastModifierId") + .HasColumnType("integer") + .HasComment("旧系统授权最后修改者Id"); + + b.Property("Remark") + .HasColumnType("text") + .HasComment("备注"); + + b.Property("SubDeviceAddress") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasComment("子设备地址"); + + b.Property("SubDeviceBrandCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("子设备品牌编码"); + + b.Property("SubDeviceIndex") + .HasColumnType("integer") + .HasComment("子设备索引,抑或是主设备下唯一标识符、计量代码"); + + b.Property("SubDeviceName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("子设备名称"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId") + .HasComment("租户ID"); + + b.HasKey("Id"); + + b.HasIndex("CreationTime"); + + b.HasIndex("DeviceAddress"); + + b.HasIndex("SubDeviceAddress"); + + b.HasIndex("SubDeviceIndex"); + + b.HasIndex(new[] { "Id", "DeviceAddress", "SubDeviceIndex", "SubDeviceAddress", "CreationTime" }, "IX_ServiceProSubDeviceManagementInfo_IsNotUniqueKey") + .IsDescending(); + + b.ToTable("ServiceProSubDeviceManagementInfo", null, t => + { + t.HasComment("子设备信息"); + }); + }); + modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.ThingModelInfos.DeviceThingModelCommandInfo", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("CommandName") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasComment("指令名称"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("DeviceThingModelId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasComment("设备端物模型Id"); b.Property("ExtraProperties") - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties") .HasComment("扩展属性,用于存储自定义字段,JSON格式"); b.Property("IoTPlatform") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("物联网平台类型"); b.Property("IoTPlatformProductId") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("物联网平台中对应的产品Id"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("IssueCommand") .IsRequired() .HasMaxLength(512) - .HasColumnType("varchar(512)") + .HasColumnType("character varying(512)") .HasComment("完整的单个下发指令"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("OSACreatorId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权创建者Id"); b.Property("OSADeleterId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权最后删除者Id"); b.Property("OSALastModifierId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权最后修改者Id"); b.Property("PropertyArray") .IsRequired() .HasMaxLength(1024) - .HasColumnType("varchar(1024)") + .HasColumnType("character varying(1024)") .HasComment("指令设备端物模型的属性名称集合,JSON格式字符串数组"); b.Property("Remark") - .HasColumnType("longtext") + .HasColumnType("text") .HasComment("备注"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId") .HasComment("租户ID"); @@ -1132,44 +1270,44 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.ThingModelInfos.DeviceThingModelManagement", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("DeviceModelName") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("设备端物模型名称"); b.Property("ExtraProperties") - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties") .HasComment("扩展属性,用于存储自定义字段,JSON格式"); - b.Property("FunctionAnalysisFlag") - .HasColumnType("tinyint(1)") + b.Property("FunctionAnalysisFlag") + .HasColumnType("boolean") .HasComment("函数解析标记,默认为false, 不能解析"); b.Property("FunctionScript") @@ -1177,53 +1315,53 @@ namespace JiShe.IoT.Migrations .HasComment("脚本函数体"); b.Property("IoTPlatform") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("物联网平台类型,默认没有指定"); b.Property("IoTPlatformProductId") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("物联网平台中对应的产品Id"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("OSACreatorId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权创建者Id"); b.Property("OSADeleterId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权最后删除者Id"); b.Property("OSALastModifierId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权最后修改者Id"); b.Property("Remark") - .HasColumnType("longtext") + .HasColumnType("text") .HasComment("备注"); b.Property("ScriptName") .IsRequired() .HasMaxLength(64) - .HasColumnType("varchar(64)") + .HasColumnType("character varying(64)") .HasComment("脚本函数名称"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId") .HasComment("租户ID"); @@ -1246,145 +1384,145 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.ThingModelInfos.DeviceThingModelPropertyInfo", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("DeviceThingModelId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasComment("设备端物模型Id"); b.Property("ExtraProperties") - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties") .HasComment("扩展属性,用于存储自定义字段,JSON格式"); b.Property("FiledType") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("物联网平台中对应产品物模型属性或者事件类型"); b.Property("IoTPlatform") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("物联网平台类型"); b.Property("IoTPlatformProductId") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("物联网平台中对应的产品Id"); b.Property("IoTPlatformRawFieldDataType") .HasMaxLength(20) - .HasColumnType("varchar(20)") + .HasColumnType("character varying(20)") .HasComment("物联网平台中对应的产品物模型属性或者事件数据类型"); b.Property("IoTPlatformRawFieldName") .IsRequired() .HasMaxLength(64) - .HasColumnType("varchar(64)") + .HasColumnType("character varying(64)") .HasComment("物联网平台中对应的产品物模型属性或者事件名称"); b.Property("IoTPlatformThingModelDataId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasComment("系统中平台端物模型数据Id"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); - b.Property("IsValueNeedConvert") - .HasColumnType("tinyint(1)") + b.Property("IsValueNeedConvert") + .HasColumnType("boolean") .HasComment("是否需要值类型转换"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("NativeSkipNumber") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("正序跳过数量"); b.Property("NativeTakeNumber") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("正序获取数量"); b.Property("OSACreatorId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权创建者Id"); b.Property("OSADeleterId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权最后删除者Id"); b.Property("OSALastModifierId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权最后修改者Id"); b.Property("ParsingSequence") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("解析顺序,1234或者3412(高低反转)"); b.Property("Remark") - .HasColumnType("longtext") + .HasColumnType("text") .HasComment("备注"); b.Property("ReversalSkipNumber") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("反转跳过数量"); b.Property("ReversalTakeNumber") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("反转获取数量"); b.Property("StandardFieldDisplayName") .IsRequired() .HasMaxLength(64) - .HasColumnType("varchar(64)") + .HasColumnType("character varying(64)") .HasComment("管理后台产品标准的物模型属性或者事件名称"); b.Property("StandardFieldName") .IsRequired() .HasMaxLength(64) - .HasColumnType("varchar(64)") + .HasColumnType("character varying(64)") .HasComment("管理后台产品标准的物模型属性或者事件名称"); b.Property("StandardFieldValueType") .IsRequired() .HasMaxLength(20) - .HasColumnType("varchar(20)") + .HasColumnType("character varying(20)") .HasComment("标准物模型字段值类型"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId") .HasComment("租户ID"); @@ -1407,55 +1545,55 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.ThingModelInfos.IoTPlatformThingModelInfo", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("ExtraProperties") - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties") .HasComment("扩展属性,用于存储自定义字段,JSON格式"); b.Property("FiledType") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("物联网平台中对应产品物模型属性或者事件类型"); b.Property("IoTPlatform") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("物联网平台类型,默认没有指定"); b.Property("IoTPlatformProductId") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("物联网平台中对应的产品Id"); b.Property("IoTPlatformRawFieldDataType") .HasMaxLength(64) - .HasColumnType("varchar(64)") + .HasColumnType("character varying(64)") .HasComment("物联网平台中对应的产品物模型属性或者事件数据类型"); b.Property("IoTPlatformRawFieldExtension") @@ -1465,67 +1603,67 @@ namespace JiShe.IoT.Migrations b.Property("IoTPlatformRawFieldName") .IsRequired() .HasMaxLength(64) - .HasColumnType("varchar(64)") + .HasColumnType("character varying(64)") .HasComment("物联网平台中对应的产品物模型属性或者事件名称"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); - b.Property("IsSpecialIdentifier") - .HasColumnType("tinyint(1)") + b.Property("IsSpecialIdentifier") + .HasColumnType("boolean") .HasComment("是否是特殊物模型标识符"); - b.Property("IsValueNeedConvert") - .HasColumnType("tinyint(1)") + b.Property("IsValueNeedConvert") + .HasColumnType("boolean") .HasComment("是否需要值类型转换"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("OSACreatorId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权创建者Id"); b.Property("OSADeleterId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权最后删除者Id"); b.Property("OSALastModifierId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权最后修改者Id"); b.Property("Remark") - .HasColumnType("longtext") + .HasColumnType("text") .HasComment("备注"); b.Property("StandardFieldDisplayName") .IsRequired() .HasMaxLength(64) - .HasColumnType("varchar(64)") + .HasColumnType("character varying(64)") .HasComment("管理后台产品标准的物模型属性或者事件名称"); b.Property("StandardFieldName") .IsRequired() .HasMaxLength(64) - .HasColumnType("varchar(64)") + .HasColumnType("character varying(64)") .HasComment("管理后台产品标准的物模型属性或者事件名称"); b.Property("StandardFieldValueType") .IsRequired() .HasMaxLength(20) - .HasColumnType("varchar(20)") + .HasColumnType("character varying(20)") .HasComment("标准物模型字段值类型"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId") .HasComment("租户ID"); @@ -1548,119 +1686,119 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("JiShe.ServicePro.DynamicMenuManagement.Menus.Menu", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("Component") .HasMaxLength(512) - .HasColumnType("varchar(512)") + .HasColumnType("character varying(512)") .HasComment("组件地址"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("DisplayTitle") .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("标准多语言"); b.Property("Enabled") - .HasColumnType("bit(1)"); + .HasColumnType("boolean"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("HideInMenu") - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasComment("是否显示"); b.Property("Icon") - .HasColumnType("longtext") + .HasColumnType("text") .HasComment("图标"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("KeepAlive") - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasComment("是否缓存"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("MenuType") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("菜单类型"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("唯一编码"); b.Property("OpenType") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("打开类型"); b.Property("Order") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("排序"); b.Property("ParentId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("Path") .IsRequired() .HasMaxLength(512) - .HasColumnType("varchar(512)") + .HasColumnType("character varying(512)") .HasComment("路由/接口地址"); b.Property("Policy") .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("授权策略名称"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("Title") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("标题"); b.Property("Url") - .HasColumnType("longtext") + .HasColumnType("text") .HasComment("内外链地址"); b.HasKey("Id"); @@ -1681,46 +1819,46 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("JiShe.ServicePro.FileManagement.Files.FileObject", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("ContentType") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("文件名称"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("FileName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("文件名称"); b.Property("FileSize") @@ -1729,26 +1867,26 @@ namespace JiShe.IoT.Migrations b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("Md5Hash") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("文件MD5"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -1764,76 +1902,76 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("JiShe.ServicePro.LanguageManagement.LanguageTexts.Aggregates.LanguageText", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("CultureName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("语言名称"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("Name") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasComment("名称"); b.Property("ResourceName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("资源名称"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("Value") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasComment("值"); b.HasKey("Id"); @@ -1849,81 +1987,81 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("JiShe.ServicePro.LanguageManagement.Languages.Aggregates.Language", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("CultureName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("语言名称"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("DisplayName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("显示名称"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("FlagIcon") .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("图标"); b.Property("IsDefault") - .HasColumnType("bit(1)"); + .HasColumnType("boolean"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("IsEnabled") - .HasColumnType("bit(1)"); + .HasColumnType("boolean"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("UiCultureName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("Ui语言名称"); b.HasKey("Id"); @@ -1939,90 +2077,90 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("JiShe.ServicePro.NotificationManagement.Notifications.Aggregates.Notification", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("Content") .IsRequired() .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); + .HasColumnType("character varying(1024)"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("MessageLevel") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("MessageType") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("Read") - .HasColumnType("bit(1)"); + .HasColumnType("boolean"); b.Property("ReadTime") - .HasColumnType("datetime(6)"); + .HasColumnType("timestamp with time zone"); b.Property("ReceiveUserId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ReceiveUserName") .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("SenderUserId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("SenderUserName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("Title") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.HasKey("Id"); @@ -2035,68 +2173,68 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("JiShe.ServicePro.NotificationManagement.Notifications.Aggregates.NotificationSubscription", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("NotificationId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("Read") - .HasColumnType("bit(1)"); + .HasColumnType("boolean"); b.Property("ReadTime") - .HasColumnType("datetime(6)"); + .HasColumnType("timestamp with time zone"); b.Property("ReceiveUserId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ReceiveUserName") .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -2114,96 +2252,96 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("JiShe.ServicePro.OneNETManagement.OneNETAccounts.OneNETAccountInfos", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("AccountAccesskey") .IsRequired() .HasMaxLength(1024) - .HasColumnType("varchar(1024)") + .HasColumnType("character varying(1024)") .HasComment("账户通信密钥,平台可以重置密钥"); b.Property("AccountName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("账号名称"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("ExtraProperties") - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties") .HasComment("扩展属性,用于存储自定义字段,JSON格式"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("OSACreatorId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权创建者Id"); b.Property("OSADeleterId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权最后删除者Id"); b.Property("OSALastModifierId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权最后修改者Id"); b.Property("OneNETAccountId") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("账户Id"); b.Property("PhoneNumber") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("手机号码"); b.Property("ProductCount") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("产品数量"); b.Property("Remark") - .HasColumnType("longtext") + .HasColumnType("text") .HasComment("备注"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId") .HasComment("租户ID"); @@ -2223,179 +2361,183 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("JiShe.ServicePro.OneNETManagement.OneNETProducts.OneNETProductInfos", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("AccessProtocol") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("接入协议"); b.Property("AccountPhoneNumber") .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("账户手机号"); b.Property("Brand") - .HasColumnType("longtext") + .HasMaxLength(256) + .HasColumnType("character varying(256)") .HasComment("产品品牌"); b.Property("CommunicationAddress") .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasComment("通讯服务地址"); b.Property("CommunicationAddressTLS") .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasComment("TLS通讯服务地址"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DataProtocol") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("数据协议"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("ExtraProperties") - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties") .HasComment("扩展属性,用于存储自定义字段,JSON格式"); b.Property("IoTPlatformProductId") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("物联网平台对应的产品Id"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("IsEnabled") - .HasColumnType("bit(1)"); + .HasColumnType("boolean"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("Manufacturer") - .HasColumnType("longtext") + .HasMaxLength(256) + .HasColumnType("character varying(256)") .HasComment("产品厂商"); b.Property("Model") - .HasColumnType("longtext") + .HasMaxLength(256) + .HasColumnType("character varying(256)") .HasComment("产品型号"); b.Property("Network") - .HasColumnType("longtext") + .HasMaxLength(256) + .HasColumnType("character varying(256)") .HasComment("联网方式"); b.Property("NodeType") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("节点类型"); b.Property("NotActiveDeviceCount") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("未激活设备数"); b.Property("OSACreatorId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权创建者Id"); b.Property("OSADeleterId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权最后删除者Id"); b.Property("OSALastModifierId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权最后修改者Id"); b.Property("OfflineDeviceCount") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("离线设备数"); b.Property("OneNETAccountId") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("账户Id"); b.Property("OnlineDeviceCount") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("在线设备总数"); b.Property("OwnDeviceCount") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("自有设备总数"); b.Property("ProductAccesskey") .IsRequired() .HasMaxLength(1024) - .HasColumnType("varchar(1024)") + .HasColumnType("character varying(1024)") .HasComment("产品访问密钥"); - b.Property("ProductCreateTime") - .HasColumnType("datetime(6)") + b.Property("ProductCreateTime") + .HasColumnType("timestamp with time zone") .HasComment("产品创建时间"); b.Property("ProductName") .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("产品名称"); - b.Property("ProductUpdateTime") - .HasColumnType("datetime(6)") + b.Property("ProductUpdateTime") + .HasColumnType("timestamp with time zone") .HasComment("最近修改时间"); b.Property("Remark") - .HasColumnType("longtext") + .HasColumnType("text") .HasComment("备注"); b.Property("Status") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("开发状态"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId") .HasComment("租户ID"); b.Property("ThingModelFileId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasComment("物模型文件Id"); b.Property("ThingModelFileName") .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasComment("物模型文件名称"); b.Property("ThingModelInfos") - .HasColumnType("longtext") + .HasColumnType("text") .HasComment("平台物模型信息"); b.HasKey("Id"); @@ -2417,76 +2559,76 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("JiShe.ServicePro.TemplateManagement.TextTemplates.TextTemplate", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("Code") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("编码"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("Content") .IsRequired() .HasMaxLength(1024) - .HasColumnType("varchar(1024)") + .HasColumnType("character varying(1024)") .HasComment("内容"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("CultureName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("语言"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("名称"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -2502,113 +2644,113 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ApplicationName") .HasMaxLength(96) - .HasColumnType("varchar(96)") + .HasColumnType("character varying(96)") .HasColumnName("ApplicationName"); b.Property("BrowserInfo") .HasMaxLength(512) - .HasColumnType("varchar(512)") + .HasColumnType("character varying(512)") .HasColumnName("BrowserInfo"); b.Property("ClientId") .HasMaxLength(64) - .HasColumnType("varchar(64)") + .HasColumnType("character varying(64)") .HasColumnName("ClientId"); b.Property("ClientIpAddress") .HasMaxLength(64) - .HasColumnType("varchar(64)") + .HasColumnType("character varying(64)") .HasColumnName("ClientIpAddress"); b.Property("ClientName") .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasColumnName("ClientName"); b.Property("Comments") .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("Comments"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CorrelationId") .HasMaxLength(64) - .HasColumnType("varchar(64)") + .HasColumnType("character varying(64)") .HasColumnName("CorrelationId"); b.Property("Exceptions") - .HasColumnType("longtext"); + .HasColumnType("text"); b.Property("ExecutionDuration") - .HasColumnType("int") + .HasColumnType("integer") .HasColumnName("ExecutionDuration"); b.Property("ExecutionTime") - .HasColumnType("datetime(6)"); + .HasColumnType("timestamp with time zone"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("HttpMethod") .HasMaxLength(16) - .HasColumnType("varchar(16)") + .HasColumnType("character varying(16)") .HasColumnName("HttpMethod"); b.Property("HttpStatusCode") - .HasColumnType("int") + .HasColumnType("integer") .HasColumnName("HttpStatusCode"); b.Property("ImpersonatorTenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("ImpersonatorTenantId"); b.Property("ImpersonatorTenantName") .HasMaxLength(64) - .HasColumnType("varchar(64)") + .HasColumnType("character varying(64)") .HasColumnName("ImpersonatorTenantName"); b.Property("ImpersonatorUserId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("ImpersonatorUserId"); b.Property("ImpersonatorUserName") .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("ImpersonatorUserName"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("TenantName") .HasMaxLength(64) - .HasColumnType("varchar(64)") + .HasColumnType("character varying(64)") .HasColumnName("TenantName"); b.Property("Url") .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("Url"); b.Property("UserId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("UserId"); b.Property("UserName") .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("UserName"); b.HasKey("Id"); @@ -2623,41 +2765,41 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("AuditLogId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("AuditLogId"); b.Property("ExecutionDuration") - .HasColumnType("int") + .HasColumnType("integer") .HasColumnName("ExecutionDuration"); b.Property("ExecutionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("ExecutionTime"); b.Property("ExtraProperties") - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("MethodName") .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasColumnName("MethodName"); b.Property("Parameters") .HasMaxLength(2000) - .HasColumnType("varchar(2000)") + .HasColumnType("character varying(2000)") .HasColumnName("Parameters"); b.Property("ServiceName") .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("ServiceName"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -2672,23 +2814,23 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogExcelFile", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("FileName") .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("FileName"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -2699,40 +2841,40 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("AuditLogId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("AuditLogId"); b.Property("ChangeTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("ChangeTime"); b.Property("ChangeType") - .HasColumnType("tinyint unsigned") + .HasColumnType("smallint") .HasColumnName("ChangeType"); b.Property("EntityId") .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasColumnName("EntityId"); b.Property("EntityTenantId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("EntityTypeFullName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasColumnName("EntityTypeFullName"); b.Property("ExtraProperties") - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -2747,35 +2889,35 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("EntityChangeId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("NewValue") .HasMaxLength(512) - .HasColumnType("varchar(512)") + .HasColumnType("character varying(512)") .HasColumnName("NewValue"); b.Property("OriginalValue") .HasMaxLength(512) - .HasColumnType("varchar(512)") + .HasColumnType("character varying(512)") .HasColumnName("OriginalValue"); b.Property("PropertyName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasColumnName("PropertyName"); b.Property("PropertyTypeFullName") .IsRequired() .HasMaxLength(64) - .HasColumnType("varchar(64)") + .HasColumnType("character varying(64)") .HasColumnName("PropertyTypeFullName"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -2788,52 +2930,52 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ApplicationName") .HasMaxLength(96) - .HasColumnType("varchar(96)"); + .HasColumnType("character varying(96)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsAbandoned") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false); b.Property("JobArgs") .IsRequired() .HasMaxLength(1048576) - .HasColumnType("longtext"); + .HasColumnType("character varying(1048576)"); b.Property("JobName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("LastTryTime") - .HasColumnType("datetime(6)"); + .HasColumnType("timestamp with time zone"); b.Property("NextTryTime") - .HasColumnType("datetime(6)"); + .HasColumnType("timestamp with time zone"); b.Property("Priority") .ValueGeneratedOnAdd() - .HasColumnType("tinyint unsigned") + .HasColumnType("smallint") .HasDefaultValue((byte)15); b.Property("TryCount") @@ -2851,52 +2993,52 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureDefinitionRecord", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("AllowedProviders") .HasMaxLength(256) - .HasColumnType("varchar(256)"); + .HasColumnType("character varying(256)"); b.Property("DefaultValue") .HasMaxLength(256) - .HasColumnType("varchar(256)"); + .HasColumnType("character varying(256)"); b.Property("Description") .HasMaxLength(256) - .HasColumnType("varchar(256)"); + .HasColumnType("character varying(256)"); b.Property("DisplayName") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)"); + .HasColumnType("character varying(256)"); b.Property("ExtraProperties") - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("GroupName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("IsAvailableToHost") - .HasColumnType("bit(1)"); + .HasColumnType("boolean"); b.Property("IsVisibleToClients") - .HasColumnType("bit(1)"); + .HasColumnType("boolean"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("ParentName") .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("ValueType") .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); + .HasColumnType("character varying(2048)"); b.HasKey("Id"); @@ -2911,21 +3053,21 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureGroupDefinitionRecord", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("DisplayName") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)"); + .HasColumnType("character varying(256)"); b.Property("ExtraProperties") - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.HasKey("Id"); @@ -2938,25 +3080,25 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("ProviderKey") .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("ProviderName") .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("Value") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.HasKey("Id"); @@ -2969,49 +3111,49 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("Description") .HasMaxLength(256) - .HasColumnType("varchar(256)"); + .HasColumnType("character varying(256)"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsStatic") - .HasColumnType("bit(1)"); + .HasColumnType("boolean"); b.Property("Name") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)"); + .HasColumnType("character varying(256)"); b.Property("Regex") .HasMaxLength(512) - .HasColumnType("varchar(512)"); + .HasColumnType("character varying(512)"); b.Property("RegexDescription") .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("Required") - .HasColumnType("bit(1)"); + .HasColumnType("boolean"); b.Property("ValueType") - .HasColumnType("int"); + .HasColumnType("integer"); b.HasKey("Id"); @@ -3021,19 +3163,19 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("SourceTenantId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("SourceUserId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("TargetTenantId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("TargetUserId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.HasKey("Id"); @@ -3046,51 +3188,51 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("EntityVersion") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsDefault") - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasColumnName("IsDefault"); b.Property("IsPublic") - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasColumnName("IsPublic"); b.Property("IsStatic") - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasColumnName("IsStatic"); b.Property("Name") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)"); + .HasColumnType("character varying(256)"); b.Property("NormalizedName") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)"); + .HasColumnType("character varying(256)"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -3103,22 +3245,22 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ClaimType") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)"); + .HasColumnType("character varying(256)"); b.Property("ClaimValue") .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); + .HasColumnType("character varying(1024)"); b.Property("RoleId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -3131,65 +3273,65 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("Action") .HasMaxLength(96) - .HasColumnType("varchar(96)"); + .HasColumnType("character varying(96)"); b.Property("ApplicationName") .HasMaxLength(96) - .HasColumnType("varchar(96)"); + .HasColumnType("character varying(96)"); b.Property("BrowserInfo") .HasMaxLength(512) - .HasColumnType("varchar(512)"); + .HasColumnType("character varying(512)"); b.Property("ClientId") .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("ClientIpAddress") .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CorrelationId") .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("CreationTime") - .HasColumnType("datetime(6)"); + .HasColumnType("timestamp with time zone"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("Identity") .HasMaxLength(96) - .HasColumnType("varchar(96)"); + .HasColumnType("character varying(96)"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("TenantName") .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("UserId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("UserName") .HasMaxLength(256) - .HasColumnType("varchar(256)"); + .HasColumnType("character varying(256)"); b.HasKey("Id"); @@ -3207,46 +3349,46 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentitySession", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ClientId") .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("Device") .IsRequired() .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("DeviceInfo") .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("ExtraProperties") - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IpAddresses") .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); + .HasColumnType("character varying(2048)"); b.Property("LastAccessed") - .HasColumnType("datetime(6)"); + .HasColumnType("timestamp with time zone"); b.Property("SessionId") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("SignedIn") - .HasColumnType("datetime(6)"); + .HasColumnType("timestamp with time zone"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("UserId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.HasKey("Id"); @@ -3262,11 +3404,11 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("AccessFailedCount") .ValueGeneratedOnAdd() - .HasColumnType("int") + .HasColumnType("integer") .HasDefaultValue(0) .HasColumnName("AccessFailedCount"); @@ -3274,142 +3416,142 @@ namespace JiShe.IoT.Migrations .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("Email") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("Email"); b.Property("EmailConfirmed") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("EmailConfirmed"); b.Property("EntityVersion") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsActive") - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasColumnName("IsActive"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("IsExternal") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsExternal"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("LastPasswordChangeTime") - .HasColumnType("datetime(6)"); + .HasColumnType("timestamp with time zone"); b.Property("LockoutEnabled") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("LockoutEnabled"); b.Property("LockoutEnd") - .HasColumnType("datetime(6)"); + .HasColumnType("timestamp with time zone"); b.Property("Name") .HasMaxLength(64) - .HasColumnType("varchar(64)") + .HasColumnType("character varying(64)") .HasColumnName("Name"); b.Property("NormalizedEmail") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("NormalizedEmail"); b.Property("NormalizedUserName") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("NormalizedUserName"); b.Property("PasswordHash") .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("PasswordHash"); b.Property("PhoneNumber") .HasMaxLength(16) - .HasColumnType("varchar(16)") + .HasColumnType("character varying(16)") .HasColumnName("PhoneNumber"); b.Property("PhoneNumberConfirmed") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("PhoneNumberConfirmed"); b.Property("SecurityStamp") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("SecurityStamp"); b.Property("ShouldChangePasswordOnNextLogin") - .HasColumnType("bit(1)"); + .HasColumnType("boolean"); b.Property("Surname") .HasMaxLength(64) - .HasColumnType("varchar(64)") + .HasColumnType("character varying(64)") .HasColumnName("Surname"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("TwoFactorEnabled") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("TwoFactorEnabled"); b.Property("UserName") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("UserName"); b.HasKey("Id"); @@ -3428,23 +3570,23 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ClaimType") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)"); + .HasColumnType("character varying(256)"); b.Property("ClaimValue") .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); + .HasColumnType("character varying(1024)"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("UserId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.HasKey("Id"); @@ -3456,22 +3598,22 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserDelegation", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("EndTime") - .HasColumnType("datetime(6)"); + .HasColumnType("timestamp with time zone"); b.Property("SourceUserId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("StartTime") - .HasColumnType("datetime(6)"); + .HasColumnType("timestamp with time zone"); b.Property("TargetUserId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -3482,23 +3624,23 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => { b.Property("UserId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("LoginProvider") .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("ProviderDisplayName") .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("ProviderKey") .IsRequired() .HasMaxLength(196) - .HasColumnType("varchar(196)"); + .HasColumnType("character varying(196)"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("UserId", "LoginProvider"); @@ -3511,21 +3653,21 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => { b.Property("OrganizationUnitId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("UserId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("OrganizationUnitId", "UserId"); @@ -3538,13 +3680,13 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => { b.Property("UserId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("RoleId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("UserId", "RoleId"); @@ -3557,22 +3699,22 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => { b.Property("UserId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("LoginProvider") .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("Name") .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("Value") - .HasColumnType("longtext"); + .HasColumnType("text"); b.HasKey("UserId", "LoginProvider", "Name"); @@ -3582,70 +3724,70 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("Code") .IsRequired() .HasMaxLength(95) - .HasColumnType("varchar(95)") + .HasColumnType("character varying(95)") .HasColumnName("Code"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("DisplayName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasColumnName("DisplayName"); b.Property("EntityVersion") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("ParentId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -3660,21 +3802,21 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => { b.Property("OrganizationUnitId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("RoleId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("OrganizationUnitId", "RoleId"); @@ -3687,44 +3829,44 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("DisplayName") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)"); + .HasColumnType("character varying(256)"); b.Property("ExtraProperties") - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("GroupName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("IsEnabled") - .HasColumnType("bit(1)"); + .HasColumnType("boolean"); b.Property("MultiTenancySide") - .HasColumnType("tinyint unsigned"); + .HasColumnType("smallint"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("ParentName") .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("Providers") .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("StateCheckers") .HasMaxLength(256) - .HasColumnType("varchar(256)"); + .HasColumnType("character varying(256)"); b.HasKey("Id"); @@ -3739,25 +3881,25 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("ProviderKey") .IsRequired() .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("ProviderName") .IsRequired() .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -3771,21 +3913,21 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("DisplayName") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)"); + .HasColumnType("character varying(256)"); b.Property("ExtraProperties") - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.HasKey("Id"); @@ -3798,25 +3940,25 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("ProviderKey") .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("ProviderName") .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("Value") .IsRequired() .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); + .HasColumnType("character varying(2048)"); b.HasKey("Id"); @@ -3829,42 +3971,42 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.SettingManagement.SettingDefinitionRecord", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("DefaultValue") .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); + .HasColumnType("character varying(2048)"); b.Property("Description") .HasMaxLength(512) - .HasColumnType("varchar(512)"); + .HasColumnType("character varying(512)"); b.Property("DisplayName") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)"); + .HasColumnType("character varying(256)"); b.Property("ExtraProperties") - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsEncrypted") - .HasColumnType("bit(1)"); + .HasColumnType("boolean"); b.Property("IsInherited") - .HasColumnType("bit(1)"); + .HasColumnType("boolean"); b.Property("IsVisibleToClients") - .HasColumnType("bit(1)"); + .HasColumnType("boolean"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("Providers") .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); + .HasColumnType("character varying(1024)"); b.HasKey("Id"); @@ -3877,62 +4019,62 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("EntityVersion") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("Name") .IsRequired() .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("NormalizedName") .IsRequired() .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.HasKey("Id"); @@ -3946,16 +4088,16 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => { b.Property("TenantId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("Name") .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("Value") .IsRequired() .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); + .HasColumnType("character varying(1024)"); b.HasKey("TenantId", "Name"); diff --git a/src/JiShe.IoT.EntityFrameworkCore/Migrations/20260115061417_InitialCreate.cs b/src/JiShe.IoT.EntityFrameworkCore/Migrations/20260115061417_InitialCreate.cs new file mode 100644 index 0000000..a5dc2d1 --- /dev/null +++ b/src/JiShe.IoT.EntityFrameworkCore/Migrations/20260115061417_InitialCreate.cs @@ -0,0 +1,2064 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace JiShe.IoT.Migrations +{ + /// + public partial class InitialCreate : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "AbpAuditLogExcelFiles", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + FileName = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpAuditLogExcelFiles", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpAuditLogs", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + ApplicationName = table.Column(type: "character varying(96)", maxLength: 96, nullable: true), + UserId = table.Column(type: "uuid", nullable: true), + UserName = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), + TenantId = table.Column(type: "uuid", nullable: true), + TenantName = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + ImpersonatorUserId = table.Column(type: "uuid", nullable: true), + ImpersonatorUserName = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), + ImpersonatorTenantId = table.Column(type: "uuid", nullable: true), + ImpersonatorTenantName = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + ExecutionTime = table.Column(type: "timestamp with time zone", nullable: false), + ExecutionDuration = table.Column(type: "integer", nullable: false), + ClientIpAddress = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + ClientName = table.Column(type: "character varying(128)", maxLength: 128, nullable: true), + ClientId = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + CorrelationId = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + BrowserInfo = table.Column(type: "character varying(512)", maxLength: 512, nullable: true), + HttpMethod = table.Column(type: "character varying(16)", maxLength: 16, nullable: true), + Url = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), + Exceptions = table.Column(type: "text", nullable: true), + Comments = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), + HttpStatusCode = table.Column(type: "integer", nullable: true), + ExtraProperties = table.Column(type: "text", nullable: false), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpAuditLogs", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpBackgroundJobs", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + ApplicationName = table.Column(type: "character varying(96)", maxLength: 96, nullable: true), + JobName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + JobArgs = table.Column(type: "character varying(1048576)", maxLength: 1048576, nullable: false), + TryCount = table.Column(type: "smallint", nullable: false, defaultValue: (short)0), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + NextTryTime = table.Column(type: "timestamp with time zone", nullable: false), + LastTryTime = table.Column(type: "timestamp with time zone", nullable: true), + IsAbandoned = table.Column(type: "boolean", nullable: false, defaultValue: false), + Priority = table.Column(type: "smallint", nullable: false, defaultValue: (byte)15), + ExtraProperties = table.Column(type: "text", nullable: false), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpBackgroundJobs", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpClaimTypes", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + Name = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + Required = table.Column(type: "boolean", nullable: false), + IsStatic = table.Column(type: "boolean", nullable: false), + Regex = table.Column(type: "character varying(512)", maxLength: 512, nullable: true), + RegexDescription = table.Column(type: "character varying(128)", maxLength: 128, nullable: true), + Description = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), + ValueType = table.Column(type: "integer", nullable: false), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + ExtraProperties = table.Column(type: "text", nullable: false), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpClaimTypes", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpDataDictionaries", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + Code = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), + DisplayText = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), + Description = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: false), + ExtraProperties = table.Column(type: "text", nullable: false), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true), + LastModificationTime = table.Column(type: "timestamp with time zone", nullable: true), + LastModifierId = table.Column(type: "uuid", nullable: true), + IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uuid", nullable: true), + DeletionTime = table.Column(type: "timestamp with time zone", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpDataDictionaries", x => x.Id); + }, + comment: "数据字典"); + + migrationBuilder.CreateTable( + name: "AbpFeatureGroups", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + DisplayName = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + ExtraProperties = table.Column(type: "text", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpFeatureGroups", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpFeatures", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + GroupName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + ParentName = table.Column(type: "character varying(128)", maxLength: 128, nullable: true), + DisplayName = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + Description = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), + DefaultValue = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), + IsVisibleToClients = table.Column(type: "boolean", nullable: false), + IsAvailableToHost = table.Column(type: "boolean", nullable: false), + AllowedProviders = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), + ValueType = table.Column(type: "character varying(2048)", maxLength: 2048, nullable: true), + ExtraProperties = table.Column(type: "text", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpFeatures", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpFeatureValues", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + Value = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + ProviderName = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + ProviderKey = table.Column(type: "character varying(64)", maxLength: 64, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpFeatureValues", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpFileObjects", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + FileName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, comment: "文件名称"), + FileSize = table.Column(type: "bigint", nullable: false, comment: "文件大小"), + ContentType = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, comment: "文件名称"), + Md5Hash = table.Column(type: "character varying(50)", maxLength: 50, nullable: false, comment: "文件MD5"), + ExtraProperties = table.Column(type: "text", nullable: false), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true), + LastModificationTime = table.Column(type: "timestamp with time zone", nullable: true), + LastModifierId = table.Column(type: "uuid", nullable: true), + IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uuid", nullable: true), + DeletionTime = table.Column(type: "timestamp with time zone", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpFileObjects", x => x.Id); + }, + comment: "文件管理"); + + migrationBuilder.CreateTable( + name: "AbpLanguages", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + CultureName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, comment: "语言名称"), + UiCultureName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, comment: "Ui语言名称"), + DisplayName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, comment: "显示名称"), + FlagIcon = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, comment: "图标"), + IsEnabled = table.Column(type: "boolean", nullable: false), + IsDefault = table.Column(type: "boolean", nullable: false), + ExtraProperties = table.Column(type: "text", nullable: false), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true), + LastModificationTime = table.Column(type: "timestamp with time zone", nullable: true), + LastModifierId = table.Column(type: "uuid", nullable: true), + IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uuid", nullable: true), + DeletionTime = table.Column(type: "timestamp with time zone", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpLanguages", x => x.Id); + }, + comment: "语言管理"); + + migrationBuilder.CreateTable( + name: "AbpLanguageTexts", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + CultureName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, comment: "语言名称"), + ResourceName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, comment: "资源名称"), + Name = table.Column(type: "character varying(256)", maxLength: 256, nullable: false, comment: "名称"), + Value = table.Column(type: "character varying(256)", maxLength: 256, nullable: false, comment: "值"), + ExtraProperties = table.Column(type: "text", nullable: false), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true), + LastModificationTime = table.Column(type: "timestamp with time zone", nullable: true), + LastModifierId = table.Column(type: "uuid", nullable: true), + IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uuid", nullable: true), + DeletionTime = table.Column(type: "timestamp with time zone", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpLanguageTexts", x => x.Id); + }, + comment: "语言文本管理"); + + migrationBuilder.CreateTable( + name: "AbpLinkUsers", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + SourceUserId = table.Column(type: "uuid", nullable: false), + SourceTenantId = table.Column(type: "uuid", nullable: true), + TargetUserId = table.Column(type: "uuid", nullable: false), + TargetTenantId = table.Column(type: "uuid", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpLinkUsers", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpNotifications", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + Title = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + Content = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: false), + MessageType = table.Column(type: "integer", nullable: false), + MessageLevel = table.Column(type: "integer", nullable: false), + SenderUserId = table.Column(type: "uuid", nullable: false), + SenderUserName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + ReceiveUserId = table.Column(type: "uuid", nullable: true), + ReceiveUserName = table.Column(type: "character varying(128)", maxLength: 128, nullable: true), + Read = table.Column(type: "boolean", nullable: false), + ReadTime = table.Column(type: "timestamp with time zone", nullable: true), + ExtraProperties = table.Column(type: "text", nullable: false), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true), + LastModificationTime = table.Column(type: "timestamp with time zone", nullable: true), + LastModifierId = table.Column(type: "uuid", nullable: true), + IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uuid", nullable: true), + DeletionTime = table.Column(type: "timestamp with time zone", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpNotifications", x => x.Id); + }, + comment: "消息通知管理"); + + migrationBuilder.CreateTable( + name: "AbpNotificationSubscriptions", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + NotificationId = table.Column(type: "uuid", nullable: false), + ReceiveUserId = table.Column(type: "uuid", nullable: false), + ReceiveUserName = table.Column(type: "character varying(128)", maxLength: 128, nullable: true), + Read = table.Column(type: "boolean", nullable: false), + ReadTime = table.Column(type: "timestamp with time zone", nullable: false), + ExtraProperties = table.Column(type: "text", nullable: false), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true), + LastModificationTime = table.Column(type: "timestamp with time zone", nullable: true), + LastModifierId = table.Column(type: "uuid", nullable: true), + IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uuid", nullable: true), + DeletionTime = table.Column(type: "timestamp with time zone", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpNotificationSubscriptions", x => x.Id); + }, + comment: "消息订阅者"); + + migrationBuilder.CreateTable( + name: "AbpOrganizationUnits", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + ParentId = table.Column(type: "uuid", nullable: true), + Code = table.Column(type: "character varying(95)", maxLength: 95, nullable: false), + DisplayName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + EntityVersion = table.Column(type: "integer", nullable: false), + ExtraProperties = table.Column(type: "text", nullable: false), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true), + LastModificationTime = table.Column(type: "timestamp with time zone", nullable: true), + LastModifierId = table.Column(type: "uuid", nullable: true), + IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uuid", nullable: true), + DeletionTime = table.Column(type: "timestamp with time zone", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpOrganizationUnits", x => x.Id); + table.ForeignKey( + name: "FK_AbpOrganizationUnits_AbpOrganizationUnits_ParentId", + column: x => x.ParentId, + principalTable: "AbpOrganizationUnits", + principalColumn: "Id"); + }); + + migrationBuilder.CreateTable( + name: "AbpPermissionGrants", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + ProviderName = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), + ProviderKey = table.Column(type: "character varying(64)", maxLength: 64, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpPermissionGrants", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpPermissionGroups", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + DisplayName = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + ExtraProperties = table.Column(type: "text", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpPermissionGroups", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpPermissions", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + GroupName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + ParentName = table.Column(type: "character varying(128)", maxLength: 128, nullable: true), + DisplayName = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + IsEnabled = table.Column(type: "boolean", nullable: false), + MultiTenancySide = table.Column(type: "smallint", nullable: false), + Providers = table.Column(type: "character varying(128)", maxLength: 128, nullable: true), + StateCheckers = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), + ExtraProperties = table.Column(type: "text", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpPermissions", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpRoles", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + Name = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + NormalizedName = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + IsDefault = table.Column(type: "boolean", nullable: false), + IsStatic = table.Column(type: "boolean", nullable: false), + IsPublic = table.Column(type: "boolean", nullable: false), + EntityVersion = table.Column(type: "integer", nullable: false), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + ExtraProperties = table.Column(type: "text", nullable: false), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpRoles", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpSecurityLogs", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + ApplicationName = table.Column(type: "character varying(96)", maxLength: 96, nullable: true), + Identity = table.Column(type: "character varying(96)", maxLength: 96, nullable: true), + Action = table.Column(type: "character varying(96)", maxLength: 96, nullable: true), + UserId = table.Column(type: "uuid", nullable: true), + UserName = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), + TenantName = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + ClientId = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + CorrelationId = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + ClientIpAddress = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + BrowserInfo = table.Column(type: "character varying(512)", maxLength: 512, nullable: true), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + ExtraProperties = table.Column(type: "text", nullable: false), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpSecurityLogs", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpSessions", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + SessionId = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + Device = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), + DeviceInfo = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + TenantId = table.Column(type: "uuid", nullable: true), + UserId = table.Column(type: "uuid", nullable: false), + ClientId = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + IpAddresses = table.Column(type: "character varying(2048)", maxLength: 2048, nullable: true), + SignedIn = table.Column(type: "timestamp with time zone", nullable: false), + LastAccessed = table.Column(type: "timestamp with time zone", nullable: true), + ExtraProperties = table.Column(type: "text", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpSessions", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpSettingDefinitions", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + DisplayName = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + Description = table.Column(type: "character varying(512)", maxLength: 512, nullable: true), + DefaultValue = table.Column(type: "character varying(2048)", maxLength: 2048, nullable: true), + IsVisibleToClients = table.Column(type: "boolean", nullable: false), + Providers = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true), + IsInherited = table.Column(type: "boolean", nullable: false), + IsEncrypted = table.Column(type: "boolean", nullable: false), + ExtraProperties = table.Column(type: "text", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpSettingDefinitions", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpSettings", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + Value = table.Column(type: "character varying(2048)", maxLength: 2048, nullable: false), + ProviderName = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + ProviderKey = table.Column(type: "character varying(64)", maxLength: 64, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpSettings", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpTenants", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + Name = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), + NormalizedName = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), + EntityVersion = table.Column(type: "integer", nullable: false), + ExtraProperties = table.Column(type: "text", nullable: false), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true), + LastModificationTime = table.Column(type: "timestamp with time zone", nullable: true), + LastModifierId = table.Column(type: "uuid", nullable: true), + IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uuid", nullable: true), + DeletionTime = table.Column(type: "timestamp with time zone", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpTenants", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpUserDelegations", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + SourceUserId = table.Column(type: "uuid", nullable: false), + TargetUserId = table.Column(type: "uuid", nullable: false), + StartTime = table.Column(type: "timestamp with time zone", nullable: false), + EndTime = table.Column(type: "timestamp with time zone", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUserDelegations", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpUsers", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + UserName = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + NormalizedUserName = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + Name = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + Surname = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + Email = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + NormalizedEmail = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + EmailConfirmed = table.Column(type: "boolean", nullable: false, defaultValue: false), + PasswordHash = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), + SecurityStamp = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + IsExternal = table.Column(type: "boolean", nullable: false, defaultValue: false), + PhoneNumber = table.Column(type: "character varying(16)", maxLength: 16, nullable: true), + PhoneNumberConfirmed = table.Column(type: "boolean", nullable: false, defaultValue: false), + IsActive = table.Column(type: "boolean", nullable: false), + TwoFactorEnabled = table.Column(type: "boolean", nullable: false, defaultValue: false), + LockoutEnd = table.Column(type: "timestamp with time zone", nullable: true), + LockoutEnabled = table.Column(type: "boolean", nullable: false, defaultValue: false), + AccessFailedCount = table.Column(type: "integer", nullable: false, defaultValue: 0), + ShouldChangePasswordOnNextLogin = table.Column(type: "boolean", nullable: false), + EntityVersion = table.Column(type: "integer", nullable: false), + LastPasswordChangeTime = table.Column(type: "timestamp with time zone", nullable: true), + ExtraProperties = table.Column(type: "text", nullable: false), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true), + LastModificationTime = table.Column(type: "timestamp with time zone", nullable: true), + LastModifierId = table.Column(type: "uuid", nullable: true), + IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uuid", nullable: true), + DeletionTime = table.Column(type: "timestamp with time zone", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUsers", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "ServiceProCTWingAccountInfo", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + AccountName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, comment: "账号名称"), + AccountId = table.Column(type: "character varying(50)", maxLength: 50, nullable: false, comment: "账号ID"), + AppId = table.Column(type: "character varying(50)", maxLength: 50, nullable: false, comment: "应用 ID"), + AppKey = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, comment: "应用 AppKey"), + AppSecret = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, comment: "应用 AppSecret"), + PlatformTenantId = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, comment: "平台租户ID"), + CommunicationAddress = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, comment: "通讯服务地址"), + PhoneNumber = table.Column(type: "character varying(50)", maxLength: 50, nullable: false, comment: "手机号码"), + ProductCount = table.Column(type: "integer", nullable: false), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true), + LastModificationTime = table.Column(type: "timestamp with time zone", nullable: true), + LastModifierId = table.Column(type: "uuid", nullable: true), + IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uuid", nullable: true), + DeletionTime = table.Column(type: "timestamp with time zone", nullable: true), + TenantId = table.Column(type: "uuid", nullable: true, comment: "租户ID"), + Remark = table.Column(type: "text", nullable: true, comment: "备注"), + OSACreatorId = table.Column(type: "integer", nullable: true, comment: "旧系统授权创建者Id"), + OSALastModifierId = table.Column(type: "integer", nullable: true, comment: "旧系统授权最后修改者Id"), + OSADeleterId = table.Column(type: "integer", nullable: true, comment: "旧系统授权最后删除者Id"), + ExtraProperties = table.Column(type: "text", nullable: true, comment: "扩展属性,用于存储自定义字段,JSON格式") + }, + constraints: table => + { + table.PrimaryKey("PK_ServiceProCTWingAccountInfo", x => x.Id); + }, + comment: "CTWing账号信息"); + + migrationBuilder.CreateTable( + name: "ServiceProCTWingPrivateProductInfo", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + CTWingAccountId = table.Column(type: "character varying(50)", maxLength: 50, nullable: false, comment: "账号ID"), + AccountPhoneNumber = table.Column(type: "character varying(50)", maxLength: 50, nullable: false, comment: "账户手机号"), + CommunicationAddress = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, comment: "通讯服务地址"), + MasterKey = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, comment: "OpenAPI 通信主密钥"), + FeatureAccesskey = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, comment: "设备访问密钥"), + IoTPlatformProductId = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, comment: "产品ID"), + ProductName = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, comment: "产品名称"), + Protocol = table.Column(type: "character varying(20)", maxLength: 20, nullable: true, comment: "通讯协议"), + ProductDesc = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, comment: "必填,产品描述"), + ProductType = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, comment: "一级分类名"), + SecondaryType = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, comment: "二级分类名"), + ThirdType = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, comment: "三级分类名"), + NodeType = table.Column(type: "integer", nullable: false), + AccessType = table.Column(type: "integer", nullable: false), + NetworkType = table.Column(type: "integer", nullable: false), + ProductProtocol = table.Column(type: "integer", nullable: false), + AuthType = table.Column(type: "integer", nullable: false), + DataEncryption = table.Column(type: "integer", nullable: false), + TupIsThrough = table.Column(type: "integer", nullable: false), + TupDeviceModel = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, comment: "设备型号"), + DeviceCount = table.Column(type: "integer", nullable: false), + ThingModelFileId = table.Column(type: "uuid", nullable: true, comment: "物模型文件Id"), + ThingModelFileName = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, comment: "物模型文件名称"), + IsEnabled = table.Column(type: "boolean", nullable: false, comment: "是否启用"), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true), + LastModificationTime = table.Column(type: "timestamp with time zone", nullable: true), + LastModifierId = table.Column(type: "uuid", nullable: true), + IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uuid", nullable: true), + DeletionTime = table.Column(type: "timestamp with time zone", nullable: true), + TenantId = table.Column(type: "uuid", nullable: true, comment: "租户ID"), + Remark = table.Column(type: "text", nullable: true, comment: "备注"), + OSACreatorId = table.Column(type: "integer", nullable: true, comment: "旧系统授权创建者Id"), + OSALastModifierId = table.Column(type: "integer", nullable: true, comment: "旧系统授权最后修改者Id"), + OSADeleterId = table.Column(type: "integer", nullable: true, comment: "旧系统授权最后删除者Id"), + ExtraProperties = table.Column(type: "text", nullable: true, comment: "扩展属性,用于存储自定义字段,JSON格式") + }, + constraints: table => + { + table.PrimaryKey("PK_ServiceProCTWingPrivateProductInfo", x => x.Id); + }, + comment: "CTWing产品信息"); + + migrationBuilder.CreateTable( + name: "ServiceProDeviceFirmwareInfo", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + IoTPlatform = table.Column(type: "integer", nullable: false, comment: "物联网平台类型"), + IoTPlatformProductId = table.Column(type: "character varying(50)", maxLength: 50, nullable: false, comment: "物联网平台中对应的产品Id"), + IoTPlatformProductName = table.Column(type: "character varying(256)", maxLength: 256, nullable: false, comment: "物联网平台中对应的产品名称"), + FirmwareVersion = table.Column(type: "character varying(50)", maxLength: 50, nullable: false, comment: "固件版本"), + FirmwareFileId = table.Column(type: "uuid", nullable: false, comment: "固件文件Id"), + FirmwareFileName = table.Column(type: "character varying(256)", maxLength: 256, nullable: false, comment: "固件文件名称"), + FirmwareHashCode = table.Column(type: "character varying(256)", maxLength: 256, nullable: false, comment: "固件哈希值"), + FirmwareLength = table.Column(type: "bigint", nullable: false), + IsEnable = table.Column(type: "boolean", nullable: false, comment: "是否启用"), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true), + LastModificationTime = table.Column(type: "timestamp with time zone", nullable: true), + LastModifierId = table.Column(type: "uuid", nullable: true), + IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uuid", nullable: true), + DeletionTime = table.Column(type: "timestamp with time zone", nullable: true), + TenantId = table.Column(type: "uuid", nullable: true, comment: "租户ID"), + Remark = table.Column(type: "text", nullable: true, comment: "备注"), + OSACreatorId = table.Column(type: "integer", nullable: true, comment: "旧系统授权创建者Id"), + OSALastModifierId = table.Column(type: "integer", nullable: true, comment: "旧系统授权最后修改者Id"), + OSADeleterId = table.Column(type: "integer", nullable: true, comment: "旧系统授权最后删除者Id"), + ExtraProperties = table.Column(type: "text", nullable: true, comment: "扩展属性,用于存储自定义字段,JSON格式") + }, + constraints: table => + { + table.PrimaryKey("PK_ServiceProDeviceFirmwareInfo", x => x.Id); + }, + comment: "设备固件信息"); + + migrationBuilder.CreateTable( + name: "ServiceProDeviceInfo", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + DeviceName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, comment: "设备名称"), + DeviceAddress = table.Column(type: "character varying(40)", maxLength: 40, nullable: false, comment: "设备地址"), + IoTPlatform = table.Column(type: "integer", nullable: false, comment: "物联网平台类型,默认没有指定"), + DeviceType = table.Column(type: "integer", nullable: false, comment: "设备类型,与业务系统无关,主要区分是网关设备、直连设备"), + IoTPlatformDeviceOpenInfo = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, comment: "物联网平台中对应的设备Id或者名称"), + PlatformPassword = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, comment: "物联网平台设备密码"), + IoTPlatformProductId = table.Column(type: "character varying(50)", maxLength: 50, nullable: false, comment: "物联网平台中对应的产品Id"), + IoTPlatformProductName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, comment: "物联网平台中对应的产品Name"), + IoTPlatformAccountId = table.Column(type: "character varying(50)", maxLength: 50, nullable: false, comment: "物联网平台中对应的账号Id"), + AccountPhoneNumber = table.Column(type: "character varying(50)", maxLength: 50, nullable: false, comment: "账户手机号"), + IoTPlatformResponse = table.Column(type: "text", nullable: true, comment: "物联网平台返回的响应信息"), + IsPlatformPushSuccess = table.Column(type: "boolean", nullable: false, comment: "物联网平台推送是否成功"), + DeviceOnlineStatus = table.Column(type: "integer", nullable: true, comment: "设备在线状态"), + LastOnlineTime = table.Column(type: "timestamp with time zone", nullable: true, comment: "最后在线时间"), + LastOfflineTime = table.Column(type: "timestamp with time zone", nullable: true, comment: "最后离线时间"), + DeviceSource = table.Column(type: "integer", nullable: false, comment: "设备来源类型"), + IsNeedConfigDevicMdoel = table.Column(type: "boolean", nullable: false, comment: "是否需要配置设备模型"), + DeviceThingModelDataId = table.Column(type: "uuid", nullable: true, comment: "设备物模型数据Id"), + FirmwareVersion = table.Column(type: "character varying(50)", maxLength: 50, nullable: true, comment: "固件版本"), + UpgradeDate = table.Column(type: "timestamp with time zone", nullable: true, comment: "升级日期"), + SecurityKey = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, comment: "设备接入鉴权key"), + DeviceBrandCode = table.Column(type: "character varying(50)", maxLength: 50, nullable: true, comment: "设备品牌编码"), + BusinessSystemDeviceDataId = table.Column(type: "bigint", nullable: true, comment: "业务系统设备数据Id"), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true), + LastModificationTime = table.Column(type: "timestamp with time zone", nullable: true), + LastModifierId = table.Column(type: "uuid", nullable: true), + IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uuid", nullable: true), + DeletionTime = table.Column(type: "timestamp with time zone", nullable: true), + TenantId = table.Column(type: "uuid", nullable: true, comment: "租户ID"), + Remark = table.Column(type: "text", nullable: true, comment: "备注"), + OSACreatorId = table.Column(type: "integer", nullable: true, comment: "旧系统授权创建者Id"), + OSALastModifierId = table.Column(type: "integer", nullable: true, comment: "旧系统授权最后修改者Id"), + OSADeleterId = table.Column(type: "integer", nullable: true, comment: "旧系统授权最后删除者Id"), + ExtraProperties = table.Column(type: "text", nullable: true, comment: "扩展属性,用于存储自定义字段,JSON格式") + }, + constraints: table => + { + table.PrimaryKey("PK_ServiceProDeviceInfo", x => x.Id); + }, + comment: "设备信息"); + + migrationBuilder.CreateTable( + name: "ServiceProDeviceThingModelCommandInfo", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + DeviceThingModelId = table.Column(type: "uuid", nullable: false, comment: "设备端物模型Id"), + IoTPlatform = table.Column(type: "integer", nullable: false, comment: "物联网平台类型"), + IoTPlatformProductId = table.Column(type: "character varying(50)", maxLength: 50, nullable: false, comment: "物联网平台中对应的产品Id"), + CommandName = table.Column(type: "character varying(256)", maxLength: 256, nullable: false, comment: "指令名称"), + IssueCommand = table.Column(type: "character varying(512)", maxLength: 512, nullable: false, comment: "完整的单个下发指令"), + PropertyArray = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: false, comment: "指令设备端物模型的属性名称集合,JSON格式字符串数组"), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true), + LastModificationTime = table.Column(type: "timestamp with time zone", nullable: true), + LastModifierId = table.Column(type: "uuid", nullable: true), + IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uuid", nullable: true), + DeletionTime = table.Column(type: "timestamp with time zone", nullable: true), + TenantId = table.Column(type: "uuid", nullable: true, comment: "租户ID"), + Remark = table.Column(type: "text", nullable: true, comment: "备注"), + OSACreatorId = table.Column(type: "integer", nullable: true, comment: "旧系统授权创建者Id"), + OSALastModifierId = table.Column(type: "integer", nullable: true, comment: "旧系统授权最后修改者Id"), + OSADeleterId = table.Column(type: "integer", nullable: true, comment: "旧系统授权最后删除者Id"), + ExtraProperties = table.Column(type: "text", nullable: true, comment: "扩展属性,用于存储自定义字段,JSON格式") + }, + constraints: table => + { + table.PrimaryKey("PK_ServiceProDeviceThingModelCommandInfo", x => x.Id); + }, + comment: "设备端透传指令详情"); + + migrationBuilder.CreateTable( + name: "ServiceProDeviceThingModelManagement", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + DeviceModelName = table.Column(type: "character varying(50)", maxLength: 50, nullable: false, comment: "设备端物模型名称"), + IoTPlatform = table.Column(type: "integer", nullable: false, comment: "物联网平台类型,默认没有指定"), + IoTPlatformProductId = table.Column(type: "character varying(50)", maxLength: 50, nullable: false, comment: "物联网平台中对应的产品Id"), + ScriptName = table.Column(type: "character varying(64)", maxLength: 64, nullable: false, comment: "脚本函数名称"), + FunctionScript = table.Column(type: "text", nullable: true, comment: "脚本函数体"), + FunctionAnalysisFlag = table.Column(type: "boolean", nullable: false, comment: "函数解析标记,默认为false, 不能解析"), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true), + LastModificationTime = table.Column(type: "timestamp with time zone", nullable: true), + LastModifierId = table.Column(type: "uuid", nullable: true), + IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uuid", nullable: true), + DeletionTime = table.Column(type: "timestamp with time zone", nullable: true), + TenantId = table.Column(type: "uuid", nullable: true, comment: "租户ID"), + Remark = table.Column(type: "text", nullable: true, comment: "备注"), + OSACreatorId = table.Column(type: "integer", nullable: true, comment: "旧系统授权创建者Id"), + OSALastModifierId = table.Column(type: "integer", nullable: true, comment: "旧系统授权最后修改者Id"), + OSADeleterId = table.Column(type: "integer", nullable: true, comment: "旧系统授权最后删除者Id"), + ExtraProperties = table.Column(type: "text", nullable: true, comment: "扩展属性,用于存储自定义字段,JSON格式") + }, + constraints: table => + { + table.PrimaryKey("PK_ServiceProDeviceThingModelManagement", x => x.Id); + }, + comment: "设备端物模型管理"); + + migrationBuilder.CreateTable( + name: "ServiceProDeviceThingModelPropertylInfo", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + DeviceThingModelId = table.Column(type: "uuid", nullable: false, comment: "设备端物模型Id"), + IoTPlatform = table.Column(type: "integer", nullable: false, comment: "物联网平台类型"), + IoTPlatformProductId = table.Column(type: "character varying(50)", maxLength: 50, nullable: false, comment: "物联网平台中对应的产品Id"), + IoTPlatformThingModelDataId = table.Column(type: "uuid", nullable: false, comment: "系统中平台端物模型数据Id"), + FiledType = table.Column(type: "character varying(50)", maxLength: 50, nullable: false, comment: "物联网平台中对应产品物模型属性或者事件类型"), + IoTPlatformRawFieldName = table.Column(type: "character varying(64)", maxLength: 64, nullable: false, comment: "物联网平台中对应的产品物模型属性或者事件名称"), + IoTPlatformRawFieldDataType = table.Column(type: "character varying(20)", maxLength: 20, nullable: true, comment: "物联网平台中对应的产品物模型属性或者事件数据类型"), + StandardFieldName = table.Column(type: "character varying(64)", maxLength: 64, nullable: false, comment: "管理后台产品标准的物模型属性或者事件名称"), + StandardFieldValueType = table.Column(type: "character varying(20)", maxLength: 20, nullable: false, comment: "标准物模型字段值类型"), + StandardFieldDisplayName = table.Column(type: "character varying(64)", maxLength: 64, nullable: false, comment: "管理后台产品标准的物模型属性或者事件名称"), + IsValueNeedConvert = table.Column(type: "boolean", nullable: false, comment: "是否需要值类型转换"), + NativeSkipNumber = table.Column(type: "integer", nullable: false, comment: "正序跳过数量"), + NativeTakeNumber = table.Column(type: "integer", nullable: false, comment: "正序获取数量"), + ParsingSequence = table.Column(type: "integer", nullable: false, comment: "解析顺序,1234或者3412(高低反转)"), + ReversalSkipNumber = table.Column(type: "integer", nullable: true, comment: "反转跳过数量"), + ReversalTakeNumber = table.Column(type: "integer", nullable: true, comment: "反转获取数量"), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true), + LastModificationTime = table.Column(type: "timestamp with time zone", nullable: true), + LastModifierId = table.Column(type: "uuid", nullable: true), + IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uuid", nullable: true), + DeletionTime = table.Column(type: "timestamp with time zone", nullable: true), + TenantId = table.Column(type: "uuid", nullable: true, comment: "租户ID"), + Remark = table.Column(type: "text", nullable: true, comment: "备注"), + OSACreatorId = table.Column(type: "integer", nullable: true, comment: "旧系统授权创建者Id"), + OSALastModifierId = table.Column(type: "integer", nullable: true, comment: "旧系统授权最后修改者Id"), + OSADeleterId = table.Column(type: "integer", nullable: true, comment: "旧系统授权最后删除者Id"), + ExtraProperties = table.Column(type: "text", nullable: true, comment: "扩展属性,用于存储自定义字段,JSON格式") + }, + constraints: table => + { + table.PrimaryKey("PK_ServiceProDeviceThingModelPropertylInfo", x => x.Id); + }, + comment: "设备端物模型属性信息,是指设备端支持的属性或者事件"); + + migrationBuilder.CreateTable( + name: "ServiceProDeviceUpgradeRecord", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + DeviceName = table.Column(type: "character varying(50)", maxLength: 50, nullable: false, comment: "设备名称"), + DeviceAddress = table.Column(type: "character varying(50)", maxLength: 50, nullable: false, comment: "设备地址"), + OldFirmwareVersion = table.Column(type: "character varying(50)", maxLength: 50, nullable: false, comment: "旧的固件版本"), + NowFirmwareVersion = table.Column(type: "character varying(50)", maxLength: 50, nullable: false, comment: "当前固件版本"), + UpgradeDate = table.Column(type: "timestamp with time zone", nullable: false, comment: "升级日期"), + UpgradeSource = table.Column(type: "integer", nullable: false, comment: "升级来源"), + UpgradeMessage = table.Column(type: "character varying(512)", maxLength: 512, nullable: false, comment: "升级信息"), + UpgradeStatus = table.Column(type: "integer", nullable: false, comment: "升级状态"), + UpgradeIdentifier = table.Column(type: "bigint", nullable: false, comment: "升级标识符号"), + FirmwareSignature = table.Column(type: "character varying(50)", maxLength: 50, nullable: false, comment: "签名校验值"), + UpgradeResult = table.Column(type: "integer", nullable: true, comment: "升级结果"), + UpgradeDescription = table.Column(type: "character varying(512)", maxLength: 512, nullable: false, comment: "升级描述"), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true), + LastModificationTime = table.Column(type: "timestamp with time zone", nullable: true), + LastModifierId = table.Column(type: "uuid", nullable: true), + IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uuid", nullable: true), + DeletionTime = table.Column(type: "timestamp with time zone", nullable: true), + TenantId = table.Column(type: "uuid", nullable: true, comment: "租户ID"), + Remark = table.Column(type: "text", nullable: true, comment: "备注"), + OSACreatorId = table.Column(type: "integer", nullable: true, comment: "旧系统授权创建者Id"), + OSALastModifierId = table.Column(type: "integer", nullable: true, comment: "旧系统授权最后修改者Id"), + OSADeleterId = table.Column(type: "integer", nullable: true, comment: "旧系统授权最后删除者Id"), + ExtraProperties = table.Column(type: "text", nullable: true, comment: "扩展属性,用于存储自定义字段,JSON格式") + }, + constraints: table => + { + table.PrimaryKey("PK_ServiceProDeviceUpgradeRecord", x => x.Id); + }, + comment: "设备升级记录"); + + migrationBuilder.CreateTable( + name: "ServiceProIoTPlatformThingModelInfo", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + IoTPlatform = table.Column(type: "integer", nullable: false, comment: "物联网平台类型,默认没有指定"), + IoTPlatformProductId = table.Column(type: "character varying(50)", maxLength: 50, nullable: false, comment: "物联网平台中对应的产品Id"), + FiledType = table.Column(type: "character varying(50)", maxLength: 50, nullable: false, comment: "物联网平台中对应产品物模型属性或者事件类型"), + IoTPlatformRawFieldName = table.Column(type: "character varying(64)", maxLength: 64, nullable: false, comment: "物联网平台中对应的产品物模型属性或者事件名称"), + IoTPlatformRawFieldDataType = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, comment: "物联网平台中对应的产品物模型属性或者事件数据类型"), + StandardFieldName = table.Column(type: "character varying(64)", maxLength: 64, nullable: false, comment: "管理后台产品标准的物模型属性或者事件名称"), + StandardFieldValueType = table.Column(type: "character varying(20)", maxLength: 20, nullable: false, comment: "标准物模型字段值类型"), + StandardFieldDisplayName = table.Column(type: "character varying(64)", maxLength: 64, nullable: false, comment: "管理后台产品标准的物模型属性或者事件名称"), + IsValueNeedConvert = table.Column(type: "boolean", nullable: false, comment: "是否需要值类型转换"), + IsSpecialIdentifier = table.Column(type: "boolean", nullable: false, comment: "是否是特殊物模型标识符"), + IoTPlatformRawFieldExtension = table.Column(type: "text", nullable: true, comment: "物联网平台中对应产品物模型标识符扩展,用于扩展结构体类型"), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true), + LastModificationTime = table.Column(type: "timestamp with time zone", nullable: true), + LastModifierId = table.Column(type: "uuid", nullable: true), + IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uuid", nullable: true), + DeletionTime = table.Column(type: "timestamp with time zone", nullable: true), + TenantId = table.Column(type: "uuid", nullable: true, comment: "租户ID"), + Remark = table.Column(type: "text", nullable: true, comment: "备注"), + OSACreatorId = table.Column(type: "integer", nullable: true, comment: "旧系统授权创建者Id"), + OSALastModifierId = table.Column(type: "integer", nullable: true, comment: "旧系统授权最后修改者Id"), + OSADeleterId = table.Column(type: "integer", nullable: true, comment: "旧系统授权最后删除者Id"), + ExtraProperties = table.Column(type: "text", nullable: true, comment: "扩展属性,用于存储自定义字段,JSON格式") + }, + constraints: table => + { + table.PrimaryKey("PK_ServiceProIoTPlatformThingModelInfo", x => x.Id); + }, + comment: "平台端物模型信息"); + + migrationBuilder.CreateTable( + name: "ServiceProMenus", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + ParentId = table.Column(type: "uuid", nullable: true), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, comment: "唯一编码"), + Title = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, comment: "标题"), + DisplayTitle = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, comment: "标准多语言"), + Icon = table.Column(type: "text", nullable: true, comment: "图标"), + KeepAlive = table.Column(type: "boolean", nullable: false, comment: "是否缓存"), + HideInMenu = table.Column(type: "boolean", nullable: false, comment: "是否显示"), + Order = table.Column(type: "integer", nullable: false, comment: "排序"), + Path = table.Column(type: "character varying(512)", maxLength: 512, nullable: false, comment: "路由/接口地址"), + MenuType = table.Column(type: "integer", nullable: false, comment: "菜单类型"), + OpenType = table.Column(type: "integer", nullable: false, comment: "打开类型"), + Url = table.Column(type: "text", nullable: true, comment: "内外链地址"), + Component = table.Column(type: "character varying(512)", maxLength: 512, nullable: true, comment: "组件地址"), + Policy = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, comment: "授权策略名称"), + Enabled = table.Column(type: "boolean", nullable: false), + ExtraProperties = table.Column(type: "text", nullable: false), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true), + LastModificationTime = table.Column(type: "timestamp with time zone", nullable: true), + LastModifierId = table.Column(type: "uuid", nullable: true), + IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uuid", nullable: true), + DeletionTime = table.Column(type: "timestamp with time zone", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_ServiceProMenus", x => x.Id); + }, + comment: "动态菜单管理"); + + migrationBuilder.CreateTable( + name: "ServiceProOneNETAccountInfo", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + AccountName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, comment: "账号名称"), + OneNETAccountId = table.Column(type: "character varying(50)", maxLength: 50, nullable: false, comment: "账户Id"), + PhoneNumber = table.Column(type: "character varying(50)", maxLength: 50, nullable: false, comment: "手机号码"), + AccountAccesskey = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: false, comment: "账户通信密钥,平台可以重置密钥"), + ProductCount = table.Column(type: "integer", nullable: false, comment: "产品数量"), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true), + LastModificationTime = table.Column(type: "timestamp with time zone", nullable: true), + LastModifierId = table.Column(type: "uuid", nullable: true), + IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uuid", nullable: true), + DeletionTime = table.Column(type: "timestamp with time zone", nullable: true), + TenantId = table.Column(type: "uuid", nullable: true, comment: "租户ID"), + Remark = table.Column(type: "text", nullable: true, comment: "备注"), + OSACreatorId = table.Column(type: "integer", nullable: true, comment: "旧系统授权创建者Id"), + OSALastModifierId = table.Column(type: "integer", nullable: true, comment: "旧系统授权最后修改者Id"), + OSADeleterId = table.Column(type: "integer", nullable: true, comment: "旧系统授权最后删除者Id"), + ExtraProperties = table.Column(type: "text", nullable: true, comment: "扩展属性,用于存储自定义字段,JSON格式") + }, + constraints: table => + { + table.PrimaryKey("PK_ServiceProOneNETAccountInfo", x => x.Id); + }, + comment: "OneNET账号管理"); + + migrationBuilder.CreateTable( + name: "ServiceProOneNETProductInfo", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + OneNETAccountId = table.Column(type: "character varying(50)", maxLength: 50, nullable: false, comment: "账户Id"), + AccountPhoneNumber = table.Column(type: "character varying(50)", maxLength: 50, nullable: true, comment: "账户手机号"), + IoTPlatformProductId = table.Column(type: "character varying(50)", maxLength: 50, nullable: false, comment: "物联网平台对应的产品Id"), + ProductName = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, comment: "产品名称"), + ProductAccesskey = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: false, comment: "产品访问密钥"), + ThingModelFileId = table.Column(type: "uuid", nullable: true, comment: "物模型文件Id"), + ThingModelFileName = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, comment: "物模型文件名称"), + IsEnabled = table.Column(type: "boolean", nullable: false), + AccessProtocol = table.Column(type: "integer", nullable: false, comment: "接入协议"), + DataProtocol = table.Column(type: "integer", nullable: false, comment: "数据协议"), + NodeType = table.Column(type: "integer", nullable: false, comment: "节点类型"), + ProductCreateTime = table.Column(type: "timestamp with time zone", nullable: true, comment: "产品创建时间"), + ProductUpdateTime = table.Column(type: "timestamp with time zone", nullable: true, comment: "最近修改时间"), + Network = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, comment: "联网方式"), + Manufacturer = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, comment: "产品厂商"), + Model = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, comment: "产品型号"), + Brand = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, comment: "产品品牌"), + Status = table.Column(type: "integer", nullable: false, comment: "开发状态"), + OwnDeviceCount = table.Column(type: "integer", nullable: false, comment: "自有设备总数"), + OnlineDeviceCount = table.Column(type: "integer", nullable: false, comment: "在线设备总数"), + OfflineDeviceCount = table.Column(type: "integer", nullable: false, comment: "离线设备数"), + NotActiveDeviceCount = table.Column(type: "integer", nullable: false, comment: "未激活设备数"), + CommunicationAddress = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, comment: "通讯服务地址"), + CommunicationAddressTLS = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, comment: "TLS通讯服务地址"), + ThingModelInfos = table.Column(type: "text", nullable: true, comment: "平台物模型信息"), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true), + LastModificationTime = table.Column(type: "timestamp with time zone", nullable: true), + LastModifierId = table.Column(type: "uuid", nullable: true), + IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uuid", nullable: true), + DeletionTime = table.Column(type: "timestamp with time zone", nullable: true), + TenantId = table.Column(type: "uuid", nullable: true, comment: "租户ID"), + Remark = table.Column(type: "text", nullable: true, comment: "备注"), + OSACreatorId = table.Column(type: "integer", nullable: true, comment: "旧系统授权创建者Id"), + OSALastModifierId = table.Column(type: "integer", nullable: true, comment: "旧系统授权最后修改者Id"), + OSADeleterId = table.Column(type: "integer", nullable: true, comment: "旧系统授权最后删除者Id"), + ExtraProperties = table.Column(type: "text", nullable: true, comment: "扩展属性,用于存储自定义字段,JSON格式") + }, + constraints: table => + { + table.PrimaryKey("PK_ServiceProOneNETProductInfo", x => x.Id); + }, + comment: "OneNET产品管理"); + + migrationBuilder.CreateTable( + name: "ServiceProSubDeviceManagementInfo", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + DeviceDataId = table.Column(type: "uuid", nullable: false, comment: "网关设备或直连设备数据Id"), + DeviceAddress = table.Column(type: "character varying(40)", maxLength: 40, nullable: false, comment: "网关设备或直连设备地址"), + SubDeviceName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, comment: "子设备名称"), + SubDeviceAddress = table.Column(type: "character varying(40)", maxLength: 40, nullable: false, comment: "子设备地址"), + SubDeviceIndex = table.Column(type: "integer", nullable: false, comment: "子设备索引,抑或是主设备下唯一标识符、计量代码"), + SubDeviceBrandCode = table.Column(type: "character varying(50)", maxLength: 50, nullable: false, comment: "子设备品牌编码"), + BusinessSystemSubDeviceDataId = table.Column(type: "bigint", nullable: true, comment: "业务系统子设备数据Id"), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true), + LastModificationTime = table.Column(type: "timestamp with time zone", nullable: true), + LastModifierId = table.Column(type: "uuid", nullable: true), + IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uuid", nullable: true), + DeletionTime = table.Column(type: "timestamp with time zone", nullable: true), + TenantId = table.Column(type: "uuid", nullable: true, comment: "租户ID"), + Remark = table.Column(type: "text", nullable: true, comment: "备注"), + OSACreatorId = table.Column(type: "integer", nullable: true, comment: "旧系统授权创建者Id"), + OSALastModifierId = table.Column(type: "integer", nullable: true, comment: "旧系统授权最后修改者Id"), + OSADeleterId = table.Column(type: "integer", nullable: true, comment: "旧系统授权最后删除者Id"), + ExtraProperties = table.Column(type: "text", nullable: true, comment: "扩展属性,用于存储自定义字段,JSON格式") + }, + constraints: table => + { + table.PrimaryKey("PK_ServiceProSubDeviceManagementInfo", x => x.Id); + }, + comment: "子设备信息"); + + migrationBuilder.CreateTable( + name: "ServiceProTextTemplates", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, comment: "名称"), + Code = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, comment: "编码"), + Content = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: false, comment: "内容"), + CultureName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, comment: "语言"), + ExtraProperties = table.Column(type: "text", nullable: false), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true), + LastModificationTime = table.Column(type: "timestamp with time zone", nullable: true), + LastModifierId = table.Column(type: "uuid", nullable: true), + IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uuid", nullable: true), + DeletionTime = table.Column(type: "timestamp with time zone", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_ServiceProTextTemplates", x => x.Id); + }, + comment: "模板管理"); + + migrationBuilder.CreateTable( + name: "ServiceProUserRefreshTokens", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + UserId = table.Column(type: "uuid", nullable: false, comment: "用户id"), + TenantId = table.Column(type: "uuid", nullable: true), + RefreshToken = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, comment: "刷新token"), + Token = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: false, comment: "Token"), + IsUsed = table.Column(type: "boolean", nullable: false, comment: "是否使用"), + ExpirationTime = table.Column(type: "timestamp with time zone", nullable: false, comment: "过期时间"), + ExtraProperties = table.Column(type: "text", nullable: false), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true), + LastModificationTime = table.Column(type: "timestamp with time zone", nullable: true), + LastModifierId = table.Column(type: "uuid", nullable: true), + IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uuid", nullable: true), + DeletionTime = table.Column(type: "timestamp with time zone", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_ServiceProUserRefreshTokens", x => x.Id); + }, + comment: "刷新Token"); + + migrationBuilder.CreateTable( + name: "AbpAuditLogActions", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + AuditLogId = table.Column(type: "uuid", nullable: false), + ServiceName = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), + MethodName = table.Column(type: "character varying(128)", maxLength: 128, nullable: true), + Parameters = table.Column(type: "character varying(2000)", maxLength: 2000, nullable: true), + ExecutionTime = table.Column(type: "timestamp with time zone", nullable: false), + ExecutionDuration = table.Column(type: "integer", nullable: false), + ExtraProperties = table.Column(type: "text", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpAuditLogActions", x => x.Id); + table.ForeignKey( + name: "FK_AbpAuditLogActions_AbpAuditLogs_AuditLogId", + column: x => x.AuditLogId, + principalTable: "AbpAuditLogs", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpEntityChanges", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + AuditLogId = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + ChangeTime = table.Column(type: "timestamp with time zone", nullable: false), + ChangeType = table.Column(type: "smallint", nullable: false), + EntityTenantId = table.Column(type: "uuid", nullable: true), + EntityId = table.Column(type: "character varying(128)", maxLength: 128, nullable: true), + EntityTypeFullName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + ExtraProperties = table.Column(type: "text", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpEntityChanges", x => x.Id); + table.ForeignKey( + name: "FK_AbpEntityChanges_AbpAuditLogs_AuditLogId", + column: x => x.AuditLogId, + principalTable: "AbpAuditLogs", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpDataDictionaryDetails", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + DataDictionaryId = table.Column(type: "uuid", nullable: false), + Code = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), + Order = table.Column(type: "integer", nullable: false), + DisplayText = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + Description = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true), + IsEnabled = table.Column(type: "boolean", nullable: false), + ExtendedAttribute = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true), + LastModificationTime = table.Column(type: "timestamp with time zone", nullable: true), + LastModifierId = table.Column(type: "uuid", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpDataDictionaryDetails", x => x.Id); + table.ForeignKey( + name: "FK_AbpDataDictionaryDetails_AbpDataDictionaries_DataDictionary~", + column: x => x.DataDictionaryId, + principalTable: "AbpDataDictionaries", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }, + comment: "数据字典详情"); + + migrationBuilder.CreateTable( + name: "AbpOrganizationUnitRoles", + columns: table => new + { + RoleId = table.Column(type: "uuid", nullable: false), + OrganizationUnitId = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpOrganizationUnitRoles", x => new { x.OrganizationUnitId, x.RoleId }); + table.ForeignKey( + name: "FK_AbpOrganizationUnitRoles_AbpOrganizationUnits_OrganizationU~", + column: x => x.OrganizationUnitId, + principalTable: "AbpOrganizationUnits", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_AbpOrganizationUnitRoles_AbpRoles_RoleId", + column: x => x.RoleId, + principalTable: "AbpRoles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpRoleClaims", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + RoleId = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + ClaimType = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + ClaimValue = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpRoleClaims", x => x.Id); + table.ForeignKey( + name: "FK_AbpRoleClaims_AbpRoles_RoleId", + column: x => x.RoleId, + principalTable: "AbpRoles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpTenantConnectionStrings", + columns: table => new + { + TenantId = table.Column(type: "uuid", nullable: false), + Name = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), + Value = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpTenantConnectionStrings", x => new { x.TenantId, x.Name }); + table.ForeignKey( + name: "FK_AbpTenantConnectionStrings_AbpTenants_TenantId", + column: x => x.TenantId, + principalTable: "AbpTenants", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpUserClaims", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + UserId = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + ClaimType = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + ClaimValue = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUserClaims", x => x.Id); + table.ForeignKey( + name: "FK_AbpUserClaims_AbpUsers_UserId", + column: x => x.UserId, + principalTable: "AbpUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpUserLogins", + columns: table => new + { + UserId = table.Column(type: "uuid", nullable: false), + LoginProvider = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + ProviderKey = table.Column(type: "character varying(196)", maxLength: 196, nullable: false), + ProviderDisplayName = table.Column(type: "character varying(128)", maxLength: 128, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUserLogins", x => new { x.UserId, x.LoginProvider }); + table.ForeignKey( + name: "FK_AbpUserLogins_AbpUsers_UserId", + column: x => x.UserId, + principalTable: "AbpUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpUserOrganizationUnits", + columns: table => new + { + UserId = table.Column(type: "uuid", nullable: false), + OrganizationUnitId = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUserOrganizationUnits", x => new { x.OrganizationUnitId, x.UserId }); + table.ForeignKey( + name: "FK_AbpUserOrganizationUnits_AbpOrganizationUnits_OrganizationU~", + column: x => x.OrganizationUnitId, + principalTable: "AbpOrganizationUnits", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_AbpUserOrganizationUnits_AbpUsers_UserId", + column: x => x.UserId, + principalTable: "AbpUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpUserRoles", + columns: table => new + { + UserId = table.Column(type: "uuid", nullable: false), + RoleId = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUserRoles", x => new { x.UserId, x.RoleId }); + table.ForeignKey( + name: "FK_AbpUserRoles_AbpRoles_RoleId", + column: x => x.RoleId, + principalTable: "AbpRoles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_AbpUserRoles_AbpUsers_UserId", + column: x => x.UserId, + principalTable: "AbpUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpUserTokens", + columns: table => new + { + UserId = table.Column(type: "uuid", nullable: false), + LoginProvider = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + Value = table.Column(type: "text", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUserTokens", x => new { x.UserId, x.LoginProvider, x.Name }); + table.ForeignKey( + name: "FK_AbpUserTokens_AbpUsers_UserId", + column: x => x.UserId, + principalTable: "AbpUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpEntityPropertyChanges", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + EntityChangeId = table.Column(type: "uuid", nullable: false), + NewValue = table.Column(type: "character varying(512)", maxLength: 512, nullable: true), + OriginalValue = table.Column(type: "character varying(512)", maxLength: 512, nullable: true), + PropertyName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + PropertyTypeFullName = table.Column(type: "character varying(64)", maxLength: 64, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpEntityPropertyChanges", x => x.Id); + table.ForeignKey( + name: "FK_AbpEntityPropertyChanges_AbpEntityChanges_EntityChangeId", + column: x => x.EntityChangeId, + principalTable: "AbpEntityChanges", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateIndex( + name: "IX_AbpAuditLogActions_AuditLogId", + table: "AbpAuditLogActions", + column: "AuditLogId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpAuditLogActions_TenantId_ServiceName_MethodName_Executio~", + table: "AbpAuditLogActions", + columns: new[] { "TenantId", "ServiceName", "MethodName", "ExecutionTime" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpAuditLogs_TenantId_ExecutionTime", + table: "AbpAuditLogs", + columns: new[] { "TenantId", "ExecutionTime" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpAuditLogs_TenantId_UserId_ExecutionTime", + table: "AbpAuditLogs", + columns: new[] { "TenantId", "UserId", "ExecutionTime" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpBackgroundJobs_IsAbandoned_NextTryTime", + table: "AbpBackgroundJobs", + columns: new[] { "IsAbandoned", "NextTryTime" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpDataDictionaryDetails_DataDictionaryId", + table: "AbpDataDictionaryDetails", + column: "DataDictionaryId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpEntityChanges_AuditLogId", + table: "AbpEntityChanges", + column: "AuditLogId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpEntityChanges_TenantId_EntityTypeFullName_EntityId", + table: "AbpEntityChanges", + columns: new[] { "TenantId", "EntityTypeFullName", "EntityId" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpEntityPropertyChanges_EntityChangeId", + table: "AbpEntityPropertyChanges", + column: "EntityChangeId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpFeatureGroups_Name", + table: "AbpFeatureGroups", + column: "Name", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_AbpFeatures_GroupName", + table: "AbpFeatures", + column: "GroupName"); + + migrationBuilder.CreateIndex( + name: "IX_AbpFeatures_Name", + table: "AbpFeatures", + column: "Name", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_AbpFeatureValues_Name_ProviderName_ProviderKey", + table: "AbpFeatureValues", + columns: new[] { "Name", "ProviderName", "ProviderKey" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_AbpFileObjects_FileName", + table: "AbpFileObjects", + column: "FileName"); + + migrationBuilder.CreateIndex( + name: "IX_AbpLanguages_CultureName", + table: "AbpLanguages", + column: "CultureName"); + + migrationBuilder.CreateIndex( + name: "IX_AbpLanguageTexts_TenantId_ResourceName_CultureName", + table: "AbpLanguageTexts", + columns: new[] { "TenantId", "ResourceName", "CultureName" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpLinkUsers_SourceUserId_SourceTenantId_TargetUserId_Targe~", + table: "AbpLinkUsers", + columns: new[] { "SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_AbpNotificationSubscriptions_NotificationId", + table: "AbpNotificationSubscriptions", + column: "NotificationId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpNotificationSubscriptions_ReceiveUserId", + table: "AbpNotificationSubscriptions", + column: "ReceiveUserId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpOrganizationUnitRoles_RoleId_OrganizationUnitId", + table: "AbpOrganizationUnitRoles", + columns: new[] { "RoleId", "OrganizationUnitId" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpOrganizationUnits_Code", + table: "AbpOrganizationUnits", + column: "Code"); + + migrationBuilder.CreateIndex( + name: "IX_AbpOrganizationUnits_ParentId", + table: "AbpOrganizationUnits", + column: "ParentId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpPermissionGrants_TenantId_Name_ProviderName_ProviderKey", + table: "AbpPermissionGrants", + columns: new[] { "TenantId", "Name", "ProviderName", "ProviderKey" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_AbpPermissionGroups_Name", + table: "AbpPermissionGroups", + column: "Name", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_AbpPermissions_GroupName", + table: "AbpPermissions", + column: "GroupName"); + + migrationBuilder.CreateIndex( + name: "IX_AbpPermissions_Name", + table: "AbpPermissions", + column: "Name", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_AbpRoleClaims_RoleId", + table: "AbpRoleClaims", + column: "RoleId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpRoles_NormalizedName", + table: "AbpRoles", + column: "NormalizedName"); + + migrationBuilder.CreateIndex( + name: "IX_AbpSecurityLogs_TenantId_Action", + table: "AbpSecurityLogs", + columns: new[] { "TenantId", "Action" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpSecurityLogs_TenantId_ApplicationName", + table: "AbpSecurityLogs", + columns: new[] { "TenantId", "ApplicationName" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpSecurityLogs_TenantId_Identity", + table: "AbpSecurityLogs", + columns: new[] { "TenantId", "Identity" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpSecurityLogs_TenantId_UserId", + table: "AbpSecurityLogs", + columns: new[] { "TenantId", "UserId" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpSessions_Device", + table: "AbpSessions", + column: "Device"); + + migrationBuilder.CreateIndex( + name: "IX_AbpSessions_SessionId", + table: "AbpSessions", + column: "SessionId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpSessions_TenantId_UserId", + table: "AbpSessions", + columns: new[] { "TenantId", "UserId" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpSettingDefinitions_Name", + table: "AbpSettingDefinitions", + column: "Name", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_AbpSettings_Name_ProviderName_ProviderKey", + table: "AbpSettings", + columns: new[] { "Name", "ProviderName", "ProviderKey" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_AbpTenants_Name", + table: "AbpTenants", + column: "Name"); + + migrationBuilder.CreateIndex( + name: "IX_AbpTenants_NormalizedName", + table: "AbpTenants", + column: "NormalizedName"); + + migrationBuilder.CreateIndex( + name: "IX_AbpUserClaims_UserId", + table: "AbpUserClaims", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpUserLogins_LoginProvider_ProviderKey", + table: "AbpUserLogins", + columns: new[] { "LoginProvider", "ProviderKey" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpUserOrganizationUnits_UserId_OrganizationUnitId", + table: "AbpUserOrganizationUnits", + columns: new[] { "UserId", "OrganizationUnitId" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpUserRoles_RoleId_UserId", + table: "AbpUserRoles", + columns: new[] { "RoleId", "UserId" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpUsers_Email", + table: "AbpUsers", + column: "Email"); + + migrationBuilder.CreateIndex( + name: "IX_AbpUsers_NormalizedEmail", + table: "AbpUsers", + column: "NormalizedEmail"); + + migrationBuilder.CreateIndex( + name: "IX_AbpUsers_NormalizedUserName", + table: "AbpUsers", + column: "NormalizedUserName"); + + migrationBuilder.CreateIndex( + name: "IX_AbpUsers_UserName", + table: "AbpUsers", + column: "UserName"); + + migrationBuilder.CreateIndex( + name: "IX_ServiceProCTWingAccountInfo_CreationTime", + table: "ServiceProCTWingAccountInfo", + column: "CreationTime"); + + migrationBuilder.CreateIndex( + name: "IX_ServiceProCTWingAccountInfo_IsNotUniqueKey", + table: "ServiceProCTWingAccountInfo", + columns: new[] { "Id", "AccountId", "AccountName", "CreationTime" }, + descending: new bool[0]); + + migrationBuilder.CreateIndex( + name: "IX_ServiceProCTWingPrivateProductInfo_CreationTime", + table: "ServiceProCTWingPrivateProductInfo", + column: "CreationTime"); + + migrationBuilder.CreateIndex( + name: "IX_ServiceProCTWingPrivateProductInfo_IsNotUniqueKey", + table: "ServiceProCTWingPrivateProductInfo", + columns: new[] { "Id", "IoTPlatformProductId", "ProductName", "CreationTime" }, + descending: new bool[0]); + + migrationBuilder.CreateIndex( + name: "IX_ServiceProDeviceFirmwareInfo_CreationTime", + table: "ServiceProDeviceFirmwareInfo", + column: "CreationTime"); + + migrationBuilder.CreateIndex( + name: "IX_ServiceProDeviceFirmwareInfo_IoTPlatformProductId", + table: "ServiceProDeviceFirmwareInfo", + column: "IoTPlatformProductId"); + + migrationBuilder.CreateIndex( + name: "IX_ServiceProDeviceFirmwareInfo_IsNotUniqueKey", + table: "ServiceProDeviceFirmwareInfo", + columns: new[] { "Id", "IoTPlatformProductId", "FirmwareVersion", "CreationTime" }, + descending: new bool[0]); + + migrationBuilder.CreateIndex( + name: "IX_ServiceProDeviceInfo_CreationTime", + table: "ServiceProDeviceInfo", + column: "CreationTime"); + + migrationBuilder.CreateIndex( + name: "IX_ServiceProDeviceInfo_DeviceAddress", + table: "ServiceProDeviceInfo", + column: "DeviceAddress"); + + migrationBuilder.CreateIndex( + name: "IX_ServiceProDeviceInfo_IsNotUniqueKey", + table: "ServiceProDeviceInfo", + columns: new[] { "Id", "DeviceName", "DeviceAddress", "IoTPlatformProductId", "CreationTime" }, + descending: new bool[0]); + + migrationBuilder.CreateIndex( + name: "IX_ServiceProDeviceThingModelCommandInfo_CreationTime", + table: "ServiceProDeviceThingModelCommandInfo", + column: "CreationTime"); + + migrationBuilder.CreateIndex( + name: "IX_ServiceProDeviceThingModelCommandInfo_DeviceThingModelId", + table: "ServiceProDeviceThingModelCommandInfo", + column: "DeviceThingModelId"); + + migrationBuilder.CreateIndex( + name: "IX_ServiceProIoTPlatformThingModelInfo_IsNotUniqueKey", + table: "ServiceProDeviceThingModelCommandInfo", + columns: new[] { "Id", "DeviceThingModelId", "IoTPlatformProductId", "CreationTime" }, + descending: new bool[0]); + + migrationBuilder.CreateIndex( + name: "IX_ServiceProDeviceThingModelManagement_CreationTime", + table: "ServiceProDeviceThingModelManagement", + column: "CreationTime"); + + migrationBuilder.CreateIndex( + name: "IX_ServiceProDeviceThingModelManagement_IoTPlatformProductId", + table: "ServiceProDeviceThingModelManagement", + column: "IoTPlatformProductId"); + + migrationBuilder.CreateIndex( + name: "IX_ServiceProIoTPlatformThingModelInfo_IsNotUniqueKey1", + table: "ServiceProDeviceThingModelManagement", + columns: new[] { "Id", "DeviceModelName", "IoTPlatformProductId", "CreationTime" }, + descending: new bool[0]); + + migrationBuilder.CreateIndex( + name: "IX_ServiceProDeviceThingModelPropertylInfo_CreationTime", + table: "ServiceProDeviceThingModelPropertylInfo", + column: "CreationTime"); + + migrationBuilder.CreateIndex( + name: "IX_ServiceProDeviceThingModelPropertylInfo_IoTPlatformProductId", + table: "ServiceProDeviceThingModelPropertylInfo", + column: "IoTPlatformProductId"); + + migrationBuilder.CreateIndex( + name: "IX_ServiceProIoTPlatformThingModelInfo_IsNotUniqueKey2", + table: "ServiceProDeviceThingModelPropertylInfo", + columns: new[] { "Id", "IoTPlatformProductId", "IoTPlatformRawFieldName", "StandardFieldName", "CreationTime" }, + descending: new bool[0]); + + migrationBuilder.CreateIndex( + name: "IX_ServiceProDeviceUpgradeRecord_CreationTime", + table: "ServiceProDeviceUpgradeRecord", + column: "CreationTime"); + + migrationBuilder.CreateIndex( + name: "IX_ServiceProDeviceUpgradeRecord_DeviceAddress", + table: "ServiceProDeviceUpgradeRecord", + column: "DeviceAddress"); + + migrationBuilder.CreateIndex( + name: "IX_ServiceProDeviceUpgradeRecord_IsNotUniqueKey", + table: "ServiceProDeviceUpgradeRecord", + columns: new[] { "Id", "DeviceAddress", "UpgradeIdentifier", "NowFirmwareVersion", "CreationTime" }, + descending: new bool[0]); + + migrationBuilder.CreateIndex( + name: "IX_ServiceProDeviceUpgradeRecord_UpgradeIdentifier", + table: "ServiceProDeviceUpgradeRecord", + column: "UpgradeIdentifier", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_ServiceProIoTPlatformThingModelInfo_CreationTime", + table: "ServiceProIoTPlatformThingModelInfo", + column: "CreationTime"); + + migrationBuilder.CreateIndex( + name: "IX_ServiceProIoTPlatformThingModelInfo_IoTPlatformProductId", + table: "ServiceProIoTPlatformThingModelInfo", + column: "IoTPlatformProductId"); + + migrationBuilder.CreateIndex( + name: "IX_ServiceProIoTPlatformThingModelInfo_IsNotUniqueKey3", + table: "ServiceProIoTPlatformThingModelInfo", + columns: new[] { "Id", "IoTPlatformProductId", "IoTPlatformRawFieldName", "StandardFieldName", "CreationTime" }, + descending: new bool[0]); + + migrationBuilder.CreateIndex( + name: "IX_Menus_IsNotUniqueKey", + table: "ServiceProMenus", + columns: new[] { "Id", "Name", "Path", "MenuType", "CreationTime" }, + descending: new bool[0]); + + migrationBuilder.CreateIndex( + name: "IX_ServiceProMenus_CreationTime", + table: "ServiceProMenus", + column: "CreationTime"); + + migrationBuilder.CreateIndex( + name: "IX_ServiceProMenus_Name", + table: "ServiceProMenus", + column: "Name"); + + migrationBuilder.CreateIndex( + name: "IX_ServiceProOneNETAccountInfo_CreationTime", + table: "ServiceProOneNETAccountInfo", + column: "CreationTime"); + + migrationBuilder.CreateIndex( + name: "IX_ServiceProOneNETAccountInfo_IsNotUniqueKey", + table: "ServiceProOneNETAccountInfo", + columns: new[] { "Id", "OneNETAccountId", "AccountName", "PhoneNumber", "CreationTime" }, + descending: new bool[0]); + + migrationBuilder.CreateIndex( + name: "IX_ServiceProOneNETProductInfo_CreationTime", + table: "ServiceProOneNETProductInfo", + column: "CreationTime"); + + migrationBuilder.CreateIndex( + name: "IX_ServiceProOneNETProductInfo_IoTPlatformProductId", + table: "ServiceProOneNETProductInfo", + column: "IoTPlatformProductId", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_ServiceProOneNETProductInfo_IsNotUniqueKey", + table: "ServiceProOneNETProductInfo", + columns: new[] { "Id", "IoTPlatformProductId", "ProductName", "CreationTime" }, + descending: new bool[0]); + + migrationBuilder.CreateIndex( + name: "IX_ServiceProSubDeviceManagementInfo_CreationTime", + table: "ServiceProSubDeviceManagementInfo", + column: "CreationTime"); + + migrationBuilder.CreateIndex( + name: "IX_ServiceProSubDeviceManagementInfo_DeviceAddress", + table: "ServiceProSubDeviceManagementInfo", + column: "DeviceAddress"); + + migrationBuilder.CreateIndex( + name: "IX_ServiceProSubDeviceManagementInfo_IsNotUniqueKey", + table: "ServiceProSubDeviceManagementInfo", + columns: new[] { "Id", "DeviceAddress", "SubDeviceIndex", "SubDeviceAddress", "CreationTime" }, + descending: new bool[0]); + + migrationBuilder.CreateIndex( + name: "IX_ServiceProSubDeviceManagementInfo_SubDeviceAddress", + table: "ServiceProSubDeviceManagementInfo", + column: "SubDeviceAddress"); + + migrationBuilder.CreateIndex( + name: "IX_ServiceProSubDeviceManagementInfo_SubDeviceIndex", + table: "ServiceProSubDeviceManagementInfo", + column: "SubDeviceIndex"); + + migrationBuilder.CreateIndex( + name: "IX_ServiceProTextTemplates_Code", + table: "ServiceProTextTemplates", + column: "Code"); + + migrationBuilder.CreateIndex( + name: "IX_ServiceProUserRefreshTokens_RefreshToken", + table: "ServiceProUserRefreshTokens", + column: "RefreshToken"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "AbpAuditLogActions"); + + migrationBuilder.DropTable( + name: "AbpAuditLogExcelFiles"); + + migrationBuilder.DropTable( + name: "AbpBackgroundJobs"); + + migrationBuilder.DropTable( + name: "AbpClaimTypes"); + + migrationBuilder.DropTable( + name: "AbpDataDictionaryDetails"); + + migrationBuilder.DropTable( + name: "AbpEntityPropertyChanges"); + + migrationBuilder.DropTable( + name: "AbpFeatureGroups"); + + migrationBuilder.DropTable( + name: "AbpFeatures"); + + migrationBuilder.DropTable( + name: "AbpFeatureValues"); + + migrationBuilder.DropTable( + name: "AbpFileObjects"); + + migrationBuilder.DropTable( + name: "AbpLanguages"); + + migrationBuilder.DropTable( + name: "AbpLanguageTexts"); + + migrationBuilder.DropTable( + name: "AbpLinkUsers"); + + migrationBuilder.DropTable( + name: "AbpNotifications"); + + migrationBuilder.DropTable( + name: "AbpNotificationSubscriptions"); + + migrationBuilder.DropTable( + name: "AbpOrganizationUnitRoles"); + + migrationBuilder.DropTable( + name: "AbpPermissionGrants"); + + migrationBuilder.DropTable( + name: "AbpPermissionGroups"); + + migrationBuilder.DropTable( + name: "AbpPermissions"); + + migrationBuilder.DropTable( + name: "AbpRoleClaims"); + + migrationBuilder.DropTable( + name: "AbpSecurityLogs"); + + migrationBuilder.DropTable( + name: "AbpSessions"); + + migrationBuilder.DropTable( + name: "AbpSettingDefinitions"); + + migrationBuilder.DropTable( + name: "AbpSettings"); + + migrationBuilder.DropTable( + name: "AbpTenantConnectionStrings"); + + migrationBuilder.DropTable( + name: "AbpUserClaims"); + + migrationBuilder.DropTable( + name: "AbpUserDelegations"); + + migrationBuilder.DropTable( + name: "AbpUserLogins"); + + migrationBuilder.DropTable( + name: "AbpUserOrganizationUnits"); + + migrationBuilder.DropTable( + name: "AbpUserRoles"); + + migrationBuilder.DropTable( + name: "AbpUserTokens"); + + migrationBuilder.DropTable( + name: "ServiceProCTWingAccountInfo"); + + migrationBuilder.DropTable( + name: "ServiceProCTWingPrivateProductInfo"); + + migrationBuilder.DropTable( + name: "ServiceProDeviceFirmwareInfo"); + + migrationBuilder.DropTable( + name: "ServiceProDeviceInfo"); + + migrationBuilder.DropTable( + name: "ServiceProDeviceThingModelCommandInfo"); + + migrationBuilder.DropTable( + name: "ServiceProDeviceThingModelManagement"); + + migrationBuilder.DropTable( + name: "ServiceProDeviceThingModelPropertylInfo"); + + migrationBuilder.DropTable( + name: "ServiceProDeviceUpgradeRecord"); + + migrationBuilder.DropTable( + name: "ServiceProIoTPlatformThingModelInfo"); + + migrationBuilder.DropTable( + name: "ServiceProMenus"); + + migrationBuilder.DropTable( + name: "ServiceProOneNETAccountInfo"); + + migrationBuilder.DropTable( + name: "ServiceProOneNETProductInfo"); + + migrationBuilder.DropTable( + name: "ServiceProSubDeviceManagementInfo"); + + migrationBuilder.DropTable( + name: "ServiceProTextTemplates"); + + migrationBuilder.DropTable( + name: "ServiceProUserRefreshTokens"); + + migrationBuilder.DropTable( + name: "AbpDataDictionaries"); + + migrationBuilder.DropTable( + name: "AbpEntityChanges"); + + migrationBuilder.DropTable( + name: "AbpTenants"); + + migrationBuilder.DropTable( + name: "AbpOrganizationUnits"); + + migrationBuilder.DropTable( + name: "AbpRoles"); + + migrationBuilder.DropTable( + name: "AbpUsers"); + + migrationBuilder.DropTable( + name: "AbpAuditLogs"); + } + } +} diff --git a/src/JiShe.IoT.EntityFrameworkCore/Migrations/IoTDbContextModelSnapshot.cs b/src/JiShe.IoT.EntityFrameworkCore/Migrations/IoTDbContextModelSnapshot.cs index fbf5859..8a7569d 100644 --- a/src/JiShe.IoT.EntityFrameworkCore/Migrations/IoTDbContextModelSnapshot.cs +++ b/src/JiShe.IoT.EntityFrameworkCore/Migrations/IoTDbContextModelSnapshot.cs @@ -3,8 +3,8 @@ using System; using JiShe.IoT.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; using Volo.Abp.EntityFrameworkCore; #nullable disable @@ -18,85 +18,85 @@ namespace JiShe.IoT.Migrations { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.PostgreSql) .HasAnnotation("ProductVersion", "9.0.11") - .HasAnnotation("Relational:MaxIdentifierLength", 64); + .HasAnnotation("Relational:MaxIdentifierLength", 63); - MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); modelBuilder.Entity("JiShe.ServicePro.BasicManagement.UserRefreshTokens.UserRefreshToken", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("ExpirationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasComment("过期时间"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("IsUsed") - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasComment("是否使用"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("RefreshToken") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("刷新token"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("Token") .IsRequired() .HasMaxLength(1024) - .HasColumnType("varchar(1024)") + .HasColumnType("character varying(1024)") .HasComment("Token"); b.Property("UserId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasComment("用户id"); b.HasKey("Id"); @@ -112,117 +112,117 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("JiShe.ServicePro.CTWingManagement.CTWingAccount.CTWingAccountInfo", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("AccountId") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("账号ID"); b.Property("AccountName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("账号名称"); b.Property("AppId") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("应用 ID"); b.Property("AppKey") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("应用 AppKey"); b.Property("AppSecret") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("应用 AppSecret"); b.Property("CommunicationAddress") .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("通讯服务地址"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("ExtraProperties") - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties") .HasComment("扩展属性,用于存储自定义字段,JSON格式"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("OSACreatorId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权创建者Id"); b.Property("OSADeleterId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权最后删除者Id"); b.Property("OSALastModifierId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权最后修改者Id"); b.Property("PhoneNumber") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("手机号码"); b.Property("PlatformTenantId") .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("平台租户ID"); b.Property("ProductCount") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("Remark") - .HasColumnType("longtext") + .HasColumnType("text") .HasComment("备注"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId") .HasComment("租户ID"); @@ -242,172 +242,175 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("JiShe.ServicePro.CTWingManagement.CTWingProduct.CTWingPrivateProductInfo", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("AccessType") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("AccountPhoneNumber") - .HasColumnType("longtext"); + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("账户手机号"); b.Property("AuthType") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("CTWingAccountId") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("账号ID"); b.Property("CommunicationAddress") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("通讯服务地址"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DataEncryption") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("DeviceCount") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("ExtraProperties") - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties") .HasComment("扩展属性,用于存储自定义字段,JSON格式"); b.Property("FeatureAccesskey") .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasComment("设备访问密钥"); b.Property("IoTPlatformProductId") .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("产品ID"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("IsEnabled") - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasComment("是否启用"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("MasterKey") .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasComment("OpenAPI 通信主密钥"); b.Property("NetworkType") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("NodeType") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("OSACreatorId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权创建者Id"); b.Property("OSADeleterId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权最后删除者Id"); b.Property("OSALastModifierId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权最后修改者Id"); b.Property("ProductDesc") .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("必填,产品描述"); b.Property("ProductName") .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("产品名称"); b.Property("ProductProtocol") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("ProductType") .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("一级分类名"); b.Property("Protocol") .HasMaxLength(20) - .HasColumnType("varchar(20)") + .HasColumnType("character varying(20)") .HasComment("通讯协议"); b.Property("Remark") - .HasColumnType("longtext") + .HasColumnType("text") .HasComment("备注"); b.Property("SecondaryType") .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("二级分类名"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId") .HasComment("租户ID"); b.Property("ThingModelFileId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasComment("物模型文件Id"); b.Property("ThingModelFileName") .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasComment("物模型文件名称"); b.Property("ThirdType") .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("三级分类名"); b.Property("TupDeviceModel") .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("设备型号"); b.Property("TupIsThrough") - .HasColumnType("int"); + .HasColumnType("integer"); b.HasKey("Id"); @@ -425,67 +428,67 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("JiShe.ServicePro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionary", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("Code") .IsRequired() .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("Description") .IsRequired() .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); + .HasColumnType("character varying(1024)"); b.Property("DisplayText") .IsRequired() .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -499,49 +502,49 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("JiShe.ServicePro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionaryDetail", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("Code") .IsRequired() .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DataDictionaryId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("Description") .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); + .HasColumnType("character varying(1024)"); b.Property("DisplayText") .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("ExtendedAttribute") .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("IsEnabled") - .HasColumnType("bit(1)"); + .HasColumnType("boolean"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("Order") - .HasColumnType("int"); + .HasColumnType("integer"); b.HasKey("Id"); @@ -556,48 +559,51 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.DeviceInfos.DeviceFirmwareInfo", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("ExtraProperties") - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties") .HasComment("扩展属性,用于存储自定义字段,JSON格式"); b.Property("FirmwareFileId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasComment("固件文件Id"); b.Property("FirmwareFileName") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasComment("固件文件名称"); b.Property("FirmwareHashCode") - .HasColumnType("longtext"); + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasComment("固件哈希值"); b.Property("FirmwareLength") .HasColumnType("bigint"); @@ -605,61 +611,61 @@ namespace JiShe.IoT.Migrations b.Property("FirmwareVersion") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("固件版本"); b.Property("IoTPlatform") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("物联网平台类型"); b.Property("IoTPlatformProductId") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("物联网平台中对应的产品Id"); b.Property("IoTPlatformProductName") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasComment("物联网平台中对应的产品名称"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); - b.Property("IsEnable") - .HasColumnType("tinyint(1)") + b.Property("IsEnable") + .HasColumnType("boolean") .HasComment("是否启用"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("OSACreatorId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权创建者Id"); b.Property("OSADeleterId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权最后删除者Id"); b.Property("OSALastModifierId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权最后修改者Id"); b.Property("Remark") - .HasColumnType("longtext") + .HasColumnType("text") .HasComment("备注"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId") .HasComment("租户ID"); @@ -681,101 +687,110 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.DeviceInfos.DeviceManagementInfo", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("AccountPhoneNumber") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("账户手机号"); + b.Property("BusinessSystemDeviceDataId") + .HasColumnType("bigint") + .HasComment("业务系统设备数据Id"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("DeviceAddress") .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasComment("设备地址"); + b.Property("DeviceBrandCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("设备品牌编码"); + b.Property("DeviceName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("设备名称"); b.Property("DeviceOnlineStatus") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("设备在线状态"); b.Property("DeviceSource") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("设备来源类型"); b.Property("DeviceThingModelDataId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasComment("设备物模型数据Id"); b.Property("DeviceType") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("设备类型,与业务系统无关,主要区分是网关设备、直连设备"); b.Property("ExtraProperties") - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties") .HasComment("扩展属性,用于存储自定义字段,JSON格式"); b.Property("FirmwareVersion") .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("固件版本"); b.Property("IoTPlatform") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("物联网平台类型,默认没有指定"); b.Property("IoTPlatformAccountId") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("物联网平台中对应的账号Id"); b.Property("IoTPlatformDeviceOpenInfo") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("物联网平台中对应的设备Id或者名称"); b.Property("IoTPlatformProductId") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("物联网平台中对应的产品Id"); b.Property("IoTPlatformProductName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("物联网平台中对应的产品Name"); b.Property("IoTPlatformResponse") @@ -784,68 +799,68 @@ namespace JiShe.IoT.Migrations b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("IsNeedConfigDevicMdoel") - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasComment("是否需要配置设备模型"); - b.Property("IsPlatformPushSuccess") - .HasColumnType("tinyint(1)") + b.Property("IsPlatformPushSuccess") + .HasColumnType("boolean") .HasComment("物联网平台推送是否成功"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("LastOfflineTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasComment("最后离线时间"); b.Property("LastOnlineTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasComment("最后在线时间"); b.Property("OSACreatorId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权创建者Id"); b.Property("OSADeleterId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权最后删除者Id"); b.Property("OSALastModifierId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权最后修改者Id"); b.Property("PlatformPassword") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("物联网平台设备密码"); b.Property("Remark") - .HasColumnType("longtext") + .HasColumnType("text") .HasComment("备注"); b.Property("SecurityKey") .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasComment("设备接入鉴权key"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId") .HasComment("租户ID"); b.Property("UpgradeDate") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasComment("升级日期"); b.HasKey("Id"); @@ -866,109 +881,109 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.DeviceInfos.DeviceUpgradeRecord", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("DeviceAddress") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("设备地址"); b.Property("DeviceName") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("设备名称"); b.Property("ExtraProperties") - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties") .HasComment("扩展属性,用于存储自定义字段,JSON格式"); b.Property("FirmwareSignature") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("签名校验值"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("NowFirmwareVersion") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("当前固件版本"); b.Property("OSACreatorId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权创建者Id"); b.Property("OSADeleterId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权最后删除者Id"); b.Property("OSALastModifierId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权最后修改者Id"); b.Property("OldFirmwareVersion") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("旧的固件版本"); b.Property("Remark") - .HasColumnType("longtext") + .HasColumnType("text") .HasComment("备注"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId") .HasComment("租户ID"); b.Property("UpgradeDate") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasComment("升级日期"); b.Property("UpgradeDescription") .IsRequired() .HasMaxLength(512) - .HasColumnType("varchar(512)") + .HasColumnType("character varying(512)") .HasComment("升级描述"); b.Property("UpgradeIdentifier") @@ -978,19 +993,19 @@ namespace JiShe.IoT.Migrations b.Property("UpgradeMessage") .IsRequired() .HasMaxLength(512) - .HasColumnType("varchar(512)") + .HasColumnType("character varying(512)") .HasComment("升级信息"); b.Property("UpgradeResult") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("升级结果"); b.Property("UpgradeSource") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("升级来源"); b.Property("UpgradeStatus") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("升级状态"); b.HasKey("Id"); @@ -1011,103 +1026,226 @@ namespace JiShe.IoT.Migrations }); }); + modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.DeviceInfos.SubDeviceManagementInfo", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("BusinessSystemSubDeviceDataId") + .HasColumnType("bigint") + .HasComment("业务系统子设备数据Id"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("DeletionTime"); + + b.Property("DeviceAddress") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasComment("网关设备或直连设备地址"); + + b.Property("DeviceDataId") + .HasColumnType("uuid") + .HasComment("网关设备或直连设备数据Id"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties") + .HasComment("扩展属性,用于存储自定义字段,JSON格式"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("OSACreatorId") + .HasColumnType("integer") + .HasComment("旧系统授权创建者Id"); + + b.Property("OSADeleterId") + .HasColumnType("integer") + .HasComment("旧系统授权最后删除者Id"); + + b.Property("OSALastModifierId") + .HasColumnType("integer") + .HasComment("旧系统授权最后修改者Id"); + + b.Property("Remark") + .HasColumnType("text") + .HasComment("备注"); + + b.Property("SubDeviceAddress") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasComment("子设备地址"); + + b.Property("SubDeviceBrandCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasComment("子设备品牌编码"); + + b.Property("SubDeviceIndex") + .HasColumnType("integer") + .HasComment("子设备索引,抑或是主设备下唯一标识符、计量代码"); + + b.Property("SubDeviceName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("子设备名称"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId") + .HasComment("租户ID"); + + b.HasKey("Id"); + + b.HasIndex("CreationTime"); + + b.HasIndex("DeviceAddress"); + + b.HasIndex("SubDeviceAddress"); + + b.HasIndex("SubDeviceIndex"); + + b.HasIndex(new[] { "Id", "DeviceAddress", "SubDeviceIndex", "SubDeviceAddress", "CreationTime" }, "IX_ServiceProSubDeviceManagementInfo_IsNotUniqueKey") + .IsDescending(); + + b.ToTable("ServiceProSubDeviceManagementInfo", null, t => + { + t.HasComment("子设备信息"); + }); + }); + modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.ThingModelInfos.DeviceThingModelCommandInfo", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("CommandName") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasComment("指令名称"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("DeviceThingModelId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasComment("设备端物模型Id"); b.Property("ExtraProperties") - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties") .HasComment("扩展属性,用于存储自定义字段,JSON格式"); b.Property("IoTPlatform") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("物联网平台类型"); b.Property("IoTPlatformProductId") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("物联网平台中对应的产品Id"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("IssueCommand") .IsRequired() .HasMaxLength(512) - .HasColumnType("varchar(512)") + .HasColumnType("character varying(512)") .HasComment("完整的单个下发指令"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("OSACreatorId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权创建者Id"); b.Property("OSADeleterId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权最后删除者Id"); b.Property("OSALastModifierId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权最后修改者Id"); b.Property("PropertyArray") .IsRequired() .HasMaxLength(1024) - .HasColumnType("varchar(1024)") + .HasColumnType("character varying(1024)") .HasComment("指令设备端物模型的属性名称集合,JSON格式字符串数组"); b.Property("Remark") - .HasColumnType("longtext") + .HasColumnType("text") .HasComment("备注"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId") .HasComment("租户ID"); @@ -1129,44 +1267,44 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.ThingModelInfos.DeviceThingModelManagement", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("DeviceModelName") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("设备端物模型名称"); b.Property("ExtraProperties") - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties") .HasComment("扩展属性,用于存储自定义字段,JSON格式"); - b.Property("FunctionAnalysisFlag") - .HasColumnType("tinyint(1)") + b.Property("FunctionAnalysisFlag") + .HasColumnType("boolean") .HasComment("函数解析标记,默认为false, 不能解析"); b.Property("FunctionScript") @@ -1174,53 +1312,53 @@ namespace JiShe.IoT.Migrations .HasComment("脚本函数体"); b.Property("IoTPlatform") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("物联网平台类型,默认没有指定"); b.Property("IoTPlatformProductId") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("物联网平台中对应的产品Id"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("OSACreatorId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权创建者Id"); b.Property("OSADeleterId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权最后删除者Id"); b.Property("OSALastModifierId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权最后修改者Id"); b.Property("Remark") - .HasColumnType("longtext") + .HasColumnType("text") .HasComment("备注"); b.Property("ScriptName") .IsRequired() .HasMaxLength(64) - .HasColumnType("varchar(64)") + .HasColumnType("character varying(64)") .HasComment("脚本函数名称"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId") .HasComment("租户ID"); @@ -1243,145 +1381,145 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.ThingModelInfos.DeviceThingModelPropertyInfo", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("DeviceThingModelId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasComment("设备端物模型Id"); b.Property("ExtraProperties") - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties") .HasComment("扩展属性,用于存储自定义字段,JSON格式"); b.Property("FiledType") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("物联网平台中对应产品物模型属性或者事件类型"); b.Property("IoTPlatform") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("物联网平台类型"); b.Property("IoTPlatformProductId") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("物联网平台中对应的产品Id"); b.Property("IoTPlatformRawFieldDataType") .HasMaxLength(20) - .HasColumnType("varchar(20)") + .HasColumnType("character varying(20)") .HasComment("物联网平台中对应的产品物模型属性或者事件数据类型"); b.Property("IoTPlatformRawFieldName") .IsRequired() .HasMaxLength(64) - .HasColumnType("varchar(64)") + .HasColumnType("character varying(64)") .HasComment("物联网平台中对应的产品物模型属性或者事件名称"); b.Property("IoTPlatformThingModelDataId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasComment("系统中平台端物模型数据Id"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); - b.Property("IsValueNeedConvert") - .HasColumnType("tinyint(1)") + b.Property("IsValueNeedConvert") + .HasColumnType("boolean") .HasComment("是否需要值类型转换"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("NativeSkipNumber") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("正序跳过数量"); b.Property("NativeTakeNumber") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("正序获取数量"); b.Property("OSACreatorId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权创建者Id"); b.Property("OSADeleterId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权最后删除者Id"); b.Property("OSALastModifierId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权最后修改者Id"); b.Property("ParsingSequence") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("解析顺序,1234或者3412(高低反转)"); b.Property("Remark") - .HasColumnType("longtext") + .HasColumnType("text") .HasComment("备注"); b.Property("ReversalSkipNumber") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("反转跳过数量"); b.Property("ReversalTakeNumber") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("反转获取数量"); b.Property("StandardFieldDisplayName") .IsRequired() .HasMaxLength(64) - .HasColumnType("varchar(64)") + .HasColumnType("character varying(64)") .HasComment("管理后台产品标准的物模型属性或者事件名称"); b.Property("StandardFieldName") .IsRequired() .HasMaxLength(64) - .HasColumnType("varchar(64)") + .HasColumnType("character varying(64)") .HasComment("管理后台产品标准的物模型属性或者事件名称"); b.Property("StandardFieldValueType") .IsRequired() .HasMaxLength(20) - .HasColumnType("varchar(20)") + .HasColumnType("character varying(20)") .HasComment("标准物模型字段值类型"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId") .HasComment("租户ID"); @@ -1404,55 +1542,55 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.ThingModelInfos.IoTPlatformThingModelInfo", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("ExtraProperties") - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties") .HasComment("扩展属性,用于存储自定义字段,JSON格式"); b.Property("FiledType") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("物联网平台中对应产品物模型属性或者事件类型"); b.Property("IoTPlatform") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("物联网平台类型,默认没有指定"); b.Property("IoTPlatformProductId") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("物联网平台中对应的产品Id"); b.Property("IoTPlatformRawFieldDataType") .HasMaxLength(64) - .HasColumnType("varchar(64)") + .HasColumnType("character varying(64)") .HasComment("物联网平台中对应的产品物模型属性或者事件数据类型"); b.Property("IoTPlatformRawFieldExtension") @@ -1462,67 +1600,67 @@ namespace JiShe.IoT.Migrations b.Property("IoTPlatformRawFieldName") .IsRequired() .HasMaxLength(64) - .HasColumnType("varchar(64)") + .HasColumnType("character varying(64)") .HasComment("物联网平台中对应的产品物模型属性或者事件名称"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); - b.Property("IsSpecialIdentifier") - .HasColumnType("tinyint(1)") + b.Property("IsSpecialIdentifier") + .HasColumnType("boolean") .HasComment("是否是特殊物模型标识符"); - b.Property("IsValueNeedConvert") - .HasColumnType("tinyint(1)") + b.Property("IsValueNeedConvert") + .HasColumnType("boolean") .HasComment("是否需要值类型转换"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("OSACreatorId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权创建者Id"); b.Property("OSADeleterId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权最后删除者Id"); b.Property("OSALastModifierId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权最后修改者Id"); b.Property("Remark") - .HasColumnType("longtext") + .HasColumnType("text") .HasComment("备注"); b.Property("StandardFieldDisplayName") .IsRequired() .HasMaxLength(64) - .HasColumnType("varchar(64)") + .HasColumnType("character varying(64)") .HasComment("管理后台产品标准的物模型属性或者事件名称"); b.Property("StandardFieldName") .IsRequired() .HasMaxLength(64) - .HasColumnType("varchar(64)") + .HasColumnType("character varying(64)") .HasComment("管理后台产品标准的物模型属性或者事件名称"); b.Property("StandardFieldValueType") .IsRequired() .HasMaxLength(20) - .HasColumnType("varchar(20)") + .HasColumnType("character varying(20)") .HasComment("标准物模型字段值类型"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId") .HasComment("租户ID"); @@ -1545,119 +1683,119 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("JiShe.ServicePro.DynamicMenuManagement.Menus.Menu", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("Component") .HasMaxLength(512) - .HasColumnType("varchar(512)") + .HasColumnType("character varying(512)") .HasComment("组件地址"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("DisplayTitle") .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("标准多语言"); b.Property("Enabled") - .HasColumnType("bit(1)"); + .HasColumnType("boolean"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("HideInMenu") - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasComment("是否显示"); b.Property("Icon") - .HasColumnType("longtext") + .HasColumnType("text") .HasComment("图标"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("KeepAlive") - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasComment("是否缓存"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("MenuType") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("菜单类型"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("唯一编码"); b.Property("OpenType") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("打开类型"); b.Property("Order") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("排序"); b.Property("ParentId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("Path") .IsRequired() .HasMaxLength(512) - .HasColumnType("varchar(512)") + .HasColumnType("character varying(512)") .HasComment("路由/接口地址"); b.Property("Policy") .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("授权策略名称"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("Title") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("标题"); b.Property("Url") - .HasColumnType("longtext") + .HasColumnType("text") .HasComment("内外链地址"); b.HasKey("Id"); @@ -1678,46 +1816,46 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("JiShe.ServicePro.FileManagement.Files.FileObject", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("ContentType") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("文件名称"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("FileName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("文件名称"); b.Property("FileSize") @@ -1726,26 +1864,26 @@ namespace JiShe.IoT.Migrations b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("Md5Hash") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("文件MD5"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -1761,76 +1899,76 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("JiShe.ServicePro.LanguageManagement.LanguageTexts.Aggregates.LanguageText", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("CultureName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("语言名称"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("Name") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasComment("名称"); b.Property("ResourceName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("资源名称"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("Value") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasComment("值"); b.HasKey("Id"); @@ -1846,81 +1984,81 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("JiShe.ServicePro.LanguageManagement.Languages.Aggregates.Language", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("CultureName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("语言名称"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("DisplayName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("显示名称"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("FlagIcon") .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("图标"); b.Property("IsDefault") - .HasColumnType("bit(1)"); + .HasColumnType("boolean"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("IsEnabled") - .HasColumnType("bit(1)"); + .HasColumnType("boolean"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("UiCultureName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("Ui语言名称"); b.HasKey("Id"); @@ -1936,90 +2074,90 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("JiShe.ServicePro.NotificationManagement.Notifications.Aggregates.Notification", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("Content") .IsRequired() .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); + .HasColumnType("character varying(1024)"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("MessageLevel") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("MessageType") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("Read") - .HasColumnType("bit(1)"); + .HasColumnType("boolean"); b.Property("ReadTime") - .HasColumnType("datetime(6)"); + .HasColumnType("timestamp with time zone"); b.Property("ReceiveUserId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ReceiveUserName") .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("SenderUserId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("SenderUserName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("Title") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.HasKey("Id"); @@ -2032,68 +2170,68 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("JiShe.ServicePro.NotificationManagement.Notifications.Aggregates.NotificationSubscription", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("NotificationId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("Read") - .HasColumnType("bit(1)"); + .HasColumnType("boolean"); b.Property("ReadTime") - .HasColumnType("datetime(6)"); + .HasColumnType("timestamp with time zone"); b.Property("ReceiveUserId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ReceiveUserName") .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -2111,96 +2249,96 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("JiShe.ServicePro.OneNETManagement.OneNETAccounts.OneNETAccountInfos", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("AccountAccesskey") .IsRequired() .HasMaxLength(1024) - .HasColumnType("varchar(1024)") + .HasColumnType("character varying(1024)") .HasComment("账户通信密钥,平台可以重置密钥"); b.Property("AccountName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("账号名称"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("ExtraProperties") - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties") .HasComment("扩展属性,用于存储自定义字段,JSON格式"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("OSACreatorId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权创建者Id"); b.Property("OSADeleterId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权最后删除者Id"); b.Property("OSALastModifierId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权最后修改者Id"); b.Property("OneNETAccountId") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("账户Id"); b.Property("PhoneNumber") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("手机号码"); b.Property("ProductCount") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("产品数量"); b.Property("Remark") - .HasColumnType("longtext") + .HasColumnType("text") .HasComment("备注"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId") .HasComment("租户ID"); @@ -2220,179 +2358,183 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("JiShe.ServicePro.OneNETManagement.OneNETProducts.OneNETProductInfos", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("AccessProtocol") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("接入协议"); b.Property("AccountPhoneNumber") .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("账户手机号"); b.Property("Brand") - .HasColumnType("longtext") + .HasMaxLength(256) + .HasColumnType("character varying(256)") .HasComment("产品品牌"); b.Property("CommunicationAddress") .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasComment("通讯服务地址"); b.Property("CommunicationAddressTLS") .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasComment("TLS通讯服务地址"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DataProtocol") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("数据协议"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("ExtraProperties") - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties") .HasComment("扩展属性,用于存储自定义字段,JSON格式"); b.Property("IoTPlatformProductId") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("物联网平台对应的产品Id"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("IsEnabled") - .HasColumnType("bit(1)"); + .HasColumnType("boolean"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("Manufacturer") - .HasColumnType("longtext") + .HasMaxLength(256) + .HasColumnType("character varying(256)") .HasComment("产品厂商"); b.Property("Model") - .HasColumnType("longtext") + .HasMaxLength(256) + .HasColumnType("character varying(256)") .HasComment("产品型号"); b.Property("Network") - .HasColumnType("longtext") + .HasMaxLength(256) + .HasColumnType("character varying(256)") .HasComment("联网方式"); b.Property("NodeType") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("节点类型"); b.Property("NotActiveDeviceCount") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("未激活设备数"); b.Property("OSACreatorId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权创建者Id"); b.Property("OSADeleterId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权最后删除者Id"); b.Property("OSALastModifierId") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("旧系统授权最后修改者Id"); b.Property("OfflineDeviceCount") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("离线设备数"); b.Property("OneNETAccountId") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50)") + .HasColumnType("character varying(50)") .HasComment("账户Id"); b.Property("OnlineDeviceCount") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("在线设备总数"); b.Property("OwnDeviceCount") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("自有设备总数"); b.Property("ProductAccesskey") .IsRequired() .HasMaxLength(1024) - .HasColumnType("varchar(1024)") + .HasColumnType("character varying(1024)") .HasComment("产品访问密钥"); - b.Property("ProductCreateTime") - .HasColumnType("datetime(6)") + b.Property("ProductCreateTime") + .HasColumnType("timestamp with time zone") .HasComment("产品创建时间"); b.Property("ProductName") .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("产品名称"); - b.Property("ProductUpdateTime") - .HasColumnType("datetime(6)") + b.Property("ProductUpdateTime") + .HasColumnType("timestamp with time zone") .HasComment("最近修改时间"); b.Property("Remark") - .HasColumnType("longtext") + .HasColumnType("text") .HasComment("备注"); b.Property("Status") - .HasColumnType("int") + .HasColumnType("integer") .HasComment("开发状态"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId") .HasComment("租户ID"); b.Property("ThingModelFileId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasComment("物模型文件Id"); b.Property("ThingModelFileName") .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasComment("物模型文件名称"); b.Property("ThingModelInfos") - .HasColumnType("longtext") + .HasColumnType("text") .HasComment("平台物模型信息"); b.HasKey("Id"); @@ -2414,76 +2556,76 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("JiShe.ServicePro.TemplateManagement.TextTemplates.TextTemplate", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("Code") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("编码"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("Content") .IsRequired() .HasMaxLength(1024) - .HasColumnType("varchar(1024)") + .HasColumnType("character varying(1024)") .HasComment("内容"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("CultureName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("语言"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("名称"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -2499,113 +2641,113 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ApplicationName") .HasMaxLength(96) - .HasColumnType("varchar(96)") + .HasColumnType("character varying(96)") .HasColumnName("ApplicationName"); b.Property("BrowserInfo") .HasMaxLength(512) - .HasColumnType("varchar(512)") + .HasColumnType("character varying(512)") .HasColumnName("BrowserInfo"); b.Property("ClientId") .HasMaxLength(64) - .HasColumnType("varchar(64)") + .HasColumnType("character varying(64)") .HasColumnName("ClientId"); b.Property("ClientIpAddress") .HasMaxLength(64) - .HasColumnType("varchar(64)") + .HasColumnType("character varying(64)") .HasColumnName("ClientIpAddress"); b.Property("ClientName") .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasColumnName("ClientName"); b.Property("Comments") .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("Comments"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CorrelationId") .HasMaxLength(64) - .HasColumnType("varchar(64)") + .HasColumnType("character varying(64)") .HasColumnName("CorrelationId"); b.Property("Exceptions") - .HasColumnType("longtext"); + .HasColumnType("text"); b.Property("ExecutionDuration") - .HasColumnType("int") + .HasColumnType("integer") .HasColumnName("ExecutionDuration"); b.Property("ExecutionTime") - .HasColumnType("datetime(6)"); + .HasColumnType("timestamp with time zone"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("HttpMethod") .HasMaxLength(16) - .HasColumnType("varchar(16)") + .HasColumnType("character varying(16)") .HasColumnName("HttpMethod"); b.Property("HttpStatusCode") - .HasColumnType("int") + .HasColumnType("integer") .HasColumnName("HttpStatusCode"); b.Property("ImpersonatorTenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("ImpersonatorTenantId"); b.Property("ImpersonatorTenantName") .HasMaxLength(64) - .HasColumnType("varchar(64)") + .HasColumnType("character varying(64)") .HasColumnName("ImpersonatorTenantName"); b.Property("ImpersonatorUserId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("ImpersonatorUserId"); b.Property("ImpersonatorUserName") .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("ImpersonatorUserName"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("TenantName") .HasMaxLength(64) - .HasColumnType("varchar(64)") + .HasColumnType("character varying(64)") .HasColumnName("TenantName"); b.Property("Url") .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("Url"); b.Property("UserId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("UserId"); b.Property("UserName") .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("UserName"); b.HasKey("Id"); @@ -2620,41 +2762,41 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("AuditLogId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("AuditLogId"); b.Property("ExecutionDuration") - .HasColumnType("int") + .HasColumnType("integer") .HasColumnName("ExecutionDuration"); b.Property("ExecutionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("ExecutionTime"); b.Property("ExtraProperties") - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("MethodName") .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasColumnName("MethodName"); b.Property("Parameters") .HasMaxLength(2000) - .HasColumnType("varchar(2000)") + .HasColumnType("character varying(2000)") .HasColumnName("Parameters"); b.Property("ServiceName") .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("ServiceName"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -2669,23 +2811,23 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogExcelFile", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("FileName") .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("FileName"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -2696,40 +2838,40 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("AuditLogId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("AuditLogId"); b.Property("ChangeTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("ChangeTime"); b.Property("ChangeType") - .HasColumnType("tinyint unsigned") + .HasColumnType("smallint") .HasColumnName("ChangeType"); b.Property("EntityId") .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasColumnName("EntityId"); b.Property("EntityTenantId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("EntityTypeFullName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasColumnName("EntityTypeFullName"); b.Property("ExtraProperties") - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -2744,35 +2886,35 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("EntityChangeId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("NewValue") .HasMaxLength(512) - .HasColumnType("varchar(512)") + .HasColumnType("character varying(512)") .HasColumnName("NewValue"); b.Property("OriginalValue") .HasMaxLength(512) - .HasColumnType("varchar(512)") + .HasColumnType("character varying(512)") .HasColumnName("OriginalValue"); b.Property("PropertyName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasColumnName("PropertyName"); b.Property("PropertyTypeFullName") .IsRequired() .HasMaxLength(64) - .HasColumnType("varchar(64)") + .HasColumnType("character varying(64)") .HasColumnName("PropertyTypeFullName"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -2785,52 +2927,52 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ApplicationName") .HasMaxLength(96) - .HasColumnType("varchar(96)"); + .HasColumnType("character varying(96)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsAbandoned") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false); b.Property("JobArgs") .IsRequired() .HasMaxLength(1048576) - .HasColumnType("longtext"); + .HasColumnType("character varying(1048576)"); b.Property("JobName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("LastTryTime") - .HasColumnType("datetime(6)"); + .HasColumnType("timestamp with time zone"); b.Property("NextTryTime") - .HasColumnType("datetime(6)"); + .HasColumnType("timestamp with time zone"); b.Property("Priority") .ValueGeneratedOnAdd() - .HasColumnType("tinyint unsigned") + .HasColumnType("smallint") .HasDefaultValue((byte)15); b.Property("TryCount") @@ -2848,52 +2990,52 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureDefinitionRecord", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("AllowedProviders") .HasMaxLength(256) - .HasColumnType("varchar(256)"); + .HasColumnType("character varying(256)"); b.Property("DefaultValue") .HasMaxLength(256) - .HasColumnType("varchar(256)"); + .HasColumnType("character varying(256)"); b.Property("Description") .HasMaxLength(256) - .HasColumnType("varchar(256)"); + .HasColumnType("character varying(256)"); b.Property("DisplayName") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)"); + .HasColumnType("character varying(256)"); b.Property("ExtraProperties") - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("GroupName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("IsAvailableToHost") - .HasColumnType("bit(1)"); + .HasColumnType("boolean"); b.Property("IsVisibleToClients") - .HasColumnType("bit(1)"); + .HasColumnType("boolean"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("ParentName") .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("ValueType") .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); + .HasColumnType("character varying(2048)"); b.HasKey("Id"); @@ -2908,21 +3050,21 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureGroupDefinitionRecord", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("DisplayName") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)"); + .HasColumnType("character varying(256)"); b.Property("ExtraProperties") - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.HasKey("Id"); @@ -2935,25 +3077,25 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("ProviderKey") .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("ProviderName") .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("Value") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.HasKey("Id"); @@ -2966,49 +3108,49 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("Description") .HasMaxLength(256) - .HasColumnType("varchar(256)"); + .HasColumnType("character varying(256)"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsStatic") - .HasColumnType("bit(1)"); + .HasColumnType("boolean"); b.Property("Name") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)"); + .HasColumnType("character varying(256)"); b.Property("Regex") .HasMaxLength(512) - .HasColumnType("varchar(512)"); + .HasColumnType("character varying(512)"); b.Property("RegexDescription") .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("Required") - .HasColumnType("bit(1)"); + .HasColumnType("boolean"); b.Property("ValueType") - .HasColumnType("int"); + .HasColumnType("integer"); b.HasKey("Id"); @@ -3018,19 +3160,19 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("SourceTenantId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("SourceUserId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("TargetTenantId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("TargetUserId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.HasKey("Id"); @@ -3043,51 +3185,51 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("EntityVersion") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsDefault") - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasColumnName("IsDefault"); b.Property("IsPublic") - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasColumnName("IsPublic"); b.Property("IsStatic") - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasColumnName("IsStatic"); b.Property("Name") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)"); + .HasColumnType("character varying(256)"); b.Property("NormalizedName") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)"); + .HasColumnType("character varying(256)"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -3100,22 +3242,22 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ClaimType") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)"); + .HasColumnType("character varying(256)"); b.Property("ClaimValue") .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); + .HasColumnType("character varying(1024)"); b.Property("RoleId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -3128,65 +3270,65 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("Action") .HasMaxLength(96) - .HasColumnType("varchar(96)"); + .HasColumnType("character varying(96)"); b.Property("ApplicationName") .HasMaxLength(96) - .HasColumnType("varchar(96)"); + .HasColumnType("character varying(96)"); b.Property("BrowserInfo") .HasMaxLength(512) - .HasColumnType("varchar(512)"); + .HasColumnType("character varying(512)"); b.Property("ClientId") .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("ClientIpAddress") .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CorrelationId") .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("CreationTime") - .HasColumnType("datetime(6)"); + .HasColumnType("timestamp with time zone"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("Identity") .HasMaxLength(96) - .HasColumnType("varchar(96)"); + .HasColumnType("character varying(96)"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("TenantName") .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("UserId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("UserName") .HasMaxLength(256) - .HasColumnType("varchar(256)"); + .HasColumnType("character varying(256)"); b.HasKey("Id"); @@ -3204,46 +3346,46 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentitySession", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ClientId") .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("Device") .IsRequired() .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("DeviceInfo") .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("ExtraProperties") - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IpAddresses") .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); + .HasColumnType("character varying(2048)"); b.Property("LastAccessed") - .HasColumnType("datetime(6)"); + .HasColumnType("timestamp with time zone"); b.Property("SessionId") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("SignedIn") - .HasColumnType("datetime(6)"); + .HasColumnType("timestamp with time zone"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("UserId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.HasKey("Id"); @@ -3259,11 +3401,11 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("AccessFailedCount") .ValueGeneratedOnAdd() - .HasColumnType("int") + .HasColumnType("integer") .HasDefaultValue(0) .HasColumnName("AccessFailedCount"); @@ -3271,142 +3413,142 @@ namespace JiShe.IoT.Migrations .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("Email") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("Email"); b.Property("EmailConfirmed") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("EmailConfirmed"); b.Property("EntityVersion") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsActive") - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasColumnName("IsActive"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("IsExternal") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsExternal"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("LastPasswordChangeTime") - .HasColumnType("datetime(6)"); + .HasColumnType("timestamp with time zone"); b.Property("LockoutEnabled") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("LockoutEnabled"); b.Property("LockoutEnd") - .HasColumnType("datetime(6)"); + .HasColumnType("timestamp with time zone"); b.Property("Name") .HasMaxLength(64) - .HasColumnType("varchar(64)") + .HasColumnType("character varying(64)") .HasColumnName("Name"); b.Property("NormalizedEmail") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("NormalizedEmail"); b.Property("NormalizedUserName") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("NormalizedUserName"); b.Property("PasswordHash") .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("PasswordHash"); b.Property("PhoneNumber") .HasMaxLength(16) - .HasColumnType("varchar(16)") + .HasColumnType("character varying(16)") .HasColumnName("PhoneNumber"); b.Property("PhoneNumberConfirmed") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("PhoneNumberConfirmed"); b.Property("SecurityStamp") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("SecurityStamp"); b.Property("ShouldChangePasswordOnNextLogin") - .HasColumnType("bit(1)"); + .HasColumnType("boolean"); b.Property("Surname") .HasMaxLength(64) - .HasColumnType("varchar(64)") + .HasColumnType("character varying(64)") .HasColumnName("Surname"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("TwoFactorEnabled") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("TwoFactorEnabled"); b.Property("UserName") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("UserName"); b.HasKey("Id"); @@ -3425,23 +3567,23 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ClaimType") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)"); + .HasColumnType("character varying(256)"); b.Property("ClaimValue") .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); + .HasColumnType("character varying(1024)"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("UserId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.HasKey("Id"); @@ -3453,22 +3595,22 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserDelegation", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("EndTime") - .HasColumnType("datetime(6)"); + .HasColumnType("timestamp with time zone"); b.Property("SourceUserId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("StartTime") - .HasColumnType("datetime(6)"); + .HasColumnType("timestamp with time zone"); b.Property("TargetUserId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -3479,23 +3621,23 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => { b.Property("UserId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("LoginProvider") .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("ProviderDisplayName") .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("ProviderKey") .IsRequired() .HasMaxLength(196) - .HasColumnType("varchar(196)"); + .HasColumnType("character varying(196)"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("UserId", "LoginProvider"); @@ -3508,21 +3650,21 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => { b.Property("OrganizationUnitId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("UserId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("OrganizationUnitId", "UserId"); @@ -3535,13 +3677,13 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => { b.Property("UserId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("RoleId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("UserId", "RoleId"); @@ -3554,22 +3696,22 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => { b.Property("UserId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("LoginProvider") .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("Name") .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("Value") - .HasColumnType("longtext"); + .HasColumnType("text"); b.HasKey("UserId", "LoginProvider", "Name"); @@ -3579,70 +3721,70 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("Code") .IsRequired() .HasMaxLength(95) - .HasColumnType("varchar(95)") + .HasColumnType("character varying(95)") .HasColumnName("Code"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("DisplayName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasColumnName("DisplayName"); b.Property("EntityVersion") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("ParentId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -3657,21 +3799,21 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => { b.Property("OrganizationUnitId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("RoleId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("OrganizationUnitId", "RoleId"); @@ -3684,44 +3826,44 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("DisplayName") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)"); + .HasColumnType("character varying(256)"); b.Property("ExtraProperties") - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("GroupName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("IsEnabled") - .HasColumnType("bit(1)"); + .HasColumnType("boolean"); b.Property("MultiTenancySide") - .HasColumnType("tinyint unsigned"); + .HasColumnType("smallint"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("ParentName") .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("Providers") .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("StateCheckers") .HasMaxLength(256) - .HasColumnType("varchar(256)"); + .HasColumnType("character varying(256)"); b.HasKey("Id"); @@ -3736,25 +3878,25 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("ProviderKey") .IsRequired() .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("ProviderName") .IsRequired() .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -3768,21 +3910,21 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("DisplayName") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)"); + .HasColumnType("character varying(256)"); b.Property("ExtraProperties") - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.HasKey("Id"); @@ -3795,25 +3937,25 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("ProviderKey") .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("ProviderName") .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("Value") .IsRequired() .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); + .HasColumnType("character varying(2048)"); b.HasKey("Id"); @@ -3826,42 +3968,42 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.SettingManagement.SettingDefinitionRecord", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("DefaultValue") .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); + .HasColumnType("character varying(2048)"); b.Property("Description") .HasMaxLength(512) - .HasColumnType("varchar(512)"); + .HasColumnType("character varying(512)"); b.Property("DisplayName") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)"); + .HasColumnType("character varying(256)"); b.Property("ExtraProperties") - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsEncrypted") - .HasColumnType("bit(1)"); + .HasColumnType("boolean"); b.Property("IsInherited") - .HasColumnType("bit(1)"); + .HasColumnType("boolean"); b.Property("IsVisibleToClients") - .HasColumnType("bit(1)"); + .HasColumnType("boolean"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("Providers") .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); + .HasColumnType("character varying(1024)"); b.HasKey("Id"); @@ -3874,62 +4016,62 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("EntityVersion") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("Name") .IsRequired() .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("NormalizedName") .IsRequired() .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.HasKey("Id"); @@ -3943,16 +4085,16 @@ namespace JiShe.IoT.Migrations modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => { b.Property("TenantId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("Name") .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("Value") .IsRequired() .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); + .HasColumnType("character varying(1024)"); b.HasKey("TenantId", "Name");