diff --git a/aspnet-core/LINGYUN.MicroService.All.sln b/aspnet-core/LINGYUN.MicroService.All.sln index e4d1eccdc..b83d054c6 100644 --- a/aspnet-core/LINGYUN.MicroService.All.sln +++ b/aspnet-core/LINGYUN.MicroService.All.sln @@ -556,6 +556,18 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{ ..\.github\workflows\release.yml = ..\.github\workflows\release.yml EndProjectSection EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LY.MicroService.BackendAdmin.EntityFrameworkCore", "migrations\LY.MicroService.BackendAdmin.EntityFrameworkCore\LY.MicroService.BackendAdmin.EntityFrameworkCore.csproj", "{742913C8-F10F-4B5E-AAE5-A52800F080BB}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LY.MicroService.AuthServer.EntityFrameworkCore", "migrations\LY.MicroService.AuthServer.EntityFrameworkCore\LY.MicroService.AuthServer.EntityFrameworkCore.csproj", "{730CC41B-99F7-4A1B-A645-093494ECEBC1}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LY.MicroService.IdentityServer.EntityFrameworkCore", "migrations\LY.MicroService.IdentityServer.EntityFrameworkCore\LY.MicroService.IdentityServer.EntityFrameworkCore.csproj", "{F74D8A4E-737F-4144-94BF-9EE80AFC8E9B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LY.MicroService.LocalizationManagement.EntityFrameworkCore", "migrations\LY.MicroService.LocalizationManagement.EntityFrameworkCore\LY.MicroService.LocalizationManagement.EntityFrameworkCore.csproj", "{7DBC2821-22B2-497F-A594-18CF3EE79940}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LY.MicroService.Platform.EntityFrameworkCore", "migrations\LY.MicroService.Platform.EntityFrameworkCore\LY.MicroService.Platform.EntityFrameworkCore.csproj", "{B9421FC5-47EB-428D-92C6-F688D02ABE06}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LY.MicroService.RealtimeMessage.EntityFrameworkCore", "migrations\LY.MicroService.RealtimeMessage.EntityFrameworkCore\LY.MicroService.RealtimeMessage.EntityFrameworkCore.csproj", "{6AC6AC37-0163-4EF2-A49C-2E0B87F73AE9}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -1410,6 +1422,30 @@ Global {42A0FC3F-C38E-4FF4-B78A-5ED29DF144BF}.Debug|Any CPU.Build.0 = Debug|Any CPU {42A0FC3F-C38E-4FF4-B78A-5ED29DF144BF}.Release|Any CPU.ActiveCfg = Release|Any CPU {42A0FC3F-C38E-4FF4-B78A-5ED29DF144BF}.Release|Any CPU.Build.0 = Release|Any CPU + {742913C8-F10F-4B5E-AAE5-A52800F080BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {742913C8-F10F-4B5E-AAE5-A52800F080BB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {742913C8-F10F-4B5E-AAE5-A52800F080BB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {742913C8-F10F-4B5E-AAE5-A52800F080BB}.Release|Any CPU.Build.0 = Release|Any CPU + {730CC41B-99F7-4A1B-A645-093494ECEBC1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {730CC41B-99F7-4A1B-A645-093494ECEBC1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {730CC41B-99F7-4A1B-A645-093494ECEBC1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {730CC41B-99F7-4A1B-A645-093494ECEBC1}.Release|Any CPU.Build.0 = Release|Any CPU + {F74D8A4E-737F-4144-94BF-9EE80AFC8E9B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F74D8A4E-737F-4144-94BF-9EE80AFC8E9B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F74D8A4E-737F-4144-94BF-9EE80AFC8E9B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F74D8A4E-737F-4144-94BF-9EE80AFC8E9B}.Release|Any CPU.Build.0 = Release|Any CPU + {7DBC2821-22B2-497F-A594-18CF3EE79940}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7DBC2821-22B2-497F-A594-18CF3EE79940}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7DBC2821-22B2-497F-A594-18CF3EE79940}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7DBC2821-22B2-497F-A594-18CF3EE79940}.Release|Any CPU.Build.0 = Release|Any CPU + {B9421FC5-47EB-428D-92C6-F688D02ABE06}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B9421FC5-47EB-428D-92C6-F688D02ABE06}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B9421FC5-47EB-428D-92C6-F688D02ABE06}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B9421FC5-47EB-428D-92C6-F688D02ABE06}.Release|Any CPU.Build.0 = Release|Any CPU + {6AC6AC37-0163-4EF2-A49C-2E0B87F73AE9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6AC6AC37-0163-4EF2-A49C-2E0B87F73AE9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6AC6AC37-0163-4EF2-A49C-2E0B87F73AE9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6AC6AC37-0163-4EF2-A49C-2E0B87F73AE9}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1678,6 +1714,12 @@ Global {EFC5C34F-81A1-4EFC-966F-50B646C54FA6} = {1A23BB7F-1839-4204-88C5-7E9A6C9FBF1E} {42A0FC3F-C38E-4FF4-B78A-5ED29DF144BF} = {90E88EAC-4291-4406-8D88-EFDF61B11292} {F3E04039-7BEE-46F8-B33B-FE13E977DCCA} = {52E60F16-6304-4E37-A220-C94D8C5D27DC} + {742913C8-F10F-4B5E-AAE5-A52800F080BB} = {E12DFE37-3F4D-435D-97AE-903259AE2DF4} + {730CC41B-99F7-4A1B-A645-093494ECEBC1} = {D724FDCC-375A-4D61-A444-4264A00A6AC9} + {F74D8A4E-737F-4144-94BF-9EE80AFC8E9B} = {B2493730-4DDC-4DA7-BF19-CACD75450270} + {7DBC2821-22B2-497F-A594-18CF3EE79940} = {B18CF0D3-3D01-4A64-A9C4-DC0C214BEE42} + {B9421FC5-47EB-428D-92C6-F688D02ABE06} = {F260FB5F-C6C7-4948-B638-E4D6986D07ED} + {6AC6AC37-0163-4EF2-A49C-2E0B87F73AE9} = {B1AC656F-8F4C-43D5-B5A0-CCF5F119EA44} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {C95FDF91-16F2-4A8B-A4BE-0E62D1B66718} diff --git a/aspnet-core/LINGYUN.MicroService.TaskManagement.sln b/aspnet-core/LINGYUN.MicroService.TaskManagement.sln index d46cf64f1..04fc3f6c9 100644 --- a/aspnet-core/LINGYUN.MicroService.TaskManagement.sln +++ b/aspnet-core/LINGYUN.MicroService.TaskManagement.sln @@ -84,6 +84,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "migrations", "migrations", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LY.MicroService.TaskManagement.DbMigrator", "migrations\LY.MicroService.TaskManagement.DbMigrator\LY.MicroService.TaskManagement.DbMigrator.csproj", "{52FD8F39-0AB6-4C51-A584-187C219AC8B5}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LY.MicroService.TaskManagement.EntityFrameworkCore", "migrations\LY.MicroService.TaskManagement.EntityFrameworkCore\LY.MicroService.TaskManagement.EntityFrameworkCore.csproj", "{58F51875-6D2C-4A65-9DD3-8BC004B39B72}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -206,6 +208,10 @@ Global {52FD8F39-0AB6-4C51-A584-187C219AC8B5}.Debug|Any CPU.Build.0 = Debug|Any CPU {52FD8F39-0AB6-4C51-A584-187C219AC8B5}.Release|Any CPU.ActiveCfg = Release|Any CPU {52FD8F39-0AB6-4C51-A584-187C219AC8B5}.Release|Any CPU.Build.0 = Release|Any CPU + {58F51875-6D2C-4A65-9DD3-8BC004B39B72}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {58F51875-6D2C-4A65-9DD3-8BC004B39B72}.Debug|Any CPU.Build.0 = Debug|Any CPU + {58F51875-6D2C-4A65-9DD3-8BC004B39B72}.Release|Any CPU.ActiveCfg = Release|Any CPU + {58F51875-6D2C-4A65-9DD3-8BC004B39B72}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -240,6 +246,7 @@ Global {FEC5FD25-9B26-4245-88D8-7621B26C7C3A} = {B38D2141-AC0F-4F4A-9315-4292E3856C15} {DF963ABB-E713-49E9-A03C-DEB431E369DF} = {B38D2141-AC0F-4F4A-9315-4292E3856C15} {52FD8F39-0AB6-4C51-A584-187C219AC8B5} = {820A8FA4-17C4-44DF-8C31-9F211D00F790} + {58F51875-6D2C-4A65-9DD3-8BC004B39B72} = {820A8FA4-17C4-44DF-8C31-9F211D00F790} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {E1FD1F4C-D344-408B-97CF-B6F1F6D7D293} diff --git a/aspnet-core/LINGYUN.MicroService.WebhooksManagement.sln b/aspnet-core/LINGYUN.MicroService.WebhooksManagement.sln index 29874944c..2a98f1a0f 100644 --- a/aspnet-core/LINGYUN.MicroService.WebhooksManagement.sln +++ b/aspnet-core/LINGYUN.MicroService.WebhooksManagement.sln @@ -43,6 +43,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "migrations", "migrations", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LY.MicroService.WebhooksManagement.DbMigrator", "migrations\LY.MicroService.WebhooksManagement.DbMigrator\LY.MicroService.WebhooksManagement.DbMigrator.csproj", "{3BC77471-D273-4C9C-8985-7FE450DA4686}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LY.MicroService.WebhooksManagement.EntityFrameworkCore", "migrations\LY.MicroService.WebhooksManagement.EntityFrameworkCore\LY.MicroService.WebhooksManagement.EntityFrameworkCore.csproj", "{CC0BF1BE-A938-4BED-B5DD-AEA0235FF978}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -113,6 +115,10 @@ Global {3BC77471-D273-4C9C-8985-7FE450DA4686}.Debug|Any CPU.Build.0 = Debug|Any CPU {3BC77471-D273-4C9C-8985-7FE450DA4686}.Release|Any CPU.ActiveCfg = Release|Any CPU {3BC77471-D273-4C9C-8985-7FE450DA4686}.Release|Any CPU.Build.0 = Release|Any CPU + {CC0BF1BE-A938-4BED-B5DD-AEA0235FF978}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CC0BF1BE-A938-4BED-B5DD-AEA0235FF978}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CC0BF1BE-A938-4BED-B5DD-AEA0235FF978}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CC0BF1BE-A938-4BED-B5DD-AEA0235FF978}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -134,6 +140,7 @@ Global {46C08EF3-4C81-411E-B5E4-AC3A5040DC67} = {FB7A9794-06D2-42CF-939E-4626497B97BD} {BBF1C93D-EF73-4B00-919F-5E7F360BDB03} = {FB7A9794-06D2-42CF-939E-4626497B97BD} {3BC77471-D273-4C9C-8985-7FE450DA4686} = {2868332B-7D4F-4B43-8FC3-BA5CACC36C7E} + {CC0BF1BE-A938-4BED-B5DD-AEA0235FF978} = {2868332B-7D4F-4B43-8FC3-BA5CACC36C7E} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {80ED12A5-C899-459F-A181-ADCC9D680DE5} diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/AuthServerDbMigratorHostedService.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/AuthServerDbMigratorHostedService.cs index aca4bbe15..0548a06b8 100644 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/AuthServerDbMigratorHostedService.cs +++ b/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/AuthServerDbMigratorHostedService.cs @@ -1,4 +1,4 @@ -using LY.MicroService.AuthServer.DbMigrator.EntityFrameworkCore; +using LY.MicroService.AuthServer.EntityFrameworkCore; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/AuthServerDbMigratorModule.Configure.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/AuthServerDbMigratorModule.Configure.cs index 790b72a55..d93c9ec2a 100644 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/AuthServerDbMigratorModule.Configure.cs +++ b/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/AuthServerDbMigratorModule.Configure.cs @@ -1,18 +1,4 @@ -using LY.MicroService.AuthServer.DbMigrator.EntityFrameworkCore; -using Microsoft.Extensions.DependencyInjection; -using Volo.Abp.EntityFrameworkCore; - -namespace LY.MicroService.AuthServer.DbMigrator; +namespace LY.MicroService.AuthServer.DbMigrator; public partial class AuthServerDbMigratorModule { - private void ConfigureDbContext(IServiceCollection services) - { - services.AddAbpDbContext(); - - // 配置Ef - Configure(options => - { - options.UseMySQL(); - }); - } } diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/AuthServerDbMigratorModule.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/AuthServerDbMigratorModule.cs index c431d1fbd..e471e113b 100644 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/AuthServerDbMigratorModule.cs +++ b/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/AuthServerDbMigratorModule.cs @@ -1,23 +1,14 @@ -using LINGYUN.Abp.Data.DbMigrator; -using LINGYUN.Abp.Identity.EntityFrameworkCore; -using LINGYUN.Abp.Saas.EntityFrameworkCore; +using LY.MicroService.AuthServer.EntityFrameworkCore; using Volo.Abp.Autofac; using Volo.Abp.Modularity; -using Volo.Abp.OpenIddict.EntityFrameworkCore; namespace LY.MicroService.AuthServer.DbMigrator; [DependsOn( - typeof(AbpSaasEntityFrameworkCoreModule), - typeof(AbpIdentityEntityFrameworkCoreModule), - typeof(AbpOpenIddictEntityFrameworkCoreModule), - typeof(AbpDataDbMigratorModule), + typeof(AuthServerMigrationsEntityFrameworkCoreModule), typeof(AbpAutofacModule) )] public partial class AuthServerDbMigratorModule : AbpModule { - public override void ConfigureServices(ServiceConfigurationContext context) - { - ConfigureDbContext(context.Services); - } + } diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/LY.MicroService.AuthServer.DbMigrator.csproj b/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/LY.MicroService.AuthServer.DbMigrator.csproj index d41e58a72..ef5b04b69 100644 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/LY.MicroService.AuthServer.DbMigrator.csproj +++ b/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/LY.MicroService.AuthServer.DbMigrator.csproj @@ -44,10 +44,7 @@ - - - - + diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/EntityFrameworkCore/AuthServerDbMigrationService.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/AuthServerDbMigrationService.cs similarity index 93% rename from aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/EntityFrameworkCore/AuthServerDbMigrationService.cs rename to aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/AuthServerDbMigrationService.cs index cd37ed7f7..7a3f5388f 100644 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/EntityFrameworkCore/AuthServerDbMigrationService.cs +++ b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/AuthServerDbMigrationService.cs @@ -3,13 +3,18 @@ using LINGYUN.Abp.Saas.Tenants; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; +using System; +using System.Collections.Generic; using System.Diagnostics; +using System.IO; +using System.Linq; using System.Runtime.InteropServices; +using System.Threading.Tasks; using Volo.Abp.Data; using Volo.Abp.DependencyInjection; using Volo.Abp.MultiTenancy; -namespace LY.MicroService.AuthServer.DbMigrator.EntityFrameworkCore; +namespace LY.MicroService.AuthServer.EntityFrameworkCore; public class AuthServerDbMigrationService : ITransientDependency { @@ -190,7 +195,7 @@ public class AuthServerDbMigrationService : ITransientDependency return Path.Combine(slnDirectoryPath, "LY.MicroService.BackendAdmin.DbMigrator"); } - private string? GetSolutionDirectoryPath() + private string GetSolutionDirectoryPath() { var currentDirectory = new DirectoryInfo(Directory.GetCurrentDirectory()); diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/EntityFrameworkCore/AuthServerMigrationsDbContext.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/AuthServerMigrationsDbContext.cs similarity index 87% rename from aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/EntityFrameworkCore/AuthServerMigrationsDbContext.cs rename to aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/AuthServerMigrationsDbContext.cs index 905d6e151..28b1a03da 100644 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/EntityFrameworkCore/AuthServerMigrationsDbContext.cs +++ b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/AuthServerMigrationsDbContext.cs @@ -4,7 +4,7 @@ using Volo.Abp.EntityFrameworkCore; using Volo.Abp.Identity.EntityFrameworkCore; using Volo.Abp.OpenIddict.EntityFrameworkCore; -namespace LY.MicroService.AuthServer.DbMigrator.EntityFrameworkCore; +namespace LY.MicroService.AuthServer.EntityFrameworkCore; [ConnectionStringName("AuthServerDbMigrator")] public class AuthServerMigrationsDbContext : AbpDbContext diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/EntityFrameworkCore/AuthServerMigrationsDbContextFactory.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/AuthServerMigrationsDbContextFactory.cs similarity index 74% rename from aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/EntityFrameworkCore/AuthServerMigrationsDbContextFactory.cs rename to aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/AuthServerMigrationsDbContextFactory.cs index b02a70e6f..9dc1039a1 100644 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/EntityFrameworkCore/AuthServerMigrationsDbContextFactory.cs +++ b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/AuthServerMigrationsDbContextFactory.cs @@ -1,8 +1,9 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Design; using Microsoft.Extensions.Configuration; +using System.IO; -namespace LY.MicroService.AuthServer.DbMigrator.EntityFrameworkCore; +namespace LY.MicroService.AuthServer.EntityFrameworkCore; public class AuthServerMigrationsDbContextFactory : IDesignTimeDbContextFactory { @@ -20,9 +21,8 @@ public class AuthServerMigrationsDbContextFactory : IDesignTimeDbContextFactory< private static IConfigurationRoot BuildConfiguration() { var builder = new ConfigurationBuilder() - .SetBasePath(Directory.GetCurrentDirectory()) - .AddJsonFile("appsettings.json", optional: false) - .AddJsonFile("appsettings.Development.json", optional: true); + .SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../LY.MicroService.AuthServer.DbMigrator/")) + .AddJsonFile("appsettings.json", optional: false); return builder.Build(); } diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/AuthServerMigrationsEntityFrameworkCoreModule.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/AuthServerMigrationsEntityFrameworkCoreModule.cs new file mode 100644 index 000000000..0cc4f995b --- /dev/null +++ b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/AuthServerMigrationsEntityFrameworkCoreModule.cs @@ -0,0 +1,26 @@ +using LINGYUN.Abp.Data.DbMigrator; +using LINGYUN.Abp.Saas.EntityFrameworkCore; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.Modularity; +using Volo.Abp.OpenIddict.EntityFrameworkCore; + +namespace LY.MicroService.AuthServer.EntityFrameworkCore; + +[DependsOn( + typeof(AbpSaasEntityFrameworkCoreModule), + typeof(AbpOpenIddictEntityFrameworkCoreModule), + typeof(AbpDataDbMigratorModule) + )] +public class AuthServerMigrationsEntityFrameworkCoreModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddAbpDbContext(); + + Configure(options => + { + options.UseMySQL(); + }); + } +} diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/FodyWeavers.xml b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/FodyWeavers.xml new file mode 100644 index 000000000..1715698cc --- /dev/null +++ b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/FodyWeavers.xsd b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/FodyWeavers.xsd new file mode 100644 index 000000000..11da52550 --- /dev/null +++ b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/LY.MicroService.AuthServer.EntityFrameworkCore.csproj b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/LY.MicroService.AuthServer.EntityFrameworkCore.csproj new file mode 100644 index 000000000..87b3b42c2 --- /dev/null +++ b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/LY.MicroService.AuthServer.EntityFrameworkCore.csproj @@ -0,0 +1,26 @@ + + + + + + + net7.0 + LY.MicroService.AuthServer.EntityFrameworkCore + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/Migrations/20230109085530_Initial-Auth-Server.Designer.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20230109085530_Initial-Auth-Server.Designer.cs similarity index 97% rename from aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/Migrations/20230109085530_Initial-Auth-Server.Designer.cs rename to aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20230109085530_Initial-Auth-Server.Designer.cs index 892179dfc..a439d944c 100644 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/Migrations/20230109085530_Initial-Auth-Server.Designer.cs +++ b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20230109085530_Initial-Auth-Server.Designer.cs @@ -1,6 +1,5 @@ // using System; -using LY.MicroService.AuthServer.DbMigrator.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; @@ -9,7 +8,7 @@ using Volo.Abp.EntityFrameworkCore; #nullable disable -namespace LY.MicroService.AuthServer.DbMigrator.Migrations +namespace LY.MicroService.AuthServer.EntityFrameworkCore.Migrations { [DbContext(typeof(AuthServerMigrationsDbContext))] [Migration("20230109085530_Initial-Auth-Server")] diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/Migrations/20230109085530_Initial-Auth-Server.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20230109085530_Initial-Auth-Server.cs similarity index 98% rename from aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/Migrations/20230109085530_Initial-Auth-Server.cs rename to aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20230109085530_Initial-Auth-Server.cs index a14ec5ed5..aacb7d26c 100644 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/Migrations/20230109085530_Initial-Auth-Server.cs +++ b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20230109085530_Initial-Auth-Server.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations; #nullable disable -namespace LY.MicroService.AuthServer.DbMigrator.Migrations +namespace LY.MicroService.AuthServer.EntityFrameworkCore.Migrations { /// public partial class InitialAuthServer : Migration diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/Migrations/AuthServerMigrationsDbContextModelSnapshot.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/AuthServerMigrationsDbContextModelSnapshot.cs similarity index 97% rename from aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/Migrations/AuthServerMigrationsDbContextModelSnapshot.cs rename to aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/AuthServerMigrationsDbContextModelSnapshot.cs index 26a918cfd..3bf802b60 100644 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/Migrations/AuthServerMigrationsDbContextModelSnapshot.cs +++ b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/AuthServerMigrationsDbContextModelSnapshot.cs @@ -1,6 +1,6 @@ // using System; -using LY.MicroService.AuthServer.DbMigrator.EntityFrameworkCore; +using LY.MicroService.AuthServer.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/BackendAdminDbMigratorHostedService.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/BackendAdminDbMigratorHostedService.cs index e03469a3c..e51499f5a 100644 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/BackendAdminDbMigratorHostedService.cs +++ b/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/BackendAdminDbMigratorHostedService.cs @@ -1,4 +1,4 @@ -using LY.MicroService.BackendAdmin.DbMigrator.EntityFrameworkCore; +using LY.MicroService.BackendAdmin.EntityFrameworkCore; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/BackendAdminDbMigratorModule.Configure.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/BackendAdminDbMigratorModule.Configure.cs index ff0c0ddf4..bdd290cdf 100644 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/BackendAdminDbMigratorModule.Configure.cs +++ b/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/BackendAdminDbMigratorModule.Configure.cs @@ -1,18 +1,4 @@ -using LY.MicroService.BackendAdmin.DbMigrator.EntityFrameworkCore; -using Microsoft.Extensions.DependencyInjection; -using Volo.Abp.EntityFrameworkCore; - -namespace LY.MicroService.BackendAdmin.DbMigrator; +namespace LY.MicroService.BackendAdmin.DbMigrator; public partial class BackendAdminDbMigratorModule { - private void ConfigureDbContext(IServiceCollection services) - { - services.AddAbpDbContext(); - - // 配置Ef - Configure(options => - { - options.UseMySQL(); - }); - } } diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/BackendAdminDbMigratorModule.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/BackendAdminDbMigratorModule.cs index 4dba235b6..023015c96 100644 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/BackendAdminDbMigratorModule.cs +++ b/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/BackendAdminDbMigratorModule.cs @@ -1,27 +1,13 @@ -using LINGYUN.Abp.Data.DbMigrator; -using LINGYUN.Abp.Saas.EntityFrameworkCore; -using LINGYUN.Abp.TextTemplating.EntityFrameworkCore; +using LY.MicroService.BackendAdmin.EntityFrameworkCore; using Volo.Abp.Autofac; -using Volo.Abp.FeatureManagement.EntityFrameworkCore; using Volo.Abp.Modularity; -using Volo.Abp.PermissionManagement.EntityFrameworkCore; -using Volo.Abp.SettingManagement.EntityFrameworkCore; namespace LY.MicroService.BackendAdmin.DbMigrator; [DependsOn( - typeof(AbpSaasEntityFrameworkCoreModule), - typeof(AbpSettingManagementEntityFrameworkCoreModule), - typeof(AbpPermissionManagementEntityFrameworkCoreModule), - typeof(AbpFeatureManagementEntityFrameworkCoreModule), - typeof(AbpTextTemplatingEntityFrameworkCoreModule), - typeof(AbpDataDbMigratorModule), + typeof(BackendAdminMigrationsEntityFrameworkCoreModule), typeof(AbpAutofacModule) )] public partial class BackendAdminDbMigratorModule : AbpModule { - public override void ConfigureServices(ServiceConfigurationContext context) - { - ConfigureDbContext(context.Services); - } } diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/LY.MicroService.BackendAdmin.DbMigrator.csproj b/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/LY.MicroService.BackendAdmin.DbMigrator.csproj index dc64a16d9..34e122d01 100644 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/LY.MicroService.BackendAdmin.DbMigrator.csproj +++ b/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/LY.MicroService.BackendAdmin.DbMigrator.csproj @@ -17,10 +17,6 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - - - - @@ -43,9 +39,7 @@ - - - + diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/EntityFrameworkCore/BackendAdminDbMigrationService.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/BackendAdminDbMigrationService.cs similarity index 91% rename from aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/EntityFrameworkCore/BackendAdminDbMigrationService.cs rename to aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/BackendAdminDbMigrationService.cs index a7b2c0311..e9f3c7ee7 100644 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/EntityFrameworkCore/BackendAdminDbMigrationService.cs +++ b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/BackendAdminDbMigrationService.cs @@ -3,13 +3,18 @@ using LINGYUN.Abp.Saas.Tenants; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; +using System; +using System.Collections.Generic; using System.Diagnostics; +using System.IO; +using System.Linq; using System.Runtime.InteropServices; +using System.Threading.Tasks; using Volo.Abp.Data; using Volo.Abp.DependencyInjection; using Volo.Abp.MultiTenancy; -namespace LY.MicroService.BackendAdmin.DbMigrator.EntityFrameworkCore; +namespace LY.MicroService.BackendAdmin.EntityFrameworkCore; public class BackendAdminDbMigrationService : ITransientDependency { @@ -81,7 +86,7 @@ public class BackendAdminDbMigrationService : ITransientDependency Logger.LogInformation("You can safely end this process..."); } - private async Task MigrateDatabaseSchemaAsync(Tenant? tenant = null) + private async Task MigrateDatabaseSchemaAsync(Tenant tenant = null) { Logger.LogInformation($"Migrating schema for {(tenant == null ? "host" : tenant.Name + " tenant")} database..."); // 迁移租户数据 @@ -94,7 +99,7 @@ public class BackendAdminDbMigrationService : ITransientDependency }); } - private async Task SeedDataAsync(Tenant? tenant = null) + private async Task SeedDataAsync(Tenant tenant = null) { Logger.LogInformation($"Executing {(tenant == null ? "host" : tenant.Name + " tenant")} database seed..."); @@ -190,7 +195,7 @@ public class BackendAdminDbMigrationService : ITransientDependency return Path.Combine(slnDirectoryPath, "LY.MicroService.BackendAdmin.DbMigrator"); } - private string? GetSolutionDirectoryPath() + private string GetSolutionDirectoryPath() { var currentDirectory = new DirectoryInfo(Directory.GetCurrentDirectory()); diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/EntityFrameworkCore/BackendAdminMigrationsDbContext.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/BackendAdminMigrationsDbContext.cs similarity index 90% rename from aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/EntityFrameworkCore/BackendAdminMigrationsDbContext.cs rename to aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/BackendAdminMigrationsDbContext.cs index e830ae934..2b08280f2 100644 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/EntityFrameworkCore/BackendAdminMigrationsDbContext.cs +++ b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/BackendAdminMigrationsDbContext.cs @@ -7,7 +7,7 @@ using Volo.Abp.FeatureManagement.EntityFrameworkCore; using Volo.Abp.PermissionManagement.EntityFrameworkCore; using Volo.Abp.SettingManagement.EntityFrameworkCore; -namespace LY.MicroService.BackendAdmin.DbMigrator.EntityFrameworkCore; +namespace LY.MicroService.BackendAdmin.EntityFrameworkCore; [ConnectionStringName("BackendAdminDbMigrator")] public class BackendAdminMigrationsDbContext : AbpDbContext diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/EntityFrameworkCore/BackendAdminMigrationsDbContextFactory.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/BackendAdminMigrationsDbContextFactory.cs similarity index 74% rename from aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/EntityFrameworkCore/BackendAdminMigrationsDbContextFactory.cs rename to aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/BackendAdminMigrationsDbContextFactory.cs index 373b8bd83..b06cd9f2b 100644 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/EntityFrameworkCore/BackendAdminMigrationsDbContextFactory.cs +++ b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/BackendAdminMigrationsDbContextFactory.cs @@ -1,8 +1,9 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Design; using Microsoft.Extensions.Configuration; +using System.IO; -namespace LY.MicroService.BackendAdmin.DbMigrator.EntityFrameworkCore; +namespace LY.MicroService.BackendAdmin.EntityFrameworkCore; public class BackendAdminMigrationsDbContextFactory : IDesignTimeDbContextFactory { @@ -20,9 +21,8 @@ public class BackendAdminMigrationsDbContextFactory : IDesignTimeDbContextFactor private static IConfigurationRoot BuildConfiguration() { var builder = new ConfigurationBuilder() - .SetBasePath(Directory.GetCurrentDirectory()) - .AddJsonFile("appsettings.json", optional: false) - .AddJsonFile("appsettings.Development.json", optional: true); + .SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../LY.MicroService.BackendAdmin.DbMigrator/")) + .AddJsonFile("appsettings.json", optional: false); return builder.Build(); } diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/BackendAdminMigrationsEntityFrameworkCoreModule.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/BackendAdminMigrationsEntityFrameworkCoreModule.cs new file mode 100644 index 000000000..2c237ea09 --- /dev/null +++ b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/BackendAdminMigrationsEntityFrameworkCoreModule.cs @@ -0,0 +1,32 @@ +using LINGYUN.Abp.Data.DbMigrator; +using LINGYUN.Abp.Saas.EntityFrameworkCore; +using LINGYUN.Abp.TextTemplating.EntityFrameworkCore; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.FeatureManagement.EntityFrameworkCore; +using Volo.Abp.Modularity; +using Volo.Abp.PermissionManagement.EntityFrameworkCore; +using Volo.Abp.SettingManagement.EntityFrameworkCore; + +namespace LY.MicroService.BackendAdmin.EntityFrameworkCore; + +[DependsOn( + typeof(AbpSaasEntityFrameworkCoreModule), + typeof(AbpSettingManagementEntityFrameworkCoreModule), + typeof(AbpPermissionManagementEntityFrameworkCoreModule), + typeof(AbpFeatureManagementEntityFrameworkCoreModule), + typeof(AbpTextTemplatingEntityFrameworkCoreModule), + typeof(AbpDataDbMigratorModule) + )] +public class BackendAdminMigrationsEntityFrameworkCoreModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddAbpDbContext(); + + Configure(options => + { + options.UseMySQL(); + }); + } +} diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/FodyWeavers.xml b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/FodyWeavers.xml new file mode 100644 index 000000000..1715698cc --- /dev/null +++ b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/FodyWeavers.xsd b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/FodyWeavers.xsd new file mode 100644 index 000000000..11da52550 --- /dev/null +++ b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/LY.MicroService.BackendAdmin.EntityFrameworkCore.csproj b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/LY.MicroService.BackendAdmin.EntityFrameworkCore.csproj new file mode 100644 index 000000000..dbedf316f --- /dev/null +++ b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/LY.MicroService.BackendAdmin.EntityFrameworkCore.csproj @@ -0,0 +1,28 @@ + + + + + + + net7.0 + LY.MicroService.BackendAdmin.EntityFrameworkCore + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + + diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/Migrations/20230109083613_Initial-Backend-Admin.Designer.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20230109083613_Initial-Backend-Admin.Designer.cs similarity index 96% rename from aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/Migrations/20230109083613_Initial-Backend-Admin.Designer.cs rename to aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20230109083613_Initial-Backend-Admin.Designer.cs index 3c056137b..a0eb97372 100644 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/Migrations/20230109083613_Initial-Backend-Admin.Designer.cs +++ b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20230109083613_Initial-Backend-Admin.Designer.cs @@ -1,6 +1,6 @@ // using System; -using LY.MicroService.BackendAdmin.DbMigrator.EntityFrameworkCore; +using LY.MicroService.BackendAdmin.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; @@ -9,7 +9,7 @@ using Volo.Abp.EntityFrameworkCore; #nullable disable -namespace LY.MicroService.BackendAdmin.DbMigrator.Migrations +namespace LY.MicroService.BackendAdmin.EntityFrameworkCore.Migrations { [DbContext(typeof(BackendAdminMigrationsDbContext))] [Migration("20230109083613_Initial-Backend-Admin")] diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/Migrations/20230109083613_Initial-Backend-Admin.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20230109083613_Initial-Backend-Admin.cs similarity index 97% rename from aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/Migrations/20230109083613_Initial-Backend-Admin.cs rename to aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20230109083613_Initial-Backend-Admin.cs index 7986c100d..ac15818eb 100644 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/Migrations/20230109083613_Initial-Backend-Admin.cs +++ b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20230109083613_Initial-Backend-Admin.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations; #nullable disable -namespace LY.MicroService.BackendAdmin.DbMigrator.Migrations +namespace LY.MicroService.BackendAdmin.EntityFrameworkCore.Migrations { /// public partial class InitialBackendAdmin : Migration diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/Migrations/BackendAdminMigrationsDbContextModelSnapshot.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/BackendAdminMigrationsDbContextModelSnapshot.cs similarity index 96% rename from aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/Migrations/BackendAdminMigrationsDbContextModelSnapshot.cs rename to aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/BackendAdminMigrationsDbContextModelSnapshot.cs index b62269730..79aefffef 100644 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/Migrations/BackendAdminMigrationsDbContextModelSnapshot.cs +++ b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/BackendAdminMigrationsDbContextModelSnapshot.cs @@ -1,6 +1,6 @@ // using System; -using LY.MicroService.BackendAdmin.DbMigrator.EntityFrameworkCore; +using LY.MicroService.BackendAdmin.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; @@ -8,7 +8,7 @@ using Volo.Abp.EntityFrameworkCore; #nullable disable -namespace LY.MicroService.BackendAdmin.DbMigrator.Migrations +namespace LY.MicroService.BackendAdmin.EntityFrameworkCore.Migrations { [DbContext(typeof(BackendAdminMigrationsDbContext))] partial class BackendAdminMigrationsDbContextModelSnapshot : ModelSnapshot diff --git a/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/DataSeeder/IWeChatResourceDataSeeder.cs b/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/DataSeeder/IWeChatResourceDataSeeder.cs deleted file mode 100644 index 7c15ae4c6..000000000 --- a/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/DataSeeder/IWeChatResourceDataSeeder.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace LY.MicroService.IdentityServer.DbMigrator.DataSeeder; - -public interface IWeChatResourceDataSeeder -{ - Task CreateStandardResourcesAsync(); -} diff --git a/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/IdentityServerDbMigratorHostedService.cs b/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/IdentityServerDbMigratorHostedService.cs index 0f7b0c25b..e5ae2190b 100644 --- a/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/IdentityServerDbMigratorHostedService.cs +++ b/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/IdentityServerDbMigratorHostedService.cs @@ -1,4 +1,4 @@ -using LY.MicroService.IdentityServer.DbMigrator.EntityFrameworkCore; +using LY.MicroService.IdentityServer.EntityFrameworkCore; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; diff --git a/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/IdentityServerDbMigratorModule.Configure.cs b/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/IdentityServerDbMigratorModule.Configure.cs index e8887d2f6..ff1dfbac0 100644 --- a/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/IdentityServerDbMigratorModule.Configure.cs +++ b/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/IdentityServerDbMigratorModule.Configure.cs @@ -1,18 +1,4 @@ -using LY.MicroService.IdentityServer.DbMigrator.EntityFrameworkCore; -using Microsoft.Extensions.DependencyInjection; -using Volo.Abp.EntityFrameworkCore; - -namespace LY.MicroService.IdentityServer.DbMigrator; +namespace LY.MicroService.IdentityServer.DbMigrator; public partial class IdentityServerDbMigratorModule { - private void ConfigureDbContext(IServiceCollection services) - { - services.AddAbpDbContext(); - - // 配置Ef - Configure(options => - { - options.UseMySQL(); - }); - } } diff --git a/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/IdentityServerDbMigratorModule.cs b/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/IdentityServerDbMigratorModule.cs index a0f7c2a8e..cb951ef59 100644 --- a/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/IdentityServerDbMigratorModule.cs +++ b/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/IdentityServerDbMigratorModule.cs @@ -1,27 +1,13 @@ -using LINGYUN.Abp.Data.DbMigrator; -using LINGYUN.Abp.Identity.EntityFrameworkCore; -using LINGYUN.Abp.IdentityServer.EntityFrameworkCore; -using LINGYUN.Abp.Saas.EntityFrameworkCore; -using LINGYUN.Abp.WeChat; +using LY.MicroService.IdentityServer.EntityFrameworkCore; using Volo.Abp.Autofac; using Volo.Abp.Modularity; -using Volo.Abp.PermissionManagement.EntityFrameworkCore; namespace LY.MicroService.IdentityServer.DbMigrator; [DependsOn( - typeof(AbpSaasEntityFrameworkCoreModule), - typeof(AbpIdentityEntityFrameworkCoreModule), - typeof(AbpIdentityServerEntityFrameworkCoreModule), - typeof(AbpPermissionManagementEntityFrameworkCoreModule), - typeof(AbpWeChatModule), - typeof(AbpDataDbMigratorModule), + typeof(IdentityServerMigrationsEntityFrameworkCoreModule), typeof(AbpAutofacModule) )] public partial class IdentityServerDbMigratorModule : AbpModule { - public override void ConfigureServices(ServiceConfigurationContext context) - { - ConfigureDbContext(context.Services); - } } diff --git a/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/LY.MicroService.IdentityServer.DbMigrator.csproj b/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/LY.MicroService.IdentityServer.DbMigrator.csproj index 236d69b04..1c4f896cd 100644 --- a/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/LY.MicroService.IdentityServer.DbMigrator.csproj +++ b/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/LY.MicroService.IdentityServer.DbMigrator.csproj @@ -45,11 +45,7 @@ - - - - - + diff --git a/aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/DataSeeder/IWeChatResourceDataSeeder.cs b/aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/DataSeeder/IWeChatResourceDataSeeder.cs new file mode 100644 index 000000000..af6cc0fbd --- /dev/null +++ b/aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/DataSeeder/IWeChatResourceDataSeeder.cs @@ -0,0 +1,8 @@ +using System.Threading.Tasks; + +namespace LY.MicroService.IdentityServer.EntityFrameworkCore.DataSeeder; + +public interface IWeChatResourceDataSeeder +{ + Task CreateStandardResourcesAsync(); +} diff --git a/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/DataSeeder/IdentityServerDataSeedContributor.cs b/aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/DataSeeder/IdentityServerDataSeedContributor.cs similarity index 96% rename from aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/DataSeeder/IdentityServerDataSeedContributor.cs rename to aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/DataSeeder/IdentityServerDataSeedContributor.cs index ae15d8404..b28d00cfc 100644 --- a/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/DataSeeder/IdentityServerDataSeedContributor.cs +++ b/aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/DataSeeder/IdentityServerDataSeedContributor.cs @@ -17,7 +17,7 @@ using Volo.Abp.MultiTenancy; using Volo.Abp.PermissionManagement; using Volo.Abp.Uow; -namespace LY.MicroService.IdentityServer.DbMigrator.DataSeeder; +namespace LY.MicroService.IdentityServer.EntityFrameworkCore.DataSeeder; public class IdentityServerDataSeedContributor : IDataSeedContributor, ITransientDependency { diff --git a/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/DataSeeder/WeChatResourceDataSeeder.cs b/aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/DataSeeder/WeChatResourceDataSeeder.cs similarity index 95% rename from aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/DataSeeder/WeChatResourceDataSeeder.cs rename to aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/DataSeeder/WeChatResourceDataSeeder.cs index 7eab87459..7bb4f79ec 100644 --- a/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/DataSeeder/WeChatResourceDataSeeder.cs +++ b/aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/DataSeeder/WeChatResourceDataSeeder.cs @@ -6,7 +6,7 @@ using Volo.Abp.Guids; using Volo.Abp.Identity; using Volo.Abp.IdentityServer.IdentityResources; -namespace LY.MicroService.IdentityServer.DbMigrator.DataSeeder; +namespace LY.MicroService.IdentityServer.EntityFrameworkCore.DataSeeder; public class WeChatResourceDataSeeder : IWeChatResourceDataSeeder, ITransientDependency { diff --git a/aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/FodyWeavers.xml b/aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/FodyWeavers.xml new file mode 100644 index 000000000..1715698cc --- /dev/null +++ b/aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/FodyWeavers.xsd b/aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/FodyWeavers.xsd new file mode 100644 index 000000000..11da52550 --- /dev/null +++ b/aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/EntityFrameworkCore/IdentityServerDbMigrationService.cs b/aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/IdentityServerDbMigrationService.cs similarity index 91% rename from aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/EntityFrameworkCore/IdentityServerDbMigrationService.cs rename to aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/IdentityServerDbMigrationService.cs index 16f7d23d7..9b6903991 100644 --- a/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/EntityFrameworkCore/IdentityServerDbMigrationService.cs +++ b/aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/IdentityServerDbMigrationService.cs @@ -3,13 +3,18 @@ using LINGYUN.Abp.Saas.Tenants; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; +using System; +using System.Collections.Generic; using System.Diagnostics; +using System.IO; +using System.Linq; using System.Runtime.InteropServices; +using System.Threading.Tasks; using Volo.Abp.Data; using Volo.Abp.DependencyInjection; using Volo.Abp.MultiTenancy; -namespace LY.MicroService.IdentityServer.DbMigrator.EntityFrameworkCore; +namespace LY.MicroService.IdentityServer.EntityFrameworkCore; public class IdentityServerDbMigrationService : ITransientDependency { @@ -81,7 +86,7 @@ public class IdentityServerDbMigrationService : ITransientDependency Logger.LogInformation("You can safely end this process..."); } - private async Task MigrateDatabaseSchemaAsync(Tenant? tenant = null) + private async Task MigrateDatabaseSchemaAsync(Tenant tenant = null) { Logger.LogInformation($"Migrating schema for {(tenant == null ? "host" : tenant.Name + " tenant")} database..."); // 迁移租户数据 @@ -94,7 +99,7 @@ public class IdentityServerDbMigrationService : ITransientDependency }); } - private async Task SeedDataAsync(Tenant? tenant = null) + private async Task SeedDataAsync(Tenant tenant = null) { Logger.LogInformation($"Executing {(tenant == null ? "host" : tenant.Name + " tenant")} database seed..."); @@ -190,7 +195,7 @@ public class IdentityServerDbMigrationService : ITransientDependency return Path.Combine(slnDirectoryPath, "LY.MicroService.BackendAdmin.DbMigrator"); } - private string? GetSolutionDirectoryPath() + private string GetSolutionDirectoryPath() { var currentDirectory = new DirectoryInfo(Directory.GetCurrentDirectory()); diff --git a/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/EntityFrameworkCore/IdentityServerMigrationsDbContext.cs b/aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/IdentityServerMigrationsDbContext.cs similarity index 87% rename from aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/EntityFrameworkCore/IdentityServerMigrationsDbContext.cs rename to aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/IdentityServerMigrationsDbContext.cs index dc56642f4..c65cb8868 100644 --- a/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/EntityFrameworkCore/IdentityServerMigrationsDbContext.cs +++ b/aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/IdentityServerMigrationsDbContext.cs @@ -4,7 +4,7 @@ using Volo.Abp.EntityFrameworkCore; using Volo.Abp.Identity.EntityFrameworkCore; using Volo.Abp.IdentityServer.EntityFrameworkCore; -namespace LY.MicroService.IdentityServer.DbMigrator.EntityFrameworkCore; +namespace LY.MicroService.IdentityServer.EntityFrameworkCore; [ConnectionStringName("IdentityServerDbMigrator")] public class IdentityServerMigrationsDbContext : AbpDbContext diff --git a/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/EntityFrameworkCore/IdentityServerMigrationsDbContextFactory.cs b/aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/IdentityServerMigrationsDbContextFactory.cs similarity index 74% rename from aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/EntityFrameworkCore/IdentityServerMigrationsDbContextFactory.cs rename to aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/IdentityServerMigrationsDbContextFactory.cs index 92f2e2649..2f602a462 100644 --- a/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/EntityFrameworkCore/IdentityServerMigrationsDbContextFactory.cs +++ b/aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/IdentityServerMigrationsDbContextFactory.cs @@ -1,8 +1,9 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Design; using Microsoft.Extensions.Configuration; +using System.IO; -namespace LY.MicroService.IdentityServer.DbMigrator.EntityFrameworkCore; +namespace LY.MicroService.IdentityServer.EntityFrameworkCore; public class IdentityServerMigrationsDbContextFactory : IDesignTimeDbContextFactory { @@ -20,9 +21,8 @@ public class IdentityServerMigrationsDbContextFactory : IDesignTimeDbContextFact private static IConfigurationRoot BuildConfiguration() { var builder = new ConfigurationBuilder() - .SetBasePath(Directory.GetCurrentDirectory()) - .AddJsonFile("appsettings.json", optional: false) - .AddJsonFile("appsettings.Development.json", optional: true); + .SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../LY.MicroService.IdentityServer.DbMigrator/")) + .AddJsonFile("appsettings.json", optional: false); return builder.Build(); } diff --git a/aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/IdentityServerMigrationsEntityFrameworkCoreModule.cs b/aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/IdentityServerMigrationsEntityFrameworkCoreModule.cs new file mode 100644 index 000000000..fb2382f9f --- /dev/null +++ b/aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/IdentityServerMigrationsEntityFrameworkCoreModule.cs @@ -0,0 +1,32 @@ +using LINGYUN.Abp.Data.DbMigrator; +using LINGYUN.Abp.Identity.EntityFrameworkCore; +using LINGYUN.Abp.IdentityServer.EntityFrameworkCore; +using LINGYUN.Abp.Saas.EntityFrameworkCore; +using LINGYUN.Abp.WeChat; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.Modularity; +using Volo.Abp.PermissionManagement.EntityFrameworkCore; + +namespace LY.MicroService.IdentityServer.EntityFrameworkCore; + +[DependsOn( + typeof(AbpSaasEntityFrameworkCoreModule), + typeof(AbpIdentityEntityFrameworkCoreModule), + typeof(AbpIdentityServerEntityFrameworkCoreModule), + typeof(AbpPermissionManagementEntityFrameworkCoreModule), + typeof(AbpWeChatModule), + typeof(AbpDataDbMigratorModule) + )] +public class IdentityServerMigrationsEntityFrameworkCoreModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddAbpDbContext(); + + Configure(options => + { + options.UseMySQL(); + }); + } +} diff --git a/aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/LY.MicroService.IdentityServer.EntityFrameworkCore.csproj b/aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/LY.MicroService.IdentityServer.EntityFrameworkCore.csproj new file mode 100644 index 000000000..594b68ca7 --- /dev/null +++ b/aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/LY.MicroService.IdentityServer.EntityFrameworkCore.csproj @@ -0,0 +1,28 @@ + + + + + + + net7.0 + LY.MicroService.IdentityServer.EntityFrameworkCore + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + + diff --git a/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/Migrations/20230109090609_Initial-Identity-Server.Designer.cs b/aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/Migrations/20230109090609_Initial-Identity-Server.Designer.cs similarity index 97% rename from aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/Migrations/20230109090609_Initial-Identity-Server.Designer.cs rename to aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/Migrations/20230109090609_Initial-Identity-Server.Designer.cs index e80281fb2..e548d76af 100644 --- a/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/Migrations/20230109090609_Initial-Identity-Server.Designer.cs +++ b/aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/Migrations/20230109090609_Initial-Identity-Server.Designer.cs @@ -1,6 +1,6 @@ // using System; -using LY.MicroService.IdentityServer.DbMigrator.EntityFrameworkCore; +using LY.MicroService.IdentityServer.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; @@ -9,7 +9,7 @@ using Volo.Abp.EntityFrameworkCore; #nullable disable -namespace LY.MicroService.IdentityServer.DbMigrator.Migrations +namespace LY.MicroService.IdentityServer.EntityFrameworkCore.Migrations { [DbContext(typeof(IdentityServerMigrationsDbContext))] [Migration("20230109090609_Initial-Identity-Server")] diff --git a/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/Migrations/20230109090609_Initial-Identity-Server.cs b/aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/Migrations/20230109090609_Initial-Identity-Server.cs similarity index 98% rename from aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/Migrations/20230109090609_Initial-Identity-Server.cs rename to aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/Migrations/20230109090609_Initial-Identity-Server.cs index f2834fa7b..ada9932c6 100644 --- a/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/Migrations/20230109090609_Initial-Identity-Server.cs +++ b/aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/Migrations/20230109090609_Initial-Identity-Server.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations; #nullable disable -namespace LY.MicroService.IdentityServer.DbMigrator.Migrations +namespace LY.MicroService.IdentityServer.EntityFrameworkCore.Migrations { /// public partial class InitialIdentityServer : Migration diff --git a/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/Migrations/IdentityServerMigrationsDbContextModelSnapshot.cs b/aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/Migrations/IdentityServerMigrationsDbContextModelSnapshot.cs similarity index 97% rename from aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/Migrations/IdentityServerMigrationsDbContextModelSnapshot.cs rename to aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/Migrations/IdentityServerMigrationsDbContextModelSnapshot.cs index a284929bf..d6b3389d3 100644 --- a/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/Migrations/IdentityServerMigrationsDbContextModelSnapshot.cs +++ b/aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/Migrations/IdentityServerMigrationsDbContextModelSnapshot.cs @@ -1,6 +1,6 @@ // using System; -using LY.MicroService.IdentityServer.DbMigrator.EntityFrameworkCore; +using LY.MicroService.IdentityServer.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; @@ -8,7 +8,7 @@ using Volo.Abp.EntityFrameworkCore; #nullable disable -namespace LY.MicroService.IdentityServer.DbMigrator.Migrations +namespace LY.MicroService.IdentityServer.EntityFrameworkCore.Migrations { [DbContext(typeof(IdentityServerMigrationsDbContext))] partial class IdentityServerMigrationsDbContextModelSnapshot : ModelSnapshot diff --git a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LY.MicroService.LocalizationManagement.DbMigrator.csproj b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LY.MicroService.LocalizationManagement.DbMigrator.csproj index d862e1929..5f058f524 100644 --- a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LY.MicroService.LocalizationManagement.DbMigrator.csproj +++ b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LY.MicroService.LocalizationManagement.DbMigrator.csproj @@ -46,10 +46,7 @@ - - - - + diff --git a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LocalizationManagementDbMigratorHostedService.cs b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LocalizationManagementDbMigratorHostedService.cs index d10a301a7..7550d79c4 100644 --- a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LocalizationManagementDbMigratorHostedService.cs +++ b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LocalizationManagementDbMigratorHostedService.cs @@ -1,4 +1,4 @@ -using LY.MicroService.LocalizationManagement.DbMigrator.EntityFrameworkCore; +using LY.MicroService.LocalizationManagement.EntityFrameworkCore; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; diff --git a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LocalizationManagementDbMigratorModule.Configure.cs b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LocalizationManagementDbMigratorModule.Configure.cs index ab833bee8..d39b3a985 100644 --- a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LocalizationManagementDbMigratorModule.Configure.cs +++ b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LocalizationManagementDbMigratorModule.Configure.cs @@ -1,18 +1,4 @@ -using LY.MicroService.LocalizationManagement.DbMigrator.EntityFrameworkCore; -using Microsoft.Extensions.DependencyInjection; -using Volo.Abp.EntityFrameworkCore; - -namespace LY.MicroService.LocalizationManagement.DbMigrator; +namespace LY.MicroService.LocalizationManagement.DbMigrator; public partial class LocalizationManagementDbMigratorModule { - private void ConfigureDbContext(IServiceCollection services) - { - services.AddAbpDbContext(); - - // 配置Ef - Configure(options => - { - options.UseMySQL(); - }); - } } diff --git a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LocalizationManagementDbMigratorModule.cs b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LocalizationManagementDbMigratorModule.cs index 4f8975003..c99ed3745 100644 --- a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LocalizationManagementDbMigratorModule.cs +++ b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LocalizationManagementDbMigratorModule.cs @@ -1,27 +1,13 @@ -using LINGYUN.Abp.Data.DbMigrator; -using LINGYUN.Abp.Saas.EntityFrameworkCore; -using LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore; +using LY.MicroService.LocalizationManagement.EntityFrameworkCore; using Volo.Abp.Autofac; -using Volo.Abp.FeatureManagement.EntityFrameworkCore; using Volo.Abp.Modularity; -using Volo.Abp.PermissionManagement.EntityFrameworkCore; -using Volo.Abp.SettingManagement.EntityFrameworkCore; namespace LY.MicroService.LocalizationManagement.DbMigrator; [DependsOn( - typeof(AbpSaasEntityFrameworkCoreModule), - typeof(AbpSettingManagementEntityFrameworkCoreModule), - typeof(AbpPermissionManagementEntityFrameworkCoreModule), - typeof(AbpFeatureManagementEntityFrameworkCoreModule), - typeof(AbpLocalizationManagementEntityFrameworkCoreModule), - typeof(AbpDataDbMigratorModule), + typeof(LocalizationManagementMigrationsEntityFrameworkCoreModule), typeof(AbpAutofacModule) )] public partial class LocalizationManagementDbMigratorModule : AbpModule { - public override void ConfigureServices(ServiceConfigurationContext context) - { - ConfigureDbContext(context.Services); - } } diff --git a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/LY.MicroService.LocalizationManagement.EntityFrameworkCore.csproj b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/LY.MicroService.LocalizationManagement.EntityFrameworkCore.csproj new file mode 100644 index 000000000..c7481de61 --- /dev/null +++ b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/LY.MicroService.LocalizationManagement.EntityFrameworkCore.csproj @@ -0,0 +1,25 @@ + + + + net7.0 + LY.MicroService.LocalizationManagement.EntityFrameworkCore + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + + diff --git a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/EntityFrameworkCore/LocalizationManagementDbMigrationService.cs b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/LocalizationManagementDbMigrationService.cs similarity index 94% rename from aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/EntityFrameworkCore/LocalizationManagementDbMigrationService.cs rename to aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/LocalizationManagementDbMigrationService.cs index d9b21bb14..068efd9a3 100644 --- a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/EntityFrameworkCore/LocalizationManagementDbMigrationService.cs +++ b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/LocalizationManagementDbMigrationService.cs @@ -3,13 +3,18 @@ using LINGYUN.Abp.Saas.Tenants; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; +using System; +using System.Collections.Generic; using System.Diagnostics; +using System.IO; +using System.Linq; using System.Runtime.InteropServices; +using System.Threading.Tasks; using Volo.Abp.Data; using Volo.Abp.DependencyInjection; using Volo.Abp.MultiTenancy; -namespace LY.MicroService.LocalizationManagement.DbMigrator.EntityFrameworkCore; +namespace LY.MicroService.LocalizationManagement.EntityFrameworkCore; public class LocalizationManagementDbMigrationService : ITransientDependency { diff --git a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/EntityFrameworkCore/LocalizationManagementMigrationsDbContext.cs b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/LocalizationManagementMigrationsDbContext.cs similarity index 86% rename from aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/EntityFrameworkCore/LocalizationManagementMigrationsDbContext.cs rename to aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/LocalizationManagementMigrationsDbContext.cs index 8089bdd10..874880c0e 100644 --- a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/EntityFrameworkCore/LocalizationManagementMigrationsDbContext.cs +++ b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/LocalizationManagementMigrationsDbContext.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Volo.Abp.Data; using Volo.Abp.EntityFrameworkCore; -namespace LY.MicroService.LocalizationManagement.DbMigrator.EntityFrameworkCore; +namespace LY.MicroService.LocalizationManagement.EntityFrameworkCore; [ConnectionStringName("LocalizationManagementDbMigrator")] public class LocalizationManagementMigrationsDbContext : AbpDbContext diff --git a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/EntityFrameworkCore/LocalizationManagementMigrationsDbContextFactory.cs b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/LocalizationManagementMigrationsDbContextFactory.cs similarity index 74% rename from aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/EntityFrameworkCore/LocalizationManagementMigrationsDbContextFactory.cs rename to aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/LocalizationManagementMigrationsDbContextFactory.cs index 75d9732ba..ca647917b 100644 --- a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/EntityFrameworkCore/LocalizationManagementMigrationsDbContextFactory.cs +++ b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/LocalizationManagementMigrationsDbContextFactory.cs @@ -1,8 +1,9 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Design; using Microsoft.Extensions.Configuration; +using System.IO; -namespace LY.MicroService.LocalizationManagement.DbMigrator.EntityFrameworkCore; +namespace LY.MicroService.LocalizationManagement.EntityFrameworkCore; public class LocalizationManagementMigrationsDbContextFactory : IDesignTimeDbContextFactory { @@ -20,9 +21,8 @@ public class LocalizationManagementMigrationsDbContextFactory : IDesignTimeDbCon private static IConfigurationRoot BuildConfiguration() { var builder = new ConfigurationBuilder() - .SetBasePath(Directory.GetCurrentDirectory()) - .AddJsonFile("appsettings.json", optional: false) - .AddJsonFile("appsettings.Development.json", optional: true); + .SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../LY.MicroService.LocalizationManagement.DbMigrator/")) + .AddJsonFile("appsettings.json", optional: false); return builder.Build(); } diff --git a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/LocalizationManagementMigrationsEntityFrameworkCoreModule.cs b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/LocalizationManagementMigrationsEntityFrameworkCoreModule.cs new file mode 100644 index 000000000..e17d8c1cc --- /dev/null +++ b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/LocalizationManagementMigrationsEntityFrameworkCoreModule.cs @@ -0,0 +1,32 @@ +using LINGYUN.Abp.Data.DbMigrator; +using LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore; +using LINGYUN.Abp.Saas.EntityFrameworkCore; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.FeatureManagement.EntityFrameworkCore; +using Volo.Abp.Modularity; +using Volo.Abp.PermissionManagement.EntityFrameworkCore; +using Volo.Abp.SettingManagement.EntityFrameworkCore; + +namespace LY.MicroService.LocalizationManagement.EntityFrameworkCore; + +[DependsOn( + typeof(AbpSaasEntityFrameworkCoreModule), + typeof(AbpSettingManagementEntityFrameworkCoreModule), + typeof(AbpPermissionManagementEntityFrameworkCoreModule), + typeof(AbpFeatureManagementEntityFrameworkCoreModule), + typeof(AbpLocalizationManagementEntityFrameworkCoreModule), + typeof(AbpDataDbMigratorModule) + )] +public class LocalizationManagementMigrationsEntityFrameworkCoreModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddAbpDbContext(); + + Configure(options => + { + options.UseMySQL(); + }); + } +} diff --git a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/Migrations/20230109093938_Initial-Localization-Management.Designer.cs b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/Migrations/20230109093938_Initial-Localization-Management.Designer.cs similarity index 95% rename from aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/Migrations/20230109093938_Initial-Localization-Management.Designer.cs rename to aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/Migrations/20230109093938_Initial-Localization-Management.Designer.cs index 42d3667a6..dfdf8fdc2 100644 --- a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/Migrations/20230109093938_Initial-Localization-Management.Designer.cs +++ b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/Migrations/20230109093938_Initial-Localization-Management.Designer.cs @@ -1,6 +1,6 @@ // using System; -using LY.MicroService.LocalizationManagement.DbMigrator.EntityFrameworkCore; +using LY.MicroService.LocalizationManagement.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; @@ -9,7 +9,7 @@ using Volo.Abp.EntityFrameworkCore; #nullable disable -namespace LY.MicroService.LocalizationManagement.DbMigrator.Migrations +namespace LY.MicroService.LocalizationManagement.EntityFrameworkCore.Migrations { [DbContext(typeof(LocalizationManagementMigrationsDbContext))] [Migration("20230109093938_Initial-Localization-Management")] diff --git a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/Migrations/20230109093938_Initial-Localization-Management.cs b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/Migrations/20230109093938_Initial-Localization-Management.cs similarity index 96% rename from aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/Migrations/20230109093938_Initial-Localization-Management.cs rename to aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/Migrations/20230109093938_Initial-Localization-Management.cs index 1d832ffe3..feca8b9bd 100644 --- a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/Migrations/20230109093938_Initial-Localization-Management.cs +++ b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/Migrations/20230109093938_Initial-Localization-Management.cs @@ -4,7 +4,7 @@ using Microsoft.EntityFrameworkCore.Migrations; #nullable disable -namespace LY.MicroService.LocalizationManagement.DbMigrator.Migrations +namespace LY.MicroService.LocalizationManagement.EntityFrameworkCore.Migrations { /// public partial class InitialLocalizationManagement : Migration diff --git a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/Migrations/20230110091142_Add-Default-Culture-Name-With-Resource-Record.Designer.cs b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/Migrations/20230110091142_Add-Default-Culture-Name-With-Resource-Record.Designer.cs similarity index 95% rename from aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/Migrations/20230110091142_Add-Default-Culture-Name-With-Resource-Record.Designer.cs rename to aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/Migrations/20230110091142_Add-Default-Culture-Name-With-Resource-Record.Designer.cs index 86c6cab55..3922e9ff1 100644 --- a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/Migrations/20230110091142_Add-Default-Culture-Name-With-Resource-Record.Designer.cs +++ b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/Migrations/20230110091142_Add-Default-Culture-Name-With-Resource-Record.Designer.cs @@ -1,6 +1,6 @@ // using System; -using LY.MicroService.LocalizationManagement.DbMigrator.EntityFrameworkCore; +using LY.MicroService.LocalizationManagement.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; @@ -9,7 +9,7 @@ using Volo.Abp.EntityFrameworkCore; #nullable disable -namespace LY.MicroService.LocalizationManagement.DbMigrator.Migrations +namespace LY.MicroService.LocalizationManagement.EntityFrameworkCore.Migrations { [DbContext(typeof(LocalizationManagementMigrationsDbContext))] [Migration("20230110091142_Add-Default-Culture-Name-With-Resource-Record")] diff --git a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/Migrations/20230110091142_Add-Default-Culture-Name-With-Resource-Record.cs b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/Migrations/20230110091142_Add-Default-Culture-Name-With-Resource-Record.cs similarity index 88% rename from aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/Migrations/20230110091142_Add-Default-Culture-Name-With-Resource-Record.cs rename to aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/Migrations/20230110091142_Add-Default-Culture-Name-With-Resource-Record.cs index 93d5ed418..500cf79b7 100644 --- a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/Migrations/20230110091142_Add-Default-Culture-Name-With-Resource-Record.cs +++ b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/Migrations/20230110091142_Add-Default-Culture-Name-With-Resource-Record.cs @@ -2,7 +2,7 @@ #nullable disable -namespace LY.MicroService.LocalizationManagement.DbMigrator.Migrations +namespace LY.MicroService.LocalizationManagement.EntityFrameworkCore.Migrations { /// public partial class AddDefaultCultureNameWithResourceRecord : Migration diff --git a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/Migrations/LocalizationManagementMigrationsDbContextModelSnapshot.cs b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/Migrations/LocalizationManagementMigrationsDbContextModelSnapshot.cs similarity index 95% rename from aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/Migrations/LocalizationManagementMigrationsDbContextModelSnapshot.cs rename to aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/Migrations/LocalizationManagementMigrationsDbContextModelSnapshot.cs index 6203ebf62..8d1be8086 100644 --- a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/Migrations/LocalizationManagementMigrationsDbContextModelSnapshot.cs +++ b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/Migrations/LocalizationManagementMigrationsDbContextModelSnapshot.cs @@ -1,6 +1,6 @@ // using System; -using LY.MicroService.LocalizationManagement.DbMigrator.EntityFrameworkCore; +using LY.MicroService.LocalizationManagement.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; @@ -8,7 +8,7 @@ using Volo.Abp.EntityFrameworkCore; #nullable disable -namespace LY.MicroService.LocalizationManagement.DbMigrator.Migrations +namespace LY.MicroService.LocalizationManagement.EntityFrameworkCore.Migrations { [DbContext(typeof(LocalizationManagementMigrationsDbContext))] partial class LocalizationManagementMigrationsDbContextModelSnapshot : ModelSnapshot diff --git a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/LY.MicroService.Platform.DbMigrator.csproj b/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/LY.MicroService.Platform.DbMigrator.csproj index 7c004bc29..e15062627 100644 --- a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/LY.MicroService.Platform.DbMigrator.csproj +++ b/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/LY.MicroService.Platform.DbMigrator.csproj @@ -47,10 +47,7 @@ - - - - + diff --git a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/PlatformDbMigratorHostedService.cs b/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/PlatformDbMigratorHostedService.cs index 3e75627e7..3d025f6cf 100644 --- a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/PlatformDbMigratorHostedService.cs +++ b/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/PlatformDbMigratorHostedService.cs @@ -1,4 +1,4 @@ -using LY.MicroService.Platform.DbMigrator.EntityFrameworkCore; +using LY.MicroService.Platform.EntityFrameworkCore; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; diff --git a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/PlatformDbMigratorModule.Configure.cs b/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/PlatformDbMigratorModule.Configure.cs index ee39e7c28..1b41d61f9 100644 --- a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/PlatformDbMigratorModule.Configure.cs +++ b/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/PlatformDbMigratorModule.Configure.cs @@ -1,18 +1,4 @@ -using LY.MicroService.Platform.DbMigrator.EntityFrameworkCore; -using Microsoft.Extensions.DependencyInjection; -using Volo.Abp.EntityFrameworkCore; - -namespace LY.MicroService.Platform.DbMigrator; +namespace LY.MicroService.Platform.DbMigrator; public partial class PlatformDbMigratorModule { - private void ConfigureDbContext(IServiceCollection services) - { - services.AddAbpDbContext(); - - // 配置Ef - Configure(options => - { - options.UseMySQL(); - }); - } } diff --git a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/PlatformDbMigratorModule.cs b/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/PlatformDbMigratorModule.cs index c43ee1274..b39b17225 100644 --- a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/PlatformDbMigratorModule.cs +++ b/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/PlatformDbMigratorModule.cs @@ -1,29 +1,15 @@ -using LINGYUN.Abp.Data.DbMigrator; -using LINGYUN.Abp.Saas.EntityFrameworkCore; -using LINGYUN.Abp.UI.Navigation.VueVbenAdmin; -using LINGYUN.Platform.EntityFrameworkCore; +using LINGYUN.Abp.UI.Navigation.VueVbenAdmin; +using LY.MicroService.Platform.EntityFrameworkCore; using Volo.Abp.Autofac; -using Volo.Abp.FeatureManagement.EntityFrameworkCore; using Volo.Abp.Modularity; -using Volo.Abp.PermissionManagement.EntityFrameworkCore; -using Volo.Abp.SettingManagement.EntityFrameworkCore; namespace LY.MicroService.Platform.DbMigrator; [DependsOn( - typeof(AbpSaasEntityFrameworkCoreModule), - typeof(AbpSettingManagementEntityFrameworkCoreModule), - typeof(AbpPermissionManagementEntityFrameworkCoreModule), - typeof(AbpFeatureManagementEntityFrameworkCoreModule), - typeof(PlatformEntityFrameworkCoreModule), + typeof(PlatformMigrationsEntityFrameworkCoreModule), typeof(AbpUINavigationVueVbenAdminModule), - typeof(AbpDataDbMigratorModule), typeof(AbpAutofacModule) )] public partial class PlatformDbMigratorModule : AbpModule { - public override void ConfigureServices(ServiceConfigurationContext context) - { - ConfigureDbContext(context.Services); - } } diff --git a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/LY.MicroService.Platform.EntityFrameworkCore.csproj b/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/LY.MicroService.Platform.EntityFrameworkCore.csproj new file mode 100644 index 000000000..3695fbed9 --- /dev/null +++ b/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/LY.MicroService.Platform.EntityFrameworkCore.csproj @@ -0,0 +1,25 @@ + + + + net7.0 + LY.MicroService.Platform.EntityFrameworkCore + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + + diff --git a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/Migrations/20230110015904_Initial-Platform.Designer.cs b/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20230110015904_Initial-Platform.Designer.cs similarity index 97% rename from aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/Migrations/20230110015904_Initial-Platform.Designer.cs rename to aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20230110015904_Initial-Platform.Designer.cs index 822a6bc41..df085320c 100644 --- a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/Migrations/20230110015904_Initial-Platform.Designer.cs +++ b/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20230110015904_Initial-Platform.Designer.cs @@ -1,6 +1,6 @@ // using System; -using LY.MicroService.Platform.DbMigrator.EntityFrameworkCore; +using LY.MicroService.Platform.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; @@ -9,7 +9,7 @@ using Volo.Abp.EntityFrameworkCore; #nullable disable -namespace LY.MicroService.Platform.DbMigrator.Migrations +namespace LY.MicroService.Platform.EntityFrameworkCore.Migrations { [DbContext(typeof(PlatformMigrationsDbContext))] [Migration("20230110015904_Initial-Platform")] diff --git a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/Migrations/20230110015904_Initial-Platform.cs b/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20230110015904_Initial-Platform.cs similarity index 98% rename from aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/Migrations/20230110015904_Initial-Platform.cs rename to aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20230110015904_Initial-Platform.cs index 47a0bc4d5..1d8cd46af 100644 --- a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/Migrations/20230110015904_Initial-Platform.cs +++ b/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20230110015904_Initial-Platform.cs @@ -4,7 +4,7 @@ using Microsoft.EntityFrameworkCore.Migrations; #nullable disable -namespace LY.MicroService.Platform.DbMigrator.Migrations +namespace LY.MicroService.Platform.EntityFrameworkCore.Migrations { /// public partial class InitialPlatform : Migration diff --git a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/Migrations/PlatformMigrationsDbContextModelSnapshot.cs b/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/PlatformMigrationsDbContextModelSnapshot.cs similarity index 97% rename from aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/Migrations/PlatformMigrationsDbContextModelSnapshot.cs rename to aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/PlatformMigrationsDbContextModelSnapshot.cs index 0e2d05916..16ba35529 100644 --- a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/Migrations/PlatformMigrationsDbContextModelSnapshot.cs +++ b/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/PlatformMigrationsDbContextModelSnapshot.cs @@ -1,6 +1,6 @@ // using System; -using LY.MicroService.Platform.DbMigrator.EntityFrameworkCore; +using LY.MicroService.Platform.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; @@ -8,7 +8,7 @@ using Volo.Abp.EntityFrameworkCore; #nullable disable -namespace LY.MicroService.Platform.DbMigrator.Migrations +namespace LY.MicroService.Platform.EntityFrameworkCore.Migrations { [DbContext(typeof(PlatformMigrationsDbContext))] partial class PlatformMigrationsDbContextModelSnapshot : ModelSnapshot diff --git a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/EntityFrameworkCore/PlatformDbMigrationService.cs b/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/PlatformDbMigrationService.cs similarity index 94% rename from aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/EntityFrameworkCore/PlatformDbMigrationService.cs rename to aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/PlatformDbMigrationService.cs index 79dc80114..8a4c2d6de 100644 --- a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/EntityFrameworkCore/PlatformDbMigrationService.cs +++ b/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/PlatformDbMigrationService.cs @@ -3,13 +3,18 @@ using LINGYUN.Abp.Saas.Tenants; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; +using System; +using System.Collections.Generic; using System.Diagnostics; +using System.IO; +using System.Linq; using System.Runtime.InteropServices; +using System.Threading.Tasks; using Volo.Abp.Data; using Volo.Abp.DependencyInjection; using Volo.Abp.MultiTenancy; -namespace LY.MicroService.Platform.DbMigrator.EntityFrameworkCore; +namespace LY.MicroService.Platform.EntityFrameworkCore; public class PlatformDbMigrationService : ITransientDependency { diff --git a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/EntityFrameworkCore/PlatformMigrationsDbContext.cs b/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/PlatformMigrationsDbContext.cs similarity index 86% rename from aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/EntityFrameworkCore/PlatformMigrationsDbContext.cs rename to aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/PlatformMigrationsDbContext.cs index 72f20e950..b81c103c4 100644 --- a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/EntityFrameworkCore/PlatformMigrationsDbContext.cs +++ b/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/PlatformMigrationsDbContext.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Volo.Abp.Data; using Volo.Abp.EntityFrameworkCore; -namespace LY.MicroService.Platform.DbMigrator.EntityFrameworkCore; +namespace LY.MicroService.Platform.EntityFrameworkCore; [ConnectionStringName("PlatformDbMigrator")] public class PlatformMigrationsDbContext : AbpDbContext diff --git a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/EntityFrameworkCore/PlatformMigrationsDbContextFactory.cs b/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/PlatformMigrationsDbContextFactory.cs similarity index 74% rename from aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/EntityFrameworkCore/PlatformMigrationsDbContextFactory.cs rename to aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/PlatformMigrationsDbContextFactory.cs index f335baecf..af07c60cf 100644 --- a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/EntityFrameworkCore/PlatformMigrationsDbContextFactory.cs +++ b/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/PlatformMigrationsDbContextFactory.cs @@ -1,8 +1,9 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Design; using Microsoft.Extensions.Configuration; +using System.IO; -namespace LY.MicroService.Platform.DbMigrator.EntityFrameworkCore; +namespace LY.MicroService.Platform.EntityFrameworkCore; public class PlatformMigrationsDbContextFactory : IDesignTimeDbContextFactory { @@ -20,9 +21,8 @@ public class PlatformMigrationsDbContextFactory : IDesignTimeDbContextFactory(); + + Configure(options => + { + options.UseMySQL(); + }); + } +} diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/LY.MicroService.RealtimeMessage.DbMigrator.csproj b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/LY.MicroService.RealtimeMessage.DbMigrator.csproj index 4cf2fb9e2..520d79792 100644 --- a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/LY.MicroService.RealtimeMessage.DbMigrator.csproj +++ b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/LY.MicroService.RealtimeMessage.DbMigrator.csproj @@ -47,10 +47,7 @@ - - - - + diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/RealtimeMessageDbMigratorHostedService.cs b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/RealtimeMessageDbMigratorHostedService.cs index 0200baae3..4d1e808c4 100644 --- a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/RealtimeMessageDbMigratorHostedService.cs +++ b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/RealtimeMessageDbMigratorHostedService.cs @@ -1,4 +1,4 @@ -using LY.MicroService.RealtimeMessage.DbMigrator.EntityFrameworkCore; +using LY.MicroService.RealtimeMessage.EntityFrameworkCore; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/RealtimeMessageDbMigratorModule.Configure.cs b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/RealtimeMessageDbMigratorModule.Configure.cs index 7e9875d32..d10abc4b4 100644 --- a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/RealtimeMessageDbMigratorModule.Configure.cs +++ b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/RealtimeMessageDbMigratorModule.Configure.cs @@ -1,18 +1,4 @@ -using LY.MicroService.RealtimeMessage.DbMigrator.EntityFrameworkCore; -using Microsoft.Extensions.DependencyInjection; -using Volo.Abp.EntityFrameworkCore; - -namespace LY.MicroService.RealtimeMessage.DbMigrator; +namespace LY.MicroService.RealtimeMessage.DbMigrator; public partial class RealtimeMessageDbMigratorModule { - private void ConfigureDbContext(IServiceCollection services) - { - services.AddAbpDbContext(); - - // 配置Ef - Configure(options => - { - options.UseMySQL(); - }); - } } diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/RealtimeMessageDbMigratorModule.cs b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/RealtimeMessageDbMigratorModule.cs index 8c7f3f5a3..02816d783 100644 --- a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/RealtimeMessageDbMigratorModule.cs +++ b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/RealtimeMessageDbMigratorModule.cs @@ -1,29 +1,15 @@ using LINGYUN.Abp.Data.DbMigrator; -using LINGYUN.Abp.Saas.EntityFrameworkCore; -using LINGYUN.Abp.MessageService.EntityFrameworkCore; +using LY.MicroService.RealtimeMessage.EntityFrameworkCore; using Volo.Abp.Autofac; -using Volo.Abp.FeatureManagement.EntityFrameworkCore; using Volo.Abp.Modularity; -using Volo.Abp.PermissionManagement.EntityFrameworkCore; -using Volo.Abp.SettingManagement.EntityFrameworkCore; -using LINGYUN.Abp.Notifications.EntityFrameworkCore; namespace LY.MicroService.RealtimeMessage.DbMigrator; [DependsOn( - typeof(AbpSaasEntityFrameworkCoreModule), - typeof(AbpSettingManagementEntityFrameworkCoreModule), - typeof(AbpPermissionManagementEntityFrameworkCoreModule), - typeof(AbpFeatureManagementEntityFrameworkCoreModule), - typeof(AbpNotificationsEntityFrameworkCoreModule), - typeof(AbpMessageServiceEntityFrameworkCoreModule), + typeof(RealtimeMessageMigrationsEntityFrameworkCoreModule), typeof(AbpDataDbMigratorModule), typeof(AbpAutofacModule) )] public partial class RealtimeMessageDbMigratorModule : AbpModule { - public override void ConfigureServices(ServiceConfigurationContext context) - { - ConfigureDbContext(context.Services); - } } diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/LY.MicroService.RealtimeMessage.EntityFrameworkCore.csproj b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/LY.MicroService.RealtimeMessage.EntityFrameworkCore.csproj new file mode 100644 index 000000000..8455c65ad --- /dev/null +++ b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/LY.MicroService.RealtimeMessage.EntityFrameworkCore.csproj @@ -0,0 +1,26 @@ + + + + net7.0 + LY.MicroService.RealtimeMessage.EntityFrameworkCore + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + + + diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/Migrations/20230110063428_Initial-Realtime-Message.Designer.cs b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/Migrations/20230110063428_Initial-Realtime-Message.Designer.cs similarity index 96% rename from aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/Migrations/20230110063428_Initial-Realtime-Message.Designer.cs rename to aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/Migrations/20230110063428_Initial-Realtime-Message.Designer.cs index b1ea34d95..ee9314811 100644 --- a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/Migrations/20230110063428_Initial-Realtime-Message.Designer.cs +++ b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/Migrations/20230110063428_Initial-Realtime-Message.Designer.cs @@ -1,6 +1,6 @@ // using System; -using LY.MicroService.RealtimeMessage.DbMigrator.EntityFrameworkCore; +using LY.MicroService.RealtimeMessage.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; @@ -9,7 +9,7 @@ using Volo.Abp.EntityFrameworkCore; #nullable disable -namespace LY.MicroService.RealtimeMessage.DbMigrator.Migrations +namespace LY.MicroService.RealtimeMessage.EntityFrameworkCore.Migrations { [DbContext(typeof(RealtimeMessageMigrationsDbContext))] [Migration("20230110063428_Initial-Realtime-Message")] diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/Migrations/20230110063428_Initial-Realtime-Message.cs b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/Migrations/20230110063428_Initial-Realtime-Message.cs similarity index 98% rename from aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/Migrations/20230110063428_Initial-Realtime-Message.cs rename to aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/Migrations/20230110063428_Initial-Realtime-Message.cs index b1ebde592..28f70f553 100644 --- a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/Migrations/20230110063428_Initial-Realtime-Message.cs +++ b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/Migrations/20230110063428_Initial-Realtime-Message.cs @@ -4,7 +4,7 @@ using Microsoft.EntityFrameworkCore.Migrations; #nullable disable -namespace LY.MicroService.RealtimeMessage.DbMigrator.Migrations +namespace LY.MicroService.RealtimeMessage.EntityFrameworkCore.Migrations { /// public partial class InitialRealtimeMessage : Migration diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/Migrations/RealtimeMessageMigrationsDbContextModelSnapshot.cs b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/Migrations/RealtimeMessageMigrationsDbContextModelSnapshot.cs similarity index 96% rename from aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/Migrations/RealtimeMessageMigrationsDbContextModelSnapshot.cs rename to aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/Migrations/RealtimeMessageMigrationsDbContextModelSnapshot.cs index b1af499c3..2ac333c2d 100644 --- a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/Migrations/RealtimeMessageMigrationsDbContextModelSnapshot.cs +++ b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/Migrations/RealtimeMessageMigrationsDbContextModelSnapshot.cs @@ -1,6 +1,6 @@ // using System; -using LY.MicroService.RealtimeMessage.DbMigrator.EntityFrameworkCore; +using LY.MicroService.RealtimeMessage.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; @@ -8,7 +8,7 @@ using Volo.Abp.EntityFrameworkCore; #nullable disable -namespace LY.MicroService.RealtimeMessage.DbMigrator.Migrations +namespace LY.MicroService.RealtimeMessage.EntityFrameworkCore.Migrations { [DbContext(typeof(RealtimeMessageMigrationsDbContext))] partial class RealtimeMessageMigrationsDbContextModelSnapshot : ModelSnapshot diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/EntityFrameworkCore/RealtimeMessageDbMigrationService.cs b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/RealtimeMessageDbMigrationService.cs similarity index 91% rename from aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/EntityFrameworkCore/RealtimeMessageDbMigrationService.cs rename to aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/RealtimeMessageDbMigrationService.cs index 6beefd2d3..8a2a26f7d 100644 --- a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/EntityFrameworkCore/RealtimeMessageDbMigrationService.cs +++ b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/RealtimeMessageDbMigrationService.cs @@ -3,13 +3,18 @@ using LINGYUN.Abp.Saas.Tenants; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; +using System; +using System.Collections.Generic; using System.Diagnostics; +using System.IO; +using System.Linq; using System.Runtime.InteropServices; +using System.Threading.Tasks; using Volo.Abp.Data; using Volo.Abp.DependencyInjection; using Volo.Abp.MultiTenancy; -namespace LY.MicroService.RealtimeMessage.DbMigrator.EntityFrameworkCore; +namespace LY.MicroService.RealtimeMessage.EntityFrameworkCore; public class RealtimeMessageDbMigrationService : ITransientDependency { @@ -81,7 +86,7 @@ public class RealtimeMessageDbMigrationService : ITransientDependency Logger.LogInformation("You can safely end this process..."); } - private async Task MigrateDatabaseSchemaAsync(Tenant? tenant = null) + private async Task MigrateDatabaseSchemaAsync(Tenant tenant = null) { Logger.LogInformation($"Migrating schema for {(tenant == null ? "host" : tenant.Name + " tenant")} database..."); // 迁移租户数据 @@ -94,7 +99,7 @@ public class RealtimeMessageDbMigrationService : ITransientDependency }); } - private async Task SeedDataAsync(Tenant? tenant = null) + private async Task SeedDataAsync(Tenant tenant = null) { Logger.LogInformation($"Executing {(tenant == null ? "host" : tenant.Name + " tenant")} database seed..."); @@ -190,7 +195,7 @@ public class RealtimeMessageDbMigrationService : ITransientDependency return Path.Combine(slnDirectoryPath, "LY.MicroService.RealtimeMessage.DbMigrator"); } - private string? GetSolutionDirectoryPath() + private string GetSolutionDirectoryPath() { var currentDirectory = new DirectoryInfo(Directory.GetCurrentDirectory()); diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/EntityFrameworkCore/RealtimeMessageMigrationsDbContext.cs b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/RealtimeMessageMigrationsDbContext.cs similarity index 88% rename from aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/EntityFrameworkCore/RealtimeMessageMigrationsDbContext.cs rename to aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/RealtimeMessageMigrationsDbContext.cs index 3b64d1c37..b83e0d687 100644 --- a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/EntityFrameworkCore/RealtimeMessageMigrationsDbContext.cs +++ b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/RealtimeMessageMigrationsDbContext.cs @@ -4,7 +4,7 @@ using Microsoft.EntityFrameworkCore; using Volo.Abp.Data; using Volo.Abp.EntityFrameworkCore; -namespace LY.MicroService.RealtimeMessage.DbMigrator.EntityFrameworkCore; +namespace LY.MicroService.RealtimeMessage.EntityFrameworkCore; [ConnectionStringName("RealtimeMessageDbMigrator")] public class RealtimeMessageMigrationsDbContext : AbpDbContext diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/EntityFrameworkCore/RealtimeMessageMigrationsDbContextFactory.cs b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/RealtimeMessageMigrationsDbContextFactory.cs similarity index 74% rename from aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/EntityFrameworkCore/RealtimeMessageMigrationsDbContextFactory.cs rename to aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/RealtimeMessageMigrationsDbContextFactory.cs index 93744ecf1..57d6857a4 100644 --- a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/EntityFrameworkCore/RealtimeMessageMigrationsDbContextFactory.cs +++ b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/RealtimeMessageMigrationsDbContextFactory.cs @@ -1,8 +1,9 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Design; using Microsoft.Extensions.Configuration; +using System.IO; -namespace LY.MicroService.RealtimeMessage.DbMigrator.EntityFrameworkCore; +namespace LY.MicroService.RealtimeMessage.EntityFrameworkCore; public class RealtimeMessageMigrationsDbContextFactory : IDesignTimeDbContextFactory { @@ -20,9 +21,8 @@ public class RealtimeMessageMigrationsDbContextFactory : IDesignTimeDbContextFac private static IConfigurationRoot BuildConfiguration() { var builder = new ConfigurationBuilder() - .SetBasePath(Directory.GetCurrentDirectory()) - .AddJsonFile("appsettings.json", optional: false) - .AddJsonFile("appsettings.Development.json", optional: true); + .SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../LY.MicroService.RealtimeMessage.DbMigrator/")) + .AddJsonFile("appsettings.json", optional: false); return builder.Build(); } diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/RealtimeMessageMigrationsEntityFrameworkCoreModule.cs b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/RealtimeMessageMigrationsEntityFrameworkCoreModule.cs new file mode 100644 index 000000000..65039461a --- /dev/null +++ b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/RealtimeMessageMigrationsEntityFrameworkCoreModule.cs @@ -0,0 +1,34 @@ +using LINGYUN.Abp.Data.DbMigrator; +using LINGYUN.Abp.MessageService.EntityFrameworkCore; +using LINGYUN.Abp.Notifications.EntityFrameworkCore; +using LINGYUN.Abp.Saas.EntityFrameworkCore; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.FeatureManagement.EntityFrameworkCore; +using Volo.Abp.Modularity; +using Volo.Abp.PermissionManagement.EntityFrameworkCore; +using Volo.Abp.SettingManagement.EntityFrameworkCore; + +namespace LY.MicroService.RealtimeMessage.EntityFrameworkCore; + +[DependsOn( + typeof(AbpSaasEntityFrameworkCoreModule), + typeof(AbpSettingManagementEntityFrameworkCoreModule), + typeof(AbpPermissionManagementEntityFrameworkCoreModule), + typeof(AbpFeatureManagementEntityFrameworkCoreModule), + typeof(AbpNotificationsEntityFrameworkCoreModule), + typeof(AbpMessageServiceEntityFrameworkCoreModule), + typeof(AbpDataDbMigratorModule) + )] +public class RealtimeMessageMigrationsEntityFrameworkCoreModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddAbpDbContext(); + + Configure(options => + { + options.UseMySQL(); + }); + } +} diff --git a/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/LY.MicroService.TaskManagement.DbMigrator.csproj b/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/LY.MicroService.TaskManagement.DbMigrator.csproj index 1ad4a5f12..dfabb67c2 100644 --- a/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/LY.MicroService.TaskManagement.DbMigrator.csproj +++ b/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/LY.MicroService.TaskManagement.DbMigrator.csproj @@ -46,10 +46,7 @@ - - - - + diff --git a/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/Migrations/TaskManagementMigrationsDbContextModelSnapshot.cs b/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/Migrations/TaskManagementMigrationsDbContextModelSnapshot.cs deleted file mode 100644 index c32dad0f1..000000000 --- a/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/Migrations/TaskManagementMigrationsDbContextModelSnapshot.cs +++ /dev/null @@ -1,270 +0,0 @@ -// -using System; -using LY.MicroService.TaskManagement.DbMigrator.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.TaskManagement.DbMigrator.Migrations -{ - [DbContext(typeof(TaskManagementMigrationsDbContext))] - partial class TaskManagementMigrationsDbContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "7.0.2") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobAction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("JobId") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("JobId"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Name"); - - b.Property("Paramters") - .HasColumnType("longtext") - .HasColumnName("Paramters"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("TK_BackgroundJobActions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobInfo", b => - { - b.Property("Id") - .HasColumnType("varchar(255)"); - - b.Property("Args") - .HasColumnType("longtext") - .HasColumnName("Args"); - - b.Property("BeginTime") - .HasColumnType("datetime(6)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Cron") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("Cron"); - - b.Property("Description") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Description"); - - b.Property("EndTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Group") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("Group"); - - b.Property("Interval") - .HasColumnType("int"); - - b.Property("IsAbandoned") - .HasColumnType("tinyint(1)"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("JobType") - .HasColumnType("int"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LastRunTime") - .HasColumnType("datetime(6)"); - - b.Property("LockTimeOut") - .HasColumnType("int"); - - b.Property("MaxCount") - .HasColumnType("int"); - - b.Property("MaxTryCount") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Name"); - - b.Property("NextRunTime") - .HasColumnType("datetime(6)"); - - b.Property("NodeName") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("NodeName"); - - b.Property("Priority") - .HasColumnType("int"); - - b.Property("Result") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("Result"); - - b.Property("Source") - .HasColumnType("int"); - - b.Property("Status") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TriggerCount") - .HasColumnType("int"); - - b.Property("TryCount") - .HasColumnType("int"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("Type"); - - b.HasKey("Id"); - - b.HasIndex("Name", "Group"); - - b.ToTable("TK_BackgroundJobs", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Exception") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasColumnName("Exception"); - - b.Property("JobGroup") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("JobGroup"); - - b.Property("JobId") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("JobId"); - - b.Property("JobName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("JobName"); - - b.Property("JobType") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("JobType"); - - b.Property("Message") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("Message"); - - b.Property("RunTime") - .HasColumnType("datetime(6)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("JobGroup", "JobName"); - - b.ToTable("TK_BackgroundJobLogs", (string)null); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/TaskManagementDbMigratorModule.Configure.cs b/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/TaskManagementDbMigratorModule.Configure.cs index 6fd7f7551..2d6de0c50 100644 --- a/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/TaskManagementDbMigratorModule.Configure.cs +++ b/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/TaskManagementDbMigratorModule.Configure.cs @@ -1,18 +1,4 @@ -using LY.MicroService.TaskManagement.DbMigrator.EntityFrameworkCore; -using Microsoft.Extensions.DependencyInjection; -using Volo.Abp.EntityFrameworkCore; - -namespace LY.MicroService.TaskManagement.DbMigrator; +namespace LY.MicroService.TaskManagement.DbMigrator; public partial class TaskManagementDbMigratorModule { - private void ConfigureDbContext(IServiceCollection services) - { - services.AddAbpDbContext(); - - // 配置Ef - Configure(options => - { - options.UseMySQL(); - }); - } } diff --git a/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/TaskManagementDbMigratorModule.cs b/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/TaskManagementDbMigratorModule.cs index a10892b76..e81dabc63 100644 --- a/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/TaskManagementDbMigratorModule.cs +++ b/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/TaskManagementDbMigratorModule.cs @@ -1,29 +1,14 @@ -using LINGYUN.Abp.Data.DbMigrator; -using LINGYUN.Abp.Saas.EntityFrameworkCore; -using LINGYUN.Abp.TaskManagement.EntityFrameworkCore; +using LY.MicroService.TaskManagement.EntityFrameworkCore; using Volo.Abp.Autofac; -using Volo.Abp.EntityFrameworkCore.MySQL; -using Volo.Abp.FeatureManagement.EntityFrameworkCore; using Volo.Abp.Modularity; -using Volo.Abp.PermissionManagement.EntityFrameworkCore; -using Volo.Abp.SettingManagement.EntityFrameworkCore; namespace LY.MicroService.TaskManagement.DbMigrator; [DependsOn( - typeof(AbpSaasEntityFrameworkCoreModule), - typeof(AbpSettingManagementEntityFrameworkCoreModule), - typeof(AbpPermissionManagementEntityFrameworkCoreModule), - typeof(AbpFeatureManagementEntityFrameworkCoreModule), - typeof(TaskManagementEntityFrameworkCoreModule), - typeof(AbpEntityFrameworkCoreMySQLModule), - typeof(AbpDataDbMigratorModule), + typeof(TaskManagementMigrationsEntityFrameworkCoreModule), typeof(AbpAutofacModule) )] public partial class TaskManagementDbMigratorModule : AbpModule { - public override void ConfigureServices(ServiceConfigurationContext context) - { - ConfigureDbContext(context.Services); - } + } diff --git a/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/FodyWeavers.xml b/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/FodyWeavers.xml new file mode 100644 index 000000000..ac6b5b292 --- /dev/null +++ b/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/FodyWeavers.xsd b/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/FodyWeavers.xsd new file mode 100644 index 000000000..11da52550 --- /dev/null +++ b/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/LY.MicroService.TaskManagement.EntityFrameworkCore.csproj b/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/LY.MicroService.TaskManagement.EntityFrameworkCore.csproj new file mode 100644 index 000000000..3d34b4866 --- /dev/null +++ b/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/LY.MicroService.TaskManagement.EntityFrameworkCore.csproj @@ -0,0 +1,28 @@ + + + + + + + net7.0 + LY.MicroService.TaskManagement.EntityFrameworkCore + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + + diff --git a/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/Migrations/20230112021621_Initial-Task-Management.Designer.cs b/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/Migrations/20230112021621_Initial-Task-Management.Designer.cs similarity index 96% rename from aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/Migrations/20230112021621_Initial-Task-Management.Designer.cs rename to aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/Migrations/20230112021621_Initial-Task-Management.Designer.cs index 88dfad48b..5f5155e85 100644 --- a/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/Migrations/20230112021621_Initial-Task-Management.Designer.cs +++ b/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/Migrations/20230112021621_Initial-Task-Management.Designer.cs @@ -1,6 +1,6 @@ // using System; -using LY.MicroService.TaskManagement.DbMigrator.EntityFrameworkCore; +using LY.MicroService.TaskManagement.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; @@ -9,7 +9,7 @@ using Volo.Abp.EntityFrameworkCore; #nullable disable -namespace LY.MicroService.TaskManagement.DbMigrator.Migrations +namespace LY.MicroService.TaskManagement.EntityFrameworkCore.Migrations { [DbContext(typeof(TaskManagementMigrationsDbContext))] [Migration("20230112021621_Initial-Task-Management")] diff --git a/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/Migrations/20230112021621_Initial-Task-Management.cs b/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/Migrations/20230112021621_Initial-Task-Management.cs similarity index 97% rename from aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/Migrations/20230112021621_Initial-Task-Management.cs rename to aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/Migrations/20230112021621_Initial-Task-Management.cs index 3d8081aee..8d6b2915f 100644 --- a/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/Migrations/20230112021621_Initial-Task-Management.cs +++ b/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/Migrations/20230112021621_Initial-Task-Management.cs @@ -4,7 +4,7 @@ using Microsoft.EntityFrameworkCore.Migrations; #nullable disable -namespace LY.MicroService.TaskManagement.DbMigrator.Migrations +namespace LY.MicroService.TaskManagement.EntityFrameworkCore.Migrations { /// public partial class InitialTaskManagement : Migration diff --git a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/TaskManagementMigrationsDbContextModelSnapshot.cs b/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/Migrations/TaskManagementMigrationsDbContextModelSnapshot.cs similarity index 96% rename from aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/TaskManagementMigrationsDbContextModelSnapshot.cs rename to aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/Migrations/TaskManagementMigrationsDbContextModelSnapshot.cs index 782ccc326..9382db469 100644 --- a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/TaskManagementMigrationsDbContextModelSnapshot.cs +++ b/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/Migrations/TaskManagementMigrationsDbContextModelSnapshot.cs @@ -8,7 +8,7 @@ using Volo.Abp.EntityFrameworkCore; #nullable disable -namespace LY.MicroService.TaskManagement.Migrations +namespace LY.MicroService.TaskManagement.EntityFrameworkCore.Migrations { [DbContext(typeof(TaskManagementMigrationsDbContext))] partial class TaskManagementMigrationsDbContextModelSnapshot : ModelSnapshot @@ -18,7 +18,7 @@ namespace LY.MicroService.TaskManagement.Migrations #pragma warning disable 612, 618 modelBuilder .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "6.0.6") + .HasAnnotation("ProductVersion", "7.0.2") .HasAnnotation("Relational:MaxIdentifierLength", 64); modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobAction", b => diff --git a/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/EntityFrameworkCore/TaskManagementDbMigrationService.cs b/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/TaskManagementDbMigrationService.cs similarity index 91% rename from aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/EntityFrameworkCore/TaskManagementDbMigrationService.cs rename to aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/TaskManagementDbMigrationService.cs index 60d21acb2..1e21b9aba 100644 --- a/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/EntityFrameworkCore/TaskManagementDbMigrationService.cs +++ b/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/TaskManagementDbMigrationService.cs @@ -3,13 +3,18 @@ using LINGYUN.Abp.Saas.Tenants; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; +using System; +using System.Collections.Generic; using System.Diagnostics; +using System.IO; +using System.Linq; using System.Runtime.InteropServices; +using System.Threading.Tasks; using Volo.Abp.Data; using Volo.Abp.DependencyInjection; using Volo.Abp.MultiTenancy; -namespace LY.MicroService.TaskManagement.DbMigrator.EntityFrameworkCore; +namespace LY.MicroService.TaskManagement.EntityFrameworkCore; public class TaskManagementDbMigrationService : ITransientDependency { @@ -81,7 +86,7 @@ public class TaskManagementDbMigrationService : ITransientDependency Logger.LogInformation("You can safely end this process..."); } - private async Task MigrateDatabaseSchemaAsync(Tenant? tenant = null) + private async Task MigrateDatabaseSchemaAsync(Tenant tenant = null) { Logger.LogInformation($"Migrating schema for {(tenant == null ? "host" : tenant.Name + " tenant")} database..."); // 迁移租户数据 @@ -94,7 +99,7 @@ public class TaskManagementDbMigrationService : ITransientDependency }); } - private async Task SeedDataAsync(Tenant? tenant = null) + private async Task SeedDataAsync(Tenant tenant = null) { Logger.LogInformation($"Executing {(tenant == null ? "host" : tenant.Name + " tenant")} database seed..."); @@ -190,7 +195,7 @@ public class TaskManagementDbMigrationService : ITransientDependency return Path.Combine(slnDirectoryPath, "LY.MicroService.TaskManagement.DbMigrator"); } - private string? GetSolutionDirectoryPath() + private string GetSolutionDirectoryPath() { var currentDirectory = new DirectoryInfo(Directory.GetCurrentDirectory()); diff --git a/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/EntityFrameworkCore/TaskManagementMigrationsDbContext.cs b/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/TaskManagementMigrationsDbContext.cs similarity index 86% rename from aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/EntityFrameworkCore/TaskManagementMigrationsDbContext.cs rename to aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/TaskManagementMigrationsDbContext.cs index edd68ae13..55fad2229 100644 --- a/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/EntityFrameworkCore/TaskManagementMigrationsDbContext.cs +++ b/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/TaskManagementMigrationsDbContext.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Volo.Abp.Data; using Volo.Abp.EntityFrameworkCore; -namespace LY.MicroService.TaskManagement.DbMigrator.EntityFrameworkCore; +namespace LY.MicroService.TaskManagement.EntityFrameworkCore; [ConnectionStringName("TaskManagementDbMigrator")] public class TaskManagementMigrationsDbContext : AbpDbContext diff --git a/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/EntityFrameworkCore/TaskManagementMigrationsDbContextFactory.cs b/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/TaskManagementMigrationsDbContextFactory.cs similarity index 74% rename from aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/EntityFrameworkCore/TaskManagementMigrationsDbContextFactory.cs rename to aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/TaskManagementMigrationsDbContextFactory.cs index bc48317d7..22a5204fd 100644 --- a/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/EntityFrameworkCore/TaskManagementMigrationsDbContextFactory.cs +++ b/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/TaskManagementMigrationsDbContextFactory.cs @@ -1,8 +1,9 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Design; using Microsoft.Extensions.Configuration; +using System.IO; -namespace LY.MicroService.TaskManagement.DbMigrator.EntityFrameworkCore; +namespace LY.MicroService.TaskManagement.EntityFrameworkCore; public class TaskManagementMigrationsDbContextFactory : IDesignTimeDbContextFactory { @@ -20,9 +21,8 @@ public class TaskManagementMigrationsDbContextFactory : IDesignTimeDbContextFact private static IConfigurationRoot BuildConfiguration() { var builder = new ConfigurationBuilder() - .SetBasePath(Directory.GetCurrentDirectory()) - .AddJsonFile("appsettings.json", optional: false) - .AddJsonFile("appsettings.Development.json", optional: true); + .SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../LY.MicroService.TaskManagement.DbMigrator/")) + .AddJsonFile("appsettings.json", optional: false); return builder.Build(); } diff --git a/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/TaskManagementMigrationsEntityFrameworkCoreModule.cs b/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/TaskManagementMigrationsEntityFrameworkCoreModule.cs new file mode 100644 index 000000000..c3196690a --- /dev/null +++ b/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/TaskManagementMigrationsEntityFrameworkCoreModule.cs @@ -0,0 +1,34 @@ +using LINGYUN.Abp.Data.DbMigrator; +using LINGYUN.Abp.Saas.EntityFrameworkCore; +using LINGYUN.Abp.TaskManagement.EntityFrameworkCore; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore.MySQL; +using Volo.Abp.FeatureManagement.EntityFrameworkCore; +using Volo.Abp.Modularity; +using Volo.Abp.PermissionManagement.EntityFrameworkCore; +using Volo.Abp.SettingManagement.EntityFrameworkCore; + +namespace LY.MicroService.TaskManagement.EntityFrameworkCore; + +[DependsOn( + typeof(AbpSaasEntityFrameworkCoreModule), + typeof(AbpSettingManagementEntityFrameworkCoreModule), + typeof(AbpPermissionManagementEntityFrameworkCoreModule), + typeof(AbpFeatureManagementEntityFrameworkCoreModule), + typeof(TaskManagementEntityFrameworkCoreModule), + typeof(AbpEntityFrameworkCoreMySQLModule), + typeof(AbpDataDbMigratorModule) + )] +public class TaskManagementMigrationsEntityFrameworkCoreModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddAbpDbContext(); + + Configure(options => + { + options.UseMySQL(); + }); + } +} diff --git a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/LY.MicroService.WebhooksManagement.DbMigrator.csproj b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/LY.MicroService.WebhooksManagement.DbMigrator.csproj index cd2c05e23..4ec511c26 100644 --- a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/LY.MicroService.WebhooksManagement.DbMigrator.csproj +++ b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/LY.MicroService.WebhooksManagement.DbMigrator.csproj @@ -46,10 +46,7 @@ - - - - + diff --git a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/WebhooksManagementDbMigratorHostedService.cs b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/WebhooksManagementDbMigratorHostedService.cs index 07962a564..053dead0c 100644 --- a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/WebhooksManagementDbMigratorHostedService.cs +++ b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/WebhooksManagementDbMigratorHostedService.cs @@ -1,4 +1,4 @@ -using LY.MicroService.WebhooksManagement.DbMigrator.EntityFrameworkCore; +using LY.MicroService.WebhooksManagement.EntityFrameworkCore; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; diff --git a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/WebhooksManagementDbMigratorModule.Configure.cs b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/WebhooksManagementDbMigratorModule.Configure.cs index 55bd1dae1..4bd2127d0 100644 --- a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/WebhooksManagementDbMigratorModule.Configure.cs +++ b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/WebhooksManagementDbMigratorModule.Configure.cs @@ -1,18 +1,4 @@ -using LY.MicroService.WebhooksManagement.DbMigrator.EntityFrameworkCore; -using Microsoft.Extensions.DependencyInjection; -using Volo.Abp.EntityFrameworkCore; - -namespace LY.MicroService.WebhooksManagement.DbMigrator; +namespace LY.MicroService.WebhooksManagement.DbMigrator; public partial class WebhooksManagementDbMigratorModule { - private void ConfigureDbContext(IServiceCollection services) - { - services.AddAbpDbContext(); - - // 配置Ef - Configure(options => - { - options.UseMySQL(); - }); - } } diff --git a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/WebhooksManagementDbMigratorModule.cs b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/WebhooksManagementDbMigratorModule.cs index 9eef33565..4a51ee059 100644 --- a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/WebhooksManagementDbMigratorModule.cs +++ b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/WebhooksManagementDbMigratorModule.cs @@ -1,29 +1,13 @@ -using LINGYUN.Abp.Data.DbMigrator; -using LINGYUN.Abp.Saas.EntityFrameworkCore; -using LINGYUN.Abp.WebhooksManagement.EntityFrameworkCore; +using LY.MicroService.WebhooksManagement.EntityFrameworkCore; using Volo.Abp.Autofac; -using Volo.Abp.EntityFrameworkCore.MySQL; -using Volo.Abp.FeatureManagement.EntityFrameworkCore; using Volo.Abp.Modularity; -using Volo.Abp.PermissionManagement.EntityFrameworkCore; -using Volo.Abp.SettingManagement.EntityFrameworkCore; namespace LY.MicroService.WebhooksManagement.DbMigrator; [DependsOn( - typeof(AbpSaasEntityFrameworkCoreModule), - typeof(AbpSettingManagementEntityFrameworkCoreModule), - typeof(AbpPermissionManagementEntityFrameworkCoreModule), - typeof(AbpFeatureManagementEntityFrameworkCoreModule), - typeof(WebhooksManagementEntityFrameworkCoreModule), - typeof(AbpEntityFrameworkCoreMySQLModule), - typeof(AbpDataDbMigratorModule), + typeof(WebhooksManagementMigrationsEntityFrameworkCoreModule), typeof(AbpAutofacModule) )] public partial class WebhooksManagementDbMigratorModule : AbpModule { - public override void ConfigureServices(ServiceConfigurationContext context) - { - ConfigureDbContext(context.Services); - } } diff --git a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/FodyWeavers.xml b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/FodyWeavers.xml new file mode 100644 index 000000000..ac6b5b292 --- /dev/null +++ b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/FodyWeavers.xsd b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/FodyWeavers.xsd new file mode 100644 index 000000000..11da52550 --- /dev/null +++ b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/LY.MicroService.WebhooksManagement.EntityFrameworkCore.csproj b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/LY.MicroService.WebhooksManagement.EntityFrameworkCore.csproj new file mode 100644 index 000000000..e5a113dd0 --- /dev/null +++ b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/LY.MicroService.WebhooksManagement.EntityFrameworkCore.csproj @@ -0,0 +1,28 @@ + + + + + + + net7.0 + LY.MicroService.WebhooksManagement.EntityFrameworkCore + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + + diff --git a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/Migrations/20230112004517_Initial-Webhooks-Management.Designer.cs b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/Migrations/20230112004517_Initial-Webhooks-Management.Designer.cs similarity index 95% rename from aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/Migrations/20230112004517_Initial-Webhooks-Management.Designer.cs rename to aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/Migrations/20230112004517_Initial-Webhooks-Management.Designer.cs index 5634a8214..aea1aa56a 100644 --- a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/Migrations/20230112004517_Initial-Webhooks-Management.Designer.cs +++ b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/Migrations/20230112004517_Initial-Webhooks-Management.Designer.cs @@ -1,6 +1,6 @@ // using System; -using LY.MicroService.WebhooksManagement.DbMigrator.EntityFrameworkCore; +using LY.MicroService.WebhooksManagement.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; @@ -9,7 +9,7 @@ using Volo.Abp.EntityFrameworkCore; #nullable disable -namespace LY.MicroService.WebhooksManagement.DbMigrator.Migrations +namespace LY.MicroService.WebhooksManagement.EntityFrameworkCore.Migrations { [DbContext(typeof(WebhooksManagementMigrationsDbContext))] [Migration("20230112004517_Initial-Webhooks-Management")] diff --git a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/Migrations/20230112004517_Initial-Webhooks-Management.cs b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/Migrations/20230112004517_Initial-Webhooks-Management.cs similarity index 97% rename from aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/Migrations/20230112004517_Initial-Webhooks-Management.cs rename to aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/Migrations/20230112004517_Initial-Webhooks-Management.cs index 8d16414cc..2728e9494 100644 --- a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/Migrations/20230112004517_Initial-Webhooks-Management.cs +++ b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/Migrations/20230112004517_Initial-Webhooks-Management.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations; #nullable disable -namespace LY.MicroService.WebhooksManagement.DbMigrator.Migrations +namespace LY.MicroService.WebhooksManagement.EntityFrameworkCore.Migrations { /// public partial class InitialWebhooksManagement : Migration diff --git a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/Migrations/WebhooksManagementMigrationsDbContextModelSnapshot.cs b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/Migrations/WebhooksManagementMigrationsDbContextModelSnapshot.cs similarity index 95% rename from aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/Migrations/WebhooksManagementMigrationsDbContextModelSnapshot.cs rename to aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/Migrations/WebhooksManagementMigrationsDbContextModelSnapshot.cs index 4bbaa84c0..587b3914c 100644 --- a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/Migrations/WebhooksManagementMigrationsDbContextModelSnapshot.cs +++ b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/Migrations/WebhooksManagementMigrationsDbContextModelSnapshot.cs @@ -1,6 +1,6 @@ // using System; -using LY.MicroService.WebhooksManagement.DbMigrator.EntityFrameworkCore; +using LY.MicroService.WebhooksManagement.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; @@ -8,7 +8,7 @@ using Volo.Abp.EntityFrameworkCore; #nullable disable -namespace LY.MicroService.WebhooksManagement.DbMigrator.Migrations +namespace LY.MicroService.WebhooksManagement.EntityFrameworkCore.Migrations { [DbContext(typeof(WebhooksManagementMigrationsDbContext))] partial class WebhooksManagementMigrationsDbContextModelSnapshot : ModelSnapshot diff --git a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/EntityFrameworkCore/WebhooksManagementDbMigrationService.cs b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/WebhooksManagementDbMigrationService.cs similarity index 91% rename from aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/EntityFrameworkCore/WebhooksManagementDbMigrationService.cs rename to aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/WebhooksManagementDbMigrationService.cs index 40cbe4a47..c59c158c5 100644 --- a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/EntityFrameworkCore/WebhooksManagementDbMigrationService.cs +++ b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/WebhooksManagementDbMigrationService.cs @@ -3,13 +3,18 @@ using LINGYUN.Abp.Saas.Tenants; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; +using System; +using System.Collections.Generic; using System.Diagnostics; +using System.IO; +using System.Linq; using System.Runtime.InteropServices; +using System.Threading.Tasks; using Volo.Abp.Data; using Volo.Abp.DependencyInjection; using Volo.Abp.MultiTenancy; -namespace LY.MicroService.WebhooksManagement.DbMigrator.EntityFrameworkCore; +namespace LY.MicroService.WebhooksManagement.EntityFrameworkCore; public class WebhooksManagementDbMigrationService : ITransientDependency { @@ -81,7 +86,7 @@ public class WebhooksManagementDbMigrationService : ITransientDependency Logger.LogInformation("You can safely end this process..."); } - private async Task MigrateDatabaseSchemaAsync(Tenant? tenant = null) + private async Task MigrateDatabaseSchemaAsync(Tenant tenant = null) { Logger.LogInformation($"Migrating schema for {(tenant == null ? "host" : tenant.Name + " tenant")} database..."); // 迁移租户数据 @@ -94,7 +99,7 @@ public class WebhooksManagementDbMigrationService : ITransientDependency }); } - private async Task SeedDataAsync(Tenant? tenant = null) + private async Task SeedDataAsync(Tenant tenant = null) { Logger.LogInformation($"Executing {(tenant == null ? "host" : tenant.Name + " tenant")} database seed..."); @@ -190,7 +195,7 @@ public class WebhooksManagementDbMigrationService : ITransientDependency return Path.Combine(slnDirectoryPath, "LY.MicroService.WebhooksManagement.DbMigrator"); } - private string? GetSolutionDirectoryPath() + private string GetSolutionDirectoryPath() { var currentDirectory = new DirectoryInfo(Directory.GetCurrentDirectory()); diff --git a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/EntityFrameworkCore/WebhooksManagementMigrationsDbContext.cs b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/WebhooksManagementMigrationsDbContext.cs similarity index 86% rename from aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/EntityFrameworkCore/WebhooksManagementMigrationsDbContext.cs rename to aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/WebhooksManagementMigrationsDbContext.cs index afc598796..b82d84c58 100644 --- a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/EntityFrameworkCore/WebhooksManagementMigrationsDbContext.cs +++ b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/WebhooksManagementMigrationsDbContext.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Volo.Abp.Data; using Volo.Abp.EntityFrameworkCore; -namespace LY.MicroService.WebhooksManagement.DbMigrator.EntityFrameworkCore; +namespace LY.MicroService.WebhooksManagement.EntityFrameworkCore; [ConnectionStringName("WebhooksManagementDbMigrator")] public class WebhooksManagementMigrationsDbContext : AbpDbContext diff --git a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/EntityFrameworkCore/WebhooksManagementMigrationsDbContextFactory.cs b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/WebhooksManagementMigrationsDbContextFactory.cs similarity index 74% rename from aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/EntityFrameworkCore/WebhooksManagementMigrationsDbContextFactory.cs rename to aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/WebhooksManagementMigrationsDbContextFactory.cs index 42e523f10..bb01dc63b 100644 --- a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/EntityFrameworkCore/WebhooksManagementMigrationsDbContextFactory.cs +++ b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/WebhooksManagementMigrationsDbContextFactory.cs @@ -1,8 +1,9 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Design; using Microsoft.Extensions.Configuration; +using System.IO; -namespace LY.MicroService.WebhooksManagement.DbMigrator.EntityFrameworkCore; +namespace LY.MicroService.WebhooksManagement.EntityFrameworkCore; public class WebhooksManagementMigrationsDbContextFactory : IDesignTimeDbContextFactory { @@ -20,9 +21,8 @@ public class WebhooksManagementMigrationsDbContextFactory : IDesignTimeDbContext private static IConfigurationRoot BuildConfiguration() { var builder = new ConfigurationBuilder() - .SetBasePath(Directory.GetCurrentDirectory()) - .AddJsonFile("appsettings.json", optional: false) - .AddJsonFile("appsettings.Development.json", optional: true); + .SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../LY.MicroService.WebhooksManagement.DbMigrator/")) + .AddJsonFile("appsettings.json", optional: false); return builder.Build(); } diff --git a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/WebhooksManagementMigrationsEntityFrameworkCoreModule.cs b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/WebhooksManagementMigrationsEntityFrameworkCoreModule.cs new file mode 100644 index 000000000..268990c31 --- /dev/null +++ b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/WebhooksManagementMigrationsEntityFrameworkCoreModule.cs @@ -0,0 +1,34 @@ +using LINGYUN.Abp.Data.DbMigrator; +using LINGYUN.Abp.Saas.EntityFrameworkCore; +using LINGYUN.Abp.WebhooksManagement.EntityFrameworkCore; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore.MySQL; +using Volo.Abp.FeatureManagement.EntityFrameworkCore; +using Volo.Abp.Modularity; +using Volo.Abp.PermissionManagement.EntityFrameworkCore; +using Volo.Abp.SettingManagement.EntityFrameworkCore; + +namespace LY.MicroService.WebhooksManagement.EntityFrameworkCore; + +[DependsOn( + typeof(AbpSaasEntityFrameworkCoreModule), + typeof(AbpSettingManagementEntityFrameworkCoreModule), + typeof(AbpPermissionManagementEntityFrameworkCoreModule), + typeof(AbpFeatureManagementEntityFrameworkCoreModule), + typeof(WebhooksManagementEntityFrameworkCoreModule), + typeof(AbpEntityFrameworkCoreMySQLModule), + typeof(AbpDataDbMigratorModule) + )] +public class WebhooksManagementMigrationsEntityFrameworkCoreModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddAbpDbContext(); + + Configure(options => + { + options.UseMySQL(); + }); + } +} diff --git a/aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/AuthServerHttpApiHostModule.Configure.cs b/aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/AuthServerHttpApiHostModule.Configure.cs index 4587d1ea6..f4750e6e8 100644 --- a/aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/AuthServerHttpApiHostModule.Configure.cs +++ b/aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/AuthServerHttpApiHostModule.Configure.cs @@ -59,7 +59,7 @@ public partial class AuthServerHttpApiHostModule PreConfigure(options => { // 以开放端口区别,应在0-31之间 - options.SnowflakeIdOptions.WorkerId = 30015 - 30000; + options.SnowflakeIdOptions.WorkerId = 15; options.SnowflakeIdOptions.WorkerIdBits = 5; options.SnowflakeIdOptions.DatacenterId = 1; }); diff --git a/aspnet-core/services/LY.MicroService.AuthServer/AuthServerModule.cs b/aspnet-core/services/LY.MicroService.AuthServer/AuthServerModule.cs index 4753ceeab..cd45c15fc 100644 --- a/aspnet-core/services/LY.MicroService.AuthServer/AuthServerModule.cs +++ b/aspnet-core/services/LY.MicroService.AuthServer/AuthServerModule.cs @@ -16,6 +16,7 @@ using LINGYUN.Abp.Saas.EntityFrameworkCore; using LINGYUN.Abp.Serilog.Enrichers.Application; using LINGYUN.Abp.Serilog.Enrichers.UniqueId; using LINGYUN.Abp.Sms.Aliyun; +using LY.MicroService.AuthServer.EntityFrameworkCore; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.DependencyInjection; @@ -64,6 +65,7 @@ namespace LY.MicroService.AuthServer; typeof(AbpSettingManagementEntityFrameworkCoreModule), typeof(AbpFeatureManagementEntityFrameworkCoreModule), typeof(AbpSaasEntityFrameworkCoreModule), + typeof(AuthServerMigrationsEntityFrameworkCoreModule), typeof(AbpDataDbMigratorModule), typeof(AbpAuditLoggingElasticsearchModule), // 放在 AbpIdentity 模块之后,避免被覆盖 typeof(AbpAspNetCoreHttpOverridesModule), diff --git a/aspnet-core/services/LY.MicroService.AuthServer/EntityFrameworkCore/AuthServerMigrationsDbContext.cs b/aspnet-core/services/LY.MicroService.AuthServer/EntityFrameworkCore/AuthServerMigrationsDbContext.cs deleted file mode 100644 index e0c4b7718..000000000 --- a/aspnet-core/services/LY.MicroService.AuthServer/EntityFrameworkCore/AuthServerMigrationsDbContext.cs +++ /dev/null @@ -1,23 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using Volo.Abp.EntityFrameworkCore; -using Volo.Abp.Identity.EntityFrameworkCore; -using Volo.Abp.OpenIddict.EntityFrameworkCore; - -namespace LY.MicroService.AuthServer.EntityFrameworkCore; - -public class AuthServerMigrationsDbContext : AbpDbContext -{ - public AuthServerMigrationsDbContext(DbContextOptions options) - : base(options) - { - - } - - protected override void OnModelCreating(ModelBuilder modelBuilder) - { - base.OnModelCreating(modelBuilder); - - modelBuilder.ConfigureIdentity(); - modelBuilder.ConfigureOpenIddict(); - } -} diff --git a/aspnet-core/services/LY.MicroService.AuthServer/LY.MicroService.AuthServer.csproj b/aspnet-core/services/LY.MicroService.AuthServer/LY.MicroService.AuthServer.csproj index 72f138d6b..8e5c8c269 100644 --- a/aspnet-core/services/LY.MicroService.AuthServer/LY.MicroService.AuthServer.csproj +++ b/aspnet-core/services/LY.MicroService.AuthServer/LY.MicroService.AuthServer.csproj @@ -43,6 +43,7 @@ + @@ -63,8 +64,4 @@ - - - - diff --git a/aspnet-core/services/LY.MicroService.AuthServer/Migrations/20221214082509_Add-OpenIddict-Module.Designer.cs b/aspnet-core/services/LY.MicroService.AuthServer/Migrations/20221214082509_Add-OpenIddict-Module.Designer.cs deleted file mode 100644 index 45fc11a76..000000000 --- a/aspnet-core/services/LY.MicroService.AuthServer/Migrations/20221214082509_Add-OpenIddict-Module.Designer.cs +++ /dev/null @@ -1,1108 +0,0 @@ -// -using System; -using LY.MicroService.AuthServer.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.AuthServer.Migrations -{ - [DbContext(typeof(AuthServerMigrationsDbContext))] - [Migration("20221214082509_Add-OpenIddict-Module")] - partial class AddOpenIddictModule - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "6.0.11") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Description") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("Regex") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("RegexDescription") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Required") - .HasColumnType("tinyint(1)"); - - b.Property("ValueType") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("AbpClaimTypes", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("SourceTenantId") - .HasColumnType("char(36)"); - - b.Property("SourceUserId") - .HasColumnType("char(36)"); - - b.Property("TargetTenantId") - .HasColumnType("char(36)"); - - b.Property("TargetUserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") - .IsUnique(); - - b.ToTable("AbpLinkUsers", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDefault") - .HasColumnType("tinyint(1)") - .HasColumnName("IsDefault"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)") - .HasColumnName("IsPublic"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)") - .HasColumnName("IsStatic"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("NormalizedName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName"); - - b.ToTable("AbpRoles", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("ClaimType") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ClaimValue") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AbpRoleClaims", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Action") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("ApplicationName") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("BrowserInfo") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("ClientId") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ClientIpAddress") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CorrelationId") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Identity") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TenantName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Action"); - - b.HasIndex("TenantId", "ApplicationName"); - - b.HasIndex("TenantId", "Identity"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AbpSecurityLogs", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AccessFailedCount") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("AccessFailedCount"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Email") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("Email"); - - b.Property("EmailConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("EmailConfirmed"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnName("IsActive"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsExternal") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsExternal"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LockoutEnabled") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("LockoutEnabled"); - - b.Property("LockoutEnd") - .HasColumnType("datetime(6)"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("NormalizedEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("NormalizedEmail"); - - b.Property("NormalizedUserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("NormalizedUserName"); - - b.Property("PasswordHash") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("PasswordHash"); - - b.Property("PhoneNumber") - .HasMaxLength(16) - .HasColumnType("varchar(16)") - .HasColumnName("PhoneNumber"); - - b.Property("PhoneNumberConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("PhoneNumberConfirmed"); - - b.Property("SecurityStamp") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("SecurityStamp"); - - b.Property("Surname") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Surname"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TwoFactorEnabled") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("TwoFactorEnabled"); - - b.Property("UserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("UserName"); - - b.HasKey("Id"); - - b.HasIndex("Email"); - - b.HasIndex("NormalizedEmail"); - - b.HasIndex("NormalizedUserName"); - - b.HasIndex("UserName"); - - b.ToTable("AbpUsers", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("ClaimType") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ClaimValue") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AbpUserClaims", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("LoginProvider") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderDisplayName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .IsRequired() - .HasMaxLength(196) - .HasColumnType("varchar(196)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("UserId", "LoginProvider"); - - b.HasIndex("LoginProvider", "ProviderKey"); - - b.ToTable("AbpUserLogins", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => - { - b.Property("OrganizationUnitId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("OrganizationUnitId", "UserId"); - - b.HasIndex("UserId", "OrganizationUnitId"); - - b.ToTable("AbpUserOrganizationUnits", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId", "UserId"); - - b.ToTable("AbpUserRoles", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("LoginProvider") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Name") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Value") - .HasColumnType("longtext"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AbpUserTokens", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(95) - .HasColumnType("varchar(95)") - .HasColumnName("Code"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Code"); - - b.HasIndex("ParentId"); - - b.ToTable("AbpOrganizationUnits", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => - { - b.Property("OrganizationUnitId") - .HasColumnType("char(36)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("OrganizationUnitId", "RoleId"); - - b.HasIndex("RoleId", "OrganizationUnitId"); - - b.ToTable("AbpOrganizationUnitRoles", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ClientId") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("ClientSecret") - .HasColumnType("longtext"); - - b.Property("ClientUri") - .HasColumnType("longtext"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ConsentType") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .HasColumnType("longtext"); - - b.Property("DisplayNames") - .HasColumnType("longtext"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LogoUri") - .HasColumnType("longtext"); - - b.Property("Permissions") - .HasColumnType("longtext"); - - b.Property("PostLogoutRedirectUris") - .HasColumnType("longtext"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("RedirectUris") - .HasColumnType("longtext"); - - b.Property("Requirements") - .HasColumnType("longtext"); - - b.Property("Type") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("ClientId"); - - b.ToTable("OpenIddictApplications", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ApplicationId") - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationDate") - .HasColumnType("datetime(6)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("Scopes") - .HasColumnType("longtext"); - - b.Property("Status") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Subject") - .HasMaxLength(400) - .HasColumnType("varchar(400)"); - - b.Property("Type") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("ApplicationId", "Status", "Subject", "Type"); - - b.ToTable("OpenIddictAuthorizations", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Scopes.OpenIddictScope", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("Descriptions") - .HasColumnType("longtext"); - - b.Property("DisplayName") - .HasColumnType("longtext"); - - b.Property("DisplayNames") - .HasColumnType("longtext"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("Resources") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("OpenIddictScopes", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ApplicationId") - .HasColumnType("char(36)"); - - b.Property("AuthorizationId") - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationDate") - .HasColumnType("datetime(6)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("ExpirationDate") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Payload") - .HasColumnType("longtext"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("RedemptionDate") - .HasColumnType("datetime(6)"); - - b.Property("ReferenceId") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Status") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Subject") - .HasMaxLength(400) - .HasColumnType("varchar(400)"); - - b.Property("Type") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("AuthorizationId"); - - b.HasIndex("ReferenceId"); - - b.HasIndex("ApplicationId", "Status", "Subject", "Type"); - - b.ToTable("OpenIddictTokens", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => - { - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany("Claims") - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Claims") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Logins") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany() - .HasForeignKey("OrganizationUnitId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("OrganizationUnits") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => - { - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Roles") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Tokens") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany() - .HasForeignKey("ParentId"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany("Roles") - .HasForeignKey("OrganizationUnitId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => - { - b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) - .WithMany() - .HasForeignKey("ApplicationId"); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => - { - b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) - .WithMany() - .HasForeignKey("ApplicationId"); - - b.HasOne("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", null) - .WithMany() - .HasForeignKey("AuthorizationId"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => - { - b.Navigation("Claims"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => - { - b.Navigation("Claims"); - - b.Navigation("Logins"); - - b.Navigation("OrganizationUnits"); - - b.Navigation("Roles"); - - b.Navigation("Tokens"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.Navigation("Roles"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/LY.MicroService.AuthServer/Migrations/20221214082509_Add-OpenIddict-Module.cs b/aspnet-core/services/LY.MicroService.AuthServer/Migrations/20221214082509_Add-OpenIddict-Module.cs deleted file mode 100644 index deff74c9e..000000000 --- a/aspnet-core/services/LY.MicroService.AuthServer/Migrations/20221214082509_Add-OpenIddict-Module.cs +++ /dev/null @@ -1,735 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.AuthServer.Migrations -{ - public partial class AddOpenIddictModule : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterDatabase() - .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: "tinyint(1)", nullable: false), - IsStatic = table.Column(type: "tinyint(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), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpClaimTypes", x => x.Id); - }) - .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: "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"), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, 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"), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) - }, - 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: "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: "tinyint(1)", nullable: false), - IsStatic = table.Column(type: "tinyint(1)", nullable: false), - IsPublic = table.Column(type: "tinyint(1)", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) - .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: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpSecurityLogs", 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: "tinyint(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: "tinyint(1)", nullable: false, defaultValue: false), - PhoneNumber = table.Column(type: "varchar(16)", maxLength: 16, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - PhoneNumberConfirmed = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - IsActive = table.Column(type: "tinyint(1)", nullable: false), - TwoFactorEnabled = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - LockoutEnd = table.Column(type: "datetime(6)", nullable: true), - LockoutEnabled = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - AccessFailedCount = table.Column(type: "int", nullable: false, defaultValue: 0), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, 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"), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpUsers", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "OpenIddictApplications", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - ClientId = table.Column(type: "varchar(100)", maxLength: 100, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ClientSecret = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConsentType = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - DisplayName = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - DisplayNames = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Permissions = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - PostLogoutRedirectUris = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Properties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - RedirectUris = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Requirements = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Type = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ClientUri = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - LogoUri = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, 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"), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_OpenIddictApplications", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "OpenIddictScopes", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Description = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Descriptions = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - DisplayName = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - DisplayNames = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Name = table.Column(type: "varchar(200)", maxLength: 200, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Properties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Resources = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, 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"), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_OpenIddictScopes", x => x.Id); - }) - .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: "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: "OpenIddictAuthorizations", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - ApplicationId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - CreationDate = table.Column(type: "datetime(6)", nullable: true), - Properties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Scopes = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Status = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Subject = table.Column(type: "varchar(400)", maxLength: 400, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Type = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, 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"), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_OpenIddictAuthorizations", x => x.Id); - table.ForeignKey( - name: "FK_OpenIddictAuthorizations_OpenIddictApplications_ApplicationId", - column: x => x.ApplicationId, - principalTable: "OpenIddictApplications", - principalColumn: "Id"); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "OpenIddictTokens", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - ApplicationId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - AuthorizationId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - CreationDate = table.Column(type: "datetime(6)", nullable: true), - ExpirationDate = table.Column(type: "datetime(6)", nullable: true), - Payload = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Properties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - RedemptionDate = table.Column(type: "datetime(6)", nullable: true), - ReferenceId = table.Column(type: "varchar(100)", maxLength: 100, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Status = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Subject = table.Column(type: "varchar(400)", maxLength: 400, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Type = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, 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"), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_OpenIddictTokens", x => x.Id); - table.ForeignKey( - name: "FK_OpenIddictTokens_OpenIddictApplications_ApplicationId", - column: x => x.ApplicationId, - principalTable: "OpenIddictApplications", - principalColumn: "Id"); - table.ForeignKey( - name: "FK_OpenIddictTokens_OpenIddictAuthorizations_AuthorizationId", - column: x => x.AuthorizationId, - principalTable: "OpenIddictAuthorizations", - principalColumn: "Id"); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "IX_AbpLinkUsers_SourceUserId_SourceTenantId_TargetUserId_Target~", - table: "AbpLinkUsers", - columns: new[] { "SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId" }, - unique: true); - - 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_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_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_OpenIddictApplications_ClientId", - table: "OpenIddictApplications", - column: "ClientId"); - - migrationBuilder.CreateIndex( - name: "IX_OpenIddictAuthorizations_ApplicationId_Status_Subject_Type", - table: "OpenIddictAuthorizations", - columns: new[] { "ApplicationId", "Status", "Subject", "Type" }); - - migrationBuilder.CreateIndex( - name: "IX_OpenIddictScopes_Name", - table: "OpenIddictScopes", - column: "Name"); - - migrationBuilder.CreateIndex( - name: "IX_OpenIddictTokens_ApplicationId_Status_Subject_Type", - table: "OpenIddictTokens", - columns: new[] { "ApplicationId", "Status", "Subject", "Type" }); - - migrationBuilder.CreateIndex( - name: "IX_OpenIddictTokens_AuthorizationId", - table: "OpenIddictTokens", - column: "AuthorizationId"); - - migrationBuilder.CreateIndex( - name: "IX_OpenIddictTokens_ReferenceId", - table: "OpenIddictTokens", - column: "ReferenceId"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AbpClaimTypes"); - - migrationBuilder.DropTable( - name: "AbpLinkUsers"); - - migrationBuilder.DropTable( - name: "AbpOrganizationUnitRoles"); - - migrationBuilder.DropTable( - name: "AbpRoleClaims"); - - migrationBuilder.DropTable( - name: "AbpSecurityLogs"); - - migrationBuilder.DropTable( - name: "AbpUserClaims"); - - migrationBuilder.DropTable( - name: "AbpUserLogins"); - - migrationBuilder.DropTable( - name: "AbpUserOrganizationUnits"); - - migrationBuilder.DropTable( - name: "AbpUserRoles"); - - migrationBuilder.DropTable( - name: "AbpUserTokens"); - - migrationBuilder.DropTable( - name: "OpenIddictScopes"); - - migrationBuilder.DropTable( - name: "OpenIddictTokens"); - - migrationBuilder.DropTable( - name: "AbpOrganizationUnits"); - - migrationBuilder.DropTable( - name: "AbpRoles"); - - migrationBuilder.DropTable( - name: "AbpUsers"); - - migrationBuilder.DropTable( - name: "OpenIddictAuthorizations"); - - migrationBuilder.DropTable( - name: "OpenIddictApplications"); - } - } -} diff --git a/aspnet-core/services/LY.MicroService.AuthServer/Migrations/AuthServerMigrationsDbContextModelSnapshot.cs b/aspnet-core/services/LY.MicroService.AuthServer/Migrations/AuthServerMigrationsDbContextModelSnapshot.cs deleted file mode 100644 index c74d22af5..000000000 --- a/aspnet-core/services/LY.MicroService.AuthServer/Migrations/AuthServerMigrationsDbContextModelSnapshot.cs +++ /dev/null @@ -1,1106 +0,0 @@ -// -using System; -using LY.MicroService.AuthServer.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.AuthServer.Migrations -{ - [DbContext(typeof(AuthServerMigrationsDbContext))] - partial class AuthServerMigrationsDbContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "6.0.11") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Description") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("Regex") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("RegexDescription") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Required") - .HasColumnType("tinyint(1)"); - - b.Property("ValueType") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("AbpClaimTypes", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("SourceTenantId") - .HasColumnType("char(36)"); - - b.Property("SourceUserId") - .HasColumnType("char(36)"); - - b.Property("TargetTenantId") - .HasColumnType("char(36)"); - - b.Property("TargetUserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") - .IsUnique(); - - b.ToTable("AbpLinkUsers", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDefault") - .HasColumnType("tinyint(1)") - .HasColumnName("IsDefault"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)") - .HasColumnName("IsPublic"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)") - .HasColumnName("IsStatic"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("NormalizedName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName"); - - b.ToTable("AbpRoles", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("ClaimType") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ClaimValue") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AbpRoleClaims", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Action") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("ApplicationName") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("BrowserInfo") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("ClientId") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ClientIpAddress") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CorrelationId") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Identity") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TenantName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Action"); - - b.HasIndex("TenantId", "ApplicationName"); - - b.HasIndex("TenantId", "Identity"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AbpSecurityLogs", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AccessFailedCount") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("AccessFailedCount"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Email") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("Email"); - - b.Property("EmailConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("EmailConfirmed"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnName("IsActive"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsExternal") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsExternal"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LockoutEnabled") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("LockoutEnabled"); - - b.Property("LockoutEnd") - .HasColumnType("datetime(6)"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("NormalizedEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("NormalizedEmail"); - - b.Property("NormalizedUserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("NormalizedUserName"); - - b.Property("PasswordHash") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("PasswordHash"); - - b.Property("PhoneNumber") - .HasMaxLength(16) - .HasColumnType("varchar(16)") - .HasColumnName("PhoneNumber"); - - b.Property("PhoneNumberConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("PhoneNumberConfirmed"); - - b.Property("SecurityStamp") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("SecurityStamp"); - - b.Property("Surname") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Surname"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TwoFactorEnabled") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("TwoFactorEnabled"); - - b.Property("UserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("UserName"); - - b.HasKey("Id"); - - b.HasIndex("Email"); - - b.HasIndex("NormalizedEmail"); - - b.HasIndex("NormalizedUserName"); - - b.HasIndex("UserName"); - - b.ToTable("AbpUsers", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("ClaimType") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ClaimValue") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AbpUserClaims", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("LoginProvider") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderDisplayName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .IsRequired() - .HasMaxLength(196) - .HasColumnType("varchar(196)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("UserId", "LoginProvider"); - - b.HasIndex("LoginProvider", "ProviderKey"); - - b.ToTable("AbpUserLogins", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => - { - b.Property("OrganizationUnitId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("OrganizationUnitId", "UserId"); - - b.HasIndex("UserId", "OrganizationUnitId"); - - b.ToTable("AbpUserOrganizationUnits", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId", "UserId"); - - b.ToTable("AbpUserRoles", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("LoginProvider") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Name") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Value") - .HasColumnType("longtext"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AbpUserTokens", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(95) - .HasColumnType("varchar(95)") - .HasColumnName("Code"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Code"); - - b.HasIndex("ParentId"); - - b.ToTable("AbpOrganizationUnits", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => - { - b.Property("OrganizationUnitId") - .HasColumnType("char(36)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("OrganizationUnitId", "RoleId"); - - b.HasIndex("RoleId", "OrganizationUnitId"); - - b.ToTable("AbpOrganizationUnitRoles", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ClientId") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("ClientSecret") - .HasColumnType("longtext"); - - b.Property("ClientUri") - .HasColumnType("longtext"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ConsentType") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .HasColumnType("longtext"); - - b.Property("DisplayNames") - .HasColumnType("longtext"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LogoUri") - .HasColumnType("longtext"); - - b.Property("Permissions") - .HasColumnType("longtext"); - - b.Property("PostLogoutRedirectUris") - .HasColumnType("longtext"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("RedirectUris") - .HasColumnType("longtext"); - - b.Property("Requirements") - .HasColumnType("longtext"); - - b.Property("Type") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("ClientId"); - - b.ToTable("OpenIddictApplications", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ApplicationId") - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationDate") - .HasColumnType("datetime(6)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("Scopes") - .HasColumnType("longtext"); - - b.Property("Status") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Subject") - .HasMaxLength(400) - .HasColumnType("varchar(400)"); - - b.Property("Type") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("ApplicationId", "Status", "Subject", "Type"); - - b.ToTable("OpenIddictAuthorizations", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Scopes.OpenIddictScope", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("Descriptions") - .HasColumnType("longtext"); - - b.Property("DisplayName") - .HasColumnType("longtext"); - - b.Property("DisplayNames") - .HasColumnType("longtext"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("Resources") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("OpenIddictScopes", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ApplicationId") - .HasColumnType("char(36)"); - - b.Property("AuthorizationId") - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationDate") - .HasColumnType("datetime(6)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("ExpirationDate") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Payload") - .HasColumnType("longtext"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("RedemptionDate") - .HasColumnType("datetime(6)"); - - b.Property("ReferenceId") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Status") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Subject") - .HasMaxLength(400) - .HasColumnType("varchar(400)"); - - b.Property("Type") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("AuthorizationId"); - - b.HasIndex("ReferenceId"); - - b.HasIndex("ApplicationId", "Status", "Subject", "Type"); - - b.ToTable("OpenIddictTokens", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => - { - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany("Claims") - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Claims") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Logins") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany() - .HasForeignKey("OrganizationUnitId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("OrganizationUnits") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => - { - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Roles") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Tokens") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany() - .HasForeignKey("ParentId"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany("Roles") - .HasForeignKey("OrganizationUnitId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => - { - b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) - .WithMany() - .HasForeignKey("ApplicationId"); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => - { - b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) - .WithMany() - .HasForeignKey("ApplicationId"); - - b.HasOne("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", null) - .WithMany() - .HasForeignKey("AuthorizationId"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => - { - b.Navigation("Claims"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => - { - b.Navigation("Claims"); - - b.Navigation("Logins"); - - b.Navigation("OrganizationUnits"); - - b.Navigation("Roles"); - - b.Navigation("Tokens"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.Navigation("Roles"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/BackendAdminHttpApiHostModule.Configure.cs b/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/BackendAdminHttpApiHostModule.Configure.cs index 34f0a95c8..2b251c008 100644 --- a/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/BackendAdminHttpApiHostModule.Configure.cs +++ b/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/BackendAdminHttpApiHostModule.Configure.cs @@ -58,7 +58,7 @@ public partial class BackendAdminHttpApiHostModule PreConfigure(options => { // 以开放端口区别,应在0-31之间 - options.SnowflakeIdOptions.WorkerId = 30010 - 30000; + options.SnowflakeIdOptions.WorkerId = 10; options.SnowflakeIdOptions.WorkerIdBits = 5; options.SnowflakeIdOptions.DatacenterId = 1; }); diff --git a/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/BackendAdminHttpApiHostModule.cs b/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/BackendAdminHttpApiHostModule.cs index 1d8295348..e5323d34b 100644 --- a/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/BackendAdminHttpApiHostModule.cs +++ b/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/BackendAdminHttpApiHostModule.cs @@ -24,6 +24,7 @@ using LINGYUN.Abp.SettingManagement; using LINGYUN.Abp.Sms.Aliyun; using LINGYUN.Abp.TextTemplating; using LINGYUN.Abp.TextTemplating.EntityFrameworkCore; +using LY.MicroService.BackendAdmin.EntityFrameworkCore; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.DependencyInjection; @@ -85,6 +86,7 @@ namespace LY.MicroService.BackendAdmin; typeof(AbpFeatureManagementEntityFrameworkCoreModule), typeof(AbpLocalizationManagementEntityFrameworkCoreModule), typeof(AbpTextTemplatingEntityFrameworkCoreModule), + typeof(BackendAdminMigrationsEntityFrameworkCoreModule), typeof(AbpDataDbMigratorModule), typeof(AbpAspNetCoreAuthenticationJwtBearerModule), typeof(AbpEmailingExceptionHandlingModule), diff --git a/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/EntityFrameworkCore/BackendAdminMigrationsDbContext.cs b/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/EntityFrameworkCore/BackendAdminMigrationsDbContext.cs deleted file mode 100644 index b8dc25d8f..000000000 --- a/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/EntityFrameworkCore/BackendAdminMigrationsDbContext.cs +++ /dev/null @@ -1,31 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using Volo.Abp.EntityFrameworkCore; -using Volo.Abp.FeatureManagement.EntityFrameworkCore; -using Volo.Abp.PermissionManagement.EntityFrameworkCore; -using Volo.Abp.SettingManagement.EntityFrameworkCore; -using LINGYUN.Abp.Saas.EntityFrameworkCore; -using LINGYUN.Abp.TextTemplating.EntityFrameworkCore; -using Volo.Abp.Data; - -namespace LY.MicroService.BackendAdmin.EntityFrameworkCore; - -[ConnectionStringName("BackendAdminDbMigrator")] -public class BackendAdminMigrationsDbContext : AbpDbContext -{ - public BackendAdminMigrationsDbContext(DbContextOptions options) - : base(options) - { - - } - - protected override void OnModelCreating(ModelBuilder modelBuilder) - { - base.OnModelCreating(modelBuilder); - - modelBuilder.ConfigureFeatureManagement(); - modelBuilder.ConfigureSaas(); - modelBuilder.ConfigureSettingManagement(); - modelBuilder.ConfigurePermissionManagement(); - modelBuilder.ConfigureTextTemplating(); - } -} diff --git a/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/LY.MicroService.BackendAdmin.HttpApi.Host.csproj b/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/LY.MicroService.BackendAdmin.HttpApi.Host.csproj index 3da5478ef..0686ca906 100644 --- a/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/LY.MicroService.BackendAdmin.HttpApi.Host.csproj +++ b/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/LY.MicroService.BackendAdmin.HttpApi.Host.csproj @@ -43,6 +43,7 @@ + diff --git a/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Migrations/20211030090436_Re-Initlize-Db-Migration.Designer.cs b/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Migrations/20211030090436_Re-Initlize-Db-Migration.Designer.cs deleted file mode 100644 index ff3cc36e6..000000000 --- a/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Migrations/20211030090436_Re-Initlize-Db-Migration.Designer.cs +++ /dev/null @@ -1,211 +0,0 @@ -// -using System; -using LY.MicroService.BackendAdmin.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -namespace LY.MicroService.BackendAdmin.Migrations -{ - [DbContext(typeof(BackendAdminMigrationsDbContext))] - [Migration("20211030090436_Re-Initlize-Db-Migration")] - partial class ReInitlizeDbMigration - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("Relational:MaxIdentifierLength", 64) - .HasAnnotation("ProductVersion", "5.0.11"); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey"); - - b.ToTable("AbpFeatureValues"); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey"); - - b.ToTable("AbpPermissionGrants"); - }); - - modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey"); - - b.ToTable("AbpSettings"); - }); - - modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("AbpTenants"); - }); - - modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => - { - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.HasKey("TenantId", "Name"); - - b.ToTable("AbpTenantConnectionStrings"); - }); - - modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => - { - b.HasOne("Volo.Abp.TenantManagement.Tenant", null) - .WithMany("ConnectionStrings") - .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => - { - b.Navigation("ConnectionStrings"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Migrations/20211030090436_Re-Initlize-Db-Migration.cs b/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Migrations/20211030090436_Re-Initlize-Db-Migration.cs deleted file mode 100644 index 4f7ae37de..000000000 --- a/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Migrations/20211030090436_Re-Initlize-Db-Migration.cs +++ /dev/null @@ -1,158 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace LY.MicroService.BackendAdmin.Migrations -{ - public partial class ReInitlizeDbMigration : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterDatabase() - .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: "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: "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"), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, 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"), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpTenants", x => x.Id); - }) - .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.CreateIndex( - name: "IX_AbpFeatureValues_Name_ProviderName_ProviderKey", - table: "AbpFeatureValues", - columns: new[] { "Name", "ProviderName", "ProviderKey" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpPermissionGrants_Name_ProviderName_ProviderKey", - table: "AbpPermissionGrants", - columns: new[] { "Name", "ProviderName", "ProviderKey" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpSettings_Name_ProviderName_ProviderKey", - table: "AbpSettings", - columns: new[] { "Name", "ProviderName", "ProviderKey" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpTenants_Name", - table: "AbpTenants", - column: "Name"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AbpFeatureValues"); - - migrationBuilder.DropTable( - name: "AbpPermissionGrants"); - - migrationBuilder.DropTable( - name: "AbpSettings"); - - migrationBuilder.DropTable( - name: "AbpTenantConnectionStrings"); - - migrationBuilder.DropTable( - name: "AbpTenants"); - } - } -} diff --git a/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Migrations/20220308091230_Add-Entity-Edtions-With-TenantManagement.Designer.cs b/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Migrations/20220308091230_Add-Entity-Edtions-With-TenantManagement.Designer.cs deleted file mode 100644 index 48e52ae96..000000000 --- a/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Migrations/20220308091230_Add-Entity-Edtions-With-TenantManagement.Designer.cs +++ /dev/null @@ -1,274 +0,0 @@ -// -using System; -using LY.MicroService.BackendAdmin.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.BackendAdmin.Migrations -{ - [DbContext(typeof(BackendAdminMigrationsDbContext))] - [Migration("20220308091230_Add-Entity-Edtions-With-TenantManagement")] - partial class AddEntityEdtionsWithTenantManagement - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "6.0.2") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.TenantManagement.Editions.Edition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.HasKey("Id"); - - b.HasIndex("DisplayName"); - - b.ToTable("AbpEditions", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpFeatureValues", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpPermissionGrants", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpSettings", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("AbpTenants", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => - { - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.HasKey("TenantId", "Name"); - - b.ToTable("AbpTenantConnectionStrings", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => - { - b.HasOne("Volo.Abp.TenantManagement.Tenant", null) - .WithMany("ConnectionStrings") - .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => - { - b.Navigation("ConnectionStrings"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Migrations/20220308091230_Add-Entity-Edtions-With-TenantManagement.cs b/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Migrations/20220308091230_Add-Entity-Edtions-With-TenantManagement.cs deleted file mode 100644 index 21b13621e..000000000 --- a/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Migrations/20220308091230_Add-Entity-Edtions-With-TenantManagement.cs +++ /dev/null @@ -1,106 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.BackendAdmin.Migrations -{ - public partial class AddEntityEdtionsWithTenantManagement : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropIndex( - name: "IX_AbpSettings_Name_ProviderName_ProviderKey", - table: "AbpSettings"); - - migrationBuilder.DropIndex( - name: "IX_AbpPermissionGrants_Name_ProviderName_ProviderKey", - table: "AbpPermissionGrants"); - - migrationBuilder.DropIndex( - name: "IX_AbpFeatureValues_Name_ProviderName_ProviderKey", - table: "AbpFeatureValues"); - - migrationBuilder.CreateTable( - name: "AbpEditions", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - DisplayName = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, 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"), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpEditions", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "IX_AbpSettings_Name_ProviderName_ProviderKey", - table: "AbpSettings", - columns: new[] { "Name", "ProviderName", "ProviderKey" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_AbpPermissionGrants_TenantId_Name_ProviderName_ProviderKey", - table: "AbpPermissionGrants", - columns: new[] { "TenantId", "Name", "ProviderName", "ProviderKey" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_AbpFeatureValues_Name_ProviderName_ProviderKey", - table: "AbpFeatureValues", - columns: new[] { "Name", "ProviderName", "ProviderKey" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_AbpEditions_DisplayName", - table: "AbpEditions", - column: "DisplayName"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AbpEditions"); - - migrationBuilder.DropIndex( - name: "IX_AbpSettings_Name_ProviderName_ProviderKey", - table: "AbpSettings"); - - migrationBuilder.DropIndex( - name: "IX_AbpPermissionGrants_TenantId_Name_ProviderName_ProviderKey", - table: "AbpPermissionGrants"); - - migrationBuilder.DropIndex( - name: "IX_AbpFeatureValues_Name_ProviderName_ProviderKey", - table: "AbpFeatureValues"); - - migrationBuilder.CreateIndex( - name: "IX_AbpSettings_Name_ProviderName_ProviderKey", - table: "AbpSettings", - columns: new[] { "Name", "ProviderName", "ProviderKey" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpPermissionGrants_Name_ProviderName_ProviderKey", - table: "AbpPermissionGrants", - columns: new[] { "Name", "ProviderName", "ProviderKey" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpFeatureValues_Name_ProviderName_ProviderKey", - table: "AbpFeatureValues", - columns: new[] { "Name", "ProviderName", "ProviderKey" }); - } - } -} diff --git a/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Migrations/20220310034917_Reset-Saas-Tenant-With-Tenant-Management.Designer.cs b/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Migrations/20220310034917_Reset-Saas-Tenant-With-Tenant-Management.Designer.cs deleted file mode 100644 index ba7911097..000000000 --- a/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Migrations/20220310034917_Reset-Saas-Tenant-With-Tenant-Management.Designer.cs +++ /dev/null @@ -1,297 +0,0 @@ -// -using System; -using LY.MicroService.BackendAdmin.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.BackendAdmin.Migrations -{ - [DbContext(typeof(BackendAdminMigrationsDbContext))] - [Migration("20220310034917_Reset-Saas-Tenant-With-Tenant-Management")] - partial class ResetSaasTenantWithTenantManagement - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "6.0.3") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Editions.Edition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.HasKey("Id"); - - b.HasIndex("DisplayName"); - - b.ToTable("AbpEditions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisableTime") - .HasColumnType("datetime(6)"); - - b.Property("EditionId") - .HasColumnType("char(36)"); - - b.Property("EnableTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("EditionId"); - - b.HasIndex("Name"); - - b.ToTable("AbpTenants", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => - { - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.HasKey("TenantId", "Name"); - - b.ToTable("AbpTenantConnectionStrings", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpFeatureValues", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpPermissionGrants", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpSettings", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.HasOne("LINGYUN.Abp.Saas.Editions.Edition", "Edition") - .WithMany() - .HasForeignKey("EditionId"); - - b.Navigation("Edition"); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => - { - b.HasOne("LINGYUN.Abp.Saas.Tenants.Tenant", null) - .WithMany("ConnectionStrings") - .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.Navigation("ConnectionStrings"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Migrations/20220310034917_Reset-Saas-Tenant-With-Tenant-Management.cs b/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Migrations/20220310034917_Reset-Saas-Tenant-With-Tenant-Management.cs deleted file mode 100644 index 659c1eec1..000000000 --- a/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Migrations/20220310034917_Reset-Saas-Tenant-With-Tenant-Management.cs +++ /dev/null @@ -1,78 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.BackendAdmin.Migrations -{ - public partial class ResetSaasTenantWithTenantManagement : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "DisableTime", - table: "AbpTenants", - type: "datetime(6)", - nullable: true); - - migrationBuilder.AddColumn( - name: "EditionId", - table: "AbpTenants", - type: "char(36)", - nullable: true, - collation: "ascii_general_ci"); - - migrationBuilder.AddColumn( - name: "EnableTime", - table: "AbpTenants", - type: "datetime(6)", - nullable: true); - - migrationBuilder.AddColumn( - name: "IsActive", - table: "AbpTenants", - type: "tinyint(1)", - nullable: false, - defaultValue: false); - - migrationBuilder.CreateIndex( - name: "IX_AbpTenants_EditionId", - table: "AbpTenants", - column: "EditionId"); - - migrationBuilder.AddForeignKey( - name: "FK_AbpTenants_AbpEditions_EditionId", - table: "AbpTenants", - column: "EditionId", - principalTable: "AbpEditions", - principalColumn: "Id"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropForeignKey( - name: "FK_AbpTenants_AbpEditions_EditionId", - table: "AbpTenants"); - - migrationBuilder.DropIndex( - name: "IX_AbpTenants_EditionId", - table: "AbpTenants"); - - migrationBuilder.DropColumn( - name: "DisableTime", - table: "AbpTenants"); - - migrationBuilder.DropColumn( - name: "EditionId", - table: "AbpTenants"); - - migrationBuilder.DropColumn( - name: "EnableTime", - table: "AbpTenants"); - - migrationBuilder.DropColumn( - name: "IsActive", - table: "AbpTenants"); - } - } -} diff --git a/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Migrations/20220625063937_Add-Module-Text-Templating.Designer.cs b/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Migrations/20220625063937_Add-Module-Text-Templating.Designer.cs deleted file mode 100644 index e745525b3..000000000 --- a/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Migrations/20220625063937_Add-Module-Text-Templating.Designer.cs +++ /dev/null @@ -1,354 +0,0 @@ -// -using System; -using LY.MicroService.BackendAdmin.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.BackendAdmin.Migrations -{ - [DbContext(typeof(BackendAdminMigrationsDbContext))] - [Migration("20220625063937_Add-Module-Text-Templating")] - partial class AddModuleTextTemplating - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "6.0.6") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Editions.Edition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.HasKey("Id"); - - b.HasIndex("DisplayName"); - - b.ToTable("AbpEditions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisableTime") - .HasColumnType("datetime(6)"); - - b.Property("EditionId") - .HasColumnType("char(36)"); - - b.Property("EnableTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("EditionId"); - - b.HasIndex("Name"); - - b.ToTable("AbpTenants", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => - { - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.HasKey("TenantId", "Name"); - - b.ToTable("AbpTenantConnectionStrings", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Content") - .HasMaxLength(1048576) - .HasColumnType("longtext") - .HasColumnName("Content"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Culture") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Culture"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("DisplayName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Name"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name") - .HasDatabaseName("IX_Tenant_Text_Template_Name"); - - b.ToTable("AbpTextTemplates", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpFeatureValues", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpPermissionGrants", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpSettings", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.HasOne("LINGYUN.Abp.Saas.Editions.Edition", "Edition") - .WithMany() - .HasForeignKey("EditionId"); - - b.Navigation("Edition"); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => - { - b.HasOne("LINGYUN.Abp.Saas.Tenants.Tenant", null) - .WithMany("ConnectionStrings") - .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.Navigation("ConnectionStrings"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Migrations/20220625063937_Add-Module-Text-Templating.cs b/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Migrations/20220625063937_Add-Module-Text-Templating.cs deleted file mode 100644 index 0a9d4efc9..000000000 --- a/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Migrations/20220625063937_Add-Module-Text-Templating.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.BackendAdmin.Migrations -{ - public partial class AddModuleTextTemplating : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "AbpTextTemplates", - 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(100)", maxLength: 100, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - DisplayName = table.Column(type: "varchar(100)", maxLength: 100, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Content = table.Column(type: "longtext", maxLength: 1048576, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Culture = table.Column(type: "varchar(30)", maxLength: 30, 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") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpTextTemplates", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "IX_Tenant_Text_Template_Name", - table: "AbpTextTemplates", - columns: new[] { "TenantId", "Name" }); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AbpTextTemplates"); - } - } -} diff --git a/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Migrations/20220628050554_Alter-Culture-Field-Allow-Be-Null.Designer.cs b/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Migrations/20220628050554_Alter-Culture-Field-Allow-Be-Null.Designer.cs deleted file mode 100644 index e96678c1e..000000000 --- a/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Migrations/20220628050554_Alter-Culture-Field-Allow-Be-Null.Designer.cs +++ /dev/null @@ -1,353 +0,0 @@ -// -using System; -using LY.MicroService.BackendAdmin.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.BackendAdmin.Migrations -{ - [DbContext(typeof(BackendAdminMigrationsDbContext))] - [Migration("20220628050554_Alter-Culture-Field-Allow-Be-Null")] - partial class AlterCultureFieldAllowBeNull - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "6.0.6") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Editions.Edition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.HasKey("Id"); - - b.HasIndex("DisplayName"); - - b.ToTable("AbpEditions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisableTime") - .HasColumnType("datetime(6)"); - - b.Property("EditionId") - .HasColumnType("char(36)"); - - b.Property("EnableTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("EditionId"); - - b.HasIndex("Name"); - - b.ToTable("AbpTenants", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => - { - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.HasKey("TenantId", "Name"); - - b.ToTable("AbpTenantConnectionStrings", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Content") - .HasMaxLength(1048576) - .HasColumnType("longtext") - .HasColumnName("Content"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Culture") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Culture"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("DisplayName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Name"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name") - .HasDatabaseName("IX_Tenant_Text_Template_Name"); - - b.ToTable("AbpTextTemplates", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpFeatureValues", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpPermissionGrants", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpSettings", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.HasOne("LINGYUN.Abp.Saas.Editions.Edition", "Edition") - .WithMany() - .HasForeignKey("EditionId"); - - b.Navigation("Edition"); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => - { - b.HasOne("LINGYUN.Abp.Saas.Tenants.Tenant", null) - .WithMany("ConnectionStrings") - .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.Navigation("ConnectionStrings"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Migrations/20220628050554_Alter-Culture-Field-Allow-Be-Null.cs b/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Migrations/20220628050554_Alter-Culture-Field-Allow-Be-Null.cs deleted file mode 100644 index a66aa2361..000000000 --- a/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Migrations/20220628050554_Alter-Culture-Field-Allow-Be-Null.cs +++ /dev/null @@ -1,47 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.BackendAdmin.Migrations -{ - public partial class AlterCultureFieldAllowBeNull : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "Culture", - table: "AbpTextTemplates", - type: "varchar(30)", - maxLength: 30, - nullable: true, - oldClrType: typeof(string), - oldType: "varchar(30)", - oldMaxLength: 30) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.UpdateData( - table: "AbpTextTemplates", - keyColumn: "Culture", - keyValue: null, - column: "Culture", - value: ""); - - migrationBuilder.AlterColumn( - name: "Culture", - table: "AbpTextTemplates", - type: "varchar(30)", - maxLength: 30, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(30)", - oldMaxLength: 30, - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - } - } -} diff --git a/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Migrations/20230106023648_Upgrade-Abp-Framework-To-7.0.0.Designer.cs b/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Migrations/20230106023648_Upgrade-Abp-Framework-To-7.0.0.Designer.cs deleted file mode 100644 index c79e0bdff..000000000 --- a/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Migrations/20230106023648_Upgrade-Abp-Framework-To-7.0.0.Designer.cs +++ /dev/null @@ -1,524 +0,0 @@ -// -using System; -using LY.MicroService.BackendAdmin.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.BackendAdmin.Migrations -{ - [DbContext(typeof(BackendAdminMigrationsDbContext))] - [Migration("20230106023648_Upgrade-Abp-Framework-To-7.0.0")] - partial class UpgradeAbpFrameworkTo700 - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "7.0.1") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Editions.Edition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.HasKey("Id"); - - b.HasIndex("DisplayName"); - - b.ToTable("AbpEditions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisableTime") - .HasColumnType("datetime(6)"); - - b.Property("EditionId") - .HasColumnType("char(36)"); - - b.Property("EnableTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("EditionId"); - - b.HasIndex("Name"); - - b.ToTable("AbpTenants", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => - { - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.HasKey("TenantId", "Name"); - - b.ToTable("AbpTenantConnectionStrings", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Content") - .HasMaxLength(1048576) - .HasColumnType("longtext") - .HasColumnName("Content"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Culture") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Culture"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("DisplayName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Name"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name") - .HasDatabaseName("IX_Tenant_Text_Template_Name"); - - b.ToTable("AbpTextTemplates", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowedProviders") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("DefaultValue") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("Description") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("IsAvailableToHost") - .HasColumnType("tinyint(1)"); - - b.Property("IsVisibleToClients") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ParentName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ValueType") - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.HasKey("Id"); - - b.HasIndex("GroupName"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpFeatures", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureGroupDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpFeatureGroups", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpFeatureValues", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("MultiTenancySide") - .HasColumnType("tinyint unsigned"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ParentName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Providers") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("StateCheckers") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("GroupName"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpPermissions", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpPermissionGrants", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpPermissionGroups", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpSettings", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.HasOne("LINGYUN.Abp.Saas.Editions.Edition", "Edition") - .WithMany() - .HasForeignKey("EditionId"); - - b.Navigation("Edition"); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => - { - b.HasOne("LINGYUN.Abp.Saas.Tenants.Tenant", null) - .WithMany("ConnectionStrings") - .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.Navigation("ConnectionStrings"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Migrations/20230106023648_Upgrade-Abp-Framework-To-7.0.0.cs b/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Migrations/20230106023648_Upgrade-Abp-Framework-To-7.0.0.cs deleted file mode 100644 index 4472779ab..000000000 --- a/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Migrations/20230106023648_Upgrade-Abp-Framework-To-7.0.0.cs +++ /dev/null @@ -1,161 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.BackendAdmin.Migrations -{ - /// - public partial class UpgradeAbpFrameworkTo700 : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - 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: "tinyint(1)", nullable: false), - IsAvailableToHost = table.Column(type: "tinyint(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: "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: "tinyint(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.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_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); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AbpFeatureGroups"); - - migrationBuilder.DropTable( - name: "AbpFeatures"); - - migrationBuilder.DropTable( - name: "AbpPermissionGroups"); - - migrationBuilder.DropTable( - name: "AbpPermissions"); - } - } -} diff --git a/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Migrations/BackendAdminHostMigrationsDbContextModelSnapshot.cs b/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Migrations/BackendAdminHostMigrationsDbContextModelSnapshot.cs deleted file mode 100644 index 22525cb09..000000000 --- a/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Migrations/BackendAdminHostMigrationsDbContextModelSnapshot.cs +++ /dev/null @@ -1,521 +0,0 @@ -// -using System; -using LY.MicroService.BackendAdmin.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.BackendAdmin.Migrations -{ - [DbContext(typeof(BackendAdminMigrationsDbContext))] - partial class BackendAdminHostMigrationsDbContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "7.0.1") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Editions.Edition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.HasKey("Id"); - - b.HasIndex("DisplayName"); - - b.ToTable("AbpEditions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisableTime") - .HasColumnType("datetime(6)"); - - b.Property("EditionId") - .HasColumnType("char(36)"); - - b.Property("EnableTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("EditionId"); - - b.HasIndex("Name"); - - b.ToTable("AbpTenants", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => - { - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.HasKey("TenantId", "Name"); - - b.ToTable("AbpTenantConnectionStrings", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Content") - .HasMaxLength(1048576) - .HasColumnType("longtext") - .HasColumnName("Content"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Culture") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Culture"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("DisplayName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Name"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name") - .HasDatabaseName("IX_Tenant_Text_Template_Name"); - - b.ToTable("AbpTextTemplates", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowedProviders") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("DefaultValue") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("Description") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("IsAvailableToHost") - .HasColumnType("tinyint(1)"); - - b.Property("IsVisibleToClients") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ParentName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ValueType") - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.HasKey("Id"); - - b.HasIndex("GroupName"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpFeatures", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureGroupDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpFeatureGroups", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpFeatureValues", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("MultiTenancySide") - .HasColumnType("tinyint unsigned"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ParentName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Providers") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("StateCheckers") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("GroupName"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpPermissions", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpPermissionGrants", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpPermissionGroups", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpSettings", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.HasOne("LINGYUN.Abp.Saas.Editions.Edition", "Edition") - .WithMany() - .HasForeignKey("EditionId"); - - b.Navigation("Edition"); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => - { - b.HasOne("LINGYUN.Abp.Saas.Tenants.Tenant", null) - .WithMany("ConnectionStrings") - .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.Navigation("ConnectionStrings"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/EntityFrameworkCore/LocalizationManagementMigrationsDbContext.cs b/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/EntityFrameworkCore/LocalizationManagementMigrationsDbContext.cs deleted file mode 100644 index d1ec9ebcc..000000000 --- a/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/EntityFrameworkCore/LocalizationManagementMigrationsDbContext.cs +++ /dev/null @@ -1,23 +0,0 @@ -using LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Volo.Abp.EntityFrameworkCore; - -namespace LY.MicroService.LocalizationManagement.EntityFrameworkCore -{ - public class LocalizationManagementMigrationsDbContext : AbpDbContext - { - public LocalizationManagementMigrationsDbContext( - DbContextOptions options) - : base(options) - { - - } - - protected override void OnModelCreating(ModelBuilder modelBuilder) - { - base.OnModelCreating(modelBuilder); - - modelBuilder.ConfigureLocalization(); - } - } -} diff --git a/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/LY.MicroService.LocalizationManagement.HttpApi.Host.csproj b/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/LY.MicroService.LocalizationManagement.HttpApi.Host.csproj index 30e3b0329..51cce78a3 100644 --- a/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/LY.MicroService.LocalizationManagement.HttpApi.Host.csproj +++ b/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/LY.MicroService.LocalizationManagement.HttpApi.Host.csproj @@ -32,6 +32,7 @@ + diff --git a/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/LocalizationManagementHttpApiHostModule.Configure.cs b/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/LocalizationManagementHttpApiHostModule.Configure.cs index 891b05256..bb491d1c0 100644 --- a/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/LocalizationManagementHttpApiHostModule.Configure.cs +++ b/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/LocalizationManagementHttpApiHostModule.Configure.cs @@ -53,7 +53,7 @@ public partial class LocalizationManagementHttpApiHostModule PreConfigure(options => { // 以开放端口区别,应在0-31之间 - options.SnowflakeIdOptions.WorkerId = 30030 - 30000; + options.SnowflakeIdOptions.WorkerId = 30; options.SnowflakeIdOptions.WorkerIdBits = 5; options.SnowflakeIdOptions.DatacenterId = 1; }); diff --git a/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/LocalizationManagementHttpApiHostModule.cs b/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/LocalizationManagementHttpApiHostModule.cs index 7f37984bc..4f58d9727 100644 --- a/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/LocalizationManagementHttpApiHostModule.cs +++ b/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/LocalizationManagementHttpApiHostModule.cs @@ -1,5 +1,4 @@ -using DotNetCore.CAP; -using LINGYUN.Abp.AspNetCore.HttpOverrides; +using LINGYUN.Abp.AspNetCore.HttpOverrides; using LINGYUN.Abp.AspNetCore.Mvc.Wrapper; using LINGYUN.Abp.AuditLogging.Elasticsearch; using LINGYUN.Abp.Authorization.OrganizationUnits; @@ -13,6 +12,7 @@ using LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore; using LINGYUN.Abp.Saas.EntityFrameworkCore; using LINGYUN.Abp.Serilog.Enrichers.Application; using LINGYUN.Abp.Serilog.Enrichers.UniqueId; +using LY.MicroService.LocalizationManagement.EntityFrameworkCore; using Microsoft.AspNetCore.Builder; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; @@ -44,6 +44,7 @@ namespace LY.MicroService.LocalizationManagement typeof(AbpFeatureManagementEntityFrameworkCoreModule), typeof(AbpSettingManagementEntityFrameworkCoreModule), typeof(AbpPermissionManagementEntityFrameworkCoreModule), + typeof(LocalizationManagementMigrationsEntityFrameworkCoreModule), typeof(AbpDataDbMigratorModule), typeof(AbpAspNetCoreAuthenticationJwtBearerModule), typeof(AbpAuthorizationOrganizationUnitsModule), diff --git a/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/Migrations/20210326090255_Add-Module-Localization-Management.Designer.cs b/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/Migrations/20210326090255_Add-Module-Localization-Management.Designer.cs deleted file mode 100644 index c5a488cc7..000000000 --- a/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/Migrations/20210326090255_Add-Module-Localization-Management.Designer.cs +++ /dev/null @@ -1,178 +0,0 @@ -// -using System; -using LY.MicroService.LocalizationManagement.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -namespace LY.MicroService.LocalizationManagement.Migrations -{ - [DbContext(typeof(LocalizationManagementMigrationsDbContext))] - [Migration("20210326090255_Add-Module-Localization-Management")] - partial class AddModuleLocalizationManagement - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("Relational:MaxIdentifierLength", 64) - .HasAnnotation("ProductVersion", "5.0.2"); - - modelBuilder.Entity("LINGYUN.Abp.LocalizationManagement.Language", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("CultureName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20) CHARACTER SET utf8mb4") - .HasColumnName("CultureName"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasColumnName("DisplayName"); - - b.Property("Enable") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true); - - b.Property("FlagIcon") - .HasMaxLength(30) - .HasColumnType("varchar(30) CHARACTER SET utf8mb4") - .HasColumnName("FlagIcon"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UiCultureName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20) CHARACTER SET utf8mb4") - .HasColumnName("UiCultureName"); - - b.HasKey("Id"); - - b.HasIndex("CultureName"); - - b.ToTable("AbpLocalizationLanguages"); - }); - - modelBuilder.Entity("LINGYUN.Abp.LocalizationManagement.Resource", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(64) - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasColumnName("Description"); - - b.Property("DisplayName") - .HasMaxLength(64) - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasColumnName("DisplayName"); - - b.Property("Enable") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50) CHARACTER SET utf8mb4") - .HasColumnName("Name"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("AbpLocalizationResources"); - }); - - modelBuilder.Entity("LINGYUN.Abp.LocalizationManagement.Text", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - b.Property("CultureName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20) CHARACTER SET utf8mb4") - .HasColumnName("CultureName"); - - b.Property("Key") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("varchar(512) CHARACTER SET utf8mb4") - .HasColumnName("Key"); - - b.Property("ResourceId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Value") - .HasMaxLength(2048) - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasColumnName("Value"); - - b.HasKey("Id"); - - b.HasIndex("Key"); - - b.ToTable("AbpLocalizationTexts"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/Migrations/20210326090255_Add-Module-Localization-Management.cs b/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/Migrations/20210326090255_Add-Module-Localization-Management.cs deleted file mode 100644 index c3c3b9c97..000000000 --- a/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/Migrations/20210326090255_Add-Module-Localization-Management.cs +++ /dev/null @@ -1,97 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace LY.MicroService.LocalizationManagement.Migrations -{ - public partial class AddModuleLocalizationManagement : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "AbpLocalizationLanguages", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false), - TenantId = table.Column(type: "char(36)", nullable: true), - Enable = table.Column(type: "tinyint(1)", nullable: false, defaultValue: true), - CultureName = table.Column(type: "varchar(20) CHARACTER SET utf8mb4", maxLength: 20, nullable: false), - UiCultureName = table.Column(type: "varchar(20) CHARACTER SET utf8mb4", maxLength: 20, nullable: false), - DisplayName = table.Column(type: "varchar(64) CHARACTER SET utf8mb4", maxLength: 64, nullable: false), - FlagIcon = table.Column(type: "varchar(30) CHARACTER SET utf8mb4", maxLength: 30, nullable: true), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpLocalizationLanguages", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AbpLocalizationResources", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false), - TenantId = table.Column(type: "char(36)", nullable: true), - Enable = table.Column(type: "tinyint(1)", nullable: false, defaultValue: true), - Name = table.Column(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false), - DisplayName = table.Column(type: "varchar(64) CHARACTER SET utf8mb4", maxLength: 64, nullable: true), - Description = table.Column(type: "varchar(64) CHARACTER SET utf8mb4", maxLength: 64, nullable: true), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpLocalizationResources", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AbpLocalizationTexts", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - TenantId = table.Column(type: "char(36)", nullable: true), - CultureName = table.Column(type: "varchar(20) CHARACTER SET utf8mb4", maxLength: 20, nullable: false), - Key = table.Column(type: "varchar(512) CHARACTER SET utf8mb4", maxLength: 512, nullable: false), - Value = table.Column(type: "longtext CHARACTER SET utf8mb4", maxLength: 2048, nullable: true), - ResourceId = table.Column(type: "char(36)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpLocalizationTexts", x => x.Id); - }); - - migrationBuilder.CreateIndex( - name: "IX_AbpLocalizationLanguages_CultureName", - table: "AbpLocalizationLanguages", - column: "CultureName"); - - migrationBuilder.CreateIndex( - name: "IX_AbpLocalizationResources_Name", - table: "AbpLocalizationResources", - column: "Name"); - - migrationBuilder.CreateIndex( - name: "IX_AbpLocalizationTexts_Key", - table: "AbpLocalizationTexts", - column: "Key"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AbpLocalizationLanguages"); - - migrationBuilder.DropTable( - name: "AbpLocalizationResources"); - - migrationBuilder.DropTable( - name: "AbpLocalizationTexts"); - } - } -} diff --git a/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/Migrations/20210326100405_Rmove-Field-TenantId.Designer.cs b/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/Migrations/20210326100405_Rmove-Field-TenantId.Designer.cs deleted file mode 100644 index 8e458a892..000000000 --- a/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/Migrations/20210326100405_Rmove-Field-TenantId.Designer.cs +++ /dev/null @@ -1,166 +0,0 @@ -// -using System; -using LY.MicroService.LocalizationManagement.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -namespace LY.MicroService.LocalizationManagement.Migrations -{ - [DbContext(typeof(LocalizationManagementMigrationsDbContext))] - [Migration("20210326100405_Rmove-Field-TenantId")] - partial class RmoveFieldTenantId - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("Relational:MaxIdentifierLength", 64) - .HasAnnotation("ProductVersion", "5.0.2"); - - modelBuilder.Entity("LINGYUN.Abp.LocalizationManagement.Language", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("CultureName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20) CHARACTER SET utf8mb4") - .HasColumnName("CultureName"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasColumnName("DisplayName"); - - b.Property("Enable") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true); - - b.Property("FlagIcon") - .HasMaxLength(30) - .HasColumnType("varchar(30) CHARACTER SET utf8mb4") - .HasColumnName("FlagIcon"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("UiCultureName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20) CHARACTER SET utf8mb4") - .HasColumnName("UiCultureName"); - - b.HasKey("Id"); - - b.HasIndex("CultureName"); - - b.ToTable("AbpLocalizationLanguages"); - }); - - modelBuilder.Entity("LINGYUN.Abp.LocalizationManagement.Resource", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(64) - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasColumnName("Description"); - - b.Property("DisplayName") - .HasMaxLength(64) - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasColumnName("DisplayName"); - - b.Property("Enable") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50) CHARACTER SET utf8mb4") - .HasColumnName("Name"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("AbpLocalizationResources"); - }); - - modelBuilder.Entity("LINGYUN.Abp.LocalizationManagement.Text", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - b.Property("CultureName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20) CHARACTER SET utf8mb4") - .HasColumnName("CultureName"); - - b.Property("Key") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("varchar(512) CHARACTER SET utf8mb4") - .HasColumnName("Key"); - - b.Property("ResourceId") - .HasColumnType("char(36)"); - - b.Property("Value") - .HasMaxLength(2048) - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasColumnName("Value"); - - b.HasKey("Id"); - - b.HasIndex("Key"); - - b.ToTable("AbpLocalizationTexts"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/Migrations/20210326100405_Rmove-Field-TenantId.cs b/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/Migrations/20210326100405_Rmove-Field-TenantId.cs deleted file mode 100644 index f266d660e..000000000 --- a/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/Migrations/20210326100405_Rmove-Field-TenantId.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace LY.MicroService.LocalizationManagement.Migrations -{ - public partial class RmoveFieldTenantId : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "TenantId", - table: "AbpLocalizationTexts"); - - migrationBuilder.DropColumn( - name: "TenantId", - table: "AbpLocalizationResources"); - - migrationBuilder.DropColumn( - name: "TenantId", - table: "AbpLocalizationLanguages"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "TenantId", - table: "AbpLocalizationTexts", - type: "char(36)", - nullable: true); - - migrationBuilder.AddColumn( - name: "TenantId", - table: "AbpLocalizationResources", - type: "char(36)", - nullable: true); - - migrationBuilder.AddColumn( - name: "TenantId", - table: "AbpLocalizationLanguages", - type: "char(36)", - nullable: true); - } - } -} diff --git a/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/Migrations/20210326103126_Rename-Field-ResourceId-To-ResourceName.Designer.cs b/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/Migrations/20210326103126_Rename-Field-ResourceId-To-ResourceName.Designer.cs deleted file mode 100644 index aa5f97dd1..000000000 --- a/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/Migrations/20210326103126_Rename-Field-ResourceId-To-ResourceName.Designer.cs +++ /dev/null @@ -1,166 +0,0 @@ -// -using System; -using LY.MicroService.LocalizationManagement.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -namespace LY.MicroService.LocalizationManagement.Migrations -{ - [DbContext(typeof(LocalizationManagementMigrationsDbContext))] - [Migration("20210326103126_Rename-Field-ResourceId-To-ResourceName")] - partial class RenameFieldResourceIdToResourceName - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("Relational:MaxIdentifierLength", 64) - .HasAnnotation("ProductVersion", "5.0.2"); - - modelBuilder.Entity("LINGYUN.Abp.LocalizationManagement.Language", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("CultureName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20) CHARACTER SET utf8mb4") - .HasColumnName("CultureName"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasColumnName("DisplayName"); - - b.Property("Enable") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true); - - b.Property("FlagIcon") - .HasMaxLength(30) - .HasColumnType("varchar(30) CHARACTER SET utf8mb4") - .HasColumnName("FlagIcon"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("UiCultureName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20) CHARACTER SET utf8mb4") - .HasColumnName("UiCultureName"); - - b.HasKey("Id"); - - b.HasIndex("CultureName"); - - b.ToTable("AbpLocalizationLanguages"); - }); - - modelBuilder.Entity("LINGYUN.Abp.LocalizationManagement.Resource", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(64) - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasColumnName("Description"); - - b.Property("DisplayName") - .HasMaxLength(64) - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasColumnName("DisplayName"); - - b.Property("Enable") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50) CHARACTER SET utf8mb4") - .HasColumnName("Name"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("AbpLocalizationResources"); - }); - - modelBuilder.Entity("LINGYUN.Abp.LocalizationManagement.Text", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - b.Property("CultureName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20) CHARACTER SET utf8mb4") - .HasColumnName("CultureName"); - - b.Property("Key") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("varchar(512) CHARACTER SET utf8mb4") - .HasColumnName("Key"); - - b.Property("ResourceName") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("Value") - .HasMaxLength(2048) - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasColumnName("Value"); - - b.HasKey("Id"); - - b.HasIndex("Key"); - - b.ToTable("AbpLocalizationTexts"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/Migrations/20210326103126_Rename-Field-ResourceId-To-ResourceName.cs b/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/Migrations/20210326103126_Rename-Field-ResourceId-To-ResourceName.cs deleted file mode 100644 index 843eac61d..000000000 --- a/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/Migrations/20210326103126_Rename-Field-ResourceId-To-ResourceName.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace LY.MicroService.LocalizationManagement.Migrations -{ - public partial class RenameFieldResourceIdToResourceName : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "ResourceId", - table: "AbpLocalizationTexts"); - - migrationBuilder.AddColumn( - name: "ResourceName", - table: "AbpLocalizationTexts", - type: "longtext CHARACTER SET utf8mb4", - nullable: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "ResourceName", - table: "AbpLocalizationTexts"); - - migrationBuilder.AddColumn( - name: "ResourceId", - table: "AbpLocalizationTexts", - type: "char(36)", - nullable: false, - defaultValue: new Guid("00000000-0000-0000-0000-000000000000")); - } - } -} diff --git a/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/Migrations/LocalizationManagementMigrationsDbContextModelSnapshot.cs b/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/Migrations/LocalizationManagementMigrationsDbContextModelSnapshot.cs deleted file mode 100644 index 96e328753..000000000 --- a/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/Migrations/LocalizationManagementMigrationsDbContextModelSnapshot.cs +++ /dev/null @@ -1,164 +0,0 @@ -// -using System; -using LY.MicroService.LocalizationManagement.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -namespace LY.MicroService.LocalizationManagement.Migrations -{ - [DbContext(typeof(LocalizationManagementMigrationsDbContext))] - partial class LocalizationManagementMigrationsDbContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("Relational:MaxIdentifierLength", 64) - .HasAnnotation("ProductVersion", "5.0.2"); - - modelBuilder.Entity("LINGYUN.Abp.LocalizationManagement.Language", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("CultureName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20) CHARACTER SET utf8mb4") - .HasColumnName("CultureName"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasColumnName("DisplayName"); - - b.Property("Enable") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true); - - b.Property("FlagIcon") - .HasMaxLength(30) - .HasColumnType("varchar(30) CHARACTER SET utf8mb4") - .HasColumnName("FlagIcon"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("UiCultureName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20) CHARACTER SET utf8mb4") - .HasColumnName("UiCultureName"); - - b.HasKey("Id"); - - b.HasIndex("CultureName"); - - b.ToTable("AbpLocalizationLanguages"); - }); - - modelBuilder.Entity("LINGYUN.Abp.LocalizationManagement.Resource", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(64) - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasColumnName("Description"); - - b.Property("DisplayName") - .HasMaxLength(64) - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasColumnName("DisplayName"); - - b.Property("Enable") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50) CHARACTER SET utf8mb4") - .HasColumnName("Name"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("AbpLocalizationResources"); - }); - - modelBuilder.Entity("LINGYUN.Abp.LocalizationManagement.Text", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - b.Property("CultureName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20) CHARACTER SET utf8mb4") - .HasColumnName("CultureName"); - - b.Property("Key") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("varchar(512) CHARACTER SET utf8mb4") - .HasColumnName("Key"); - - b.Property("ResourceName") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("Value") - .HasMaxLength(2048) - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasColumnName("Value"); - - b.HasKey("Id"); - - b.HasIndex("Key"); - - b.ToTable("AbpLocalizationTexts"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/EntityFrameworkCore/PlatformManagementMigrationsDbContext.cs b/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/EntityFrameworkCore/PlatformManagementMigrationsDbContext.cs deleted file mode 100644 index 6b48b2a14..000000000 --- a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/EntityFrameworkCore/PlatformManagementMigrationsDbContext.cs +++ /dev/null @@ -1,21 +0,0 @@ -using LINGYUN.Platform.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Volo.Abp.EntityFrameworkCore; - -namespace LY.MicroService.PlatformManagement.EntityFrameworkCore; - -public class PlatformManagementMigrationsDbContext : AbpDbContext -{ - public PlatformManagementMigrationsDbContext(DbContextOptions options) - : base(options) - { - - } - - protected override void OnModelCreating(ModelBuilder modelBuilder) - { - base.OnModelCreating(modelBuilder); - - modelBuilder.ConfigurePlatform(); - } -} diff --git a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/EventBus/Handlers/TenantSynchronizer.cs b/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/EventBus/Handlers/TenantSynchronizer.cs index 370aa58be..b74ac1568 100644 --- a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/EventBus/Handlers/TenantSynchronizer.cs +++ b/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/EventBus/Handlers/TenantSynchronizer.cs @@ -1,6 +1,6 @@ using LINGYUN.Abp.Data.DbMigrator; using LINGYUN.Abp.MultiTenancy; -using LY.MicroService.PlatformManagement.EntityFrameworkCore; +using LY.MicroService.Platform.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Logging; using System.Threading.Tasks; @@ -51,12 +51,12 @@ public class TenantSynchronizer : { Logger.LogInformation("Migrating the new tenant database with platform..."); // 迁移租户数据 - await DbSchemaMigrator.MigrateAsync( + await DbSchemaMigrator.MigrateAsync( (connectionString, builder) => { builder.UseMySql(connectionString, ServerVersion.AutoDetect(connectionString)); - return new PlatformManagementMigrationsDbContext(builder.Options); + return new PlatformMigrationsDbContext(builder.Options); }); Logger.LogInformation("Migrated the new tenant database with platform."); diff --git a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/LY.MicroService.PlatformManagement.HttpApi.Host.csproj b/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/LY.MicroService.PlatformManagement.HttpApi.Host.csproj index e55a39583..65403e9e7 100644 --- a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/LY.MicroService.PlatformManagement.HttpApi.Host.csproj +++ b/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/LY.MicroService.PlatformManagement.HttpApi.Host.csproj @@ -35,6 +35,7 @@ + diff --git a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Migrations/20211030132911_Re-Initlize-Db-Migration.Designer.cs b/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Migrations/20211030132911_Re-Initlize-Db-Migration.Designer.cs deleted file mode 100644 index c98ea7341..000000000 --- a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Migrations/20211030132911_Re-Initlize-Db-Migration.Designer.cs +++ /dev/null @@ -1,665 +0,0 @@ -// -using System; -using LY.MicroService.PlatformManagement.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -namespace LY.MicroService.PlatformManagement.Migrations -{ - [DbContext(typeof(PlatformManagementMigrationsDbContext))] - [Migration("20211030132911_Re-Initlize-Db-Migration")] - partial class ReInitlizeDbMigration - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("Relational:MaxIdentifierLength", 64) - .HasAnnotation("ProductVersion", "5.0.11"); - - modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Code"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Description"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Name"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("AppPlatformDatas"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowBeNull") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DataId") - .HasColumnType("char(36)"); - - b.Property("DefaultValue") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DefaultValue"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Description"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Name"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("ValueType") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("DataId"); - - b.HasIndex("Name"); - - b.ToTable("AppPlatformDataItems"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Layouts.Layout", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DataId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Framework") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Framework"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("Path") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Path"); - - b.Property("Redirect") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Redirect"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformLayouts"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.Menu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(23) - .HasColumnType("varchar(23)") - .HasColumnName("Code"); - - b.Property("Component") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Component"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Framework") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Framework"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LayoutId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("Path") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Path"); - - b.Property("Redirect") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Redirect"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformMenus"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.RoleMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("RoleName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("RoleName"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("RoleName", "MenuId"); - - b.ToTable("AppPlatformRoleMenus"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.UserMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "MenuId"); - - b.ToTable("AppPlatformUserMenus"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Versions.AppVersion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(2048) - .HasColumnType("varchar(2048)") - .HasColumnName("Description"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Level") - .HasColumnType("int"); - - b.Property("PlatformType") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("Title"); - - b.Property("Version") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnName("Version"); - - b.HasKey("Id"); - - b.HasIndex("Version"); - - b.ToTable("AppPlatformVersion"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Versions.VersionFile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - b.Property("AppVersionId") - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DownloadCount") - .HasColumnType("int"); - - b.Property("FileType") - .HasColumnType("int"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Name"); - - b.Property("Path") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Path"); - - b.Property("SHA256") - .IsRequired() - .HasMaxLength(65) - .HasColumnType("varchar(65)") - .HasColumnName("SHA256"); - - b.Property("Size") - .HasColumnType("bigint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Version") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnName("Version"); - - b.HasKey("Id"); - - b.HasIndex("AppVersionId"); - - b.HasIndex("Path", "Name", "Version") - .IsUnique(); - - b.ToTable("AppPlatformVersionFile"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => - { - b.HasOne("LINGYUN.Platform.Datas.Data", null) - .WithMany("Items") - .HasForeignKey("DataId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("LINGYUN.Platform.Versions.VersionFile", b => - { - b.HasOne("LINGYUN.Platform.Versions.AppVersion", "AppVersion") - .WithMany("Files") - .HasForeignKey("AppVersionId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("AppVersion"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Versions.AppVersion", b => - { - b.Navigation("Files"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Migrations/20211030132911_Re-Initlize-Db-Migration.cs b/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Migrations/20211030132911_Re-Initlize-Db-Migration.cs deleted file mode 100644 index 1e7986904..000000000 --- a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Migrations/20211030132911_Re-Initlize-Db-Migration.cs +++ /dev/null @@ -1,346 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace LY.MicroService.PlatformManagement.Migrations -{ - public partial class ReInitlizeDbMigration : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterDatabase() - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AppPlatformDatas", - 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(30)", maxLength: 30, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Code = table.Column(type: "varchar(1024)", maxLength: 1024, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - DisplayName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Description = table.Column(type: "varchar(1024)", maxLength: 1024, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ParentId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - IsStatic = table.Column(type: "tinyint(1)", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, 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"), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AppPlatformDatas", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AppPlatformLayouts", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Framework = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - DataId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, 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"), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - Path = table.Column(type: "varchar(255)", maxLength: 255, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Name = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - DisplayName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Description = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Redirect = table.Column(type: "varchar(255)", maxLength: 255, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AppPlatformLayouts", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AppPlatformMenus", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Framework = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Code = table.Column(type: "varchar(23)", maxLength: 23, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Component = table.Column(type: "varchar(255)", maxLength: 255, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ParentId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LayoutId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - IsPublic = table.Column(type: "tinyint(1)", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, 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"), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - Path = table.Column(type: "varchar(255)", maxLength: 255, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Name = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - DisplayName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Description = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Redirect = table.Column(type: "varchar(255)", maxLength: 255, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AppPlatformMenus", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AppPlatformRoleMenus", - 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"), - MenuId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - RoleName = table.Column(type: "varchar(256)", maxLength: 256, 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") - }, - constraints: table => - { - table.PrimaryKey("PK_AppPlatformRoleMenus", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AppPlatformUserMenus", - 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"), - MenuId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - 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_AppPlatformUserMenus", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AppPlatformVersion", - 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(50)", maxLength: 50, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Version = table.Column(type: "varchar(20)", maxLength: 20, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Description = table.Column(type: "varchar(2048)", maxLength: 2048, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Level = table.Column(type: "int", nullable: false), - PlatformType = table.Column(type: "int", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, 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"), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AppPlatformVersion", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AppPlatformDataItems", - 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(30)", maxLength: 30, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - DisplayName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - DefaultValue = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Description = table.Column(type: "varchar(1024)", maxLength: 1024, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - AllowBeNull = table.Column(type: "tinyint(1)", nullable: false, defaultValue: true), - IsStatic = table.Column(type: "tinyint(1)", nullable: false), - ValueType = table.Column(type: "int", nullable: false), - DataId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, 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"), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AppPlatformDataItems", x => x.Id); - table.ForeignKey( - name: "FK_AppPlatformDataItems_AppPlatformDatas_DataId", - column: x => x.DataId, - principalTable: "AppPlatformDatas", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AppPlatformVersionFile", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - Path = table.Column(type: "varchar(255)", maxLength: 255, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Name = table.Column(type: "varchar(255)", maxLength: 255, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Version = table.Column(type: "varchar(20)", maxLength: 20, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Size = table.Column(type: "bigint", nullable: false), - FileType = table.Column(type: "int", nullable: false), - SHA256 = table.Column(type: "varchar(65)", maxLength: 65, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - DownloadCount = table.Column(type: "int", nullable: false), - AppVersionId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - 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_AppPlatformVersionFile", x => x.Id); - table.ForeignKey( - name: "FK_AppPlatformVersionFile_AppPlatformVersion_AppVersionId", - column: x => x.AppVersionId, - principalTable: "AppPlatformVersion", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "IX_AppPlatformDataItems_DataId", - table: "AppPlatformDataItems", - column: "DataId"); - - migrationBuilder.CreateIndex( - name: "IX_AppPlatformDataItems_Name", - table: "AppPlatformDataItems", - column: "Name"); - - migrationBuilder.CreateIndex( - name: "IX_AppPlatformDatas_Name", - table: "AppPlatformDatas", - column: "Name"); - - migrationBuilder.CreateIndex( - name: "IX_AppPlatformRoleMenus_RoleName_MenuId", - table: "AppPlatformRoleMenus", - columns: new[] { "RoleName", "MenuId" }); - - migrationBuilder.CreateIndex( - name: "IX_AppPlatformUserMenus_UserId_MenuId", - table: "AppPlatformUserMenus", - columns: new[] { "UserId", "MenuId" }); - - migrationBuilder.CreateIndex( - name: "IX_AppPlatformVersion_Version", - table: "AppPlatformVersion", - column: "Version"); - - migrationBuilder.CreateIndex( - name: "IX_AppPlatformVersionFile_AppVersionId", - table: "AppPlatformVersionFile", - column: "AppVersionId"); - - migrationBuilder.CreateIndex( - name: "IX_AppPlatformVersionFile_Path_Name_Version", - table: "AppPlatformVersionFile", - columns: new[] { "Path", "Name", "Version" }, - unique: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AppPlatformDataItems"); - - migrationBuilder.DropTable( - name: "AppPlatformLayouts"); - - migrationBuilder.DropTable( - name: "AppPlatformMenus"); - - migrationBuilder.DropTable( - name: "AppPlatformRoleMenus"); - - migrationBuilder.DropTable( - name: "AppPlatformUserMenus"); - - migrationBuilder.DropTable( - name: "AppPlatformVersionFile"); - - migrationBuilder.DropTable( - name: "AppPlatformDatas"); - - migrationBuilder.DropTable( - name: "AppPlatformVersion"); - } - } -} diff --git a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Migrations/20220301001241_Add-Field-Startup-With-UserAndRole-Menu.Designer.cs b/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Migrations/20220301001241_Add-Field-Startup-With-UserAndRole-Menu.Designer.cs deleted file mode 100644 index f69887b66..000000000 --- a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Migrations/20220301001241_Add-Field-Startup-With-UserAndRole-Menu.Designer.cs +++ /dev/null @@ -1,673 +0,0 @@ -// -using System; -using LY.MicroService.PlatformManagement.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.PlatformManagement.Migrations -{ - [DbContext(typeof(PlatformManagementMigrationsDbContext))] - [Migration("20220301001241_Add-Field-Startup-With-UserAndRole-Menu")] - partial class AddFieldStartupWithUserAndRoleMenu - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "6.0.2") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Code"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Description"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Name"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("AppPlatformDatas", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowBeNull") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DataId") - .HasColumnType("char(36)"); - - b.Property("DefaultValue") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DefaultValue"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Description"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Name"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("ValueType") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("DataId"); - - b.HasIndex("Name"); - - b.ToTable("AppPlatformDataItems", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Layouts.Layout", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DataId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Framework") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Framework"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("Path") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Path"); - - b.Property("Redirect") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Redirect"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformLayouts", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.Menu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(23) - .HasColumnType("varchar(23)") - .HasColumnName("Code"); - - b.Property("Component") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Component"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Framework") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Framework"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LayoutId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("Path") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Path"); - - b.Property("Redirect") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Redirect"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.RoleMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("RoleName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("RoleName"); - - b.Property("Startup") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("RoleName", "MenuId"); - - b.ToTable("AppPlatformRoleMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.UserMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("Startup") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "MenuId"); - - b.ToTable("AppPlatformUserMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Versions.AppVersion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(2048) - .HasColumnType("varchar(2048)") - .HasColumnName("Description"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Level") - .HasColumnType("int"); - - b.Property("PlatformType") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("Title"); - - b.Property("Version") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnName("Version"); - - b.HasKey("Id"); - - b.HasIndex("Version"); - - b.ToTable("AppPlatformVersion", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Versions.VersionFile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - b.Property("AppVersionId") - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DownloadCount") - .HasColumnType("int"); - - b.Property("FileType") - .HasColumnType("int"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Name"); - - b.Property("Path") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Path"); - - b.Property("SHA256") - .IsRequired() - .HasMaxLength(65) - .HasColumnType("varchar(65)") - .HasColumnName("SHA256"); - - b.Property("Size") - .HasColumnType("bigint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Version") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnName("Version"); - - b.HasKey("Id"); - - b.HasIndex("AppVersionId"); - - b.HasIndex("Path", "Name", "Version") - .IsUnique(); - - b.ToTable("AppPlatformVersionFile", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => - { - b.HasOne("LINGYUN.Platform.Datas.Data", null) - .WithMany("Items") - .HasForeignKey("DataId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("LINGYUN.Platform.Versions.VersionFile", b => - { - b.HasOne("LINGYUN.Platform.Versions.AppVersion", "AppVersion") - .WithMany("Files") - .HasForeignKey("AppVersionId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("AppVersion"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Versions.AppVersion", b => - { - b.Navigation("Files"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Migrations/20220301001241_Add-Field-Startup-With-UserAndRole-Menu.cs b/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Migrations/20220301001241_Add-Field-Startup-With-UserAndRole-Menu.cs deleted file mode 100644 index 358397dc5..000000000 --- a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Migrations/20220301001241_Add-Field-Startup-With-UserAndRole-Menu.cs +++ /dev/null @@ -1,37 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.PlatformManagement.Migrations -{ - public partial class AddFieldStartupWithUserAndRoleMenu : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "Startup", - table: "AppPlatformUserMenus", - type: "tinyint(1)", - nullable: false, - defaultValue: false); - - migrationBuilder.AddColumn( - name: "Startup", - table: "AppPlatformRoleMenus", - type: "tinyint(1)", - nullable: false, - defaultValue: false); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "Startup", - table: "AppPlatformUserMenus"); - - migrationBuilder.DropColumn( - name: "Startup", - table: "AppPlatformRoleMenus"); - } - } -} diff --git a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Migrations/20220923113938_Add-User-Favorite-Menu.Designer.cs b/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Migrations/20220923113938_Add-User-Favorite-Menu.Designer.cs deleted file mode 100644 index fd78a579c..000000000 --- a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Migrations/20220923113938_Add-User-Favorite-Menu.Designer.cs +++ /dev/null @@ -1,740 +0,0 @@ -// -using System; -using LY.MicroService.PlatformManagement.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.PlatformManagement.Migrations -{ - [DbContext(typeof(PlatformManagementMigrationsDbContext))] - [Migration("20220923113938_Add-User-Favorite-Menu")] - partial class AddUserFavoriteMenu - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "6.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Code"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Description"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Name"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("AppPlatformDatas", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowBeNull") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DataId") - .HasColumnType("char(36)"); - - b.Property("DefaultValue") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DefaultValue"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Description"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Name"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("ValueType") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("DataId"); - - b.HasIndex("Name"); - - b.ToTable("AppPlatformDataItems", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Layouts.Layout", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DataId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Framework") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Framework"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("Path") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Path"); - - b.Property("Redirect") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Redirect"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformLayouts", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.Menu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(23) - .HasColumnType("varchar(23)") - .HasColumnName("Code"); - - b.Property("Component") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Component"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Framework") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Framework"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LayoutId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("Path") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Path"); - - b.Property("Redirect") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Redirect"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.RoleMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("RoleName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("RoleName"); - - b.Property("Startup") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("RoleName", "MenuId"); - - b.ToTable("AppPlatformRoleMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.UserFavoriteMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("Framework") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Framework"); - - b.Property("Icon") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("Icon"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("Path") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Path"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "MenuId"); - - b.ToTable("AppPlatformUserFavoriteMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.UserMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("Startup") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "MenuId"); - - b.ToTable("AppPlatformUserMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Versions.AppVersion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(2048) - .HasColumnType("varchar(2048)") - .HasColumnName("Description"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Level") - .HasColumnType("int"); - - b.Property("PlatformType") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("Title"); - - b.Property("Version") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnName("Version"); - - b.HasKey("Id"); - - b.HasIndex("Version"); - - b.ToTable("AppPlatformVersion", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Versions.VersionFile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - b.Property("AppVersionId") - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DownloadCount") - .HasColumnType("int"); - - b.Property("FileType") - .HasColumnType("int"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Name"); - - b.Property("Path") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Path"); - - b.Property("SHA256") - .IsRequired() - .HasMaxLength(65) - .HasColumnType("varchar(65)") - .HasColumnName("SHA256"); - - b.Property("Size") - .HasColumnType("bigint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Version") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnName("Version"); - - b.HasKey("Id"); - - b.HasIndex("AppVersionId"); - - b.HasIndex("Path", "Name", "Version") - .IsUnique(); - - b.ToTable("AppPlatformVersionFile", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => - { - b.HasOne("LINGYUN.Platform.Datas.Data", null) - .WithMany("Items") - .HasForeignKey("DataId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("LINGYUN.Platform.Versions.VersionFile", b => - { - b.HasOne("LINGYUN.Platform.Versions.AppVersion", "AppVersion") - .WithMany("Files") - .HasForeignKey("AppVersionId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("AppVersion"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Versions.AppVersion", b => - { - b.Navigation("Files"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Migrations/20220923113938_Add-User-Favorite-Menu.cs b/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Migrations/20220923113938_Add-User-Favorite-Menu.cs deleted file mode 100644 index 22eac4f74..000000000 --- a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Migrations/20220923113938_Add-User-Favorite-Menu.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.PlatformManagement.Migrations -{ - public partial class AddUserFavoriteMenu : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "AppPlatformUserFavoriteMenus", - 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"), - MenuId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Framework = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Name = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - DisplayName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Path = table.Column(type: "varchar(255)", maxLength: 255, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Icon = table.Column(type: "varchar(512)", maxLength: 512, 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_AppPlatformUserFavoriteMenus", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "IX_AppPlatformUserFavoriteMenus_UserId_MenuId", - table: "AppPlatformUserFavoriteMenus", - columns: new[] { "UserId", "MenuId" }); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AppPlatformUserFavoriteMenus"); - } - } -} diff --git a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Migrations/20220926012110_Add-Color-And-AliasName-With-UserFavoriteMenu.Designer.cs b/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Migrations/20220926012110_Add-Color-And-AliasName-With-UserFavoriteMenu.Designer.cs deleted file mode 100644 index bb5c5c43e..000000000 --- a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Migrations/20220926012110_Add-Color-And-AliasName-With-UserFavoriteMenu.Designer.cs +++ /dev/null @@ -1,751 +0,0 @@ -// -using System; -using LY.MicroService.PlatformManagement.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.PlatformManagement.Migrations -{ - [DbContext(typeof(PlatformManagementMigrationsDbContext))] - [Migration("20220926012110_Add-Color-And-AliasName-With-UserFavoriteMenu")] - partial class AddColorAndAliasNameWithUserFavoriteMenu - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "6.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Code"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Description"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Name"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("AppPlatformDatas", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowBeNull") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DataId") - .HasColumnType("char(36)"); - - b.Property("DefaultValue") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DefaultValue"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Description"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Name"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("ValueType") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("DataId"); - - b.HasIndex("Name"); - - b.ToTable("AppPlatformDataItems", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Layouts.Layout", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DataId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Framework") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Framework"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("Path") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Path"); - - b.Property("Redirect") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Redirect"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformLayouts", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.Menu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(23) - .HasColumnType("varchar(23)") - .HasColumnName("Code"); - - b.Property("Component") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Component"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Framework") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Framework"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LayoutId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("Path") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Path"); - - b.Property("Redirect") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Redirect"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.RoleMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("RoleName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("RoleName"); - - b.Property("Startup") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("RoleName", "MenuId"); - - b.ToTable("AppPlatformRoleMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.UserFavoriteMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AliasName") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("AliasName"); - - b.Property("Color") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Color"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("Framework") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Framework"); - - b.Property("Icon") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("Icon"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("Path") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Path"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "MenuId"); - - b.ToTable("AppPlatformUserFavoriteMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.UserMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("Startup") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "MenuId"); - - b.ToTable("AppPlatformUserMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Versions.AppVersion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(2048) - .HasColumnType("varchar(2048)") - .HasColumnName("Description"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Level") - .HasColumnType("int"); - - b.Property("PlatformType") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("Title"); - - b.Property("Version") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnName("Version"); - - b.HasKey("Id"); - - b.HasIndex("Version"); - - b.ToTable("AppPlatformVersion", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Versions.VersionFile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - b.Property("AppVersionId") - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DownloadCount") - .HasColumnType("int"); - - b.Property("FileType") - .HasColumnType("int"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Name"); - - b.Property("Path") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Path"); - - b.Property("SHA256") - .IsRequired() - .HasMaxLength(65) - .HasColumnType("varchar(65)") - .HasColumnName("SHA256"); - - b.Property("Size") - .HasColumnType("bigint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Version") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnName("Version"); - - b.HasKey("Id"); - - b.HasIndex("AppVersionId"); - - b.HasIndex("Path", "Name", "Version") - .IsUnique(); - - b.ToTable("AppPlatformVersionFile", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => - { - b.HasOne("LINGYUN.Platform.Datas.Data", null) - .WithMany("Items") - .HasForeignKey("DataId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("LINGYUN.Platform.Versions.VersionFile", b => - { - b.HasOne("LINGYUN.Platform.Versions.AppVersion", "AppVersion") - .WithMany("Files") - .HasForeignKey("AppVersionId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("AppVersion"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Versions.AppVersion", b => - { - b.Navigation("Files"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Migrations/20220926012110_Add-Color-And-AliasName-With-UserFavoriteMenu.cs b/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Migrations/20220926012110_Add-Color-And-AliasName-With-UserFavoriteMenu.cs deleted file mode 100644 index 9e1ed10eb..000000000 --- a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Migrations/20220926012110_Add-Color-And-AliasName-With-UserFavoriteMenu.cs +++ /dev/null @@ -1,71 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.PlatformManagement.Migrations -{ - public partial class AddColorAndAliasNameWithUserFavoriteMenu : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.UpdateData( - table: "AppPlatformUserFavoriteMenus", - keyColumn: "Path", - keyValue: null, - column: "Path", - value: ""); - - migrationBuilder.AlterColumn( - name: "Path", - table: "AppPlatformUserFavoriteMenus", - type: "varchar(255)", - maxLength: 255, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(255)", - oldMaxLength: 255, - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "AliasName", - table: "AppPlatformUserFavoriteMenus", - type: "varchar(128)", - maxLength: 128, - nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "Color", - table: "AppPlatformUserFavoriteMenus", - type: "varchar(30)", - maxLength: 30, - nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "AliasName", - table: "AppPlatformUserFavoriteMenus"); - - migrationBuilder.DropColumn( - name: "Color", - table: "AppPlatformUserFavoriteMenus"); - - migrationBuilder.AlterColumn( - name: "Path", - table: "AppPlatformUserFavoriteMenus", - type: "varchar(255)", - maxLength: 255, - nullable: true, - oldClrType: typeof(string), - oldType: "varchar(255)", - oldMaxLength: 255) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - } - } -} diff --git a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Migrations/20221212081339_Add-Package-Manager.Designer.cs b/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Migrations/20221212081339_Add-Package-Manager.Designer.cs deleted file mode 100644 index 1053d32ed..000000000 --- a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Migrations/20221212081339_Add-Package-Manager.Designer.cs +++ /dev/null @@ -1,934 +0,0 @@ -// -using System; -using LY.MicroService.PlatformManagement.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.PlatformManagement.Migrations -{ - [DbContext(typeof(PlatformManagementMigrationsDbContext))] - [Migration("20221212081339_Add-Package-Manager")] - partial class AddPackageManager - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "6.0.11") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Code"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Description"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Name"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("AppPlatformDatas", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowBeNull") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DataId") - .HasColumnType("char(36)"); - - b.Property("DefaultValue") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DefaultValue"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Description"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Name"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("ValueType") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("DataId"); - - b.HasIndex("Name"); - - b.ToTable("AppPlatformDataItems", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Layouts.Layout", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DataId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Framework") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Framework"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("Path") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Path"); - - b.Property("Redirect") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Redirect"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformLayouts", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.Menu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(23) - .HasColumnType("varchar(23)") - .HasColumnName("Code"); - - b.Property("Component") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Component"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Framework") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Framework"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LayoutId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("Path") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Path"); - - b.Property("Redirect") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Redirect"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.RoleMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("RoleName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("RoleName"); - - b.Property("Startup") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("RoleName", "MenuId"); - - b.ToTable("AppPlatformRoleMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.UserFavoriteMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AliasName") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("AliasName"); - - b.Property("Color") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Color"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("Framework") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Framework"); - - b.Property("Icon") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("Icon"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("Path") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Path"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "MenuId"); - - b.ToTable("AppPlatformUserFavoriteMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.UserMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("Startup") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "MenuId"); - - b.ToTable("AppPlatformUserMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Packages.Package", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Authors") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Authors"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Description"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("ForceUpdate") - .HasColumnType("tinyint(1)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Level") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Name"); - - b.Property("Note") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Note"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Version") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Version"); - - b.HasKey("Id"); - - b.HasIndex("Name", "Version"); - - b.ToTable("AppPlatformPackages", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Packages.PackageBlob", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - b.Property("Authors") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Authors"); - - b.Property("ContentType") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("ContentType"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DownloadCount") - .HasColumnType("int"); - - b.Property("License") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("License"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Name"); - - b.Property("PackageId") - .HasColumnType("char(36)"); - - b.Property("SHA256") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("SHA256"); - - b.Property("Size") - .HasColumnType("bigint"); - - b.Property("Summary") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Summary"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); - - b.Property("Url") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("Url"); - - b.HasKey("Id"); - - b.HasIndex("PackageId", "Name"); - - b.ToTable("AppPlatformPackageBlobs", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Versions.AppVersion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(2048) - .HasColumnType("varchar(2048)") - .HasColumnName("Description"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Level") - .HasColumnType("int"); - - b.Property("PlatformType") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("Title"); - - b.Property("Version") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnName("Version"); - - b.HasKey("Id"); - - b.HasIndex("Version"); - - b.ToTable("AppPlatformVersion", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Versions.VersionFile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - b.Property("AppVersionId") - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DownloadCount") - .HasColumnType("int"); - - b.Property("FileType") - .HasColumnType("int"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Name"); - - b.Property("Path") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Path"); - - b.Property("SHA256") - .IsRequired() - .HasMaxLength(65) - .HasColumnType("varchar(65)") - .HasColumnName("SHA256"); - - b.Property("Size") - .HasColumnType("bigint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Version") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnName("Version"); - - b.HasKey("Id"); - - b.HasIndex("AppVersionId"); - - b.HasIndex("Path", "Name", "Version") - .IsUnique(); - - b.ToTable("AppPlatformVersionFile", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => - { - b.HasOne("LINGYUN.Platform.Datas.Data", null) - .WithMany("Items") - .HasForeignKey("DataId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("LINGYUN.Platform.Packages.PackageBlob", b => - { - b.HasOne("LINGYUN.Platform.Packages.Package", "Package") - .WithMany("Blobs") - .HasForeignKey("PackageId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Package"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Versions.VersionFile", b => - { - b.HasOne("LINGYUN.Platform.Versions.AppVersion", "AppVersion") - .WithMany("Files") - .HasForeignKey("AppVersionId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("AppVersion"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Packages.Package", b => - { - b.Navigation("Blobs"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Versions.AppVersion", b => - { - b.Navigation("Files"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Migrations/20221212081339_Add-Package-Manager.cs b/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Migrations/20221212081339_Add-Package-Manager.cs deleted file mode 100644 index f042cdee0..000000000 --- a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Migrations/20221212081339_Add-Package-Manager.cs +++ /dev/null @@ -1,110 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.PlatformManagement.Migrations -{ - public partial class AddPackageManager : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "AppPlatformPackages", - 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(255)", maxLength: 255, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Note = table.Column(type: "varchar(1024)", maxLength: 1024, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Version = table.Column(type: "varchar(30)", maxLength: 30, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Description = table.Column(type: "varchar(255)", maxLength: 255, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ForceUpdate = table.Column(type: "tinyint(1)", nullable: false), - Authors = table.Column(type: "varchar(100)", maxLength: 100, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Level = table.Column(type: "int", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, 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"), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AppPlatformPackages", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AppPlatformPackageBlobs", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - PackageId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Name = table.Column(type: "varchar(255)", maxLength: 255, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Url = table.Column(type: "varchar(512)", maxLength: 512, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Size = table.Column(type: "bigint", nullable: true), - Summary = table.Column(type: "varchar(1024)", maxLength: 1024, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - CreatedAt = table.Column(type: "datetime(6)", nullable: false), - UpdatedAt = table.Column(type: "datetime(6)", nullable: true), - License = table.Column(type: "varchar(1024)", maxLength: 1024, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Authors = table.Column(type: "varchar(100)", maxLength: 100, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ContentType = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - SHA256 = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - DownloadCount = table.Column(type: "int", nullable: false), - 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_AppPlatformPackageBlobs", x => x.Id); - table.ForeignKey( - name: "FK_AppPlatformPackageBlobs_AppPlatformPackages_PackageId", - column: x => x.PackageId, - principalTable: "AppPlatformPackages", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "IX_AppPlatformPackageBlobs_PackageId_Name", - table: "AppPlatformPackageBlobs", - columns: new[] { "PackageId", "Name" }); - - migrationBuilder.CreateIndex( - name: "IX_AppPlatformPackages_Name_Version", - table: "AppPlatformPackages", - columns: new[] { "Name", "Version" }); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AppPlatformPackageBlobs"); - - migrationBuilder.DropTable( - name: "AppPlatformPackages"); - } - } -} diff --git a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Migrations/20221213005241_Remove-Versions.Designer.cs b/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Migrations/20221213005241_Remove-Versions.Designer.cs deleted file mode 100644 index 225b0b6dc..000000000 --- a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Migrations/20221213005241_Remove-Versions.Designer.cs +++ /dev/null @@ -1,771 +0,0 @@ -// -using System; -using LY.MicroService.PlatformManagement.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.PlatformManagement.Migrations -{ - [DbContext(typeof(PlatformManagementMigrationsDbContext))] - [Migration("20221213005241_Remove-Versions")] - partial class RemoveVersions - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "6.0.11") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Code"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Description"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Name"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("AppPlatformDatas", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowBeNull") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DataId") - .HasColumnType("char(36)"); - - b.Property("DefaultValue") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DefaultValue"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Description"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Name"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("ValueType") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("DataId"); - - b.HasIndex("Name"); - - b.ToTable("AppPlatformDataItems", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Layouts.Layout", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DataId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Framework") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Framework"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("Path") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Path"); - - b.Property("Redirect") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Redirect"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformLayouts", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.Menu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(23) - .HasColumnType("varchar(23)") - .HasColumnName("Code"); - - b.Property("Component") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Component"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Framework") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Framework"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LayoutId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("Path") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Path"); - - b.Property("Redirect") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Redirect"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.RoleMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("RoleName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("RoleName"); - - b.Property("Startup") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("RoleName", "MenuId"); - - b.ToTable("AppPlatformRoleMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.UserFavoriteMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AliasName") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("AliasName"); - - b.Property("Color") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Color"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("Framework") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Framework"); - - b.Property("Icon") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("Icon"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("Path") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Path"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "MenuId"); - - b.ToTable("AppPlatformUserFavoriteMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.UserMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("Startup") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "MenuId"); - - b.ToTable("AppPlatformUserMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Packages.Package", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Authors") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Authors"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Description"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("ForceUpdate") - .HasColumnType("tinyint(1)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Level") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Name"); - - b.Property("Note") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Note"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Version") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Version"); - - b.HasKey("Id"); - - b.HasIndex("Name", "Version"); - - b.ToTable("AppPlatformPackages", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Packages.PackageBlob", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - b.Property("Authors") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Authors"); - - b.Property("ContentType") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("ContentType"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DownloadCount") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("License") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("License"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Name"); - - b.Property("PackageId") - .HasColumnType("char(36)"); - - b.Property("SHA256") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("SHA256"); - - b.Property("Size") - .HasColumnType("bigint"); - - b.Property("Summary") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Summary"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); - - b.Property("Url") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("Url"); - - b.HasKey("Id"); - - b.HasIndex("PackageId", "Name"); - - b.ToTable("AppPlatformPackageBlobs", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => - { - b.HasOne("LINGYUN.Platform.Datas.Data", null) - .WithMany("Items") - .HasForeignKey("DataId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("LINGYUN.Platform.Packages.PackageBlob", b => - { - b.HasOne("LINGYUN.Platform.Packages.Package", "Package") - .WithMany("Blobs") - .HasForeignKey("PackageId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Package"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Packages.Package", b => - { - b.Navigation("Blobs"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Migrations/20221213005241_Remove-Versions.cs b/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Migrations/20221213005241_Remove-Versions.cs deleted file mode 100644 index 71f455199..000000000 --- a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Migrations/20221213005241_Remove-Versions.cs +++ /dev/null @@ -1,118 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.PlatformManagement.Migrations -{ - public partial class RemoveVersions : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AppPlatformVersionFile"); - - migrationBuilder.DropTable( - name: "AppPlatformVersion"); - - migrationBuilder.AddColumn( - name: "ExtraProperties", - table: "AppPlatformPackageBlobs", - type: "longtext", - nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "ExtraProperties", - table: "AppPlatformPackageBlobs"); - - migrationBuilder.CreateTable( - name: "AppPlatformVersion", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, 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"), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true), - Description = table.Column(type: "varchar(2048)", maxLength: 2048, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - Level = table.Column(type: "int", nullable: false), - PlatformType = table.Column(type: "int", nullable: false), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - Title = table.Column(type: "varchar(50)", maxLength: 50, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Version = table.Column(type: "varchar(20)", maxLength: 20, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AppPlatformVersion", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AppPlatformVersionFile", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - AppVersionId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DownloadCount = table.Column(type: "int", nullable: false), - FileType = table.Column(type: "int", nullable: false), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - Name = table.Column(type: "varchar(255)", maxLength: 255, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Path = table.Column(type: "varchar(255)", maxLength: 255, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - SHA256 = table.Column(type: "varchar(65)", maxLength: 65, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Size = table.Column(type: "bigint", nullable: false), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - Version = table.Column(type: "varchar(20)", maxLength: 20, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AppPlatformVersionFile", x => x.Id); - table.ForeignKey( - name: "FK_AppPlatformVersionFile_AppPlatformVersion_AppVersionId", - column: x => x.AppVersionId, - principalTable: "AppPlatformVersion", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "IX_AppPlatformVersion_Version", - table: "AppPlatformVersion", - column: "Version"); - - migrationBuilder.CreateIndex( - name: "IX_AppPlatformVersionFile_AppVersionId", - table: "AppPlatformVersionFile", - column: "AppVersionId"); - - migrationBuilder.CreateIndex( - name: "IX_AppPlatformVersionFile_Path_Name_Version", - table: "AppPlatformVersionFile", - columns: new[] { "Path", "Name", "Version" }, - unique: true); - } - } -} diff --git a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Migrations/PlatformHttpApiHostMigrationsDbContextModelSnapshot.cs b/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Migrations/PlatformHttpApiHostMigrationsDbContextModelSnapshot.cs deleted file mode 100644 index a34a07e67..000000000 --- a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Migrations/PlatformHttpApiHostMigrationsDbContextModelSnapshot.cs +++ /dev/null @@ -1,769 +0,0 @@ -// -using System; -using LY.MicroService.PlatformManagement.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.PlatformManagement.Migrations -{ - [DbContext(typeof(PlatformManagementMigrationsDbContext))] - partial class PlatformHttpApiHostMigrationsDbContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "6.0.11") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Code"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Description"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Name"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("AppPlatformDatas", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowBeNull") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DataId") - .HasColumnType("char(36)"); - - b.Property("DefaultValue") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DefaultValue"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Description"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Name"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("ValueType") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("DataId"); - - b.HasIndex("Name"); - - b.ToTable("AppPlatformDataItems", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Layouts.Layout", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DataId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Framework") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Framework"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("Path") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Path"); - - b.Property("Redirect") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Redirect"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformLayouts", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.Menu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(23) - .HasColumnType("varchar(23)") - .HasColumnName("Code"); - - b.Property("Component") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Component"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Framework") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Framework"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LayoutId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("Path") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Path"); - - b.Property("Redirect") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Redirect"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.RoleMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("RoleName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("RoleName"); - - b.Property("Startup") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("RoleName", "MenuId"); - - b.ToTable("AppPlatformRoleMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.UserFavoriteMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AliasName") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("AliasName"); - - b.Property("Color") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Color"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("Framework") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Framework"); - - b.Property("Icon") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("Icon"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("Path") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Path"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "MenuId"); - - b.ToTable("AppPlatformUserFavoriteMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.UserMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("Startup") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "MenuId"); - - b.ToTable("AppPlatformUserMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Packages.Package", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Authors") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Authors"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Description"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("ForceUpdate") - .HasColumnType("tinyint(1)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Level") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Name"); - - b.Property("Note") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Note"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Version") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Version"); - - b.HasKey("Id"); - - b.HasIndex("Name", "Version"); - - b.ToTable("AppPlatformPackages", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Packages.PackageBlob", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - b.Property("Authors") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Authors"); - - b.Property("ContentType") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("ContentType"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DownloadCount") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("License") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("License"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Name"); - - b.Property("PackageId") - .HasColumnType("char(36)"); - - b.Property("SHA256") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("SHA256"); - - b.Property("Size") - .HasColumnType("bigint"); - - b.Property("Summary") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Summary"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); - - b.Property("Url") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("Url"); - - b.HasKey("Id"); - - b.HasIndex("PackageId", "Name"); - - b.ToTable("AppPlatformPackageBlobs", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => - { - b.HasOne("LINGYUN.Platform.Datas.Data", null) - .WithMany("Items") - .HasForeignKey("DataId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("LINGYUN.Platform.Packages.PackageBlob", b => - { - b.HasOne("LINGYUN.Platform.Packages.Package", "Package") - .WithMany("Blobs") - .HasForeignKey("PackageId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Package"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Packages.Package", b => - { - b.Navigation("Blobs"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Packages/PackageBlobOssManager.cs b/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Packages/PackageBlobOssManager.cs index 15f7afa22..5f256851b 100644 --- a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Packages/PackageBlobOssManager.cs +++ b/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Packages/PackageBlobOssManager.cs @@ -5,7 +5,6 @@ using System.IO; using System.Threading; using System.Threading.Tasks; using Volo.Abp.BlobStoring; -using Volo.Abp.Content; using Volo.Abp.Data; using Volo.Abp.DependencyInjection; @@ -21,15 +20,15 @@ namespace LY.MicroService.PlatformManagement.Packages; typeof(PackageBlobOssManager))] public class PackageBlobOssManager : PackageBlobManager, ITransientDependency { - protected IOssObjectAppService ObjectAppService { get; } + protected IOssContainerFactory OssContainerFactory { get; } public PackageBlobOssManager( IPackageBlobNormalizer blobNormalizer, IBlobContainer packageContainer, - IOssObjectAppService objectAppService) + IOssContainerFactory ossContainerFactory) : base(blobNormalizer, packageContainer) { - ObjectAppService = objectAppService; + OssContainerFactory = ossContainerFactory; } public async override Task RemoveBlobAsync( @@ -42,13 +41,9 @@ public class PackageBlobOssManager : PackageBlobManager, ITransientDependency var path = blobName.Replace(packageBlob.Name, ""); path.RemovePostFix(Path.PathSeparator.ToString()); - var input = new GetOssObjectInput - { - Bucket = bucket, - Path = path, - Object = packageBlob.Name - }; - await ObjectAppService.DeleteAsync(input); + var oss = OssContainerFactory.Create(); + + await oss.DeleteObjectAsync(bucket, packageBlob.Name, path); } protected async override Task DownloadFromBlobAsync( @@ -61,14 +56,11 @@ public class PackageBlobOssManager : PackageBlobManager, ITransientDependency var path = blobName.Replace(packageBlob.Name, ""); path.RemovePostFix(Path.PathSeparator.ToString()); - var input = new GetOssObjectInput - { - Bucket = bucket, - Path = path, - Object = packageBlob.Name - }; - var ossContent = await ObjectAppService.GetContentAsync(input); - return ossContent.GetStream(); + var oss = OssContainerFactory.Create(); + + var ossObject = await oss.GetObjectAsync(bucket, packageBlob.Name, path); + + return ossObject.Content; } public async override Task SaveBlobAsync( @@ -82,16 +74,17 @@ public class PackageBlobOssManager : PackageBlobManager, ITransientDependency var bucket = BlobContainerNameAttribute.GetContainerName(); var path = blobName.Replace(packageBlob.Name, ""); - var input = new CreateOssObjectInput + var request = new CreateOssObjectRequest( + bucket, + packageBlob.Name, + stream, + path) { - Bucket = bucket, - Path = path, - FileName= packageBlob.Name, - Overwrite= overrideExisting, - File = new RemoteStreamContent(stream, packageBlob.Name, packageBlob.ContentType) + Overwrite = overrideExisting }; - var ossObject = await ObjectAppService.CreateAsync(input); + var oss = OssContainerFactory.Create(); + var ossObject = await oss.CreateObjectAsync(request); if (!ossObject.MD5.IsNullOrWhiteSpace()) { diff --git a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/PlatformManagementHttpApiHostModule.Configure.cs b/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/PlatformManagementHttpApiHostModule.Configure.cs index 9522121ab..858aea532 100644 --- a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/PlatformManagementHttpApiHostModule.Configure.cs +++ b/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/PlatformManagementHttpApiHostModule.Configure.cs @@ -57,7 +57,7 @@ public partial class PlatformManagementHttpApiHostModule PreConfigure(options => { // 以开放端口区别,应在0-31之间 - options.SnowflakeIdOptions.WorkerId = 30025 - 30000; + options.SnowflakeIdOptions.WorkerId = 25; options.SnowflakeIdOptions.WorkerIdBits = 5; options.SnowflakeIdOptions.DatacenterId = 1; }); diff --git a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/PlatformManagementHttpApiHostModule.cs b/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/PlatformManagementHttpApiHostModule.cs index f7dbb4567..230c67c5c 100644 --- a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/PlatformManagementHttpApiHostModule.cs +++ b/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/PlatformManagementHttpApiHostModule.cs @@ -1,5 +1,4 @@ -using DotNetCore.CAP; -using LINGYUN.Abp.AspNetCore.HttpOverrides; +using LINGYUN.Abp.AspNetCore.HttpOverrides; using LINGYUN.Abp.AspNetCore.Mvc.Localization; using LINGYUN.Abp.AspNetCore.Mvc.Wrapper; using LINGYUN.Abp.AuditLogging.Elasticsearch; @@ -23,8 +22,8 @@ using LINGYUN.Abp.UI.Navigation.VueVbenAdmin; using LINGYUN.Platform; using LINGYUN.Platform.EntityFrameworkCore; using LINGYUN.Platform.HttpApi; -using LINGYUN.Platform.Packages; using LINGYUN.Platform.Theme.VueVbenAdmin; +using LY.MicroService.Platform.EntityFrameworkCore; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.DependencyInjection; @@ -70,6 +69,7 @@ namespace LY.MicroService.PlatformManagement; typeof(AbpSettingManagementEntityFrameworkCoreModule), typeof(AbpPermissionManagementEntityFrameworkCoreModule), typeof(AbpLocalizationManagementEntityFrameworkCoreModule), + typeof(PlatformMigrationsEntityFrameworkCoreModule), typeof(AbpDataDbMigratorModule), typeof(AbpAspNetCoreAuthenticationJwtBearerModule), typeof(AbpAuthorizationOrganizationUnitsModule), diff --git a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/EntityFrameworkCore/RealtimeMessageMigrationsDbContext.cs b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/EntityFrameworkCore/RealtimeMessageMigrationsDbContext.cs deleted file mode 100644 index 2e59bbfbd..000000000 --- a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/EntityFrameworkCore/RealtimeMessageMigrationsDbContext.cs +++ /dev/null @@ -1,22 +0,0 @@ -using LINGYUN.Abp.MessageService.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Volo.Abp.EntityFrameworkCore; - -namespace LY.MicroService.RealtimeMessage.EntityFrameworkCore -{ - public class RealtimeMessageMigrationsDbContext : AbpDbContext - { - public RealtimeMessageMigrationsDbContext(DbContextOptions options) - : base(options) - { - - } - - protected override void OnModelCreating(ModelBuilder modelBuilder) - { - base.OnModelCreating(modelBuilder); - - modelBuilder.ConfigureMessageService(); - } - } -} diff --git a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/LY.MicroService.RealtimeMessage.HttpApi.Host.csproj b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/LY.MicroService.RealtimeMessage.HttpApi.Host.csproj index 4d21ca581..af338c52f 100644 --- a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/LY.MicroService.RealtimeMessage.HttpApi.Host.csproj +++ b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/LY.MicroService.RealtimeMessage.HttpApi.Host.csproj @@ -39,6 +39,7 @@ + diff --git a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20211030131449_Re-Initlize-Db-Migration.Designer.cs b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20211030131449_Re-Initlize-Db-Migration.Designer.cs deleted file mode 100644 index 1db919322..000000000 --- a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20211030131449_Re-Initlize-Db-Migration.Designer.cs +++ /dev/null @@ -1,612 +0,0 @@ -// -using System; -using LY.MicroService.RealtimeMessage.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -namespace LY.MicroService.RealtimeMessage.Migrations -{ - [DbContext(typeof(RealtimeMessageMigrationsDbContext))] - [Migration("20211030131449_Re-Initlize-Db-Migration")] - partial class ReInitlizeDbMigration - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("Relational:MaxIdentifierLength", 64) - .HasAnnotation("ProductVersion", "5.0.11"); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatCard", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Age") - .HasColumnType("int"); - - b.Property("AvatarUrl") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("Birthday") - .HasColumnType("datetime(6)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("NickName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("Sex") - .HasColumnType("int"); - - b.Property("Sign") - .HasMaxLength(30) - .HasColumnType("varchar(30)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserChatCards"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatFriend", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Black") - .HasColumnType("tinyint(1)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("DontDisturb") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("FrientId") - .HasColumnType("char(36)"); - - b.Property("RemarkName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("SpecialFocus") - .HasColumnType("tinyint(1)"); - - b.Property("Status") - .HasColumnType("tinyint unsigned"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "FrientId"); - - b.ToTable("AppUserChatFriends"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("AllowAddFriend") - .HasColumnType("tinyint(1)"); - - b.Property("AllowAnonymous") - .HasColumnType("tinyint(1)"); - - b.Property("AllowReceiveMessage") - .HasColumnType("tinyint(1)"); - - b.Property("AllowSendMessage") - .HasColumnType("tinyint(1)"); - - b.Property("RequireAddFriendValition") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserChatSettings"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(1048576) - .HasColumnType("longtext"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("MessageId") - .HasColumnType("bigint"); - - b.Property("ReceiveUserId") - .HasColumnType("char(36)"); - - b.Property("SendState") - .HasColumnType("tinyint"); - - b.Property("SendUserName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "ReceiveUserId"); - - b.ToTable("AppUserMessages"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Group.ChatGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Address") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("AdminUserId") - .HasColumnType("char(36)"); - - b.Property("AllowAnonymous") - .HasColumnType("tinyint(1)"); - - b.Property("AllowSendMessage") - .HasColumnType("tinyint(1)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MaxUserCount") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)"); - - b.Property("Notice") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Tag") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name"); - - b.ToTable("AppChatGroups"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Group.GroupChatBlack", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("ShieldUserId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId"); - - b.ToTable("AppGroupChatBlacks"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Group.GroupMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(1048576) - .HasColumnType("longtext"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("MessageId") - .HasColumnType("bigint"); - - b.Property("SendState") - .HasColumnType("tinyint"); - - b.Property("SendUserName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId"); - - b.ToTable("AppGroupMessages"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Group.UserChatGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId", "UserId"); - - b.ToTable("AppUserChatGroups"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Group.UserGroupCard", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsAdmin") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("NickName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("SilenceEnd") - .HasColumnType("datetime(6)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserGroupCards"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Notifications.Notification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("ExpirationTime") - .HasColumnType("datetime(6)"); - - b.Property("NotificationData") - .IsRequired() - .HasMaxLength(1048576) - .HasColumnType("longtext"); - - b.Property("NotificationId") - .HasColumnType("bigint"); - - b.Property("NotificationName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("NotificationTypeName") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("Severity") - .HasColumnType("tinyint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "NotificationName"); - - b.ToTable("AppNotifications"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Notifications.UserNotification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("NotificationId") - .HasColumnType("bigint"); - - b.Property("ReadStatus") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "NotificationId") - .HasDatabaseName("IX_Tenant_User_Notification_Id"); - - b.ToTable("AppUserNotifications"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Subscriptions.UserSubscribe", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("NotificationName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .IsRequired() - .ValueGeneratedOnAdd() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasDefaultValue("/"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "NotificationName") - .IsUnique() - .HasDatabaseName("IX_Tenant_User_Notification_Name"); - - b.ToTable("AppUserSubscribes"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20211030131449_Re-Initlize-Db-Migration.cs b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20211030131449_Re-Initlize-Db-Migration.cs deleted file mode 100644 index a65675eb2..000000000 --- a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20211030131449_Re-Initlize-Db-Migration.cs +++ /dev/null @@ -1,415 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace LY.MicroService.RealtimeMessage.Migrations -{ - public partial class ReInitlizeDbMigration : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterDatabase() - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AppChatGroups", - columns: table => new - { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - AdminUserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - GroupId = table.Column(type: "bigint", nullable: false), - Name = table.Column(type: "varchar(20)", maxLength: 20, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Tag = table.Column(type: "varchar(512)", maxLength: 512, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Address = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Notice = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - MaxUserCount = table.Column(type: "int", nullable: false), - AllowAnonymous = table.Column(type: "tinyint(1)", nullable: false), - AllowSendMessage = table.Column(type: "tinyint(1)", nullable: false), - Description = table.Column(type: "varchar(128)", maxLength: 128, 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_AppChatGroups", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AppGroupChatBlacks", - columns: table => new - { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - GroupId = table.Column(type: "bigint", nullable: false), - ShieldUserId = table.Column(type: "char(36)", nullable: false, 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_AppGroupChatBlacks", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AppGroupMessages", - columns: table => new - { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - GroupId = table.Column(type: "bigint", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, 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"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - MessageId = table.Column(type: "bigint", nullable: false), - SendUserName = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Content = table.Column(type: "longtext", maxLength: 1048576, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Type = table.Column(type: "int", nullable: false), - SendState = table.Column(type: "tinyint", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AppGroupMessages", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AppNotifications", - columns: table => new - { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - Severity = table.Column(type: "tinyint", nullable: false), - Type = table.Column(type: "int", nullable: false), - NotificationId = table.Column(type: "bigint", nullable: false), - NotificationName = table.Column(type: "varchar(100)", maxLength: 100, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - NotificationData = table.Column(type: "longtext", maxLength: 1048576, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - NotificationTypeName = table.Column(type: "varchar(512)", maxLength: 512, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ExpirationTime = table.Column(type: "datetime(6)", nullable: true), - CreationTime = table.Column(type: "datetime(6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AppNotifications", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AppUserChatCards", - columns: table => new - { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - UserName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Sex = table.Column(type: "int", nullable: false), - Sign = table.Column(type: "varchar(30)", maxLength: 30, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - NickName = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Description = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - AvatarUrl = table.Column(type: "varchar(512)", maxLength: 512, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Birthday = table.Column(type: "datetime(6)", nullable: true), - Age = table.Column(type: "int", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, 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_AppUserChatCards", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AppUserChatFriends", - columns: table => new - { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - FrientId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Black = table.Column(type: "tinyint(1)", nullable: false), - DontDisturb = table.Column(type: "tinyint(1)", nullable: false), - SpecialFocus = table.Column(type: "tinyint(1)", nullable: false), - RemarkName = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Description = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Status = table.Column(type: "tinyint unsigned", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, 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_AppUserChatFriends", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AppUserChatGroups", - columns: table => new - { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - GroupId = table.Column(type: "bigint", nullable: false), - 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_AppUserChatGroups", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AppUserChatSettings", - columns: table => new - { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - AllowAnonymous = table.Column(type: "tinyint(1)", nullable: false), - AllowAddFriend = table.Column(type: "tinyint(1)", nullable: false), - RequireAddFriendValition = table.Column(type: "tinyint(1)", nullable: false), - AllowReceiveMessage = table.Column(type: "tinyint(1)", nullable: false), - AllowSendMessage = table.Column(type: "tinyint(1)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AppUserChatSettings", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AppUserGroupCards", - columns: table => new - { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - NickName = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - IsAdmin = table.Column(type: "tinyint(1)", nullable: false), - SilenceEnd = table.Column(type: "datetime(6)", nullable: true), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, 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_AppUserGroupCards", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AppUserMessages", - columns: table => new - { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - ReceiveUserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, 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"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - MessageId = table.Column(type: "bigint", nullable: false), - SendUserName = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Content = table.Column(type: "longtext", maxLength: 1048576, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Type = table.Column(type: "int", nullable: false), - SendState = table.Column(type: "tinyint", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AppUserMessages", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AppUserNotifications", - columns: table => new - { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - NotificationId = table.Column(type: "bigint", nullable: false), - ReadStatus = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AppUserNotifications", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AppUserSubscribes", - columns: table => new - { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - UserName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, defaultValue: "/") - .Annotation("MySql:CharSet", "utf8mb4"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - NotificationName = table.Column(type: "varchar(100)", maxLength: 100, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AppUserSubscribes", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "IX_AppChatGroups_TenantId_Name", - table: "AppChatGroups", - columns: new[] { "TenantId", "Name" }); - - migrationBuilder.CreateIndex( - name: "IX_AppGroupChatBlacks_TenantId_GroupId", - table: "AppGroupChatBlacks", - columns: new[] { "TenantId", "GroupId" }); - - migrationBuilder.CreateIndex( - name: "IX_AppGroupMessages_TenantId_GroupId", - table: "AppGroupMessages", - columns: new[] { "TenantId", "GroupId" }); - - migrationBuilder.CreateIndex( - name: "IX_AppNotifications_TenantId_NotificationName", - table: "AppNotifications", - columns: new[] { "TenantId", "NotificationName" }); - - migrationBuilder.CreateIndex( - name: "IX_AppUserChatCards_TenantId_UserId", - table: "AppUserChatCards", - columns: new[] { "TenantId", "UserId" }); - - migrationBuilder.CreateIndex( - name: "IX_AppUserChatFriends_TenantId_UserId_FrientId", - table: "AppUserChatFriends", - columns: new[] { "TenantId", "UserId", "FrientId" }); - - migrationBuilder.CreateIndex( - name: "IX_AppUserChatGroups_TenantId_GroupId_UserId", - table: "AppUserChatGroups", - columns: new[] { "TenantId", "GroupId", "UserId" }); - - migrationBuilder.CreateIndex( - name: "IX_AppUserChatSettings_TenantId_UserId", - table: "AppUserChatSettings", - columns: new[] { "TenantId", "UserId" }); - - migrationBuilder.CreateIndex( - name: "IX_AppUserGroupCards_TenantId_UserId", - table: "AppUserGroupCards", - columns: new[] { "TenantId", "UserId" }); - - migrationBuilder.CreateIndex( - name: "IX_AppUserMessages_TenantId_ReceiveUserId", - table: "AppUserMessages", - columns: new[] { "TenantId", "ReceiveUserId" }); - - migrationBuilder.CreateIndex( - name: "IX_Tenant_User_Notification_Id", - table: "AppUserNotifications", - columns: new[] { "TenantId", "UserId", "NotificationId" }); - - migrationBuilder.CreateIndex( - name: "IX_Tenant_User_Notification_Name", - table: "AppUserSubscribes", - columns: new[] { "TenantId", "UserId", "NotificationName" }, - unique: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AppChatGroups"); - - migrationBuilder.DropTable( - name: "AppGroupChatBlacks"); - - migrationBuilder.DropTable( - name: "AppGroupMessages"); - - migrationBuilder.DropTable( - name: "AppNotifications"); - - migrationBuilder.DropTable( - name: "AppUserChatCards"); - - migrationBuilder.DropTable( - name: "AppUserChatFriends"); - - migrationBuilder.DropTable( - name: "AppUserChatGroups"); - - migrationBuilder.DropTable( - name: "AppUserChatSettings"); - - migrationBuilder.DropTable( - name: "AppUserGroupCards"); - - migrationBuilder.DropTable( - name: "AppUserMessages"); - - migrationBuilder.DropTable( - name: "AppUserNotifications"); - - migrationBuilder.DropTable( - name: "AppUserSubscribes"); - } - } -} diff --git a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20211110144233_Add-Field-Online-Avatar.Designer.cs b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20211110144233_Add-Field-Online-Avatar.Designer.cs deleted file mode 100644 index 35ce37b9a..000000000 --- a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20211110144233_Add-Field-Online-Avatar.Designer.cs +++ /dev/null @@ -1,622 +0,0 @@ -// -using System; -using LY.MicroService.RealtimeMessage.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -namespace LY.MicroService.RealtimeMessage.Migrations -{ - [DbContext(typeof(RealtimeMessageMigrationsDbContext))] - [Migration("20211110144233_Add-Field-Online-Avatar")] - partial class AddFieldOnlineAvatar - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("Relational:MaxIdentifierLength", 64) - .HasAnnotation("ProductVersion", "5.0.12"); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatCard", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Age") - .HasColumnType("int"); - - b.Property("AvatarUrl") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("Birthday") - .HasColumnType("datetime(6)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LastOnlineTime") - .HasColumnType("datetime(6)"); - - b.Property("NickName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("Sex") - .HasColumnType("int"); - - b.Property("Sign") - .HasMaxLength(30) - .HasColumnType("varchar(30)"); - - b.Property("State") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserChatCards"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatFriend", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Black") - .HasColumnType("tinyint(1)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("DontDisturb") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("FrientId") - .HasColumnType("char(36)"); - - b.Property("RemarkName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("SpecialFocus") - .HasColumnType("tinyint(1)"); - - b.Property("Status") - .HasColumnType("tinyint unsigned"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "FrientId"); - - b.ToTable("AppUserChatFriends"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("AllowAddFriend") - .HasColumnType("tinyint(1)"); - - b.Property("AllowAnonymous") - .HasColumnType("tinyint(1)"); - - b.Property("AllowReceiveMessage") - .HasColumnType("tinyint(1)"); - - b.Property("AllowSendMessage") - .HasColumnType("tinyint(1)"); - - b.Property("RequireAddFriendValition") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserChatSettings"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(1048576) - .HasColumnType("longtext"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("MessageId") - .HasColumnType("bigint"); - - b.Property("ReceiveUserId") - .HasColumnType("char(36)"); - - b.Property("SendState") - .HasColumnType("tinyint"); - - b.Property("SendUserName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "ReceiveUserId"); - - b.ToTable("AppUserMessages"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.ChatGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Address") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("AdminUserId") - .HasColumnType("char(36)"); - - b.Property("AllowAnonymous") - .HasColumnType("tinyint(1)"); - - b.Property("AllowSendMessage") - .HasColumnType("tinyint(1)"); - - b.Property("AvatarUrl") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MaxUserCount") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)"); - - b.Property("Notice") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Tag") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name"); - - b.ToTable("AppChatGroups"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.GroupChatBlack", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("ShieldUserId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId"); - - b.ToTable("AppGroupChatBlacks"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.GroupMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(1048576) - .HasColumnType("longtext"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("MessageId") - .HasColumnType("bigint"); - - b.Property("SendState") - .HasColumnType("tinyint"); - - b.Property("SendUserName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId"); - - b.ToTable("AppGroupMessages"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.UserChatGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId", "UserId"); - - b.ToTable("AppUserChatGroups"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.UserGroupCard", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsAdmin") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("NickName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("SilenceEnd") - .HasColumnType("datetime(6)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserGroupCards"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Notifications.Notification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("ExpirationTime") - .HasColumnType("datetime(6)"); - - b.Property("NotificationData") - .IsRequired() - .HasMaxLength(1048576) - .HasColumnType("longtext"); - - b.Property("NotificationId") - .HasColumnType("bigint"); - - b.Property("NotificationName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("NotificationTypeName") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("Severity") - .HasColumnType("tinyint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "NotificationName"); - - b.ToTable("AppNotifications"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Notifications.UserNotification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("NotificationId") - .HasColumnType("bigint"); - - b.Property("ReadStatus") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "NotificationId") - .HasDatabaseName("IX_Tenant_User_Notification_Id"); - - b.ToTable("AppUserNotifications"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Subscriptions.UserSubscribe", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("NotificationName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .IsRequired() - .ValueGeneratedOnAdd() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasDefaultValue("/"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "NotificationName") - .IsUnique() - .HasDatabaseName("IX_Tenant_User_Notification_Name"); - - b.ToTable("AppUserSubscribes"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20211110144233_Add-Field-Online-Avatar.cs b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20211110144233_Add-Field-Online-Avatar.cs deleted file mode 100644 index 69a2344f3..000000000 --- a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20211110144233_Add-Field-Online-Avatar.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace LY.MicroService.RealtimeMessage.Migrations -{ - public partial class AddFieldOnlineAvatar : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "LastOnlineTime", - table: "AppUserChatCards", - type: "datetime(6)", - nullable: true); - - migrationBuilder.AddColumn( - name: "State", - table: "AppUserChatCards", - type: "int", - nullable: false, - defaultValue: 0); - - migrationBuilder.AddColumn( - name: "AvatarUrl", - table: "AppChatGroups", - type: "varchar(128)", - maxLength: 128, - nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "LastOnlineTime", - table: "AppUserChatCards"); - - migrationBuilder.DropColumn( - name: "State", - table: "AppUserChatCards"); - - migrationBuilder.DropColumn( - name: "AvatarUrl", - table: "AppChatGroups"); - } - } -} diff --git a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20211111014501_Add-Base-Type-ExtraProp-To-Notification.Designer.cs b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20211111014501_Add-Base-Type-ExtraProp-To-Notification.Designer.cs deleted file mode 100644 index ff721820c..000000000 --- a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20211111014501_Add-Base-Type-ExtraProp-To-Notification.Designer.cs +++ /dev/null @@ -1,621 +0,0 @@ -// -using System; -using LY.MicroService.RealtimeMessage.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -namespace LY.MicroService.RealtimeMessage.Migrations -{ - [DbContext(typeof(RealtimeMessageMigrationsDbContext))] - [Migration("20211111014501_Add-Base-Type-ExtraProp-To-Notification")] - partial class AddBaseTypeExtraPropToNotification - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("Relational:MaxIdentifierLength", 64) - .HasAnnotation("ProductVersion", "5.0.12"); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatCard", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Age") - .HasColumnType("int"); - - b.Property("AvatarUrl") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("Birthday") - .HasColumnType("datetime(6)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LastOnlineTime") - .HasColumnType("datetime(6)"); - - b.Property("NickName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("Sex") - .HasColumnType("int"); - - b.Property("Sign") - .HasMaxLength(30) - .HasColumnType("varchar(30)"); - - b.Property("State") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserChatCards"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatFriend", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Black") - .HasColumnType("tinyint(1)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("DontDisturb") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("FrientId") - .HasColumnType("char(36)"); - - b.Property("RemarkName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("SpecialFocus") - .HasColumnType("tinyint(1)"); - - b.Property("Status") - .HasColumnType("tinyint unsigned"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "FrientId"); - - b.ToTable("AppUserChatFriends"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("AllowAddFriend") - .HasColumnType("tinyint(1)"); - - b.Property("AllowAnonymous") - .HasColumnType("tinyint(1)"); - - b.Property("AllowReceiveMessage") - .HasColumnType("tinyint(1)"); - - b.Property("AllowSendMessage") - .HasColumnType("tinyint(1)"); - - b.Property("RequireAddFriendValition") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserChatSettings"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(1048576) - .HasColumnType("longtext"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("MessageId") - .HasColumnType("bigint"); - - b.Property("ReceiveUserId") - .HasColumnType("char(36)"); - - b.Property("SendState") - .HasColumnType("tinyint"); - - b.Property("SendUserName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "ReceiveUserId"); - - b.ToTable("AppUserMessages"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.ChatGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Address") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("AdminUserId") - .HasColumnType("char(36)"); - - b.Property("AllowAnonymous") - .HasColumnType("tinyint(1)"); - - b.Property("AllowSendMessage") - .HasColumnType("tinyint(1)"); - - b.Property("AvatarUrl") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MaxUserCount") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)"); - - b.Property("Notice") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Tag") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name"); - - b.ToTable("AppChatGroups"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.GroupChatBlack", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("ShieldUserId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId"); - - b.ToTable("AppGroupChatBlacks"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.GroupMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(1048576) - .HasColumnType("longtext"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("MessageId") - .HasColumnType("bigint"); - - b.Property("SendState") - .HasColumnType("tinyint"); - - b.Property("SendUserName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId"); - - b.ToTable("AppGroupMessages"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.UserChatGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId", "UserId"); - - b.ToTable("AppUserChatGroups"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.UserGroupCard", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsAdmin") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("NickName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("SilenceEnd") - .HasColumnType("datetime(6)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserGroupCards"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Notifications.Notification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("ExpirationTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("NotificationId") - .HasColumnType("bigint"); - - b.Property("NotificationName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("NotificationTypeName") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("Severity") - .HasColumnType("tinyint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "NotificationName"); - - b.ToTable("AppNotifications"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Notifications.UserNotification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("NotificationId") - .HasColumnType("bigint"); - - b.Property("ReadStatus") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "NotificationId") - .HasDatabaseName("IX_Tenant_User_Notification_Id"); - - b.ToTable("AppUserNotifications"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Subscriptions.UserSubscribe", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("NotificationName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .IsRequired() - .ValueGeneratedOnAdd() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasDefaultValue("/"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "NotificationName") - .IsUnique() - .HasDatabaseName("IX_Tenant_User_Notification_Name"); - - b.ToTable("AppUserSubscribes"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20211111014501_Add-Base-Type-ExtraProp-To-Notification.cs b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20211111014501_Add-Base-Type-ExtraProp-To-Notification.cs deleted file mode 100644 index a1b0f32a3..000000000 --- a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20211111014501_Add-Base-Type-ExtraProp-To-Notification.cs +++ /dev/null @@ -1,36 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -namespace LY.MicroService.RealtimeMessage.Migrations -{ - public partial class AddBaseTypeExtraPropToNotification : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "NotificationData", - table: "AppNotifications"); - - migrationBuilder.AddColumn( - name: "ExtraProperties", - table: "AppNotifications", - type: "longtext", - nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "ExtraProperties", - table: "AppNotifications"); - - migrationBuilder.AddColumn( - name: "NotificationData", - table: "AppNotifications", - type: "longtext", - maxLength: 1048576, - nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"); - } - } -} diff --git a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20211111080938_Add-Source-Type-To-Chat-Message.Designer.cs b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20211111080938_Add-Source-Type-To-Chat-Message.Designer.cs deleted file mode 100644 index d02b79e7a..000000000 --- a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20211111080938_Add-Source-Type-To-Chat-Message.Designer.cs +++ /dev/null @@ -1,627 +0,0 @@ -// -using System; -using LY.MicroService.RealtimeMessage.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -namespace LY.MicroService.RealtimeMessage.Migrations -{ - [DbContext(typeof(RealtimeMessageMigrationsDbContext))] - [Migration("20211111080938_Add-Source-Type-To-Chat-Message")] - partial class AddSourceTypeToChatMessage - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("Relational:MaxIdentifierLength", 64) - .HasAnnotation("ProductVersion", "5.0.12"); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatCard", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Age") - .HasColumnType("int"); - - b.Property("AvatarUrl") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("Birthday") - .HasColumnType("datetime(6)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LastOnlineTime") - .HasColumnType("datetime(6)"); - - b.Property("NickName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("Sex") - .HasColumnType("int"); - - b.Property("Sign") - .HasMaxLength(30) - .HasColumnType("varchar(30)"); - - b.Property("State") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserChatCards"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatFriend", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Black") - .HasColumnType("tinyint(1)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("DontDisturb") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("FrientId") - .HasColumnType("char(36)"); - - b.Property("RemarkName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("SpecialFocus") - .HasColumnType("tinyint(1)"); - - b.Property("Status") - .HasColumnType("tinyint unsigned"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "FrientId"); - - b.ToTable("AppUserChatFriends"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("AllowAddFriend") - .HasColumnType("tinyint(1)"); - - b.Property("AllowAnonymous") - .HasColumnType("tinyint(1)"); - - b.Property("AllowReceiveMessage") - .HasColumnType("tinyint(1)"); - - b.Property("AllowSendMessage") - .HasColumnType("tinyint(1)"); - - b.Property("RequireAddFriendValition") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserChatSettings"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(1048576) - .HasColumnType("longtext"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("MessageId") - .HasColumnType("bigint"); - - b.Property("ReceiveUserId") - .HasColumnType("char(36)"); - - b.Property("SendState") - .HasColumnType("tinyint"); - - b.Property("SendUserName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Source") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "ReceiveUserId"); - - b.ToTable("AppUserMessages"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.ChatGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Address") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("AdminUserId") - .HasColumnType("char(36)"); - - b.Property("AllowAnonymous") - .HasColumnType("tinyint(1)"); - - b.Property("AllowSendMessage") - .HasColumnType("tinyint(1)"); - - b.Property("AvatarUrl") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MaxUserCount") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)"); - - b.Property("Notice") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Tag") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name"); - - b.ToTable("AppChatGroups"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.GroupChatBlack", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("ShieldUserId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId"); - - b.ToTable("AppGroupChatBlacks"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.GroupMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(1048576) - .HasColumnType("longtext"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("MessageId") - .HasColumnType("bigint"); - - b.Property("SendState") - .HasColumnType("tinyint"); - - b.Property("SendUserName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Source") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId"); - - b.ToTable("AppGroupMessages"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.UserChatGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId", "UserId"); - - b.ToTable("AppUserChatGroups"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.UserGroupCard", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsAdmin") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("NickName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("SilenceEnd") - .HasColumnType("datetime(6)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserGroupCards"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Notifications.Notification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("ExpirationTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("NotificationId") - .HasColumnType("bigint"); - - b.Property("NotificationName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("NotificationTypeName") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("Severity") - .HasColumnType("tinyint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "NotificationName"); - - b.ToTable("AppNotifications"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Notifications.UserNotification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("NotificationId") - .HasColumnType("bigint"); - - b.Property("ReadStatus") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "NotificationId") - .HasDatabaseName("IX_Tenant_User_Notification_Id"); - - b.ToTable("AppUserNotifications"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Subscriptions.UserSubscribe", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("NotificationName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .IsRequired() - .ValueGeneratedOnAdd() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasDefaultValue("/"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "NotificationName") - .IsUnique() - .HasDatabaseName("IX_Tenant_User_Notification_Name"); - - b.ToTable("AppUserSubscribes"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20211111080938_Add-Source-Type-To-Chat-Message.cs b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20211111080938_Add-Source-Type-To-Chat-Message.cs deleted file mode 100644 index 40b4c91e2..000000000 --- a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20211111080938_Add-Source-Type-To-Chat-Message.cs +++ /dev/null @@ -1,35 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -namespace LY.MicroService.RealtimeMessage.Migrations -{ - public partial class AddSourceTypeToChatMessage : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "Source", - table: "AppUserMessages", - type: "int", - nullable: false, - defaultValue: 0); - - migrationBuilder.AddColumn( - name: "Source", - table: "AppGroupMessages", - type: "int", - nullable: false, - defaultValue: 0); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "Source", - table: "AppUserMessages"); - - migrationBuilder.DropColumn( - name: "Source", - table: "AppGroupMessages"); - } - } -} diff --git a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20211111221335_Add-Field-Static-To-Chat-Friend.Designer.cs b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20211111221335_Add-Field-Static-To-Chat-Friend.Designer.cs deleted file mode 100644 index 8858965fc..000000000 --- a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20211111221335_Add-Field-Static-To-Chat-Friend.Designer.cs +++ /dev/null @@ -1,630 +0,0 @@ -// -using System; -using LY.MicroService.RealtimeMessage.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -namespace LY.MicroService.RealtimeMessage.Migrations -{ - [DbContext(typeof(RealtimeMessageMigrationsDbContext))] - [Migration("20211111221335_Add-Field-Static-To-Chat-Friend")] - partial class AddFieldStaticToChatFriend - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("Relational:MaxIdentifierLength", 64) - .HasAnnotation("ProductVersion", "5.0.12"); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatCard", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Age") - .HasColumnType("int"); - - b.Property("AvatarUrl") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("Birthday") - .HasColumnType("datetime(6)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LastOnlineTime") - .HasColumnType("datetime(6)"); - - b.Property("NickName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("Sex") - .HasColumnType("int"); - - b.Property("Sign") - .HasMaxLength(30) - .HasColumnType("varchar(30)"); - - b.Property("State") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserChatCards"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatFriend", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Black") - .HasColumnType("tinyint(1)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("DontDisturb") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("FrientId") - .HasColumnType("char(36)"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("RemarkName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("SpecialFocus") - .HasColumnType("tinyint(1)"); - - b.Property("Status") - .HasColumnType("tinyint unsigned"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "FrientId"); - - b.ToTable("AppUserChatFriends"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("AllowAddFriend") - .HasColumnType("tinyint(1)"); - - b.Property("AllowAnonymous") - .HasColumnType("tinyint(1)"); - - b.Property("AllowReceiveMessage") - .HasColumnType("tinyint(1)"); - - b.Property("AllowSendMessage") - .HasColumnType("tinyint(1)"); - - b.Property("RequireAddFriendValition") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserChatSettings"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(1048576) - .HasColumnType("longtext"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("MessageId") - .HasColumnType("bigint"); - - b.Property("ReceiveUserId") - .HasColumnType("char(36)"); - - b.Property("SendState") - .HasColumnType("tinyint"); - - b.Property("SendUserName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Source") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "ReceiveUserId"); - - b.ToTable("AppUserMessages"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.ChatGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Address") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("AdminUserId") - .HasColumnType("char(36)"); - - b.Property("AllowAnonymous") - .HasColumnType("tinyint(1)"); - - b.Property("AllowSendMessage") - .HasColumnType("tinyint(1)"); - - b.Property("AvatarUrl") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MaxUserCount") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)"); - - b.Property("Notice") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Tag") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name"); - - b.ToTable("AppChatGroups"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.GroupChatBlack", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("ShieldUserId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId"); - - b.ToTable("AppGroupChatBlacks"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.GroupMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(1048576) - .HasColumnType("longtext"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("MessageId") - .HasColumnType("bigint"); - - b.Property("SendState") - .HasColumnType("tinyint"); - - b.Property("SendUserName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Source") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId"); - - b.ToTable("AppGroupMessages"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.UserChatGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId", "UserId"); - - b.ToTable("AppUserChatGroups"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.UserGroupCard", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsAdmin") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("NickName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("SilenceEnd") - .HasColumnType("datetime(6)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserGroupCards"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Notifications.Notification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("ExpirationTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("NotificationId") - .HasColumnType("bigint"); - - b.Property("NotificationName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("NotificationTypeName") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("Severity") - .HasColumnType("tinyint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "NotificationName"); - - b.ToTable("AppNotifications"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Notifications.UserNotification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("NotificationId") - .HasColumnType("bigint"); - - b.Property("ReadStatus") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "NotificationId") - .HasDatabaseName("IX_Tenant_User_Notification_Id"); - - b.ToTable("AppUserNotifications"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Subscriptions.UserSubscribe", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("NotificationName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .IsRequired() - .ValueGeneratedOnAdd() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasDefaultValue("/"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "NotificationName") - .IsUnique() - .HasDatabaseName("IX_Tenant_User_Notification_Name"); - - b.ToTable("AppUserSubscribes"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20211111221335_Add-Field-Static-To-Chat-Friend.cs b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20211111221335_Add-Field-Static-To-Chat-Friend.cs deleted file mode 100644 index 1b10c2c16..000000000 --- a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20211111221335_Add-Field-Static-To-Chat-Friend.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -namespace LY.MicroService.RealtimeMessage.Migrations -{ - public partial class AddFieldStaticToChatFriend : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "IsStatic", - table: "AppUserChatFriends", - type: "tinyint(1)", - nullable: false, - defaultValue: false); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "IsStatic", - table: "AppUserChatFriends"); - } - } -} diff --git a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20211112083050_Rename-Field-SendState-To-State.Designer.cs b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20211112083050_Rename-Field-SendState-To-State.Designer.cs deleted file mode 100644 index f555a6f81..000000000 --- a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20211112083050_Rename-Field-SendState-To-State.Designer.cs +++ /dev/null @@ -1,630 +0,0 @@ -// -using System; -using LY.MicroService.RealtimeMessage.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -namespace LY.MicroService.RealtimeMessage.Migrations -{ - [DbContext(typeof(RealtimeMessageMigrationsDbContext))] - [Migration("20211112083050_Rename-Field-SendState-To-State")] - partial class RenameFieldSendStateToState - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("Relational:MaxIdentifierLength", 64) - .HasAnnotation("ProductVersion", "5.0.12"); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatCard", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Age") - .HasColumnType("int"); - - b.Property("AvatarUrl") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("Birthday") - .HasColumnType("datetime(6)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LastOnlineTime") - .HasColumnType("datetime(6)"); - - b.Property("NickName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("Sex") - .HasColumnType("int"); - - b.Property("Sign") - .HasMaxLength(30) - .HasColumnType("varchar(30)"); - - b.Property("State") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserChatCards"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatFriend", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Black") - .HasColumnType("tinyint(1)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("DontDisturb") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("FrientId") - .HasColumnType("char(36)"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("RemarkName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("SpecialFocus") - .HasColumnType("tinyint(1)"); - - b.Property("Status") - .HasColumnType("tinyint unsigned"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "FrientId"); - - b.ToTable("AppUserChatFriends"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("AllowAddFriend") - .HasColumnType("tinyint(1)"); - - b.Property("AllowAnonymous") - .HasColumnType("tinyint(1)"); - - b.Property("AllowReceiveMessage") - .HasColumnType("tinyint(1)"); - - b.Property("AllowSendMessage") - .HasColumnType("tinyint(1)"); - - b.Property("RequireAddFriendValition") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserChatSettings"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(1048576) - .HasColumnType("longtext"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("MessageId") - .HasColumnType("bigint"); - - b.Property("ReceiveUserId") - .HasColumnType("char(36)"); - - b.Property("SendUserName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Source") - .HasColumnType("int"); - - b.Property("State") - .HasColumnType("tinyint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "ReceiveUserId"); - - b.ToTable("AppUserMessages"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.ChatGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Address") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("AdminUserId") - .HasColumnType("char(36)"); - - b.Property("AllowAnonymous") - .HasColumnType("tinyint(1)"); - - b.Property("AllowSendMessage") - .HasColumnType("tinyint(1)"); - - b.Property("AvatarUrl") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MaxUserCount") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)"); - - b.Property("Notice") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Tag") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name"); - - b.ToTable("AppChatGroups"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.GroupChatBlack", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("ShieldUserId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId"); - - b.ToTable("AppGroupChatBlacks"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.GroupMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(1048576) - .HasColumnType("longtext"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("MessageId") - .HasColumnType("bigint"); - - b.Property("SendUserName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Source") - .HasColumnType("int"); - - b.Property("State") - .HasColumnType("tinyint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId"); - - b.ToTable("AppGroupMessages"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.UserChatGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId", "UserId"); - - b.ToTable("AppUserChatGroups"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.UserGroupCard", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsAdmin") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("NickName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("SilenceEnd") - .HasColumnType("datetime(6)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserGroupCards"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Notifications.Notification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("ExpirationTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("NotificationId") - .HasColumnType("bigint"); - - b.Property("NotificationName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("NotificationTypeName") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("Severity") - .HasColumnType("tinyint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "NotificationName"); - - b.ToTable("AppNotifications"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Notifications.UserNotification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("NotificationId") - .HasColumnType("bigint"); - - b.Property("ReadStatus") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "NotificationId") - .HasDatabaseName("IX_Tenant_User_Notification_Id"); - - b.ToTable("AppUserNotifications"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Subscriptions.UserSubscribe", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("NotificationName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .IsRequired() - .ValueGeneratedOnAdd() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasDefaultValue("/"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "NotificationName") - .IsUnique() - .HasDatabaseName("IX_Tenant_User_Notification_Name"); - - b.ToTable("AppUserSubscribes"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20211112083050_Rename-Field-SendState-To-State.cs b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20211112083050_Rename-Field-SendState-To-State.cs deleted file mode 100644 index b80a59dc0..000000000 --- a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20211112083050_Rename-Field-SendState-To-State.cs +++ /dev/null @@ -1,33 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -namespace LY.MicroService.RealtimeMessage.Migrations -{ - public partial class RenameFieldSendStateToState : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.RenameColumn( - name: "SendState", - table: "AppUserMessages", - newName: "State"); - - migrationBuilder.RenameColumn( - name: "SendState", - table: "AppGroupMessages", - newName: "State"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.RenameColumn( - name: "State", - table: "AppUserMessages", - newName: "SendState"); - - migrationBuilder.RenameColumn( - name: "State", - table: "AppGroupMessages", - newName: "SendState"); - } - } -} diff --git a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20220902104049_Add-Dynamic-Notification.Designer.cs b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20220902104049_Add-Dynamic-Notification.Designer.cs deleted file mode 100644 index 127df24b0..000000000 --- a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20220902104049_Add-Dynamic-Notification.Designer.cs +++ /dev/null @@ -1,720 +0,0 @@ -// -using System; -using LY.MicroService.RealtimeMessage.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.RealtimeMessage.Migrations -{ - [DbContext(typeof(RealtimeMessageMigrationsDbContext))] - [Migration("20220902104049_Add-Dynamic-Notification")] - partial class AddDynamicNotification - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "6.0.8") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatCard", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Age") - .HasColumnType("int"); - - b.Property("AvatarUrl") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("Birthday") - .HasColumnType("datetime(6)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LastOnlineTime") - .HasColumnType("datetime(6)"); - - b.Property("NickName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("Sex") - .HasColumnType("int"); - - b.Property("Sign") - .HasMaxLength(30) - .HasColumnType("varchar(30)"); - - b.Property("State") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserChatCards", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatFriend", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Black") - .HasColumnType("tinyint(1)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("DontDisturb") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("FrientId") - .HasColumnType("char(36)"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("RemarkName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("SpecialFocus") - .HasColumnType("tinyint(1)"); - - b.Property("Status") - .HasColumnType("tinyint unsigned"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "FrientId"); - - b.ToTable("AppUserChatFriends", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("AllowAddFriend") - .HasColumnType("tinyint(1)"); - - b.Property("AllowAnonymous") - .HasColumnType("tinyint(1)"); - - b.Property("AllowReceiveMessage") - .HasColumnType("tinyint(1)"); - - b.Property("AllowSendMessage") - .HasColumnType("tinyint(1)"); - - b.Property("RequireAddFriendValition") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserChatSettings", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(1048576) - .HasColumnType("longtext"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("MessageId") - .HasColumnType("bigint"); - - b.Property("ReceiveUserId") - .HasColumnType("char(36)"); - - b.Property("SendUserName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Source") - .HasColumnType("int"); - - b.Property("State") - .HasColumnType("tinyint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "ReceiveUserId"); - - b.ToTable("AppUserMessages", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.ChatGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Address") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("AdminUserId") - .HasColumnType("char(36)"); - - b.Property("AllowAnonymous") - .HasColumnType("tinyint(1)"); - - b.Property("AllowSendMessage") - .HasColumnType("tinyint(1)"); - - b.Property("AvatarUrl") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MaxUserCount") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)"); - - b.Property("Notice") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Tag") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name"); - - b.ToTable("AppChatGroups", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.GroupChatBlack", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("ShieldUserId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId"); - - b.ToTable("AppGroupChatBlacks", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.GroupMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(1048576) - .HasColumnType("longtext"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("MessageId") - .HasColumnType("bigint"); - - b.Property("SendUserName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Source") - .HasColumnType("int"); - - b.Property("State") - .HasColumnType("tinyint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId"); - - b.ToTable("AppGroupMessages", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.UserChatGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId", "UserId"); - - b.ToTable("AppUserChatGroups", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.UserGroupCard", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsAdmin") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("NickName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("SilenceEnd") - .HasColumnType("datetime(6)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserGroupCards", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Notifications.Notification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("ExpirationTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("NotificationId") - .HasColumnType("bigint"); - - b.Property("NotificationName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("NotificationTypeName") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("Severity") - .HasColumnType("tinyint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "NotificationName"); - - b.ToTable("AppNotifications", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Notifications.NotificationDefinitionGroupRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowSubscriptionToClients") - .HasColumnType("tinyint(1)"); - - b.Property("Description") - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("DisplayName") - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Localization") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ResourceName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.HasKey("Id"); - - b.ToTable("AppNotificationDefinitionGroups", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Notifications.NotificationDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowSubscriptionToClients") - .HasColumnType("tinyint(1)"); - - b.Property("Description") - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("DisplayName") - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Localization") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("NotificationLifetime") - .HasColumnType("int"); - - b.Property("NotificationType") - .HasColumnType("int"); - - b.Property("Providers") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("ResourceName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.HasKey("Id"); - - b.ToTable("AppNotificationDefinitions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Notifications.UserNotification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("NotificationId") - .HasColumnType("bigint"); - - b.Property("ReadStatus") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "NotificationId") - .HasDatabaseName("IX_Tenant_User_Notification_Id"); - - b.ToTable("AppUserNotifications", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Subscriptions.UserSubscribe", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("NotificationName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .IsRequired() - .ValueGeneratedOnAdd() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasDefaultValue("/"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "NotificationName") - .IsUnique() - .HasDatabaseName("IX_Tenant_User_Notification_Name"); - - b.ToTable("AppUserSubscribes", (string)null); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20220902104049_Add-Dynamic-Notification.cs b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20220902104049_Add-Dynamic-Notification.cs deleted file mode 100644 index fb30570be..000000000 --- a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20220902104049_Add-Dynamic-Notification.cs +++ /dev/null @@ -1,76 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.RealtimeMessage.Migrations -{ - public partial class AddDynamicNotification : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "AppNotificationDefinitionGroups", - 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"), - DisplayName = table.Column(type: "varchar(255)", maxLength: 255, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Description = table.Column(type: "varchar(255)", maxLength: 255, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ResourceName = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Localization = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - AllowSubscriptionToClients = table.Column(type: "tinyint(1)", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AppNotificationDefinitionGroups", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AppNotificationDefinitions", - 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"), - DisplayName = table.Column(type: "varchar(255)", maxLength: 255, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Description = table.Column(type: "varchar(255)", maxLength: 255, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ResourceName = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Localization = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - NotificationLifetime = table.Column(type: "int", nullable: false), - NotificationType = table.Column(type: "int", nullable: false), - Providers = table.Column(type: "varchar(200)", maxLength: 200, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - AllowSubscriptionToClients = table.Column(type: "tinyint(1)", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AppNotificationDefinitions", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AppNotificationDefinitionGroups"); - - migrationBuilder.DropTable( - name: "AppNotificationDefinitions"); - } - } -} diff --git a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20220902122929_Add-GroupName-With-Notification-Definition-Record.Designer.cs b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20220902122929_Add-GroupName-With-Notification-Definition-Record.Designer.cs deleted file mode 100644 index 992a526ab..000000000 --- a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20220902122929_Add-GroupName-With-Notification-Definition-Record.Designer.cs +++ /dev/null @@ -1,725 +0,0 @@ -// -using System; -using LY.MicroService.RealtimeMessage.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.RealtimeMessage.Migrations -{ - [DbContext(typeof(RealtimeMessageMigrationsDbContext))] - [Migration("20220902122929_Add-GroupName-With-Notification-Definition-Record")] - partial class AddGroupNameWithNotificationDefinitionRecord - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "6.0.8") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatCard", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Age") - .HasColumnType("int"); - - b.Property("AvatarUrl") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("Birthday") - .HasColumnType("datetime(6)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LastOnlineTime") - .HasColumnType("datetime(6)"); - - b.Property("NickName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("Sex") - .HasColumnType("int"); - - b.Property("Sign") - .HasMaxLength(30) - .HasColumnType("varchar(30)"); - - b.Property("State") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserChatCards", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatFriend", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Black") - .HasColumnType("tinyint(1)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("DontDisturb") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("FrientId") - .HasColumnType("char(36)"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("RemarkName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("SpecialFocus") - .HasColumnType("tinyint(1)"); - - b.Property("Status") - .HasColumnType("tinyint unsigned"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "FrientId"); - - b.ToTable("AppUserChatFriends", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("AllowAddFriend") - .HasColumnType("tinyint(1)"); - - b.Property("AllowAnonymous") - .HasColumnType("tinyint(1)"); - - b.Property("AllowReceiveMessage") - .HasColumnType("tinyint(1)"); - - b.Property("AllowSendMessage") - .HasColumnType("tinyint(1)"); - - b.Property("RequireAddFriendValition") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserChatSettings", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(1048576) - .HasColumnType("longtext"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("MessageId") - .HasColumnType("bigint"); - - b.Property("ReceiveUserId") - .HasColumnType("char(36)"); - - b.Property("SendUserName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Source") - .HasColumnType("int"); - - b.Property("State") - .HasColumnType("tinyint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "ReceiveUserId"); - - b.ToTable("AppUserMessages", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.ChatGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Address") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("AdminUserId") - .HasColumnType("char(36)"); - - b.Property("AllowAnonymous") - .HasColumnType("tinyint(1)"); - - b.Property("AllowSendMessage") - .HasColumnType("tinyint(1)"); - - b.Property("AvatarUrl") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MaxUserCount") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)"); - - b.Property("Notice") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Tag") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name"); - - b.ToTable("AppChatGroups", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.GroupChatBlack", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("ShieldUserId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId"); - - b.ToTable("AppGroupChatBlacks", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.GroupMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(1048576) - .HasColumnType("longtext"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("MessageId") - .HasColumnType("bigint"); - - b.Property("SendUserName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Source") - .HasColumnType("int"); - - b.Property("State") - .HasColumnType("tinyint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId"); - - b.ToTable("AppGroupMessages", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.UserChatGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId", "UserId"); - - b.ToTable("AppUserChatGroups", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.UserGroupCard", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsAdmin") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("NickName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("SilenceEnd") - .HasColumnType("datetime(6)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserGroupCards", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Notifications.Notification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("ExpirationTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("NotificationId") - .HasColumnType("bigint"); - - b.Property("NotificationName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("NotificationTypeName") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("Severity") - .HasColumnType("tinyint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "NotificationName"); - - b.ToTable("AppNotifications", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Notifications.NotificationDefinitionGroupRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowSubscriptionToClients") - .HasColumnType("tinyint(1)"); - - b.Property("Description") - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("DisplayName") - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Localization") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ResourceName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.HasKey("Id"); - - b.ToTable("AppNotificationDefinitionGroups", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Notifications.NotificationDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowSubscriptionToClients") - .HasColumnType("tinyint(1)"); - - b.Property("Description") - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("DisplayName") - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Localization") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("NotificationLifetime") - .HasColumnType("int"); - - b.Property("NotificationType") - .HasColumnType("int"); - - b.Property("Providers") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("ResourceName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.HasKey("Id"); - - b.ToTable("AppNotificationDefinitions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Notifications.UserNotification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("NotificationId") - .HasColumnType("bigint"); - - b.Property("ReadStatus") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "NotificationId") - .HasDatabaseName("IX_Tenant_User_Notification_Id"); - - b.ToTable("AppUserNotifications", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Subscriptions.UserSubscribe", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("NotificationName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .IsRequired() - .ValueGeneratedOnAdd() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasDefaultValue("/"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "NotificationName") - .IsUnique() - .HasDatabaseName("IX_Tenant_User_Notification_Name"); - - b.ToTable("AppUserSubscribes", (string)null); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20220902122929_Add-GroupName-With-Notification-Definition-Record.cs b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20220902122929_Add-GroupName-With-Notification-Definition-Record.cs deleted file mode 100644 index 5063dbf63..000000000 --- a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20220902122929_Add-GroupName-With-Notification-Definition-Record.cs +++ /dev/null @@ -1,28 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.RealtimeMessage.Migrations -{ - public partial class AddGroupNameWithNotificationDefinitionRecord : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "GroupName", - table: "AppNotificationDefinitions", - type: "varchar(64)", - maxLength: 64, - nullable: false, - defaultValue: "") - .Annotation("MySql:CharSet", "utf8mb4"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "GroupName", - table: "AppNotificationDefinitions"); - } - } -} diff --git a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20220915102817_Add-ContentType-With-Notification-Definition.Designer.cs b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20220915102817_Add-ContentType-With-Notification-Definition.Designer.cs deleted file mode 100644 index c720bf3c2..000000000 --- a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20220915102817_Add-ContentType-With-Notification-Definition.Designer.cs +++ /dev/null @@ -1,735 +0,0 @@ -// -using System; -using LY.MicroService.RealtimeMessage.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.RealtimeMessage.Migrations -{ - [DbContext(typeof(RealtimeMessageMigrationsDbContext))] - [Migration("20220915102817_Add-ContentType-With-Notification-Definition")] - partial class AddContentTypeWithNotificationDefinition - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "6.0.8") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatCard", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Age") - .HasColumnType("int"); - - b.Property("AvatarUrl") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("Birthday") - .HasColumnType("datetime(6)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LastOnlineTime") - .HasColumnType("datetime(6)"); - - b.Property("NickName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("Sex") - .HasColumnType("int"); - - b.Property("Sign") - .HasMaxLength(30) - .HasColumnType("varchar(30)"); - - b.Property("State") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserChatCards", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatFriend", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Black") - .HasColumnType("tinyint(1)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("DontDisturb") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("FrientId") - .HasColumnType("char(36)"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("RemarkName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("SpecialFocus") - .HasColumnType("tinyint(1)"); - - b.Property("Status") - .HasColumnType("tinyint unsigned"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "FrientId"); - - b.ToTable("AppUserChatFriends", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("AllowAddFriend") - .HasColumnType("tinyint(1)"); - - b.Property("AllowAnonymous") - .HasColumnType("tinyint(1)"); - - b.Property("AllowReceiveMessage") - .HasColumnType("tinyint(1)"); - - b.Property("AllowSendMessage") - .HasColumnType("tinyint(1)"); - - b.Property("RequireAddFriendValition") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserChatSettings", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(1048576) - .HasColumnType("longtext"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("MessageId") - .HasColumnType("bigint"); - - b.Property("ReceiveUserId") - .HasColumnType("char(36)"); - - b.Property("SendUserName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Source") - .HasColumnType("int"); - - b.Property("State") - .HasColumnType("tinyint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "ReceiveUserId"); - - b.ToTable("AppUserMessages", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.ChatGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Address") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("AdminUserId") - .HasColumnType("char(36)"); - - b.Property("AllowAnonymous") - .HasColumnType("tinyint(1)"); - - b.Property("AllowSendMessage") - .HasColumnType("tinyint(1)"); - - b.Property("AvatarUrl") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MaxUserCount") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)"); - - b.Property("Notice") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Tag") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name"); - - b.ToTable("AppChatGroups", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.GroupChatBlack", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("ShieldUserId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId"); - - b.ToTable("AppGroupChatBlacks", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.GroupMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(1048576) - .HasColumnType("longtext"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("MessageId") - .HasColumnType("bigint"); - - b.Property("SendUserName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Source") - .HasColumnType("int"); - - b.Property("State") - .HasColumnType("tinyint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId"); - - b.ToTable("AppGroupMessages", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.UserChatGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId", "UserId"); - - b.ToTable("AppUserChatGroups", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.UserGroupCard", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsAdmin") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("NickName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("SilenceEnd") - .HasColumnType("datetime(6)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserGroupCards", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Notifications.Notification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("ContentType") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("ExpirationTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("NotificationId") - .HasColumnType("bigint"); - - b.Property("NotificationName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("NotificationTypeName") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("Severity") - .HasColumnType("tinyint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "NotificationName"); - - b.ToTable("AppNotifications", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Notifications.NotificationDefinitionGroupRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowSubscriptionToClients") - .HasColumnType("tinyint(1)"); - - b.Property("Description") - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("DisplayName") - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Localization") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ResourceName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.HasKey("Id"); - - b.ToTable("AppNotificationDefinitionGroups", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Notifications.NotificationDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowSubscriptionToClients") - .HasColumnType("tinyint(1)"); - - b.Property("ContentType") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("Description") - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("DisplayName") - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Localization") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("NotificationLifetime") - .HasColumnType("int"); - - b.Property("NotificationType") - .HasColumnType("int"); - - b.Property("Providers") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("ResourceName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.HasKey("Id"); - - b.ToTable("AppNotificationDefinitions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Notifications.UserNotification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("NotificationId") - .HasColumnType("bigint"); - - b.Property("ReadStatus") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "NotificationId") - .HasDatabaseName("IX_Tenant_User_Notification_Id"); - - b.ToTable("AppUserNotifications", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Subscriptions.UserSubscribe", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("NotificationName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .IsRequired() - .ValueGeneratedOnAdd() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasDefaultValue("/"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "NotificationName") - .IsUnique() - .HasDatabaseName("IX_Tenant_User_Notification_Name"); - - b.ToTable("AppUserSubscribes", (string)null); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20220915102817_Add-ContentType-With-Notification-Definition.cs b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20220915102817_Add-ContentType-With-Notification-Definition.cs deleted file mode 100644 index 819cb6c3a..000000000 --- a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/20220915102817_Add-ContentType-With-Notification-Definition.cs +++ /dev/null @@ -1,37 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.RealtimeMessage.Migrations -{ - public partial class AddContentTypeWithNotificationDefinition : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "ContentType", - table: "AppNotifications", - type: "int", - nullable: false, - defaultValue: 0); - - migrationBuilder.AddColumn( - name: "ContentType", - table: "AppNotificationDefinitions", - type: "int", - nullable: false, - defaultValue: 0); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "ContentType", - table: "AppNotifications"); - - migrationBuilder.DropColumn( - name: "ContentType", - table: "AppNotificationDefinitions"); - } - } -} diff --git a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/RealtimeMessageMigrationsDbContextModelSnapshot.cs b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/RealtimeMessageMigrationsDbContextModelSnapshot.cs deleted file mode 100644 index 960a067c3..000000000 --- a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Migrations/RealtimeMessageMigrationsDbContextModelSnapshot.cs +++ /dev/null @@ -1,733 +0,0 @@ -// -using System; -using LY.MicroService.RealtimeMessage.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.RealtimeMessage.Migrations -{ - [DbContext(typeof(RealtimeMessageMigrationsDbContext))] - partial class RealtimeMessageMigrationsDbContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "6.0.8") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatCard", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Age") - .HasColumnType("int"); - - b.Property("AvatarUrl") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("Birthday") - .HasColumnType("datetime(6)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LastOnlineTime") - .HasColumnType("datetime(6)"); - - b.Property("NickName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("Sex") - .HasColumnType("int"); - - b.Property("Sign") - .HasMaxLength(30) - .HasColumnType("varchar(30)"); - - b.Property("State") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserChatCards", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatFriend", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Black") - .HasColumnType("tinyint(1)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("DontDisturb") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("FrientId") - .HasColumnType("char(36)"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("RemarkName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("SpecialFocus") - .HasColumnType("tinyint(1)"); - - b.Property("Status") - .HasColumnType("tinyint unsigned"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "FrientId"); - - b.ToTable("AppUserChatFriends", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("AllowAddFriend") - .HasColumnType("tinyint(1)"); - - b.Property("AllowAnonymous") - .HasColumnType("tinyint(1)"); - - b.Property("AllowReceiveMessage") - .HasColumnType("tinyint(1)"); - - b.Property("AllowSendMessage") - .HasColumnType("tinyint(1)"); - - b.Property("RequireAddFriendValition") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserChatSettings", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(1048576) - .HasColumnType("longtext"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("MessageId") - .HasColumnType("bigint"); - - b.Property("ReceiveUserId") - .HasColumnType("char(36)"); - - b.Property("SendUserName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Source") - .HasColumnType("int"); - - b.Property("State") - .HasColumnType("tinyint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "ReceiveUserId"); - - b.ToTable("AppUserMessages", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.ChatGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Address") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("AdminUserId") - .HasColumnType("char(36)"); - - b.Property("AllowAnonymous") - .HasColumnType("tinyint(1)"); - - b.Property("AllowSendMessage") - .HasColumnType("tinyint(1)"); - - b.Property("AvatarUrl") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MaxUserCount") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)"); - - b.Property("Notice") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Tag") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name"); - - b.ToTable("AppChatGroups", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.GroupChatBlack", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("ShieldUserId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId"); - - b.ToTable("AppGroupChatBlacks", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.GroupMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(1048576) - .HasColumnType("longtext"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("MessageId") - .HasColumnType("bigint"); - - b.Property("SendUserName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Source") - .HasColumnType("int"); - - b.Property("State") - .HasColumnType("tinyint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId"); - - b.ToTable("AppGroupMessages", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.UserChatGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId", "UserId"); - - b.ToTable("AppUserChatGroups", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.UserGroupCard", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsAdmin") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("NickName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("SilenceEnd") - .HasColumnType("datetime(6)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserGroupCards", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Notifications.Notification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("ContentType") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("ExpirationTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("NotificationId") - .HasColumnType("bigint"); - - b.Property("NotificationName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("NotificationTypeName") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("Severity") - .HasColumnType("tinyint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "NotificationName"); - - b.ToTable("AppNotifications", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Notifications.NotificationDefinitionGroupRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowSubscriptionToClients") - .HasColumnType("tinyint(1)"); - - b.Property("Description") - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("DisplayName") - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Localization") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ResourceName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.HasKey("Id"); - - b.ToTable("AppNotificationDefinitionGroups", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Notifications.NotificationDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowSubscriptionToClients") - .HasColumnType("tinyint(1)"); - - b.Property("ContentType") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("Description") - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("DisplayName") - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Localization") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("NotificationLifetime") - .HasColumnType("int"); - - b.Property("NotificationType") - .HasColumnType("int"); - - b.Property("Providers") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("ResourceName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.HasKey("Id"); - - b.ToTable("AppNotificationDefinitions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Notifications.UserNotification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("NotificationId") - .HasColumnType("bigint"); - - b.Property("ReadStatus") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "NotificationId") - .HasDatabaseName("IX_Tenant_User_Notification_Id"); - - b.ToTable("AppUserNotifications", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Subscriptions.UserSubscribe", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("NotificationName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .IsRequired() - .ValueGeneratedOnAdd() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasDefaultValue("/"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "NotificationName") - .IsUnique() - .HasDatabaseName("IX_Tenant_User_Notification_Name"); - - b.ToTable("AppUserSubscribes", (string)null); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/RealtimeMessageHttpApiHostModule.Configure.cs b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/RealtimeMessageHttpApiHostModule.Configure.cs index 9f86f277f..f848338d0 100644 --- a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/RealtimeMessageHttpApiHostModule.Configure.cs +++ b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/RealtimeMessageHttpApiHostModule.Configure.cs @@ -60,7 +60,7 @@ public partial class RealtimeMessageHttpApiHostModule PreConfigure(options => { // 以开放端口区别,应在0-31之间 - options.SnowflakeIdOptions.WorkerId = 30020 - 30000; + options.SnowflakeIdOptions.WorkerId = 20; options.SnowflakeIdOptions.WorkerIdBits = 5; options.SnowflakeIdOptions.DatacenterId = 1; }); diff --git a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/RealtimeMessageHttpApiHostModule.cs b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/RealtimeMessageHttpApiHostModule.cs index 0b538013b..b9327c39d 100644 --- a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/RealtimeMessageHttpApiHostModule.cs +++ b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/RealtimeMessageHttpApiHostModule.cs @@ -32,6 +32,7 @@ using LINGYUN.Abp.Serilog.Enrichers.Application; using LINGYUN.Abp.Serilog.Enrichers.UniqueId; using LINGYUN.Abp.TaskManagement.EntityFrameworkCore; using LINGYUN.Abp.TextTemplating.EntityFrameworkCore; +using LY.MicroService.RealtimeMessage.EntityFrameworkCore; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.DependencyInjection; @@ -76,6 +77,7 @@ namespace LY.MicroService.RealtimeMessage; typeof(AbpLocalizationManagementEntityFrameworkCoreModule), typeof(AbpTextTemplatingEntityFrameworkCoreModule), typeof(AbpIdentityEntityFrameworkCoreModule), + typeof(RealtimeMessageMigrationsEntityFrameworkCoreModule), typeof(AbpDataDbMigratorModule), typeof(AbpAspNetCoreAuthenticationJwtBearerModule), typeof(AbpAuthorizationOrganizationUnitsModule), diff --git a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/EntityFrameworkCore/TaskManagementMigrationsDbContext.cs b/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/EntityFrameworkCore/TaskManagementMigrationsDbContext.cs deleted file mode 100644 index 229b8fdcc..000000000 --- a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/EntityFrameworkCore/TaskManagementMigrationsDbContext.cs +++ /dev/null @@ -1,21 +0,0 @@ -using LINGYUN.Abp.TaskManagement.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Volo.Abp.EntityFrameworkCore; - -namespace LY.MicroService.TaskManagement.EntityFrameworkCore; - -public class TaskManagementMigrationsDbContext : AbpDbContext -{ - public TaskManagementMigrationsDbContext(DbContextOptions options) - : base(options) - { - - } - - protected override void OnModelCreating(ModelBuilder modelBuilder) - { - base.OnModelCreating(modelBuilder); - - modelBuilder.ConfigureTaskManagement(); - } -} diff --git a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/LY.MicroService.TaskManagement.HttpApi.Host.csproj b/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/LY.MicroService.TaskManagement.HttpApi.Host.csproj index 77b9cfef0..d54c2511d 100644 --- a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/LY.MicroService.TaskManagement.HttpApi.Host.csproj +++ b/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/LY.MicroService.TaskManagement.HttpApi.Host.csproj @@ -50,6 +50,7 @@ + diff --git a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220109030916_Add-Module-Task-Management.Designer.cs b/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220109030916_Add-Module-Task-Management.Designer.cs deleted file mode 100644 index bb69b999d..000000000 --- a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220109030916_Add-Module-Task-Management.Designer.cs +++ /dev/null @@ -1,188 +0,0 @@ -// -using System; -using LY.MicroService.TaskManagement.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.TaskManagement.Migrations -{ - [DbContext(typeof(TaskManagementMigrationsDbContext))] - [Migration("20220109030916_Add-Module-Task-Management")] - partial class AddModuleTaskManagement - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "6.0.1") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Args") - .HasColumnType("longtext") - .HasColumnName("Args"); - - b.Property("BeginTime") - .HasColumnType("datetime(6)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Cron") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("Cron"); - - b.Property("Description") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Description"); - - b.Property("EndTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Group") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("Group"); - - b.Property("Interval") - .HasColumnType("int"); - - b.Property("IsAbandoned") - .HasColumnType("tinyint(1)"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("JobType") - .HasColumnType("int"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LastRunTime") - .HasColumnType("datetime(6)"); - - b.Property("LockTimeOut") - .HasColumnType("int"); - - b.Property("MaxCount") - .HasColumnType("int"); - - b.Property("MaxTryCount") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Name"); - - b.Property("NextRunTime") - .HasColumnType("datetime(6)"); - - b.Property("Priority") - .HasColumnType("int"); - - b.Property("Status") - .HasColumnType("int"); - - b.Property("TriggerCount") - .HasColumnType("int"); - - b.Property("TryCount") - .HasColumnType("int"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnName("Type"); - - b.HasKey("Id"); - - b.HasIndex("Name", "Group"); - - b.ToTable("TK_BackgroundJobs", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Exception") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasColumnName("Exception"); - - b.Property("JobGroup") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("JobGroup"); - - b.Property("JobId") - .HasColumnType("char(36)"); - - b.Property("JobName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("JobName"); - - b.Property("JobType") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnName("JobType"); - - b.Property("Message") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("Message"); - - b.Property("RunTime") - .HasColumnType("datetime(6)"); - - b.HasKey("Id"); - - b.HasIndex("JobGroup", "JobName"); - - b.ToTable("TK_BackgroundJobLogs", (string)null); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220109030916_Add-Module-Task-Management.cs b/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220109030916_Add-Module-Task-Management.cs deleted file mode 100644 index 1c04c8779..000000000 --- a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220109030916_Add-Module-Task-Management.cs +++ /dev/null @@ -1,108 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.TaskManagement.Migrations -{ - public partial class AddModuleTaskManagement : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterDatabase() - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "TK_BackgroundJobLogs", - columns: table => new - { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - JobId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - JobName = table.Column(type: "varchar(100)", maxLength: 100, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - JobGroup = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - JobType = table.Column(type: "varchar(200)", maxLength: 200, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Message = table.Column(type: "varchar(1000)", maxLength: 1000, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - RunTime = table.Column(type: "datetime(6)", nullable: false), - Exception = table.Column(type: "varchar(2000)", maxLength: 2000, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_TK_BackgroundJobLogs", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "TK_BackgroundJobs", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Name = table.Column(type: "varchar(100)", maxLength: 100, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Group = table.Column(type: "varchar(50)", maxLength: 50, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Type = table.Column(type: "varchar(200)", maxLength: 200, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Args = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Status = table.Column(type: "int", nullable: false), - IsEnabled = table.Column(type: "tinyint(1)", nullable: false), - Description = table.Column(type: "varchar(255)", maxLength: 255, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - LockTimeOut = table.Column(type: "int", nullable: false), - BeginTime = table.Column(type: "datetime(6)", nullable: false), - EndTime = table.Column(type: "datetime(6)", nullable: true), - LastRunTime = table.Column(type: "datetime(6)", nullable: true), - NextRunTime = table.Column(type: "datetime(6)", nullable: true), - JobType = table.Column(type: "int", nullable: false), - Cron = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Priority = table.Column(type: "int", nullable: false), - TriggerCount = table.Column(type: "int", nullable: false), - TryCount = table.Column(type: "int", nullable: false), - MaxTryCount = table.Column(type: "int", nullable: false), - MaxCount = table.Column(type: "int", nullable: false), - Interval = table.Column(type: "int", nullable: false), - IsAbandoned = table.Column(type: "tinyint(1)", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, 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_TK_BackgroundJobs", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "IX_TK_BackgroundJobLogs_JobGroup_JobName", - table: "TK_BackgroundJobLogs", - columns: new[] { "JobGroup", "JobName" }); - - migrationBuilder.CreateIndex( - name: "IX_TK_BackgroundJobs_Name_Group", - table: "TK_BackgroundJobs", - columns: new[] { "Name", "Group" }); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "TK_BackgroundJobLogs"); - - migrationBuilder.DropTable( - name: "TK_BackgroundJobs"); - } - } -} diff --git a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220109033926_Add-Field-Result-With-Background-Job-Info.Designer.cs b/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220109033926_Add-Field-Result-With-Background-Job-Info.Designer.cs deleted file mode 100644 index 72dfca939..000000000 --- a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220109033926_Add-Field-Result-With-Background-Job-Info.Designer.cs +++ /dev/null @@ -1,193 +0,0 @@ -// -using System; -using LY.MicroService.TaskManagement.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.TaskManagement.Migrations -{ - [DbContext(typeof(TaskManagementMigrationsDbContext))] - [Migration("20220109033926_Add-Field-Result-With-Background-Job-Info")] - partial class AddFieldResultWithBackgroundJobInfo - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "6.0.1") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Args") - .HasColumnType("longtext") - .HasColumnName("Args"); - - b.Property("BeginTime") - .HasColumnType("datetime(6)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Cron") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("Cron"); - - b.Property("Description") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Description"); - - b.Property("EndTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Group") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("Group"); - - b.Property("Interval") - .HasColumnType("int"); - - b.Property("IsAbandoned") - .HasColumnType("tinyint(1)"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("JobType") - .HasColumnType("int"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LastRunTime") - .HasColumnType("datetime(6)"); - - b.Property("LockTimeOut") - .HasColumnType("int"); - - b.Property("MaxCount") - .HasColumnType("int"); - - b.Property("MaxTryCount") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Name"); - - b.Property("NextRunTime") - .HasColumnType("datetime(6)"); - - b.Property("Priority") - .HasColumnType("int"); - - b.Property("Result") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("Result"); - - b.Property("Status") - .HasColumnType("int"); - - b.Property("TriggerCount") - .HasColumnType("int"); - - b.Property("TryCount") - .HasColumnType("int"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnName("Type"); - - b.HasKey("Id"); - - b.HasIndex("Name", "Group"); - - b.ToTable("TK_BackgroundJobs", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Exception") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasColumnName("Exception"); - - b.Property("JobGroup") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("JobGroup"); - - b.Property("JobId") - .HasColumnType("char(36)"); - - b.Property("JobName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("JobName"); - - b.Property("JobType") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnName("JobType"); - - b.Property("Message") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("Message"); - - b.Property("RunTime") - .HasColumnType("datetime(6)"); - - b.HasKey("Id"); - - b.HasIndex("JobGroup", "JobName"); - - b.ToTable("TK_BackgroundJobLogs", (string)null); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220109033926_Add-Field-Result-With-Background-Job-Info.cs b/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220109033926_Add-Field-Result-With-Background-Job-Info.cs deleted file mode 100644 index 644c17adb..000000000 --- a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220109033926_Add-Field-Result-With-Background-Job-Info.cs +++ /dev/null @@ -1,27 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.TaskManagement.Migrations -{ - public partial class AddFieldResultWithBackgroundJobInfo : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "Result", - table: "TK_BackgroundJobs", - type: "varchar(1000)", - maxLength: 1000, - nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "Result", - table: "TK_BackgroundJobs"); - } - } -} diff --git a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220110104046_Reset-Field-Type-Length-With-Background-Job-Info.Designer.cs b/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220110104046_Reset-Field-Type-Length-With-Background-Job-Info.Designer.cs deleted file mode 100644 index 3dcde4848..000000000 --- a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220110104046_Reset-Field-Type-Length-With-Background-Job-Info.Designer.cs +++ /dev/null @@ -1,193 +0,0 @@ -// -using System; -using LY.MicroService.TaskManagement.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.TaskManagement.Migrations -{ - [DbContext(typeof(TaskManagementMigrationsDbContext))] - [Migration("20220110104046_Reset-Field-Type-Length-With-Background-Job-Info")] - partial class ResetFieldTypeLengthWithBackgroundJobInfo - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "6.0.1") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Args") - .HasColumnType("longtext") - .HasColumnName("Args"); - - b.Property("BeginTime") - .HasColumnType("datetime(6)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Cron") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("Cron"); - - b.Property("Description") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Description"); - - b.Property("EndTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Group") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("Group"); - - b.Property("Interval") - .HasColumnType("int"); - - b.Property("IsAbandoned") - .HasColumnType("tinyint(1)"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("JobType") - .HasColumnType("int"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LastRunTime") - .HasColumnType("datetime(6)"); - - b.Property("LockTimeOut") - .HasColumnType("int"); - - b.Property("MaxCount") - .HasColumnType("int"); - - b.Property("MaxTryCount") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Name"); - - b.Property("NextRunTime") - .HasColumnType("datetime(6)"); - - b.Property("Priority") - .HasColumnType("int"); - - b.Property("Result") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("Result"); - - b.Property("Status") - .HasColumnType("int"); - - b.Property("TriggerCount") - .HasColumnType("int"); - - b.Property("TryCount") - .HasColumnType("int"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("Type"); - - b.HasKey("Id"); - - b.HasIndex("Name", "Group"); - - b.ToTable("TK_BackgroundJobs", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Exception") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasColumnName("Exception"); - - b.Property("JobGroup") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("JobGroup"); - - b.Property("JobId") - .HasColumnType("char(36)"); - - b.Property("JobName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("JobName"); - - b.Property("JobType") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("JobType"); - - b.Property("Message") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("Message"); - - b.Property("RunTime") - .HasColumnType("datetime(6)"); - - b.HasKey("Id"); - - b.HasIndex("JobGroup", "JobName"); - - b.ToTable("TK_BackgroundJobLogs", (string)null); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220110104046_Reset-Field-Type-Length-With-Background-Job-Info.cs b/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220110104046_Reset-Field-Type-Length-With-Background-Job-Info.cs deleted file mode 100644 index 82f956506..000000000 --- a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220110104046_Reset-Field-Type-Length-With-Background-Job-Info.cs +++ /dev/null @@ -1,65 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.TaskManagement.Migrations -{ - public partial class ResetFieldTypeLengthWithBackgroundJobInfo : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "Type", - table: "TK_BackgroundJobs", - type: "varchar(1000)", - maxLength: 1000, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(200)", - oldMaxLength: 200) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "JobType", - table: "TK_BackgroundJobLogs", - type: "varchar(1000)", - maxLength: 1000, - nullable: true, - oldClrType: typeof(string), - oldType: "varchar(200)", - oldMaxLength: 200, - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "Type", - table: "TK_BackgroundJobs", - type: "varchar(200)", - maxLength: 200, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(1000)", - oldMaxLength: 1000) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "JobType", - table: "TK_BackgroundJobLogs", - type: "varchar(200)", - maxLength: 200, - nullable: true, - oldClrType: typeof(string), - oldType: "varchar(1000)", - oldMaxLength: 1000, - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - } - } -} diff --git a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220112093435_Add-Support-Multi-Tenancy-With-Background-Jobs.Designer.cs b/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220112093435_Add-Support-Multi-Tenancy-With-Background-Jobs.Designer.cs deleted file mode 100644 index 65cf9773d..000000000 --- a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220112093435_Add-Support-Multi-Tenancy-With-Background-Jobs.Designer.cs +++ /dev/null @@ -1,201 +0,0 @@ -// -using System; -using LY.MicroService.TaskManagement.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.TaskManagement.Migrations -{ - [DbContext(typeof(TaskManagementMigrationsDbContext))] - [Migration("20220112093435_Add-Support-Multi-Tenancy-With-Background-Jobs")] - partial class AddSupportMultiTenancyWithBackgroundJobs - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "6.0.1") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Args") - .HasColumnType("longtext") - .HasColumnName("Args"); - - b.Property("BeginTime") - .HasColumnType("datetime(6)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Cron") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("Cron"); - - b.Property("Description") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Description"); - - b.Property("EndTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Group") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("Group"); - - b.Property("Interval") - .HasColumnType("int"); - - b.Property("IsAbandoned") - .HasColumnType("tinyint(1)"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("JobType") - .HasColumnType("int"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LastRunTime") - .HasColumnType("datetime(6)"); - - b.Property("LockTimeOut") - .HasColumnType("int"); - - b.Property("MaxCount") - .HasColumnType("int"); - - b.Property("MaxTryCount") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Name"); - - b.Property("NextRunTime") - .HasColumnType("datetime(6)"); - - b.Property("Priority") - .HasColumnType("int"); - - b.Property("Result") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("Result"); - - b.Property("Status") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TriggerCount") - .HasColumnType("int"); - - b.Property("TryCount") - .HasColumnType("int"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("Type"); - - b.HasKey("Id"); - - b.HasIndex("Name", "Group"); - - b.ToTable("TK_BackgroundJobs", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Exception") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasColumnName("Exception"); - - b.Property("JobGroup") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("JobGroup"); - - b.Property("JobId") - .HasColumnType("char(36)"); - - b.Property("JobName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("JobName"); - - b.Property("JobType") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("JobType"); - - b.Property("Message") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("Message"); - - b.Property("RunTime") - .HasColumnType("datetime(6)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("JobGroup", "JobName"); - - b.ToTable("TK_BackgroundJobLogs", (string)null); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220112093435_Add-Support-Multi-Tenancy-With-Background-Jobs.cs b/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220112093435_Add-Support-Multi-Tenancy-With-Background-Jobs.cs deleted file mode 100644 index b44f803ee..000000000 --- a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220112093435_Add-Support-Multi-Tenancy-With-Background-Jobs.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.TaskManagement.Migrations -{ - public partial class AddSupportMultiTenancyWithBackgroundJobs : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "TenantId", - table: "TK_BackgroundJobs", - type: "char(36)", - nullable: true, - collation: "ascii_general_ci"); - - migrationBuilder.AddColumn( - name: "TenantId", - table: "TK_BackgroundJobLogs", - type: "char(36)", - nullable: true, - collation: "ascii_general_ci"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "TenantId", - table: "TK_BackgroundJobs"); - - migrationBuilder.DropColumn( - name: "TenantId", - table: "TK_BackgroundJobLogs"); - } - } -} diff --git a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220113113020_Change-Background-Job-Info-Key-To-String.Designer.cs b/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220113113020_Change-Background-Job-Info-Key-To-String.Designer.cs deleted file mode 100644 index 11e48a54a..000000000 --- a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220113113020_Change-Background-Job-Info-Key-To-String.Designer.cs +++ /dev/null @@ -1,202 +0,0 @@ -// -using System; -using LY.MicroService.TaskManagement.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.TaskManagement.Migrations -{ - [DbContext(typeof(TaskManagementMigrationsDbContext))] - [Migration("20220113113020_Change-Background-Job-Info-Key-To-String")] - partial class ChangeBackgroundJobInfoKeyToString - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "6.0.1") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobInfo", b => - { - b.Property("Id") - .HasColumnType("varchar(255)"); - - b.Property("Args") - .HasColumnType("longtext") - .HasColumnName("Args"); - - b.Property("BeginTime") - .HasColumnType("datetime(6)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Cron") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("Cron"); - - b.Property("Description") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Description"); - - b.Property("EndTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Group") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("Group"); - - b.Property("Interval") - .HasColumnType("int"); - - b.Property("IsAbandoned") - .HasColumnType("tinyint(1)"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("JobType") - .HasColumnType("int"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LastRunTime") - .HasColumnType("datetime(6)"); - - b.Property("LockTimeOut") - .HasColumnType("int"); - - b.Property("MaxCount") - .HasColumnType("int"); - - b.Property("MaxTryCount") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Name"); - - b.Property("NextRunTime") - .HasColumnType("datetime(6)"); - - b.Property("Priority") - .HasColumnType("int"); - - b.Property("Result") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("Result"); - - b.Property("Status") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TriggerCount") - .HasColumnType("int"); - - b.Property("TryCount") - .HasColumnType("int"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("Type"); - - b.HasKey("Id"); - - b.HasIndex("Name", "Group"); - - b.ToTable("TK_BackgroundJobs", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Exception") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasColumnName("Exception"); - - b.Property("JobGroup") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("JobGroup"); - - b.Property("JobId") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("JobId"); - - b.Property("JobName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("JobName"); - - b.Property("JobType") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("JobType"); - - b.Property("Message") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("Message"); - - b.Property("RunTime") - .HasColumnType("datetime(6)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("JobGroup", "JobName"); - - b.ToTable("TK_BackgroundJobLogs", (string)null); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220113113020_Change-Background-Job-Info-Key-To-String.cs b/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220113113020_Change-Background-Job-Info-Key-To-String.cs deleted file mode 100644 index 9cf9799a4..000000000 --- a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220113113020_Change-Background-Job-Info-Key-To-String.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.TaskManagement.Migrations -{ - public partial class ChangeBackgroundJobInfoKeyToString : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "Id", - table: "TK_BackgroundJobs", - type: "varchar(255)", - nullable: false, - oldClrType: typeof(Guid), - oldType: "char(36)") - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("Relational:Collation", "ascii_general_ci"); - - migrationBuilder.AlterColumn( - name: "JobId", - table: "TK_BackgroundJobLogs", - type: "varchar(255)", - maxLength: 255, - nullable: true, - oldClrType: typeof(Guid), - oldType: "char(36)", - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("Relational:Collation", "ascii_general_ci"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "Id", - table: "TK_BackgroundJobs", - type: "char(36)", - nullable: false, - collation: "ascii_general_ci", - oldClrType: typeof(string), - oldType: "varchar(255)") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "JobId", - table: "TK_BackgroundJobLogs", - type: "char(36)", - nullable: true, - collation: "ascii_general_ci", - oldClrType: typeof(string), - oldType: "varchar(255)", - oldMaxLength: 255, - oldNullable: true) - .OldAnnotation("MySql:CharSet", "utf8mb4"); - } - } -} diff --git a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220330013146_Add-Field-Source-With-BackgroundJobInfo.Designer.cs b/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220330013146_Add-Field-Source-With-BackgroundJobInfo.Designer.cs deleted file mode 100644 index 72051148a..000000000 --- a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220330013146_Add-Field-Source-With-BackgroundJobInfo.Designer.cs +++ /dev/null @@ -1,208 +0,0 @@ -// -using System; -using LY.MicroService.TaskManagement.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.TaskManagement.Migrations -{ - [DbContext(typeof(TaskManagementMigrationsDbContext))] - [Migration("20220330013146_Add-Field-Source-With-BackgroundJobInfo")] - partial class AddFieldSourceWithBackgroundJobInfo - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "6.0.3") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobInfo", b => - { - b.Property("Id") - .HasColumnType("varchar(255)"); - - b.Property("Args") - .HasColumnType("longtext") - .HasColumnName("Args"); - - b.Property("BeginTime") - .HasColumnType("datetime(6)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Cron") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("Cron"); - - b.Property("Description") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Description"); - - b.Property("EndTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Group") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("Group"); - - b.Property("Interval") - .HasColumnType("int"); - - b.Property("IsAbandoned") - .HasColumnType("tinyint(1)"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("JobType") - .HasColumnType("int"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LastRunTime") - .HasColumnType("datetime(6)"); - - b.Property("LockTimeOut") - .HasColumnType("int"); - - b.Property("MaxCount") - .HasColumnType("int"); - - b.Property("MaxTryCount") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Name"); - - b.Property("NextRunTime") - .HasColumnType("datetime(6)"); - - b.Property("Priority") - .HasColumnType("int"); - - b.Property("Result") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("Result"); - - b.Property("Source") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(-1) - .HasColumnName("Source"); - - b.Property("Status") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TriggerCount") - .HasColumnType("int"); - - b.Property("TryCount") - .HasColumnType("int"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("Type"); - - b.HasKey("Id"); - - b.HasIndex("Name", "Group"); - - b.ToTable("TK_BackgroundJobs", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Exception") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasColumnName("Exception"); - - b.Property("JobGroup") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("JobGroup"); - - b.Property("JobId") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("JobId"); - - b.Property("JobName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("JobName"); - - b.Property("JobType") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("JobType"); - - b.Property("Message") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("Message"); - - b.Property("RunTime") - .HasColumnType("datetime(6)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("JobGroup", "JobName"); - - b.ToTable("TK_BackgroundJobLogs", (string)null); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220330013146_Add-Field-Source-With-BackgroundJobInfo.cs b/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220330013146_Add-Field-Source-With-BackgroundJobInfo.cs deleted file mode 100644 index a5b4204ec..000000000 --- a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220330013146_Add-Field-Source-With-BackgroundJobInfo.cs +++ /dev/null @@ -1,26 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.TaskManagement.Migrations -{ - public partial class AddFieldSourceWithBackgroundJobInfo : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "Source", - table: "TK_BackgroundJobs", - type: "int", - nullable: false, - defaultValue: -1); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "Source", - table: "TK_BackgroundJobs"); - } - } -} diff --git a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220405072809_Add-Field-NodeName-With-BackgroundJobInfo.Designer.cs b/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220405072809_Add-Field-NodeName-With-BackgroundJobInfo.Designer.cs deleted file mode 100644 index 2170291ca..000000000 --- a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220405072809_Add-Field-NodeName-With-BackgroundJobInfo.Designer.cs +++ /dev/null @@ -1,213 +0,0 @@ -// -using System; -using LY.MicroService.TaskManagement.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.TaskManagement.Migrations -{ - [DbContext(typeof(TaskManagementMigrationsDbContext))] - [Migration("20220405072809_Add-Field-NodeName-With-BackgroundJobInfo")] - partial class AddFieldNodeNameWithBackgroundJobInfo - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "6.0.3") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobInfo", b => - { - b.Property("Id") - .HasColumnType("varchar(255)"); - - b.Property("Args") - .HasColumnType("longtext") - .HasColumnName("Args"); - - b.Property("BeginTime") - .HasColumnType("datetime(6)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Cron") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("Cron"); - - b.Property("Description") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Description"); - - b.Property("EndTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Group") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("Group"); - - b.Property("Interval") - .HasColumnType("int"); - - b.Property("IsAbandoned") - .HasColumnType("tinyint(1)"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("JobType") - .HasColumnType("int"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LastRunTime") - .HasColumnType("datetime(6)"); - - b.Property("LockTimeOut") - .HasColumnType("int"); - - b.Property("MaxCount") - .HasColumnType("int"); - - b.Property("MaxTryCount") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Name"); - - b.Property("NextRunTime") - .HasColumnType("datetime(6)"); - - b.Property("NodeName") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("NodeName"); - - b.Property("Priority") - .HasColumnType("int"); - - b.Property("Result") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("Result"); - - b.Property("Source") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(-1) - .HasColumnName("Source"); - - b.Property("Status") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TriggerCount") - .HasColumnType("int"); - - b.Property("TryCount") - .HasColumnType("int"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("Type"); - - b.HasKey("Id"); - - b.HasIndex("Name", "Group"); - - b.ToTable("TK_BackgroundJobs", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Exception") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasColumnName("Exception"); - - b.Property("JobGroup") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("JobGroup"); - - b.Property("JobId") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("JobId"); - - b.Property("JobName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("JobName"); - - b.Property("JobType") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("JobType"); - - b.Property("Message") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("Message"); - - b.Property("RunTime") - .HasColumnType("datetime(6)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("JobGroup", "JobName"); - - b.ToTable("TK_BackgroundJobLogs", (string)null); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220405072809_Add-Field-NodeName-With-BackgroundJobInfo.cs b/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220405072809_Add-Field-NodeName-With-BackgroundJobInfo.cs deleted file mode 100644 index 58d6dd3c2..000000000 --- a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220405072809_Add-Field-NodeName-With-BackgroundJobInfo.cs +++ /dev/null @@ -1,27 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.TaskManagement.Migrations -{ - public partial class AddFieldNodeNameWithBackgroundJobInfo : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "NodeName", - table: "TK_BackgroundJobs", - type: "varchar(128)", - maxLength: 128, - nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "NodeName", - table: "TK_BackgroundJobs"); - } - } -} diff --git a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220707020828_Add-Task-Actions.Designer.cs b/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220707020828_Add-Task-Actions.Designer.cs deleted file mode 100644 index fb6789aa3..000000000 --- a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220707020828_Add-Task-Actions.Designer.cs +++ /dev/null @@ -1,272 +0,0 @@ -// -using System; -using LY.MicroService.TaskManagement.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.TaskManagement.Migrations -{ - [DbContext(typeof(TaskManagementMigrationsDbContext))] - [Migration("20220707020828_Add-Task-Actions")] - partial class AddTaskActions - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "6.0.6") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobAction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("JobId") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("JobId"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Name"); - - b.Property("Paramters") - .HasColumnType("longtext") - .HasColumnName("Paramters"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("TK_BackgroundJobActions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobInfo", b => - { - b.Property("Id") - .HasColumnType("varchar(255)"); - - b.Property("Args") - .HasColumnType("longtext") - .HasColumnName("Args"); - - b.Property("BeginTime") - .HasColumnType("datetime(6)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Cron") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("Cron"); - - b.Property("Description") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Description"); - - b.Property("EndTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Group") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("Group"); - - b.Property("Interval") - .HasColumnType("int"); - - b.Property("IsAbandoned") - .HasColumnType("tinyint(1)"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("JobType") - .HasColumnType("int"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LastRunTime") - .HasColumnType("datetime(6)"); - - b.Property("LockTimeOut") - .HasColumnType("int"); - - b.Property("MaxCount") - .HasColumnType("int"); - - b.Property("MaxTryCount") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Name"); - - b.Property("NextRunTime") - .HasColumnType("datetime(6)"); - - b.Property("NodeName") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("NodeName"); - - b.Property("Priority") - .HasColumnType("int"); - - b.Property("Result") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("Result"); - - b.Property("Source") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(-1) - .HasColumnName("Source"); - - b.Property("Status") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TriggerCount") - .HasColumnType("int"); - - b.Property("TryCount") - .HasColumnType("int"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("Type"); - - b.HasKey("Id"); - - b.HasIndex("Name", "Group"); - - b.ToTable("TK_BackgroundJobs", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Exception") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasColumnName("Exception"); - - b.Property("JobGroup") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("JobGroup"); - - b.Property("JobId") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("JobId"); - - b.Property("JobName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("JobName"); - - b.Property("JobType") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("JobType"); - - b.Property("Message") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("Message"); - - b.Property("RunTime") - .HasColumnType("datetime(6)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("JobGroup", "JobName"); - - b.ToTable("TK_BackgroundJobLogs", (string)null); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220707020828_Add-Task-Actions.cs b/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220707020828_Add-Task-Actions.cs deleted file mode 100644 index dc50ee07c..000000000 --- a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220707020828_Add-Task-Actions.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.TaskManagement.Migrations -{ - public partial class AddTaskActions : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "TK_BackgroundJobActions", - 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"), - JobId = table.Column(type: "varchar(255)", maxLength: 255, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Name = table.Column(type: "varchar(100)", maxLength: 100, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Paramters = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, 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_TK_BackgroundJobActions", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "IX_TK_BackgroundJobActions_Name", - table: "TK_BackgroundJobActions", - column: "Name"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "TK_BackgroundJobActions"); - } - } -} diff --git a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220707032320_Add-Field-IsEnabled-With-BackgroundJobAction.Designer.cs b/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220707032320_Add-Field-IsEnabled-With-BackgroundJobAction.Designer.cs deleted file mode 100644 index 1a2d158c0..000000000 --- a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220707032320_Add-Field-IsEnabled-With-BackgroundJobAction.Designer.cs +++ /dev/null @@ -1,275 +0,0 @@ -// -using System; -using LY.MicroService.TaskManagement.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.TaskManagement.Migrations -{ - [DbContext(typeof(TaskManagementMigrationsDbContext))] - [Migration("20220707032320_Add-Field-IsEnabled-With-BackgroundJobAction")] - partial class AddFieldIsEnabledWithBackgroundJobAction - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "6.0.6") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobAction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("JobId") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("JobId"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Name"); - - b.Property("Paramters") - .HasColumnType("longtext") - .HasColumnName("Paramters"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("TK_BackgroundJobActions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobInfo", b => - { - b.Property("Id") - .HasColumnType("varchar(255)"); - - b.Property("Args") - .HasColumnType("longtext") - .HasColumnName("Args"); - - b.Property("BeginTime") - .HasColumnType("datetime(6)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Cron") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("Cron"); - - b.Property("Description") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Description"); - - b.Property("EndTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Group") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("Group"); - - b.Property("Interval") - .HasColumnType("int"); - - b.Property("IsAbandoned") - .HasColumnType("tinyint(1)"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("JobType") - .HasColumnType("int"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LastRunTime") - .HasColumnType("datetime(6)"); - - b.Property("LockTimeOut") - .HasColumnType("int"); - - b.Property("MaxCount") - .HasColumnType("int"); - - b.Property("MaxTryCount") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Name"); - - b.Property("NextRunTime") - .HasColumnType("datetime(6)"); - - b.Property("NodeName") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("NodeName"); - - b.Property("Priority") - .HasColumnType("int"); - - b.Property("Result") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("Result"); - - b.Property("Source") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(-1) - .HasColumnName("Source"); - - b.Property("Status") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TriggerCount") - .HasColumnType("int"); - - b.Property("TryCount") - .HasColumnType("int"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("Type"); - - b.HasKey("Id"); - - b.HasIndex("Name", "Group"); - - b.ToTable("TK_BackgroundJobs", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Exception") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasColumnName("Exception"); - - b.Property("JobGroup") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("JobGroup"); - - b.Property("JobId") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("JobId"); - - b.Property("JobName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("JobName"); - - b.Property("JobType") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("JobType"); - - b.Property("Message") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("Message"); - - b.Property("RunTime") - .HasColumnType("datetime(6)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("JobGroup", "JobName"); - - b.ToTable("TK_BackgroundJobLogs", (string)null); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220707032320_Add-Field-IsEnabled-With-BackgroundJobAction.cs b/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220707032320_Add-Field-IsEnabled-With-BackgroundJobAction.cs deleted file mode 100644 index 5c2b55dd2..000000000 --- a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220707032320_Add-Field-IsEnabled-With-BackgroundJobAction.cs +++ /dev/null @@ -1,26 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.TaskManagement.Migrations -{ - public partial class AddFieldIsEnabledWithBackgroundJobAction : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "IsEnabled", - table: "TK_BackgroundJobActions", - type: "tinyint(1)", - nullable: false, - defaultValue: false); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "IsEnabled", - table: "TK_BackgroundJobActions"); - } - } -} diff --git a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220712105141_Remove-Default-Value-With-Job-Source.Designer.cs b/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220712105141_Remove-Default-Value-With-Job-Source.Designer.cs deleted file mode 100644 index c690e5cb8..000000000 --- a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220712105141_Remove-Default-Value-With-Job-Source.Designer.cs +++ /dev/null @@ -1,272 +0,0 @@ -// -using System; -using LY.MicroService.TaskManagement.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.TaskManagement.Migrations -{ - [DbContext(typeof(TaskManagementMigrationsDbContext))] - [Migration("20220712105141_Remove-Default-Value-With-Job-Source")] - partial class RemoveDefaultValueWithJobSource - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "6.0.6") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobAction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("JobId") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("JobId"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Name"); - - b.Property("Paramters") - .HasColumnType("longtext") - .HasColumnName("Paramters"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("TK_BackgroundJobActions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobInfo", b => - { - b.Property("Id") - .HasColumnType("varchar(255)"); - - b.Property("Args") - .HasColumnType("longtext") - .HasColumnName("Args"); - - b.Property("BeginTime") - .HasColumnType("datetime(6)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Cron") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("Cron"); - - b.Property("Description") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Description"); - - b.Property("EndTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Group") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("Group"); - - b.Property("Interval") - .HasColumnType("int"); - - b.Property("IsAbandoned") - .HasColumnType("tinyint(1)"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("JobType") - .HasColumnType("int"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LastRunTime") - .HasColumnType("datetime(6)"); - - b.Property("LockTimeOut") - .HasColumnType("int"); - - b.Property("MaxCount") - .HasColumnType("int"); - - b.Property("MaxTryCount") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Name"); - - b.Property("NextRunTime") - .HasColumnType("datetime(6)"); - - b.Property("NodeName") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("NodeName"); - - b.Property("Priority") - .HasColumnType("int"); - - b.Property("Result") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("Result"); - - b.Property("Source") - .HasColumnType("int"); - - b.Property("Status") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TriggerCount") - .HasColumnType("int"); - - b.Property("TryCount") - .HasColumnType("int"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("Type"); - - b.HasKey("Id"); - - b.HasIndex("Name", "Group"); - - b.ToTable("TK_BackgroundJobs", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Exception") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasColumnName("Exception"); - - b.Property("JobGroup") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("JobGroup"); - - b.Property("JobId") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("JobId"); - - b.Property("JobName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("JobName"); - - b.Property("JobType") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("JobType"); - - b.Property("Message") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("Message"); - - b.Property("RunTime") - .HasColumnType("datetime(6)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("JobGroup", "JobName"); - - b.ToTable("TK_BackgroundJobLogs", (string)null); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220712105141_Remove-Default-Value-With-Job-Source.cs b/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220712105141_Remove-Default-Value-With-Job-Source.cs deleted file mode 100644 index 6dea0144e..000000000 --- a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/20220712105141_Remove-Default-Value-With-Job-Source.cs +++ /dev/null @@ -1,33 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.TaskManagement.Migrations -{ - public partial class RemoveDefaultValueWithJobSource : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "Source", - table: "TK_BackgroundJobs", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int", - oldDefaultValue: -1); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "Source", - table: "TK_BackgroundJobs", - type: "int", - nullable: false, - defaultValue: -1, - oldClrType: typeof(int), - oldType: "int"); - } - } -} diff --git a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/TaskManagementHttpApiHostModule.Configure.cs b/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/TaskManagementHttpApiHostModule.Configure.cs index c541b3f63..496fd78e1 100644 --- a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/TaskManagementHttpApiHostModule.Configure.cs +++ b/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/TaskManagementHttpApiHostModule.Configure.cs @@ -55,7 +55,7 @@ public partial class TaskManagementHttpApiHostModule PreConfigure(options => { // 以开放端口区别 - options.SnowflakeIdOptions.WorkerId = 30040; + options.SnowflakeIdOptions.WorkerId = 27; options.SnowflakeIdOptions.WorkerIdBits = 5; options.SnowflakeIdOptions.DatacenterId = 1; }); diff --git a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/TaskManagementHttpApiHostModule.cs b/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/TaskManagementHttpApiHostModule.cs index e6d7eaa3b..d379ff410 100644 --- a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/TaskManagementHttpApiHostModule.cs +++ b/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/TaskManagementHttpApiHostModule.cs @@ -1,5 +1,4 @@ -using DotNetCore.CAP; -using LINGYUN.Abp.AspNetCore.Mvc.Localization; +using LINGYUN.Abp.AspNetCore.Mvc.Localization; using LINGYUN.Abp.AspNetCore.Mvc.Wrapper; using LINGYUN.Abp.AuditLogging.Elasticsearch; using LINGYUN.Abp.Authorization.OrganizationUnits; @@ -19,6 +18,7 @@ using LINGYUN.Abp.Serilog.Enrichers.Application; using LINGYUN.Abp.Serilog.Enrichers.UniqueId; using LINGYUN.Abp.TaskManagement; using LINGYUN.Abp.TaskManagement.EntityFrameworkCore; +using LY.MicroService.TaskManagement.EntityFrameworkCore; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.DependencyInjection; @@ -67,7 +67,7 @@ namespace LY.MicroService.TaskManagement; typeof(AbpSettingManagementEntityFrameworkCoreModule), typeof(AbpSaasEntityFrameworkCoreModule), typeof(AbpLocalizationManagementEntityFrameworkCoreModule), - typeof(AbpCAPEventBusModule), + typeof(TaskManagementMigrationsEntityFrameworkCoreModule), typeof(AbpDataDbMigratorModule), typeof(AbpCachingStackExchangeRedisModule), typeof(AbpAspNetCoreMvcModule), @@ -75,6 +75,7 @@ namespace LY.MicroService.TaskManagement; typeof(AbpLocalizationCultureMapModule), typeof(AbpHttpClientWrapperModule), typeof(AbpAspNetCoreMvcWrapperModule), + typeof(AbpCAPEventBusModule), typeof(AbpAutofacModule) )] public partial class TaskManagementHttpApiHostModule : AbpModule diff --git a/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/EntityFrameworkCore/WebhooksManagementMigrationsDbContext.cs b/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/EntityFrameworkCore/WebhooksManagementMigrationsDbContext.cs deleted file mode 100644 index d0f8b1cec..000000000 --- a/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/EntityFrameworkCore/WebhooksManagementMigrationsDbContext.cs +++ /dev/null @@ -1,21 +0,0 @@ -using LINGYUN.Abp.WebhooksManagement.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Volo.Abp.EntityFrameworkCore; - -namespace LY.MicroService.WebhooksManagement.EntityFrameworkCore; - -public class WebhooksManagementMigrationsDbContext : AbpDbContext -{ - public WebhooksManagementMigrationsDbContext(DbContextOptions options) - : base(options) - { - - } - - protected override void OnModelCreating(ModelBuilder modelBuilder) - { - base.OnModelCreating(modelBuilder); - - modelBuilder.ConfigureWebhooksManagement(); - } -} diff --git a/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/LY.MicroService.WebhooksManagement.HttpApi.Host.csproj b/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/LY.MicroService.WebhooksManagement.HttpApi.Host.csproj index e6240579d..75d1201bd 100644 --- a/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/LY.MicroService.WebhooksManagement.HttpApi.Host.csproj +++ b/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/LY.MicroService.WebhooksManagement.HttpApi.Host.csproj @@ -42,6 +42,7 @@ + diff --git a/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/Migrations/20220326064231_Add-Module-WebHooks-Management.Designer.cs b/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/Migrations/20220326064231_Add-Module-WebHooks-Management.Designer.cs deleted file mode 100644 index 1da62c921..000000000 --- a/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/Migrations/20220326064231_Add-Module-WebHooks-Management.Designer.cs +++ /dev/null @@ -1,165 +0,0 @@ -// -using System; -using LY.MicroService.WebhooksManagement.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.WebhooksManagement.Migrations -{ - [DbContext(typeof(WebhooksManagementMigrationsDbContext))] - [Migration("20220326064231_Add-Module-WebHooks-Management")] - partial class AddModuleWebHooksManagement - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "6.0.3") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookEventRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("Data") - .HasMaxLength(2147483647) - .HasColumnType("longtext") - .HasColumnName("Data"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("WebhookName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("WebhookName"); - - b.HasKey("Id"); - - b.ToTable("AbpWebhooksEvents", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookSendRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("Response") - .HasMaxLength(2147483647) - .HasColumnType("longtext") - .HasColumnName("Response"); - - b.Property("ResponseStatusCode") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("WebhookEventId") - .HasColumnType("char(36)"); - - b.Property("WebhookSubscriptionId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("WebhookEventId"); - - b.ToTable("AbpWebhooksSendAttempts", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookSubscription", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Headers") - .HasMaxLength(2147483647) - .HasColumnType("longtext") - .HasColumnName("Headers"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("Secret") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("Secret"); - - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.Property("WebhookUri") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("WebhookUri"); - - b.Property("Webhooks") - .HasMaxLength(2147483647) - .HasColumnType("longtext") - .HasColumnName("Webhooks"); - - b.HasKey("Id"); - - b.ToTable("AbpWebhooksSubscriptions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookSendRecord", b => - { - b.HasOne("LINGYUN.Abp.WebhooksManagement.WebhookEventRecord", "WebhookEvent") - .WithOne() - .HasForeignKey("LINGYUN.Abp.WebhooksManagement.WebhookSendRecord", "WebhookEventId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("WebhookEvent"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/Migrations/20220326064231_Add-Module-WebHooks-Management.cs b/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/Migrations/20220326064231_Add-Module-WebHooks-Management.cs deleted file mode 100644 index e11276c96..000000000 --- a/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/Migrations/20220326064231_Add-Module-WebHooks-Management.cs +++ /dev/null @@ -1,103 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.WebhooksManagement.Migrations -{ - public partial class AddModuleWebHooksManagement : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterDatabase() - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpWebhooksEvents", - 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"), - WebhookName = table.Column(type: "varchar(100)", maxLength: 100, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Data = table.Column(type: "longtext", maxLength: 2147483647, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - DeletionTime = table.Column(type: "datetime(6)", nullable: true), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpWebhooksEvents", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpWebhooksSubscriptions", - 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"), - WebhookUri = table.Column(type: "varchar(255)", maxLength: 255, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Secret = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - IsActive = table.Column(type: "tinyint(1)", nullable: false), - Webhooks = table.Column(type: "longtext", maxLength: 2147483647, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Headers = table.Column(type: "longtext", maxLength: 2147483647, 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_AbpWebhooksSubscriptions", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpWebhooksSendAttempts", - 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"), - WebhookEventId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - WebhookSubscriptionId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Response = table.Column(type: "longtext", maxLength: 2147483647, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ResponseStatusCode = table.Column(type: "int", nullable: true), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpWebhooksSendAttempts", x => x.Id); - table.ForeignKey( - name: "FK_AbpWebhooksSendAttempts_AbpWebhooksEvents_WebhookEventId", - column: x => x.WebhookEventId, - principalTable: "AbpWebhooksEvents", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "IX_AbpWebhooksSendAttempts_WebhookEventId", - table: "AbpWebhooksSendAttempts", - column: "WebhookEventId"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AbpWebhooksSendAttempts"); - - migrationBuilder.DropTable( - name: "AbpWebhooksSubscriptions"); - - migrationBuilder.DropTable( - name: "AbpWebhooksEvents"); - } - } -} diff --git a/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/Migrations/20220409053632_Reset-Field-Secret-To-Not-Required.Designer.cs b/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/Migrations/20220409053632_Reset-Field-Secret-To-Not-Required.Designer.cs deleted file mode 100644 index 4cccc6706..000000000 --- a/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/Migrations/20220409053632_Reset-Field-Secret-To-Not-Required.Designer.cs +++ /dev/null @@ -1,162 +0,0 @@ -// -using System; -using LY.MicroService.WebhooksManagement.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.WebhooksManagement.Migrations -{ - [DbContext(typeof(WebhooksManagementMigrationsDbContext))] - [Migration("20220409053632_Reset-Field-Secret-To-Not-Required")] - partial class ResetFieldSecretToNotRequired - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "6.0.3") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookEventRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("Data") - .HasMaxLength(2147483647) - .HasColumnType("longtext") - .HasColumnName("Data"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.Property("WebhookName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("WebhookName"); - - b.HasKey("Id"); - - b.ToTable("AbpWebhooksEvents", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookSendRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("Response") - .HasMaxLength(2147483647) - .HasColumnType("longtext") - .HasColumnName("Response"); - - b.Property("ResponseStatusCode") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.Property("WebhookEventId") - .HasColumnType("char(36)"); - - b.Property("WebhookSubscriptionId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("WebhookEventId"); - - b.ToTable("AbpWebhooksSendAttempts", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookSubscription", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Headers") - .HasMaxLength(2147483647) - .HasColumnType("longtext") - .HasColumnName("Headers"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("Secret") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("Secret"); - - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.Property("WebhookUri") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("WebhookUri"); - - b.Property("Webhooks") - .HasMaxLength(2147483647) - .HasColumnType("longtext") - .HasColumnName("Webhooks"); - - b.HasKey("Id"); - - b.ToTable("AbpWebhooksSubscriptions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookSendRecord", b => - { - b.HasOne("LINGYUN.Abp.WebhooksManagement.WebhookEventRecord", "WebhookEvent") - .WithOne() - .HasForeignKey("LINGYUN.Abp.WebhooksManagement.WebhookSendRecord", "WebhookEventId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("WebhookEvent"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/Migrations/20220409053632_Reset-Field-Secret-To-Not-Required.cs b/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/Migrations/20220409053632_Reset-Field-Secret-To-Not-Required.cs deleted file mode 100644 index 822a65baf..000000000 --- a/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/Migrations/20220409053632_Reset-Field-Secret-To-Not-Required.cs +++ /dev/null @@ -1,47 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.WebhooksManagement.Migrations -{ - public partial class ResetFieldSecretToNotRequired : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "Secret", - table: "AbpWebhooksSubscriptions", - type: "varchar(128)", - maxLength: 128, - nullable: true, - oldClrType: typeof(string), - oldType: "varchar(128)", - oldMaxLength: 128) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.UpdateData( - table: "AbpWebhooksSubscriptions", - keyColumn: "Secret", - keyValue: null, - column: "Secret", - value: ""); - - migrationBuilder.AlterColumn( - name: "Secret", - table: "AbpWebhooksSubscriptions", - type: "varchar(128)", - maxLength: 128, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(128)", - oldMaxLength: 128, - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - } - } -} diff --git a/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/Migrations/20220413084629_Add-Field-Request-And-Response-Headers-With-SendAttempts.Designer.cs b/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/Migrations/20220413084629_Add-Field-Request-And-Response-Headers-With-SendAttempts.Designer.cs deleted file mode 100644 index 813c4b91e..000000000 --- a/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/Migrations/20220413084629_Add-Field-Request-And-Response-Headers-With-SendAttempts.Designer.cs +++ /dev/null @@ -1,172 +0,0 @@ -// -using System; -using LY.MicroService.WebhooksManagement.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.WebhooksManagement.Migrations -{ - [DbContext(typeof(WebhooksManagementMigrationsDbContext))] - [Migration("20220413084629_Add-Field-Request-And-Response-Headers-With-SendAttempts")] - partial class AddFieldRequestAndResponseHeadersWithSendAttempts - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "6.0.4") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookEventRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("Data") - .HasMaxLength(2147483647) - .HasColumnType("longtext") - .HasColumnName("Data"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.Property("WebhookName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("WebhookName"); - - b.HasKey("Id"); - - b.ToTable("AbpWebhooksEvents", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookSendRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("RequestHeaders") - .HasMaxLength(2147483647) - .HasColumnType("longtext") - .HasColumnName("RequestHeaders"); - - b.Property("Response") - .HasMaxLength(2147483647) - .HasColumnType("longtext") - .HasColumnName("Response"); - - b.Property("ResponseHeaders") - .HasMaxLength(2147483647) - .HasColumnType("longtext") - .HasColumnName("ResponseHeaders"); - - b.Property("ResponseStatusCode") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.Property("WebhookEventId") - .HasColumnType("char(36)"); - - b.Property("WebhookSubscriptionId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("WebhookEventId"); - - b.ToTable("AbpWebhooksSendAttempts", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookSubscription", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Headers") - .HasMaxLength(2147483647) - .HasColumnType("longtext") - .HasColumnName("Headers"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("Secret") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("Secret"); - - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.Property("WebhookUri") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("WebhookUri"); - - b.Property("Webhooks") - .HasMaxLength(2147483647) - .HasColumnType("longtext") - .HasColumnName("Webhooks"); - - b.HasKey("Id"); - - b.ToTable("AbpWebhooksSubscriptions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookSendRecord", b => - { - b.HasOne("LINGYUN.Abp.WebhooksManagement.WebhookEventRecord", "WebhookEvent") - .WithOne() - .HasForeignKey("LINGYUN.Abp.WebhooksManagement.WebhookSendRecord", "WebhookEventId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("WebhookEvent"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/Migrations/20220413084629_Add-Field-Request-And-Response-Headers-With-SendAttempts.cs b/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/Migrations/20220413084629_Add-Field-Request-And-Response-Headers-With-SendAttempts.cs deleted file mode 100644 index 8b63103b0..000000000 --- a/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/Migrations/20220413084629_Add-Field-Request-And-Response-Headers-With-SendAttempts.cs +++ /dev/null @@ -1,39 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.WebhooksManagement.Migrations -{ - public partial class AddFieldRequestAndResponseHeadersWithSendAttempts : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "RequestHeaders", - table: "AbpWebhooksSendAttempts", - type: "longtext", - maxLength: 2147483647, - nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "ResponseHeaders", - table: "AbpWebhooksSendAttempts", - type: "longtext", - maxLength: 2147483647, - nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "RequestHeaders", - table: "AbpWebhooksSendAttempts"); - - migrationBuilder.DropColumn( - name: "ResponseHeaders", - table: "AbpWebhooksSendAttempts"); - } - } -} diff --git a/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/Migrations/20220413110728_Add-Field-SendExactSameData-With-SendAttempts.Designer.cs b/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/Migrations/20220413110728_Add-Field-SendExactSameData-With-SendAttempts.Designer.cs deleted file mode 100644 index bc1d86085..000000000 --- a/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/Migrations/20220413110728_Add-Field-SendExactSameData-With-SendAttempts.Designer.cs +++ /dev/null @@ -1,175 +0,0 @@ -// -using System; -using LY.MicroService.WebhooksManagement.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.WebhooksManagement.Migrations -{ - [DbContext(typeof(WebhooksManagementMigrationsDbContext))] - [Migration("20220413110728_Add-Field-SendExactSameData-With-SendAttempts")] - partial class AddFieldSendExactSameDataWithSendAttempts - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "6.0.4") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookEventRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("Data") - .HasMaxLength(2147483647) - .HasColumnType("longtext") - .HasColumnName("Data"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.Property("WebhookName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("WebhookName"); - - b.HasKey("Id"); - - b.ToTable("AbpWebhooksEvents", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookSendRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("RequestHeaders") - .HasMaxLength(2147483647) - .HasColumnType("longtext") - .HasColumnName("RequestHeaders"); - - b.Property("Response") - .HasMaxLength(2147483647) - .HasColumnType("longtext") - .HasColumnName("Response"); - - b.Property("ResponseHeaders") - .HasMaxLength(2147483647) - .HasColumnType("longtext") - .HasColumnName("ResponseHeaders"); - - b.Property("ResponseStatusCode") - .HasColumnType("int"); - - b.Property("SendExactSameData") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.Property("WebhookEventId") - .HasColumnType("char(36)"); - - b.Property("WebhookSubscriptionId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("WebhookEventId"); - - b.ToTable("AbpWebhooksSendAttempts", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookSubscription", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Headers") - .HasMaxLength(2147483647) - .HasColumnType("longtext") - .HasColumnName("Headers"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("Secret") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("Secret"); - - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.Property("WebhookUri") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("WebhookUri"); - - b.Property("Webhooks") - .HasMaxLength(2147483647) - .HasColumnType("longtext") - .HasColumnName("Webhooks"); - - b.HasKey("Id"); - - b.ToTable("AbpWebhooksSubscriptions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookSendRecord", b => - { - b.HasOne("LINGYUN.Abp.WebhooksManagement.WebhookEventRecord", "WebhookEvent") - .WithOne() - .HasForeignKey("LINGYUN.Abp.WebhooksManagement.WebhookSendRecord", "WebhookEventId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("WebhookEvent"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/Migrations/20220413110728_Add-Field-SendExactSameData-With-SendAttempts.cs b/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/Migrations/20220413110728_Add-Field-SendExactSameData-With-SendAttempts.cs deleted file mode 100644 index 15e36d842..000000000 --- a/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/Migrations/20220413110728_Add-Field-SendExactSameData-With-SendAttempts.cs +++ /dev/null @@ -1,26 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.WebhooksManagement.Migrations -{ - public partial class AddFieldSendExactSameDataWithSendAttempts : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "SendExactSameData", - table: "AbpWebhooksSendAttempts", - type: "tinyint(1)", - nullable: false, - defaultValue: false); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "SendExactSameData", - table: "AbpWebhooksSendAttempts"); - } - } -} diff --git a/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/Migrations/WebhooksManagementMigrationsDbContextModelSnapshot.cs b/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/Migrations/WebhooksManagementMigrationsDbContextModelSnapshot.cs deleted file mode 100644 index 5911b2582..000000000 --- a/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/Migrations/WebhooksManagementMigrationsDbContextModelSnapshot.cs +++ /dev/null @@ -1,173 +0,0 @@ -// -using System; -using LY.MicroService.WebhooksManagement.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.WebhooksManagement.Migrations -{ - [DbContext(typeof(WebhooksManagementMigrationsDbContext))] - partial class WebhooksManagementMigrationsDbContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "6.0.4") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookEventRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("Data") - .HasMaxLength(2147483647) - .HasColumnType("longtext") - .HasColumnName("Data"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.Property("WebhookName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("WebhookName"); - - b.HasKey("Id"); - - b.ToTable("AbpWebhooksEvents", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookSendRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("RequestHeaders") - .HasMaxLength(2147483647) - .HasColumnType("longtext") - .HasColumnName("RequestHeaders"); - - b.Property("Response") - .HasMaxLength(2147483647) - .HasColumnType("longtext") - .HasColumnName("Response"); - - b.Property("ResponseHeaders") - .HasMaxLength(2147483647) - .HasColumnType("longtext") - .HasColumnName("ResponseHeaders"); - - b.Property("ResponseStatusCode") - .HasColumnType("int"); - - b.Property("SendExactSameData") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.Property("WebhookEventId") - .HasColumnType("char(36)"); - - b.Property("WebhookSubscriptionId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("WebhookEventId"); - - b.ToTable("AbpWebhooksSendAttempts", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookSubscription", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Headers") - .HasMaxLength(2147483647) - .HasColumnType("longtext") - .HasColumnName("Headers"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("Secret") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("Secret"); - - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.Property("WebhookUri") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("WebhookUri"); - - b.Property("Webhooks") - .HasMaxLength(2147483647) - .HasColumnType("longtext") - .HasColumnName("Webhooks"); - - b.HasKey("Id"); - - b.ToTable("AbpWebhooksSubscriptions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookSendRecord", b => - { - b.HasOne("LINGYUN.Abp.WebhooksManagement.WebhookEventRecord", "WebhookEvent") - .WithOne() - .HasForeignKey("LINGYUN.Abp.WebhooksManagement.WebhookSendRecord", "WebhookEventId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("WebhookEvent"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/WebhooksManagementHttpApiHostModule.Configure.cs b/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/WebhooksManagementHttpApiHostModule.Configure.cs index 1871e9ea9..77008bdb7 100644 --- a/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/WebhooksManagementHttpApiHostModule.Configure.cs +++ b/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/WebhooksManagementHttpApiHostModule.Configure.cs @@ -60,7 +60,7 @@ public partial class WebhooksManagementHttpApiHostModule PreConfigure(options => { // 以开放端口区别 - options.SnowflakeIdOptions.WorkerId = 30045; + options.SnowflakeIdOptions.WorkerId = 28; options.SnowflakeIdOptions.WorkerIdBits = 5; options.SnowflakeIdOptions.DatacenterId = 1; }); diff --git a/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/WebhooksManagementHttpApiHostModule.cs b/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/WebhooksManagementHttpApiHostModule.cs index 05c6ad7a8..334cd6be8 100644 --- a/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/WebhooksManagementHttpApiHostModule.cs +++ b/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/WebhooksManagementHttpApiHostModule.cs @@ -19,6 +19,7 @@ using LINGYUN.Abp.Webhooks.Identity; using LINGYUN.Abp.Webhooks.Saas; using LINGYUN.Abp.WebhooksManagement; using LINGYUN.Abp.WebhooksManagement.EntityFrameworkCore; +using LY.MicroService.WebhooksManagement.EntityFrameworkCore; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.DependencyInjection; @@ -55,6 +56,12 @@ namespace LY.MicroService.WebhooksManagement; typeof(AbpBackgroundTasksDistributedLockingModule), typeof(AbpBackgroundTasksExceptionHandlingModule), typeof(TaskManagementEntityFrameworkCoreModule), + typeof(AbpSaasEntityFrameworkCoreModule), + typeof(AbpFeatureManagementEntityFrameworkCoreModule), + typeof(AbpPermissionManagementEntityFrameworkCoreModule), + typeof(AbpSettingManagementEntityFrameworkCoreModule), + typeof(AbpLocalizationManagementEntityFrameworkCoreModule), + typeof(WebhooksManagementMigrationsEntityFrameworkCoreModule), typeof(AbpEntityFrameworkCoreMySQLModule), typeof(AbpAspNetCoreAuthenticationJwtBearerModule), typeof(AbpAuthorizationOrganizationUnitsModule), @@ -63,11 +70,6 @@ namespace LY.MicroService.WebhooksManagement; typeof(AbpHttpClientIdentityModelWebModule), typeof(AbpAspNetCoreMultiTenancyModule), typeof(AbpAspNetCoreMvcLocalizationModule), - typeof(AbpSaasEntityFrameworkCoreModule), - typeof(AbpFeatureManagementEntityFrameworkCoreModule), - typeof(AbpPermissionManagementEntityFrameworkCoreModule), - typeof(AbpSettingManagementEntityFrameworkCoreModule), - typeof(AbpLocalizationManagementEntityFrameworkCoreModule), typeof(AbpCachingStackExchangeRedisModule), typeof(AbpDistributedLockingModule), typeof(AbpSwashbuckleModule), diff --git a/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/EntityFrameworkCore/WorkflowManagementMigrationsDbContext.cs b/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/EntityFrameworkCore/WorkflowManagementMigrationsDbContext.cs deleted file mode 100644 index 999446046..000000000 --- a/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/EntityFrameworkCore/WorkflowManagementMigrationsDbContext.cs +++ /dev/null @@ -1,21 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using Volo.Abp.EntityFrameworkCore; - -namespace LY.MicroService.WorkflowManagement.EntityFrameworkCore; - -public class WorkflowManagementMigrationsDbContext : AbpDbContext -{ - public WorkflowManagementMigrationsDbContext(DbContextOptions options) - : base(options) - { - - } - - protected override void OnModelCreating(ModelBuilder modelBuilder) - { - base.OnModelCreating(modelBuilder); - - // modelBuilder.ConfigureWorkflow(); - //modelBuilder.ConfigureWorkflowManagement(); - } -} diff --git a/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/WorkflowEngineManager.cs b/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/WorkflowEngineManager.cs deleted file mode 100644 index 41e794a02..000000000 --- a/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/WorkflowEngineManager.cs +++ /dev/null @@ -1,58 +0,0 @@ -using LINGYUN.Abp.Data.DbMigrator; -using Microsoft.EntityFrameworkCore; -using Microsoft.Extensions.Logging; -using System.Threading; -using System.Threading.Tasks; -using Volo.Abp.DependencyInjection; - -namespace LY.MicroService.WorkflowManagement; - -//public class WorkflowEngineManager : IWorkflowEngineManager, ISingletonDependency -//{ -// private readonly IWorkflowHost _workflowHost; -// private readonly IDbSchemaMigrator _dbSchemaMigrator; - -// private readonly ILogger _logger; -// public WorkflowEngineManager( -// IWorkflowHost workflowHost, -// IDbSchemaMigrator dbSchemaMigrator, -// ILogger logger) -// { -// _logger = logger; -// _workflowHost = workflowHost; -// _dbSchemaMigrator = dbSchemaMigrator; -// } - -// public async Task InitializeAsync(CancellationToken cancellationToken = default) -// { -// _logger.LogInformation("Migrating workflow core context..."); -// await _dbSchemaMigrator.MigrateAsync( -// (connectionString, builder) => -// { -// builder.UseMySql(connectionString, ServerVersion.AutoDetect(connectionString)); - -// return new WorkflowDbContext(builder.Options); -// }); -// _logger.LogInformation("Migrated workflow core context."); - -// _logger.LogInformation("Migrating workflow management context..."); -// await _dbSchemaMigrator.MigrateAsync( -// (connectionString, builder) => -// { -// builder.UseMySql(connectionString, ServerVersion.AutoDetect(connectionString)); - -// return new WorkflowManagementDbContext(builder.Options); -// }); -// _logger.LogInformation("Migrated workflow management context."); -// } - -// public async Task StartAsync(CancellationToken cancellationToken = default) -// { -// await _workflowHost.StartAsync(cancellationToken); -// } - -// public async Task StopAsync(CancellationToken cancellationToken = default) -// { -// await _workflowHost.StopAsync(cancellationToken); -// } -//} diff --git a/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/WorkflowManagementHttpApiHostModule.Configure.cs b/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/WorkflowManagementHttpApiHostModule.Configure.cs index 53b47a7a2..b9ccd28fb 100644 --- a/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/WorkflowManagementHttpApiHostModule.Configure.cs +++ b/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/WorkflowManagementHttpApiHostModule.Configure.cs @@ -8,6 +8,7 @@ using LINGYUN.Abp.ExceptionHandling; using LINGYUN.Abp.ExceptionHandling.Emailing; using LINGYUN.Abp.Localization.CultureMap; using LINGYUN.Abp.Serilog.Enrichers.Application; +using LINGYUN.Abp.Serilog.Enrichers.UniqueId; using Medallion.Threading; using Medallion.Threading.Redis; using Microsoft.AspNetCore.Authentication.JwtBearer; @@ -59,6 +60,14 @@ public partial class WorkflowManagementHttpApiHostModule private void PreConfigureApp() { AbpSerilogEnrichersConsts.ApplicationName = ApplicationName; + + PreConfigure(options => + { + // 以开放端口区别 + options.SnowflakeIdOptions.WorkerId = 29; + options.SnowflakeIdOptions.WorkerIdBits = 5; + options.SnowflakeIdOptions.DatacenterId = 1; + }); } diff --git a/aspnet-core/services/LY.MicroService.identityServer.HttpApi.Host/IdentityServerHttpApiHostModule.Configure.cs b/aspnet-core/services/LY.MicroService.identityServer.HttpApi.Host/IdentityServerHttpApiHostModule.Configure.cs index 8350b576e..70dbdf4a9 100644 --- a/aspnet-core/services/LY.MicroService.identityServer.HttpApi.Host/IdentityServerHttpApiHostModule.Configure.cs +++ b/aspnet-core/services/LY.MicroService.identityServer.HttpApi.Host/IdentityServerHttpApiHostModule.Configure.cs @@ -58,7 +58,7 @@ public partial class IdentityServerHttpApiHostModule PreConfigure(options => { // 以开放端口区别,应在0-31之间 - options.SnowflakeIdOptions.WorkerId = 30015 - 30000; + options.SnowflakeIdOptions.WorkerId = 15; options.SnowflakeIdOptions.WorkerIdBits = 5; options.SnowflakeIdOptions.DatacenterId = 1; }); diff --git a/aspnet-core/services/LY.MicroService.identityServer/DataSeeder/IWeChatResourceDataSeeder.cs b/aspnet-core/services/LY.MicroService.identityServer/DataSeeder/IWeChatResourceDataSeeder.cs deleted file mode 100644 index d24875ba7..000000000 --- a/aspnet-core/services/LY.MicroService.identityServer/DataSeeder/IWeChatResourceDataSeeder.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System.Threading.Tasks; - -namespace LY.MicroService.IdentityServer -{ - public interface IWeChatResourceDataSeeder - { - Task CreateStandardResourcesAsync(); - } -} diff --git a/aspnet-core/services/LY.MicroService.identityServer/DataSeeder/IdentityServerDataSeedContributor.cs b/aspnet-core/services/LY.MicroService.identityServer/DataSeeder/IdentityServerDataSeedContributor.cs deleted file mode 100644 index 66c3c6fc5..000000000 --- a/aspnet-core/services/LY.MicroService.identityServer/DataSeeder/IdentityServerDataSeedContributor.cs +++ /dev/null @@ -1,321 +0,0 @@ -using LINGYUN.Abp.IdentityServer.IdentityResources; -using Microsoft.Extensions.Configuration; -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Threading.Tasks; -using Volo.Abp.Authorization.Permissions; -using Volo.Abp.Data; -using Volo.Abp.DependencyInjection; -using Volo.Abp.Guids; -using Volo.Abp.IdentityServer.ApiResources; -using Volo.Abp.IdentityServer.ApiScopes; -using Volo.Abp.IdentityServer.Clients; -using Volo.Abp.IdentityServer.IdentityResources; -using Volo.Abp.MultiTenancy; -using Volo.Abp.PermissionManagement; -using Volo.Abp.Uow; - -namespace LY.MicroService.IdentityServer.DataSeeder; - -public class IdentityServerDataSeedContributor : IDataSeedContributor, ITransientDependency -{ - private readonly IApiResourceRepository _apiResourceRepository; - private readonly IApiScopeRepository _apiScopeRepository; - private readonly IClientRepository _clientRepository; - private readonly ICustomIdentityResourceDataSeeder _customIdentityResourceDataSeeder; - private readonly IIdentityResourceDataSeeder _identityResourceDataSeeder; - private readonly IWeChatResourceDataSeeder _weChatResourceDataSeeder; - private readonly IGuidGenerator _guidGenerator; - private readonly IPermissionDataSeeder _permissionDataSeeder; - private readonly IConfiguration _configuration; - private readonly ICurrentTenant _currentTenant; - - public IdentityServerDataSeedContributor( - IClientRepository clientRepository, - IApiScopeRepository apiScopeRepository, - IPermissionDataSeeder permissionDataSeeder, - IApiResourceRepository apiResourceRepository, - IWeChatResourceDataSeeder weChatResourceDataSeeder, - IIdentityResourceDataSeeder identityResourceDataSeeder, - ICustomIdentityResourceDataSeeder customIdentityResourceDataSeeder, - IGuidGenerator guidGenerator, - ICurrentTenant currentTenant) - { - _currentTenant = currentTenant; - _clientRepository = clientRepository; - _permissionDataSeeder = permissionDataSeeder; - _apiScopeRepository = apiScopeRepository; - _apiResourceRepository = apiResourceRepository; - _weChatResourceDataSeeder = weChatResourceDataSeeder; - _identityResourceDataSeeder = identityResourceDataSeeder; - _customIdentityResourceDataSeeder = customIdentityResourceDataSeeder; - _guidGenerator = guidGenerator; - var env = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT") ?? "Development"; - var configuration = new ConfigurationBuilder() - .SetBasePath(Directory.GetCurrentDirectory()) - .AddJsonFile($"appsettings.{env}.json", optional: false, reloadOnChange: true) - .AddEnvironmentVariables() - .Build(); - _configuration = configuration; - } - - [UnitOfWork] - public async virtual Task SeedAsync(DataSeedContext context) - { - using (_currentTenant.Change(context?.TenantId)) - { - await _identityResourceDataSeeder.CreateStandardResourcesAsync(); - await _customIdentityResourceDataSeeder.CreateCustomResourcesAsync(); - await CreateWeChatClaimTypeAsync(); - await CreateApiResourcesAsync(); - await CreateApiScopesAsync(); - await CreateClientsAsync(); - } - } - - private async Task CreateWeChatClaimTypeAsync() - { - await _weChatResourceDataSeeder.CreateStandardResourcesAsync(); - } - - private async Task CreateApiScopesAsync() - { - await CreateApiScopeAsync("lingyun-abp-application"); - } - - private async Task CreateApiResourcesAsync() - { - var commonApiUserClaims = new[] - { - "email", - "email_verified", - "name", - "phone_number", - "phone_number_verified", - "role" - }; - - await CreateApiResourceAsync("lingyun-abp-application", commonApiUserClaims); - } - - private async Task CreateApiResourceAsync(string name, IEnumerable claims, IEnumerable secrets = null) - { - var apiResource = await _apiResourceRepository.FindByNameAsync(name); - if (apiResource == null) - { - apiResource = await _apiResourceRepository.InsertAsync( - new ApiResource( - _guidGenerator.Create(), - name, - name + " API" - ), - autoSave: true - ); - } - - foreach (var claim in claims) - { - if (apiResource.FindClaim(claim) == null) - { - apiResource.AddUserClaim(claim); - } - } - if (secrets != null) - { - foreach (var secret in secrets) - { - if (apiResource.FindSecret(secret) == null) - { - apiResource.AddSecret(secret); - } - } - } - - return await _apiResourceRepository.UpdateAsync(apiResource); - } - - private async Task CreateApiScopeAsync(string name) - { - var apiScope = await _apiScopeRepository.FindByNameAsync(name); - if (apiScope == null) - { - apiScope = await _apiScopeRepository.InsertAsync( - new ApiScope( - _guidGenerator.Create(), - name, - name + " API" - ), - autoSave: true - ); - } - - return apiScope; - } - - private async Task CreateClientsAsync() - { - - string commonSecret = IdentityServer4.Models.HashExtensions.Sha256("1q2w3e*"); - - var commonScopes = new[] - { - "email", - "openid", - "profile", - "role", - "phone", - "address", - "offline_access" // 加上刷新, - - }; - - var configurationSection = _configuration.GetSection("IdentityServer:Clients"); - - //Web Client - var webClientId = configurationSection["AuthManagement:ClientId"]; - if (!webClientId.IsNullOrWhiteSpace()) - { - var webClientRootUrl = configurationSection["AuthManagement:RootUrl"].EnsureEndsWith('/'); - await CreateClientAsync( - webClientId, - commonScopes.Union(new[] { "lingyun-abp-application" }), - new[] { "hybrid" }, - commonSecret, - redirectUri: $"{webClientRootUrl}signin-oidc", - postLogoutRedirectUri: $"{webClientRootUrl}signout-callback-oidc", - corsOrigins: configurationSection["CorsOrigins"] - ); - } - - var vueClientId = configurationSection["AuthVueAdmin:ClientId"]; - if (!vueClientId.IsNullOrWhiteSpace()) - { - await CreateClientAsync( - vueClientId, - commonScopes.Union(new[] { "lingyun-abp-application" }), - new[] { "password", "client_credentials" }, - commonSecret - ); - } - var vueOldClientId = configurationSection["AuthOldVueAdmin:ClientId"]; - if (!vueOldClientId.IsNullOrWhiteSpace()) - { - await CreateClientAsync( - vueOldClientId, - commonScopes.Union(new[] { "lingyun-abp-application" }), - new[] { "password", "client_credentials" }, - commonSecret - ); - } - - // InternalService 内部服务间通讯客户端,必要的话需要在前端指定它拥有所有权限,当前项目仅预置用户查询权限 - var internalServiceClientId = configurationSection["InternalService:ClientId"]; - if (!internalServiceClientId.IsNullOrWhiteSpace()) - { - var internalServicePermissions = new string[2] - { - "AbpIdentity.UserLookup","AbpIdentity.Users" - }; - await CreateClientAsync( - internalServiceClientId, - commonScopes.Union(new[] { "lingyun-abp-application" }), - new[] { "client_credentials" }, - commonSecret, - permissions: internalServicePermissions - ); - } - } - - private async Task CreateClientAsync( - string name, - IEnumerable scopes, - IEnumerable grantTypes, - string secret, - string redirectUri = null, - string postLogoutRedirectUri = null, - IEnumerable permissions = null, - string corsOrigins = null) - { - var client = await _clientRepository.FindByClientIdAsync(name); - if (client == null) - { - client = await _clientRepository.InsertAsync( - new Client( - _guidGenerator.Create(), - name - ) - { - ClientName = name, - ProtocolType = "oidc", - Description = name, - AlwaysIncludeUserClaimsInIdToken = true, - AllowOfflineAccess = true, - AbsoluteRefreshTokenLifetime = 10800, //3 hours - AccessTokenLifetime = 7200, //2 hours - AuthorizationCodeLifetime = 300, - IdentityTokenLifetime = 300, - RequireConsent = false - }, - autoSave: true - ); - } - - foreach (var scope in scopes) - { - if (client.FindScope(scope) == null) - { - client.AddScope(scope); - } - } - - foreach (var grantType in grantTypes) - { - if (client.FindGrantType(grantType) == null) - { - client.AddGrantType(grantType); - } - } - - if (client.FindSecret(secret) == null) - { - client.AddSecret(secret); - } - - if (redirectUri != null) - { - if (client.FindRedirectUri(redirectUri) == null) - { - client.AddRedirectUri(redirectUri); - } - } - - if (postLogoutRedirectUri != null) - { - if (client.FindPostLogoutRedirectUri(postLogoutRedirectUri) == null) - { - client.AddPostLogoutRedirectUri(postLogoutRedirectUri); - } - } - - if (corsOrigins != null) - { - var corsOriginsSplit = corsOrigins.Split(";"); - foreach (var corsOrigin in corsOriginsSplit) - { - if (client.FindCorsOrigin(corsOrigin) == null) - { - client.AddCorsOrigin(corsOrigin); - } - } - } - - if (permissions != null) - { - await _permissionDataSeeder.SeedAsync(ClientPermissionValueProvider.ProviderName, name, permissions); - } - - return await _clientRepository.UpdateAsync(client); - } -} diff --git a/aspnet-core/services/LY.MicroService.identityServer/DataSeeder/WeChatResourceDataSeeder.cs b/aspnet-core/services/LY.MicroService.identityServer/DataSeeder/WeChatResourceDataSeeder.cs deleted file mode 100644 index 32ef5b10c..000000000 --- a/aspnet-core/services/LY.MicroService.identityServer/DataSeeder/WeChatResourceDataSeeder.cs +++ /dev/null @@ -1,86 +0,0 @@ -using LINGYUN.Abp.WeChat; -using LINGYUN.Abp.WeChat.Security.Claims; -using System.Threading.Tasks; -using Volo.Abp.DependencyInjection; -using Volo.Abp.Guids; -using Volo.Abp.Identity; -using Volo.Abp.IdentityServer.IdentityResources; - -namespace LY.MicroService.IdentityServer -{ - public class WeChatResourceDataSeeder : IWeChatResourceDataSeeder, ITransientDependency - { - protected IIdentityClaimTypeRepository ClaimTypeRepository { get; } - protected IIdentityResourceRepository IdentityResourceRepository { get; } - protected IGuidGenerator GuidGenerator { get; } - - public WeChatResourceDataSeeder( - IIdentityResourceRepository identityResourceRepository, - IGuidGenerator guidGenerator, - IIdentityClaimTypeRepository claimTypeRepository) - { - IdentityResourceRepository = identityResourceRepository; - GuidGenerator = guidGenerator; - ClaimTypeRepository = claimTypeRepository; - } - - public async virtual Task CreateStandardResourcesAsync() - { - var wechatClaimTypes = new string[] - { - AbpWeChatClaimTypes.AvatarUrl, - AbpWeChatClaimTypes.City, - AbpWeChatClaimTypes.Country, - AbpWeChatClaimTypes.NickName, - AbpWeChatClaimTypes.OpenId, - AbpWeChatClaimTypes.Privilege, - AbpWeChatClaimTypes.Province, - AbpWeChatClaimTypes.Sex, - AbpWeChatClaimTypes.UnionId - }; - - var wechatResource = new IdentityServer4.Models.IdentityResource( - AbpWeChatGlobalConsts.ProfileKey, - AbpWeChatGlobalConsts.DisplayName, - wechatClaimTypes); - - foreach (var claimType in wechatClaimTypes) - { - await AddClaimTypeIfNotExistsAsync(claimType); - } - - await AddIdentityResourceIfNotExistsAsync(wechatResource); - } - - protected async virtual Task AddIdentityResourceIfNotExistsAsync(IdentityServer4.Models.IdentityResource resource) - { - if (await IdentityResourceRepository.CheckNameExistAsync(resource.Name)) - { - return; - } - - await IdentityResourceRepository.InsertAsync( - new IdentityResource( - GuidGenerator.Create(), - resource - ) - ); - } - - protected async virtual Task AddClaimTypeIfNotExistsAsync(string claimType) - { - if (await ClaimTypeRepository.AnyAsync(claimType)) - { - return; - } - - await ClaimTypeRepository.InsertAsync( - new IdentityClaimType( - GuidGenerator.Create(), - claimType, - isStatic: true - ) - ); - } - } -} diff --git a/aspnet-core/services/LY.MicroService.identityServer/EntityFrameworkCore/IdentityServertMigrationsDbContext.cs b/aspnet-core/services/LY.MicroService.identityServer/EntityFrameworkCore/IdentityServertMigrationsDbContext.cs deleted file mode 100644 index 4525eaacf..000000000 --- a/aspnet-core/services/LY.MicroService.identityServer/EntityFrameworkCore/IdentityServertMigrationsDbContext.cs +++ /dev/null @@ -1,23 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using Volo.Abp.EntityFrameworkCore; -using Volo.Abp.Identity.EntityFrameworkCore; -using Volo.Abp.IdentityServer.EntityFrameworkCore; - -namespace LY.MicroService.IdentityServer.EntityFrameworkCore; - -public class IdentityServertMigrationsDbContext : AbpDbContext -{ - public IdentityServertMigrationsDbContext(DbContextOptions options) - : base(options) - { - - } - - protected override void OnModelCreating(ModelBuilder modelBuilder) - { - base.OnModelCreating(modelBuilder); - - modelBuilder.ConfigureIdentity(); - modelBuilder.ConfigureIdentityServer(); - } -} diff --git a/aspnet-core/services/LY.MicroService.identityServer/EventBus/Handlers/TenantSynchronizer.cs b/aspnet-core/services/LY.MicroService.identityServer/EventBus/Handlers/TenantSynchronizer.cs index 97e0ed373..e0724495b 100644 --- a/aspnet-core/services/LY.MicroService.identityServer/EventBus/Handlers/TenantSynchronizer.cs +++ b/aspnet-core/services/LY.MicroService.identityServer/EventBus/Handlers/TenantSynchronizer.cs @@ -54,12 +54,12 @@ public class TenantSynchronizer : IDistributedEventHandler, ITr { Logger.LogInformation("Migrating the new tenant database with AuthServer..."); // 迁移租户数据 - await DbSchemaMigrator.MigrateAsync( + await DbSchemaMigrator.MigrateAsync( (connectionString, builder) => { builder.UseMySql(connectionString, ServerVersion.AutoDetect(connectionString)); - return new IdentityServertMigrationsDbContext(builder.Options); + return new IdentityServerMigrationsDbContext(builder.Options); }); Logger.LogInformation("Migrated the new tenant database with AuthServer."); diff --git a/aspnet-core/services/LY.MicroService.identityServer/IdentityServerModule.cs b/aspnet-core/services/LY.MicroService.identityServer/IdentityServerModule.cs index 712daf95f..05c627beb 100644 --- a/aspnet-core/services/LY.MicroService.identityServer/IdentityServerModule.cs +++ b/aspnet-core/services/LY.MicroService.identityServer/IdentityServerModule.cs @@ -17,6 +17,7 @@ using LINGYUN.Abp.Saas.EntityFrameworkCore; using LINGYUN.Abp.Serilog.Enrichers.Application; using LINGYUN.Abp.Serilog.Enrichers.UniqueId; using LINGYUN.Abp.Sms.Aliyun; +using LY.MicroService.IdentityServer.EntityFrameworkCore; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.DependencyInjection; @@ -63,6 +64,7 @@ namespace LY.MicroService.IdentityServer; typeof(AbpSettingManagementEntityFrameworkCoreModule), typeof(AbpFeatureManagementEntityFrameworkCoreModule), typeof(AbpSaasEntityFrameworkCoreModule), + typeof(IdentityServerMigrationsEntityFrameworkCoreModule), typeof(AbpDataDbMigratorModule), typeof(AbpAspNetCoreAuthenticationJwtBearerModule), typeof(AbpAuditLoggingElasticsearchModule), // 放在 AbpIdentity 模块之后,避免被覆盖 diff --git a/aspnet-core/services/LY.MicroService.identityServer/LY.MicroService.IdentityServer.csproj b/aspnet-core/services/LY.MicroService.identityServer/LY.MicroService.IdentityServer.csproj index ef7fa1c3b..d1f112fb7 100644 --- a/aspnet-core/services/LY.MicroService.identityServer/LY.MicroService.IdentityServer.csproj +++ b/aspnet-core/services/LY.MicroService.identityServer/LY.MicroService.IdentityServer.csproj @@ -41,6 +41,7 @@ + diff --git a/aspnet-core/services/LY.MicroService.identityServer/Migrations/20211030124247_Re-Initlize-Db-Migration.Designer.cs b/aspnet-core/services/LY.MicroService.identityServer/Migrations/20211030124247_Re-Initlize-Db-Migration.Designer.cs deleted file mode 100644 index 190a4f9cb..000000000 --- a/aspnet-core/services/LY.MicroService.identityServer/Migrations/20211030124247_Re-Initlize-Db-Migration.Designer.cs +++ /dev/null @@ -1,1774 +0,0 @@ -// -using System; -using LY.MicroService.IdentityServer.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -namespace LY.MicroService.IdentityServer.Migrations -{ - [DbContext(typeof(IdentityServertMigrationsDbContext))] - [Migration("20211030124247_Re-Initlize-Db-Migration")] - partial class ReInitlizeDbMigration - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("Relational:MaxIdentifierLength", 64) - .HasAnnotation("ProductVersion", "5.0.11"); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Description") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("Regex") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("RegexDescription") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Required") - .HasColumnType("tinyint(1)"); - - b.Property("ValueType") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("AbpClaimTypes"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("SourceTenantId") - .HasColumnType("char(36)"); - - b.Property("SourceUserId") - .HasColumnType("char(36)"); - - b.Property("TargetTenantId") - .HasColumnType("char(36)"); - - b.Property("TargetUserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") - .IsUnique(); - - b.ToTable("AbpLinkUsers"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDefault") - .HasColumnType("tinyint(1)") - .HasColumnName("IsDefault"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)") - .HasColumnName("IsPublic"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)") - .HasColumnName("IsStatic"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("NormalizedName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName"); - - b.ToTable("AbpRoles"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("ClaimType") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ClaimValue") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AbpRoleClaims"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Action") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("ApplicationName") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("BrowserInfo") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("ClientId") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ClientIpAddress") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CorrelationId") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Identity") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TenantName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Action"); - - b.HasIndex("TenantId", "ApplicationName"); - - b.HasIndex("TenantId", "Identity"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AbpSecurityLogs"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AccessFailedCount") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("AccessFailedCount"); - - b.Property("AvatarUrl") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Email") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("Email"); - - b.Property("EmailConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("EmailConfirmed"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsExternal") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsExternal"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LockoutEnabled") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("LockoutEnabled"); - - b.Property("LockoutEnd") - .HasColumnType("datetime(6)"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("NormalizedEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("NormalizedEmail"); - - b.Property("NormalizedUserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("NormalizedUserName"); - - b.Property("PasswordHash") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("PasswordHash"); - - b.Property("PhoneNumber") - .HasMaxLength(16) - .HasColumnType("varchar(16)") - .HasColumnName("PhoneNumber"); - - b.Property("PhoneNumberConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("PhoneNumberConfirmed"); - - b.Property("SecurityStamp") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("SecurityStamp"); - - b.Property("Surname") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Surname"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TwoFactorEnabled") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("TwoFactorEnabled"); - - b.Property("UserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("UserName"); - - b.HasKey("Id"); - - b.HasIndex("Email"); - - b.HasIndex("NormalizedEmail"); - - b.HasIndex("NormalizedUserName"); - - b.HasIndex("UserName"); - - b.ToTable("AbpUsers"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("ClaimType") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ClaimValue") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AbpUserClaims"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("LoginProvider") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderDisplayName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .IsRequired() - .HasMaxLength(196) - .HasColumnType("varchar(196)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("UserId", "LoginProvider"); - - b.HasIndex("LoginProvider", "ProviderKey"); - - b.ToTable("AbpUserLogins"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => - { - b.Property("OrganizationUnitId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("OrganizationUnitId", "UserId"); - - b.HasIndex("UserId", "OrganizationUnitId"); - - b.ToTable("AbpUserOrganizationUnits"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId", "UserId"); - - b.ToTable("AbpUserRoles"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("LoginProvider") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Name") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Value") - .HasColumnType("longtext"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AbpUserTokens"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(95) - .HasColumnType("varchar(95)") - .HasColumnName("Code"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Code"); - - b.HasIndex("ParentId"); - - b.ToTable("AbpOrganizationUnits"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => - { - b.Property("OrganizationUnitId") - .HasColumnType("char(36)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("OrganizationUnitId", "RoleId"); - - b.HasIndex("RoleId", "OrganizationUnitId"); - - b.ToTable("AbpOrganizationUnitRoles"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowedAccessTokenSigningAlgorithms") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); - - b.Property("DisplayName") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("ShowInDiscoveryDocument") - .HasColumnType("tinyint(1)"); - - b.HasKey("Id"); - - b.ToTable("IdentityServerApiResources"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => - { - b.Property("ApiResourceId") - .HasColumnType("char(36)"); - - b.Property("Type") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("ApiResourceId", "Type"); - - b.ToTable("IdentityServerApiResourceClaims"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b => - { - b.Property("ApiResourceId") - .HasColumnType("char(36)"); - - b.Property("Key") - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.Property("Value") - .HasMaxLength(300) - .HasColumnType("varchar(300)"); - - b.HasKey("ApiResourceId", "Key", "Value"); - - b.ToTable("IdentityServerApiResourceProperties"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceScope", b => - { - b.Property("ApiResourceId") - .HasColumnType("char(36)"); - - b.Property("Scope") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("ApiResourceId", "Scope"); - - b.ToTable("IdentityServerApiResourceScopes"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceSecret", b => - { - b.Property("ApiResourceId") - .HasColumnType("char(36)"); - - b.Property("Type") - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.Property("Value") - .HasMaxLength(300) - .HasColumnType("varchar(300)"); - - b.Property("Description") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); - - b.Property("Expiration") - .HasColumnType("datetime(6)"); - - b.HasKey("ApiResourceId", "Type", "Value"); - - b.ToTable("IdentityServerApiResourceSecrets"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScope", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); - - b.Property("DisplayName") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Emphasize") - .HasColumnType("tinyint(1)"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Required") - .HasColumnType("tinyint(1)"); - - b.Property("ShowInDiscoveryDocument") - .HasColumnType("tinyint(1)"); - - b.HasKey("Id"); - - b.ToTable("IdentityServerApiScopes"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeClaim", b => - { - b.Property("ApiScopeId") - .HasColumnType("char(36)"); - - b.Property("Type") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("ApiScopeId", "Type"); - - b.ToTable("IdentityServerApiScopeClaims"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeProperty", b => - { - b.Property("ApiScopeId") - .HasColumnType("char(36)"); - - b.Property("Key") - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.Property("Value") - .HasMaxLength(300) - .HasColumnType("varchar(300)"); - - b.HasKey("ApiScopeId", "Key", "Value"); - - b.ToTable("IdentityServerApiScopeProperties"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AbsoluteRefreshTokenLifetime") - .HasColumnType("int"); - - b.Property("AccessTokenLifetime") - .HasColumnType("int"); - - b.Property("AccessTokenType") - .HasColumnType("int"); - - b.Property("AllowAccessTokensViaBrowser") - .HasColumnType("tinyint(1)"); - - b.Property("AllowOfflineAccess") - .HasColumnType("tinyint(1)"); - - b.Property("AllowPlainTextPkce") - .HasColumnType("tinyint(1)"); - - b.Property("AllowRememberConsent") - .HasColumnType("tinyint(1)"); - - b.Property("AllowedIdentityTokenSigningAlgorithms") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("AlwaysIncludeUserClaimsInIdToken") - .HasColumnType("tinyint(1)"); - - b.Property("AlwaysSendClientClaims") - .HasColumnType("tinyint(1)"); - - b.Property("AuthorizationCodeLifetime") - .HasColumnType("int"); - - b.Property("BackChannelLogoutSessionRequired") - .HasColumnType("tinyint(1)"); - - b.Property("BackChannelLogoutUri") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)"); - - b.Property("ClientClaimsPrefix") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("ClientId") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("ClientName") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("ClientUri") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ConsentLifetime") - .HasColumnType("int"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); - - b.Property("DeviceCodeLifetime") - .HasColumnType("int"); - - b.Property("EnableLocalLogin") - .HasColumnType("tinyint(1)"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("FrontChannelLogoutSessionRequired") - .HasColumnType("tinyint(1)"); - - b.Property("FrontChannelLogoutUri") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)"); - - b.Property("IdentityTokenLifetime") - .HasColumnType("int"); - - b.Property("IncludeJwtId") - .HasColumnType("tinyint(1)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LogoUri") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)"); - - b.Property("PairWiseSubjectSalt") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("ProtocolType") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("RefreshTokenExpiration") - .HasColumnType("int"); - - b.Property("RefreshTokenUsage") - .HasColumnType("int"); - - b.Property("RequireClientSecret") - .HasColumnType("tinyint(1)"); - - b.Property("RequireConsent") - .HasColumnType("tinyint(1)"); - - b.Property("RequirePkce") - .HasColumnType("tinyint(1)"); - - b.Property("RequireRequestObject") - .HasColumnType("tinyint(1)"); - - b.Property("SlidingRefreshTokenLifetime") - .HasColumnType("int"); - - b.Property("UpdateAccessTokenClaimsOnRefresh") - .HasColumnType("tinyint(1)"); - - b.Property("UserCodeType") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("UserSsoLifetime") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("ClientId"); - - b.ToTable("IdentityServerClients"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b => - { - b.Property("ClientId") - .HasColumnType("char(36)"); - - b.Property("Type") - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.Property("Value") - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.HasKey("ClientId", "Type", "Value"); - - b.ToTable("IdentityServerClientClaims"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b => - { - b.Property("ClientId") - .HasColumnType("char(36)"); - - b.Property("Origin") - .HasMaxLength(150) - .HasColumnType("varchar(150)"); - - b.HasKey("ClientId", "Origin"); - - b.ToTable("IdentityServerClientCorsOrigins"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b => - { - b.Property("ClientId") - .HasColumnType("char(36)"); - - b.Property("GrantType") - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.HasKey("ClientId", "GrantType"); - - b.ToTable("IdentityServerClientGrantTypes"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b => - { - b.Property("ClientId") - .HasColumnType("char(36)"); - - b.Property("Provider") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("ClientId", "Provider"); - - b.ToTable("IdentityServerClientIdPRestrictions"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b => - { - b.Property("ClientId") - .HasColumnType("char(36)"); - - b.Property("PostLogoutRedirectUri") - .HasMaxLength(300) - .HasColumnType("varchar(300)"); - - b.HasKey("ClientId", "PostLogoutRedirectUri"); - - b.ToTable("IdentityServerClientPostLogoutRedirectUris"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b => - { - b.Property("ClientId") - .HasColumnType("char(36)"); - - b.Property("Key") - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.Property("Value") - .HasMaxLength(300) - .HasColumnType("varchar(300)"); - - b.HasKey("ClientId", "Key", "Value"); - - b.ToTable("IdentityServerClientProperties"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b => - { - b.Property("ClientId") - .HasColumnType("char(36)"); - - b.Property("RedirectUri") - .HasMaxLength(300) - .HasColumnType("varchar(300)"); - - b.HasKey("ClientId", "RedirectUri"); - - b.ToTable("IdentityServerClientRedirectUris"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b => - { - b.Property("ClientId") - .HasColumnType("char(36)"); - - b.Property("Scope") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("ClientId", "Scope"); - - b.ToTable("IdentityServerClientScopes"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b => - { - b.Property("ClientId") - .HasColumnType("char(36)"); - - b.Property("Type") - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.Property("Value") - .HasMaxLength(300) - .HasColumnType("varchar(300)"); - - b.Property("Description") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)"); - - b.Property("Expiration") - .HasColumnType("datetime(6)"); - - b.HasKey("ClientId", "Type", "Value"); - - b.ToTable("IdentityServerClientSecrets"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Devices.DeviceFlowCodes", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ClientId") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Data") - .IsRequired() - .HasMaxLength(10000) - .HasColumnType("varchar(10000)"); - - b.Property("Description") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("DeviceCode") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Expiration") - .IsRequired() - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("SessionId") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("SubjectId") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("UserCode") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.HasIndex("DeviceCode") - .IsUnique(); - - b.HasIndex("Expiration"); - - b.HasIndex("UserCode"); - - b.ToTable("IdentityServerDeviceFlowCodes"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Grants.PersistedGrant", b => - { - b.Property("Key") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("ClientId") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ConsumedTime") - .HasColumnType("datetime(6)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("Data") - .IsRequired() - .HasMaxLength(10000) - .HasColumnType("varchar(10000)"); - - b.Property("Description") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Expiration") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("SessionId") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("SubjectId") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Key"); - - b.HasIndex("Expiration"); - - b.HasIndex("SubjectId", "ClientId", "Type"); - - b.HasIndex("SubjectId", "SessionId", "Type"); - - b.ToTable("IdentityServerPersistedGrants"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); - - b.Property("DisplayName") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Emphasize") - .HasColumnType("tinyint(1)"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Required") - .HasColumnType("tinyint(1)"); - - b.Property("ShowInDiscoveryDocument") - .HasColumnType("tinyint(1)"); - - b.HasKey("Id"); - - b.ToTable("IdentityServerIdentityResources"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceClaim", b => - { - b.Property("IdentityResourceId") - .HasColumnType("char(36)"); - - b.Property("Type") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("IdentityResourceId", "Type"); - - b.ToTable("IdentityServerIdentityResourceClaims"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceProperty", b => - { - b.Property("IdentityResourceId") - .HasColumnType("char(36)"); - - b.Property("Key") - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.Property("Value") - .HasMaxLength(300) - .HasColumnType("varchar(300)"); - - b.HasKey("IdentityResourceId", "Key", "Value"); - - b.ToTable("IdentityServerIdentityResourceProperties"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => - { - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany("Claims") - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Claims") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Logins") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany() - .HasForeignKey("OrganizationUnitId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("OrganizationUnits") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => - { - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Roles") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Tokens") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany() - .HasForeignKey("ParentId"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany("Roles") - .HasForeignKey("OrganizationUnitId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => - { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) - .WithMany("UserClaims") - .HasForeignKey("ApiResourceId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b => - { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) - .WithMany("Properties") - .HasForeignKey("ApiResourceId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceScope", b => - { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) - .WithMany("Scopes") - .HasForeignKey("ApiResourceId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceSecret", b => - { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) - .WithMany("Secrets") - .HasForeignKey("ApiResourceId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeClaim", b => - { - b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiScope", null) - .WithMany("UserClaims") - .HasForeignKey("ApiScopeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeProperty", b => - { - b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiScope", null) - .WithMany("Properties") - .HasForeignKey("ApiScopeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("Claims") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("AllowedCorsOrigins") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("AllowedGrantTypes") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("IdentityProviderRestrictions") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("PostLogoutRedirectUris") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("Properties") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("RedirectUris") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("AllowedScopes") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("ClientSecrets") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceClaim", b => - { - b.HasOne("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", null) - .WithMany("UserClaims") - .HasForeignKey("IdentityResourceId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceProperty", b => - { - b.HasOne("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", null) - .WithMany("Properties") - .HasForeignKey("IdentityResourceId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => - { - b.Navigation("Claims"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => - { - b.Navigation("Claims"); - - b.Navigation("Logins"); - - b.Navigation("OrganizationUnits"); - - b.Navigation("Roles"); - - b.Navigation("Tokens"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.Navigation("Roles"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b => - { - b.Navigation("Properties"); - - b.Navigation("Scopes"); - - b.Navigation("Secrets"); - - b.Navigation("UserClaims"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScope", b => - { - b.Navigation("Properties"); - - b.Navigation("UserClaims"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b => - { - b.Navigation("AllowedCorsOrigins"); - - b.Navigation("AllowedGrantTypes"); - - b.Navigation("AllowedScopes"); - - b.Navigation("Claims"); - - b.Navigation("ClientSecrets"); - - b.Navigation("IdentityProviderRestrictions"); - - b.Navigation("PostLogoutRedirectUris"); - - b.Navigation("Properties"); - - b.Navigation("RedirectUris"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b => - { - b.Navigation("Properties"); - - b.Navigation("UserClaims"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/LY.MicroService.identityServer/Migrations/20211030124247_Re-Initlize-Db-Migration.cs b/aspnet-core/services/LY.MicroService.identityServer/Migrations/20211030124247_Re-Initlize-Db-Migration.cs deleted file mode 100644 index 08f1f260d..000000000 --- a/aspnet-core/services/LY.MicroService.identityServer/Migrations/20211030124247_Re-Initlize-Db-Migration.cs +++ /dev/null @@ -1,1221 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace LY.MicroService.IdentityServer.Migrations -{ - public partial class ReInitlizeDbMigration : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterDatabase() - .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: "tinyint(1)", nullable: false), - IsStatic = table.Column(type: "tinyint(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), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpClaimTypes", x => x.Id); - }) - .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: "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"), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, 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"), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpOrganizationUnits", x => x.Id); - table.ForeignKey( - name: "FK_AbpOrganizationUnits_AbpOrganizationUnits_ParentId", - column: x => x.ParentId, - principalTable: "AbpOrganizationUnits", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }) - .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: "tinyint(1)", nullable: false), - IsStatic = table.Column(type: "tinyint(1)", nullable: false), - IsPublic = table.Column(type: "tinyint(1)", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) - .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: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpSecurityLogs", 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: "tinyint(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: "tinyint(1)", nullable: false, defaultValue: false), - PhoneNumber = table.Column(type: "varchar(16)", maxLength: 16, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - PhoneNumberConfirmed = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - TwoFactorEnabled = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - LockoutEnd = table.Column(type: "datetime(6)", nullable: true), - LockoutEnabled = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - AccessFailedCount = table.Column(type: "int", nullable: false, defaultValue: 0), - AvatarUrl = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, 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"), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpUsers", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "IdentityServerApiResources", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Name = table.Column(type: "varchar(200)", maxLength: 200, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - DisplayName = table.Column(type: "varchar(200)", maxLength: 200, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Description = table.Column(type: "varchar(1000)", maxLength: 1000, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Enabled = table.Column(type: "tinyint(1)", nullable: false), - AllowedAccessTokenSigningAlgorithms = table.Column(type: "varchar(100)", maxLength: 100, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ShowInDiscoveryDocument = table.Column(type: "tinyint(1)", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, 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"), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerApiResources", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "IdentityServerApiScopes", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Enabled = table.Column(type: "tinyint(1)", nullable: false), - Name = table.Column(type: "varchar(200)", maxLength: 200, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - DisplayName = table.Column(type: "varchar(200)", maxLength: 200, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Description = table.Column(type: "varchar(1000)", maxLength: 1000, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Required = table.Column(type: "tinyint(1)", nullable: false), - Emphasize = table.Column(type: "tinyint(1)", nullable: false), - ShowInDiscoveryDocument = table.Column(type: "tinyint(1)", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, 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"), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerApiScopes", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "IdentityServerClients", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - ClientId = table.Column(type: "varchar(200)", maxLength: 200, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ClientName = table.Column(type: "varchar(200)", maxLength: 200, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Description = table.Column(type: "varchar(1000)", maxLength: 1000, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ClientUri = table.Column(type: "varchar(2000)", maxLength: 2000, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - LogoUri = table.Column(type: "varchar(2000)", maxLength: 2000, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Enabled = table.Column(type: "tinyint(1)", nullable: false), - ProtocolType = table.Column(type: "varchar(200)", maxLength: 200, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - RequireClientSecret = table.Column(type: "tinyint(1)", nullable: false), - RequireConsent = table.Column(type: "tinyint(1)", nullable: false), - AllowRememberConsent = table.Column(type: "tinyint(1)", nullable: false), - AlwaysIncludeUserClaimsInIdToken = table.Column(type: "tinyint(1)", nullable: false), - RequirePkce = table.Column(type: "tinyint(1)", nullable: false), - AllowPlainTextPkce = table.Column(type: "tinyint(1)", nullable: false), - RequireRequestObject = table.Column(type: "tinyint(1)", nullable: false), - AllowAccessTokensViaBrowser = table.Column(type: "tinyint(1)", nullable: false), - FrontChannelLogoutUri = table.Column(type: "varchar(2000)", maxLength: 2000, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - FrontChannelLogoutSessionRequired = table.Column(type: "tinyint(1)", nullable: false), - BackChannelLogoutUri = table.Column(type: "varchar(2000)", maxLength: 2000, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - BackChannelLogoutSessionRequired = table.Column(type: "tinyint(1)", nullable: false), - AllowOfflineAccess = table.Column(type: "tinyint(1)", nullable: false), - IdentityTokenLifetime = table.Column(type: "int", nullable: false), - AllowedIdentityTokenSigningAlgorithms = table.Column(type: "varchar(100)", maxLength: 100, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - AccessTokenLifetime = table.Column(type: "int", nullable: false), - AuthorizationCodeLifetime = table.Column(type: "int", nullable: false), - ConsentLifetime = table.Column(type: "int", nullable: true), - AbsoluteRefreshTokenLifetime = table.Column(type: "int", nullable: false), - SlidingRefreshTokenLifetime = table.Column(type: "int", nullable: false), - RefreshTokenUsage = table.Column(type: "int", nullable: false), - UpdateAccessTokenClaimsOnRefresh = table.Column(type: "tinyint(1)", nullable: false), - RefreshTokenExpiration = table.Column(type: "int", nullable: false), - AccessTokenType = table.Column(type: "int", nullable: false), - EnableLocalLogin = table.Column(type: "tinyint(1)", nullable: false), - IncludeJwtId = table.Column(type: "tinyint(1)", nullable: false), - AlwaysSendClientClaims = table.Column(type: "tinyint(1)", nullable: false), - ClientClaimsPrefix = table.Column(type: "varchar(200)", maxLength: 200, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - PairWiseSubjectSalt = table.Column(type: "varchar(200)", maxLength: 200, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - UserSsoLifetime = table.Column(type: "int", nullable: true), - UserCodeType = table.Column(type: "varchar(100)", maxLength: 100, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - DeviceCodeLifetime = table.Column(type: "int", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, 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"), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerClients", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "IdentityServerDeviceFlowCodes", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - DeviceCode = table.Column(type: "varchar(200)", maxLength: 200, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - UserCode = table.Column(type: "varchar(200)", maxLength: 200, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - SubjectId = table.Column(type: "varchar(200)", maxLength: 200, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - SessionId = table.Column(type: "varchar(100)", maxLength: 100, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ClientId = table.Column(type: "varchar(200)", maxLength: 200, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Description = table.Column(type: "varchar(200)", maxLength: 200, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Expiration = table.Column(type: "datetime(6)", nullable: false), - Data = table.Column(type: "varchar(10000)", maxLength: 10000, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, 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_IdentityServerDeviceFlowCodes", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "IdentityServerIdentityResources", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Name = table.Column(type: "varchar(200)", maxLength: 200, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - DisplayName = table.Column(type: "varchar(200)", maxLength: 200, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Description = table.Column(type: "varchar(1000)", maxLength: 1000, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Enabled = table.Column(type: "tinyint(1)", nullable: false), - Required = table.Column(type: "tinyint(1)", nullable: false), - Emphasize = table.Column(type: "tinyint(1)", nullable: false), - ShowInDiscoveryDocument = table.Column(type: "tinyint(1)", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, 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"), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerIdentityResources", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "IdentityServerPersistedGrants", - columns: table => new - { - Key = table.Column(type: "varchar(200)", maxLength: 200, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Type = table.Column(type: "varchar(50)", maxLength: 50, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - SubjectId = table.Column(type: "varchar(200)", maxLength: 200, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - SessionId = table.Column(type: "varchar(100)", maxLength: 100, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ClientId = table.Column(type: "varchar(200)", maxLength: 200, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Description = table.Column(type: "varchar(200)", maxLength: 200, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - Expiration = table.Column(type: "datetime(6)", nullable: true), - ConsumedTime = table.Column(type: "datetime(6)", nullable: true), - Data = table.Column(type: "varchar(10000)", maxLength: 10000, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerPersistedGrants", x => x.Key); - }) - .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: "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: "IdentityServerApiResourceClaims", - columns: table => new - { - Type = table.Column(type: "varchar(200)", maxLength: 200, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ApiResourceId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci") - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerApiResourceClaims", x => new { x.ApiResourceId, x.Type }); - table.ForeignKey( - name: "FK_IdentityServerApiResourceClaims_IdentityServerApiResources_A~", - column: x => x.ApiResourceId, - principalTable: "IdentityServerApiResources", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "IdentityServerApiResourceProperties", - columns: table => new - { - ApiResourceId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Key = table.Column(type: "varchar(250)", maxLength: 250, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Value = table.Column(type: "varchar(300)", maxLength: 300, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerApiResourceProperties", x => new { x.ApiResourceId, x.Key, x.Value }); - table.ForeignKey( - name: "FK_IdentityServerApiResourceProperties_IdentityServerApiResourc~", - column: x => x.ApiResourceId, - principalTable: "IdentityServerApiResources", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "IdentityServerApiResourceScopes", - columns: table => new - { - ApiResourceId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Scope = table.Column(type: "varchar(200)", maxLength: 200, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerApiResourceScopes", x => new { x.ApiResourceId, x.Scope }); - table.ForeignKey( - name: "FK_IdentityServerApiResourceScopes_IdentityServerApiResources_A~", - column: x => x.ApiResourceId, - principalTable: "IdentityServerApiResources", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "IdentityServerApiResourceSecrets", - columns: table => new - { - Type = table.Column(type: "varchar(250)", maxLength: 250, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Value = table.Column(type: "varchar(300)", maxLength: 300, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ApiResourceId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Description = table.Column(type: "varchar(1000)", maxLength: 1000, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Expiration = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerApiResourceSecrets", x => new { x.ApiResourceId, x.Type, x.Value }); - table.ForeignKey( - name: "FK_IdentityServerApiResourceSecrets_IdentityServerApiResources_~", - column: x => x.ApiResourceId, - principalTable: "IdentityServerApiResources", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "IdentityServerApiScopeClaims", - columns: table => new - { - Type = table.Column(type: "varchar(200)", maxLength: 200, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ApiScopeId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci") - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerApiScopeClaims", x => new { x.ApiScopeId, x.Type }); - table.ForeignKey( - name: "FK_IdentityServerApiScopeClaims_IdentityServerApiScopes_ApiScop~", - column: x => x.ApiScopeId, - principalTable: "IdentityServerApiScopes", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "IdentityServerApiScopeProperties", - columns: table => new - { - ApiScopeId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Key = table.Column(type: "varchar(250)", maxLength: 250, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Value = table.Column(type: "varchar(300)", maxLength: 300, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerApiScopeProperties", x => new { x.ApiScopeId, x.Key, x.Value }); - table.ForeignKey( - name: "FK_IdentityServerApiScopeProperties_IdentityServerApiScopes_Api~", - column: x => x.ApiScopeId, - principalTable: "IdentityServerApiScopes", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "IdentityServerClientClaims", - columns: table => new - { - ClientId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Type = table.Column(type: "varchar(250)", maxLength: 250, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Value = table.Column(type: "varchar(250)", maxLength: 250, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerClientClaims", x => new { x.ClientId, x.Type, x.Value }); - table.ForeignKey( - name: "FK_IdentityServerClientClaims_IdentityServerClients_ClientId", - column: x => x.ClientId, - principalTable: "IdentityServerClients", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "IdentityServerClientCorsOrigins", - columns: table => new - { - ClientId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Origin = table.Column(type: "varchar(150)", maxLength: 150, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerClientCorsOrigins", x => new { x.ClientId, x.Origin }); - table.ForeignKey( - name: "FK_IdentityServerClientCorsOrigins_IdentityServerClients_Client~", - column: x => x.ClientId, - principalTable: "IdentityServerClients", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "IdentityServerClientGrantTypes", - columns: table => new - { - ClientId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - GrantType = table.Column(type: "varchar(250)", maxLength: 250, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerClientGrantTypes", x => new { x.ClientId, x.GrantType }); - table.ForeignKey( - name: "FK_IdentityServerClientGrantTypes_IdentityServerClients_ClientId", - column: x => x.ClientId, - principalTable: "IdentityServerClients", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "IdentityServerClientIdPRestrictions", - columns: table => new - { - ClientId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Provider = table.Column(type: "varchar(200)", maxLength: 200, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerClientIdPRestrictions", x => new { x.ClientId, x.Provider }); - table.ForeignKey( - name: "FK_IdentityServerClientIdPRestrictions_IdentityServerClients_Cl~", - column: x => x.ClientId, - principalTable: "IdentityServerClients", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "IdentityServerClientPostLogoutRedirectUris", - columns: table => new - { - ClientId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - PostLogoutRedirectUri = table.Column(type: "varchar(300)", maxLength: 300, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerClientPostLogoutRedirectUris", x => new { x.ClientId, x.PostLogoutRedirectUri }); - table.ForeignKey( - name: "FK_IdentityServerClientPostLogoutRedirectUris_IdentityServerCli~", - column: x => x.ClientId, - principalTable: "IdentityServerClients", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "IdentityServerClientProperties", - columns: table => new - { - ClientId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Key = table.Column(type: "varchar(250)", maxLength: 250, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Value = table.Column(type: "varchar(300)", maxLength: 300, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerClientProperties", x => new { x.ClientId, x.Key, x.Value }); - table.ForeignKey( - name: "FK_IdentityServerClientProperties_IdentityServerClients_ClientId", - column: x => x.ClientId, - principalTable: "IdentityServerClients", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "IdentityServerClientRedirectUris", - columns: table => new - { - ClientId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - RedirectUri = table.Column(type: "varchar(300)", maxLength: 300, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerClientRedirectUris", x => new { x.ClientId, x.RedirectUri }); - table.ForeignKey( - name: "FK_IdentityServerClientRedirectUris_IdentityServerClients_Clien~", - column: x => x.ClientId, - principalTable: "IdentityServerClients", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "IdentityServerClientScopes", - columns: table => new - { - ClientId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Scope = table.Column(type: "varchar(200)", maxLength: 200, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerClientScopes", x => new { x.ClientId, x.Scope }); - table.ForeignKey( - name: "FK_IdentityServerClientScopes_IdentityServerClients_ClientId", - column: x => x.ClientId, - principalTable: "IdentityServerClients", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "IdentityServerClientSecrets", - columns: table => new - { - Type = table.Column(type: "varchar(250)", maxLength: 250, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Value = table.Column(type: "varchar(300)", maxLength: 300, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ClientId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Description = table.Column(type: "varchar(2000)", maxLength: 2000, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Expiration = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerClientSecrets", x => new { x.ClientId, x.Type, x.Value }); - table.ForeignKey( - name: "FK_IdentityServerClientSecrets_IdentityServerClients_ClientId", - column: x => x.ClientId, - principalTable: "IdentityServerClients", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "IdentityServerIdentityResourceClaims", - columns: table => new - { - Type = table.Column(type: "varchar(200)", maxLength: 200, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - IdentityResourceId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci") - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerIdentityResourceClaims", x => new { x.IdentityResourceId, x.Type }); - table.ForeignKey( - name: "FK_IdentityServerIdentityResourceClaims_IdentityServerIdentityR~", - column: x => x.IdentityResourceId, - principalTable: "IdentityServerIdentityResources", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "IdentityServerIdentityResourceProperties", - columns: table => new - { - IdentityResourceId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Key = table.Column(type: "varchar(250)", maxLength: 250, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Value = table.Column(type: "varchar(300)", maxLength: 300, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerIdentityResourceProperties", x => new { x.IdentityResourceId, x.Key, x.Value }); - table.ForeignKey( - name: "FK_IdentityServerIdentityResourceProperties_IdentityServerIdent~", - column: x => x.IdentityResourceId, - principalTable: "IdentityServerIdentityResources", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "IX_AbpLinkUsers_SourceUserId_SourceTenantId_TargetUserId_Target~", - table: "AbpLinkUsers", - columns: new[] { "SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId" }, - unique: true); - - 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_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_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_IdentityServerClients_ClientId", - table: "IdentityServerClients", - column: "ClientId"); - - migrationBuilder.CreateIndex( - name: "IX_IdentityServerDeviceFlowCodes_DeviceCode", - table: "IdentityServerDeviceFlowCodes", - column: "DeviceCode", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_IdentityServerDeviceFlowCodes_Expiration", - table: "IdentityServerDeviceFlowCodes", - column: "Expiration"); - - migrationBuilder.CreateIndex( - name: "IX_IdentityServerDeviceFlowCodes_UserCode", - table: "IdentityServerDeviceFlowCodes", - column: "UserCode"); - - migrationBuilder.CreateIndex( - name: "IX_IdentityServerPersistedGrants_Expiration", - table: "IdentityServerPersistedGrants", - column: "Expiration"); - - migrationBuilder.CreateIndex( - name: "IX_IdentityServerPersistedGrants_SubjectId_ClientId_Type", - table: "IdentityServerPersistedGrants", - columns: new[] { "SubjectId", "ClientId", "Type" }); - - migrationBuilder.CreateIndex( - name: "IX_IdentityServerPersistedGrants_SubjectId_SessionId_Type", - table: "IdentityServerPersistedGrants", - columns: new[] { "SubjectId", "SessionId", "Type" }); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AbpClaimTypes"); - - migrationBuilder.DropTable( - name: "AbpLinkUsers"); - - migrationBuilder.DropTable( - name: "AbpOrganizationUnitRoles"); - - migrationBuilder.DropTable( - name: "AbpRoleClaims"); - - migrationBuilder.DropTable( - name: "AbpSecurityLogs"); - - migrationBuilder.DropTable( - name: "AbpUserClaims"); - - migrationBuilder.DropTable( - name: "AbpUserLogins"); - - migrationBuilder.DropTable( - name: "AbpUserOrganizationUnits"); - - migrationBuilder.DropTable( - name: "AbpUserRoles"); - - migrationBuilder.DropTable( - name: "AbpUserTokens"); - - migrationBuilder.DropTable( - name: "IdentityServerApiResourceClaims"); - - migrationBuilder.DropTable( - name: "IdentityServerApiResourceProperties"); - - migrationBuilder.DropTable( - name: "IdentityServerApiResourceScopes"); - - migrationBuilder.DropTable( - name: "IdentityServerApiResourceSecrets"); - - migrationBuilder.DropTable( - name: "IdentityServerApiScopeClaims"); - - migrationBuilder.DropTable( - name: "IdentityServerApiScopeProperties"); - - migrationBuilder.DropTable( - name: "IdentityServerClientClaims"); - - migrationBuilder.DropTable( - name: "IdentityServerClientCorsOrigins"); - - migrationBuilder.DropTable( - name: "IdentityServerClientGrantTypes"); - - migrationBuilder.DropTable( - name: "IdentityServerClientIdPRestrictions"); - - migrationBuilder.DropTable( - name: "IdentityServerClientPostLogoutRedirectUris"); - - migrationBuilder.DropTable( - name: "IdentityServerClientProperties"); - - migrationBuilder.DropTable( - name: "IdentityServerClientRedirectUris"); - - migrationBuilder.DropTable( - name: "IdentityServerClientScopes"); - - migrationBuilder.DropTable( - name: "IdentityServerClientSecrets"); - - migrationBuilder.DropTable( - name: "IdentityServerDeviceFlowCodes"); - - migrationBuilder.DropTable( - name: "IdentityServerIdentityResourceClaims"); - - migrationBuilder.DropTable( - name: "IdentityServerIdentityResourceProperties"); - - migrationBuilder.DropTable( - name: "IdentityServerPersistedGrants"); - - migrationBuilder.DropTable( - name: "AbpOrganizationUnits"); - - migrationBuilder.DropTable( - name: "AbpRoles"); - - migrationBuilder.DropTable( - name: "AbpUsers"); - - migrationBuilder.DropTable( - name: "IdentityServerApiResources"); - - migrationBuilder.DropTable( - name: "IdentityServerApiScopes"); - - migrationBuilder.DropTable( - name: "IdentityServerClients"); - - migrationBuilder.DropTable( - name: "IdentityServerIdentityResources"); - } - } -} diff --git a/aspnet-core/services/LY.MicroService.identityServer/Migrations/20211118035301_Remove-Field-AvatarUrl-With-IdentityUser.Designer.cs b/aspnet-core/services/LY.MicroService.identityServer/Migrations/20211118035301_Remove-Field-AvatarUrl-With-IdentityUser.Designer.cs deleted file mode 100644 index 2590c6fc4..000000000 --- a/aspnet-core/services/LY.MicroService.identityServer/Migrations/20211118035301_Remove-Field-AvatarUrl-With-IdentityUser.Designer.cs +++ /dev/null @@ -1,1770 +0,0 @@ -// -using System; -using LY.MicroService.IdentityServer.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -namespace LY.MicroService.IdentityServer.Migrations -{ - [DbContext(typeof(IdentityServertMigrationsDbContext))] - [Migration("20211118035301_Remove-Field-AvatarUrl-With-IdentityUser")] - partial class RemoveFieldAvatarUrlWithIdentityUser - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("Relational:MaxIdentifierLength", 64) - .HasAnnotation("ProductVersion", "5.0.12"); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Description") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("Regex") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("RegexDescription") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Required") - .HasColumnType("tinyint(1)"); - - b.Property("ValueType") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("AbpClaimTypes"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("SourceTenantId") - .HasColumnType("char(36)"); - - b.Property("SourceUserId") - .HasColumnType("char(36)"); - - b.Property("TargetTenantId") - .HasColumnType("char(36)"); - - b.Property("TargetUserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") - .IsUnique(); - - b.ToTable("AbpLinkUsers"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDefault") - .HasColumnType("tinyint(1)") - .HasColumnName("IsDefault"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)") - .HasColumnName("IsPublic"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)") - .HasColumnName("IsStatic"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("NormalizedName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName"); - - b.ToTable("AbpRoles"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("ClaimType") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ClaimValue") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AbpRoleClaims"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Action") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("ApplicationName") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("BrowserInfo") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("ClientId") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ClientIpAddress") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CorrelationId") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Identity") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TenantName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Action"); - - b.HasIndex("TenantId", "ApplicationName"); - - b.HasIndex("TenantId", "Identity"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AbpSecurityLogs"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AccessFailedCount") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("AccessFailedCount"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Email") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("Email"); - - b.Property("EmailConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("EmailConfirmed"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsExternal") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsExternal"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LockoutEnabled") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("LockoutEnabled"); - - b.Property("LockoutEnd") - .HasColumnType("datetime(6)"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("NormalizedEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("NormalizedEmail"); - - b.Property("NormalizedUserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("NormalizedUserName"); - - b.Property("PasswordHash") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("PasswordHash"); - - b.Property("PhoneNumber") - .HasMaxLength(16) - .HasColumnType("varchar(16)") - .HasColumnName("PhoneNumber"); - - b.Property("PhoneNumberConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("PhoneNumberConfirmed"); - - b.Property("SecurityStamp") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("SecurityStamp"); - - b.Property("Surname") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Surname"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TwoFactorEnabled") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("TwoFactorEnabled"); - - b.Property("UserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("UserName"); - - b.HasKey("Id"); - - b.HasIndex("Email"); - - b.HasIndex("NormalizedEmail"); - - b.HasIndex("NormalizedUserName"); - - b.HasIndex("UserName"); - - b.ToTable("AbpUsers"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("ClaimType") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ClaimValue") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AbpUserClaims"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("LoginProvider") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderDisplayName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .IsRequired() - .HasMaxLength(196) - .HasColumnType("varchar(196)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("UserId", "LoginProvider"); - - b.HasIndex("LoginProvider", "ProviderKey"); - - b.ToTable("AbpUserLogins"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => - { - b.Property("OrganizationUnitId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("OrganizationUnitId", "UserId"); - - b.HasIndex("UserId", "OrganizationUnitId"); - - b.ToTable("AbpUserOrganizationUnits"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId", "UserId"); - - b.ToTable("AbpUserRoles"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("LoginProvider") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Name") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Value") - .HasColumnType("longtext"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AbpUserTokens"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(95) - .HasColumnType("varchar(95)") - .HasColumnName("Code"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Code"); - - b.HasIndex("ParentId"); - - b.ToTable("AbpOrganizationUnits"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => - { - b.Property("OrganizationUnitId") - .HasColumnType("char(36)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("OrganizationUnitId", "RoleId"); - - b.HasIndex("RoleId", "OrganizationUnitId"); - - b.ToTable("AbpOrganizationUnitRoles"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowedAccessTokenSigningAlgorithms") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); - - b.Property("DisplayName") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("ShowInDiscoveryDocument") - .HasColumnType("tinyint(1)"); - - b.HasKey("Id"); - - b.ToTable("IdentityServerApiResources"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => - { - b.Property("ApiResourceId") - .HasColumnType("char(36)"); - - b.Property("Type") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("ApiResourceId", "Type"); - - b.ToTable("IdentityServerApiResourceClaims"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b => - { - b.Property("ApiResourceId") - .HasColumnType("char(36)"); - - b.Property("Key") - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.Property("Value") - .HasMaxLength(300) - .HasColumnType("varchar(300)"); - - b.HasKey("ApiResourceId", "Key", "Value"); - - b.ToTable("IdentityServerApiResourceProperties"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceScope", b => - { - b.Property("ApiResourceId") - .HasColumnType("char(36)"); - - b.Property("Scope") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("ApiResourceId", "Scope"); - - b.ToTable("IdentityServerApiResourceScopes"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceSecret", b => - { - b.Property("ApiResourceId") - .HasColumnType("char(36)"); - - b.Property("Type") - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.Property("Value") - .HasMaxLength(300) - .HasColumnType("varchar(300)"); - - b.Property("Description") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); - - b.Property("Expiration") - .HasColumnType("datetime(6)"); - - b.HasKey("ApiResourceId", "Type", "Value"); - - b.ToTable("IdentityServerApiResourceSecrets"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScope", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); - - b.Property("DisplayName") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Emphasize") - .HasColumnType("tinyint(1)"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Required") - .HasColumnType("tinyint(1)"); - - b.Property("ShowInDiscoveryDocument") - .HasColumnType("tinyint(1)"); - - b.HasKey("Id"); - - b.ToTable("IdentityServerApiScopes"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeClaim", b => - { - b.Property("ApiScopeId") - .HasColumnType("char(36)"); - - b.Property("Type") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("ApiScopeId", "Type"); - - b.ToTable("IdentityServerApiScopeClaims"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeProperty", b => - { - b.Property("ApiScopeId") - .HasColumnType("char(36)"); - - b.Property("Key") - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.Property("Value") - .HasMaxLength(300) - .HasColumnType("varchar(300)"); - - b.HasKey("ApiScopeId", "Key", "Value"); - - b.ToTable("IdentityServerApiScopeProperties"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AbsoluteRefreshTokenLifetime") - .HasColumnType("int"); - - b.Property("AccessTokenLifetime") - .HasColumnType("int"); - - b.Property("AccessTokenType") - .HasColumnType("int"); - - b.Property("AllowAccessTokensViaBrowser") - .HasColumnType("tinyint(1)"); - - b.Property("AllowOfflineAccess") - .HasColumnType("tinyint(1)"); - - b.Property("AllowPlainTextPkce") - .HasColumnType("tinyint(1)"); - - b.Property("AllowRememberConsent") - .HasColumnType("tinyint(1)"); - - b.Property("AllowedIdentityTokenSigningAlgorithms") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("AlwaysIncludeUserClaimsInIdToken") - .HasColumnType("tinyint(1)"); - - b.Property("AlwaysSendClientClaims") - .HasColumnType("tinyint(1)"); - - b.Property("AuthorizationCodeLifetime") - .HasColumnType("int"); - - b.Property("BackChannelLogoutSessionRequired") - .HasColumnType("tinyint(1)"); - - b.Property("BackChannelLogoutUri") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)"); - - b.Property("ClientClaimsPrefix") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("ClientId") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("ClientName") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("ClientUri") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ConsentLifetime") - .HasColumnType("int"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); - - b.Property("DeviceCodeLifetime") - .HasColumnType("int"); - - b.Property("EnableLocalLogin") - .HasColumnType("tinyint(1)"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("FrontChannelLogoutSessionRequired") - .HasColumnType("tinyint(1)"); - - b.Property("FrontChannelLogoutUri") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)"); - - b.Property("IdentityTokenLifetime") - .HasColumnType("int"); - - b.Property("IncludeJwtId") - .HasColumnType("tinyint(1)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LogoUri") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)"); - - b.Property("PairWiseSubjectSalt") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("ProtocolType") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("RefreshTokenExpiration") - .HasColumnType("int"); - - b.Property("RefreshTokenUsage") - .HasColumnType("int"); - - b.Property("RequireClientSecret") - .HasColumnType("tinyint(1)"); - - b.Property("RequireConsent") - .HasColumnType("tinyint(1)"); - - b.Property("RequirePkce") - .HasColumnType("tinyint(1)"); - - b.Property("RequireRequestObject") - .HasColumnType("tinyint(1)"); - - b.Property("SlidingRefreshTokenLifetime") - .HasColumnType("int"); - - b.Property("UpdateAccessTokenClaimsOnRefresh") - .HasColumnType("tinyint(1)"); - - b.Property("UserCodeType") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("UserSsoLifetime") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("ClientId"); - - b.ToTable("IdentityServerClients"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b => - { - b.Property("ClientId") - .HasColumnType("char(36)"); - - b.Property("Type") - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.Property("Value") - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.HasKey("ClientId", "Type", "Value"); - - b.ToTable("IdentityServerClientClaims"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b => - { - b.Property("ClientId") - .HasColumnType("char(36)"); - - b.Property("Origin") - .HasMaxLength(150) - .HasColumnType("varchar(150)"); - - b.HasKey("ClientId", "Origin"); - - b.ToTable("IdentityServerClientCorsOrigins"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b => - { - b.Property("ClientId") - .HasColumnType("char(36)"); - - b.Property("GrantType") - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.HasKey("ClientId", "GrantType"); - - b.ToTable("IdentityServerClientGrantTypes"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b => - { - b.Property("ClientId") - .HasColumnType("char(36)"); - - b.Property("Provider") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("ClientId", "Provider"); - - b.ToTable("IdentityServerClientIdPRestrictions"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b => - { - b.Property("ClientId") - .HasColumnType("char(36)"); - - b.Property("PostLogoutRedirectUri") - .HasMaxLength(300) - .HasColumnType("varchar(300)"); - - b.HasKey("ClientId", "PostLogoutRedirectUri"); - - b.ToTable("IdentityServerClientPostLogoutRedirectUris"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b => - { - b.Property("ClientId") - .HasColumnType("char(36)"); - - b.Property("Key") - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.Property("Value") - .HasMaxLength(300) - .HasColumnType("varchar(300)"); - - b.HasKey("ClientId", "Key", "Value"); - - b.ToTable("IdentityServerClientProperties"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b => - { - b.Property("ClientId") - .HasColumnType("char(36)"); - - b.Property("RedirectUri") - .HasMaxLength(300) - .HasColumnType("varchar(300)"); - - b.HasKey("ClientId", "RedirectUri"); - - b.ToTable("IdentityServerClientRedirectUris"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b => - { - b.Property("ClientId") - .HasColumnType("char(36)"); - - b.Property("Scope") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("ClientId", "Scope"); - - b.ToTable("IdentityServerClientScopes"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b => - { - b.Property("ClientId") - .HasColumnType("char(36)"); - - b.Property("Type") - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.Property("Value") - .HasMaxLength(300) - .HasColumnType("varchar(300)"); - - b.Property("Description") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)"); - - b.Property("Expiration") - .HasColumnType("datetime(6)"); - - b.HasKey("ClientId", "Type", "Value"); - - b.ToTable("IdentityServerClientSecrets"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Devices.DeviceFlowCodes", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ClientId") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Data") - .IsRequired() - .HasMaxLength(10000) - .HasColumnType("varchar(10000)"); - - b.Property("Description") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("DeviceCode") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Expiration") - .IsRequired() - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("SessionId") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("SubjectId") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("UserCode") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.HasIndex("DeviceCode") - .IsUnique(); - - b.HasIndex("Expiration"); - - b.HasIndex("UserCode"); - - b.ToTable("IdentityServerDeviceFlowCodes"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Grants.PersistedGrant", b => - { - b.Property("Key") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("ClientId") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ConsumedTime") - .HasColumnType("datetime(6)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("Data") - .IsRequired() - .HasMaxLength(10000) - .HasColumnType("varchar(10000)"); - - b.Property("Description") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Expiration") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("SessionId") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("SubjectId") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Key"); - - b.HasIndex("Expiration"); - - b.HasIndex("SubjectId", "ClientId", "Type"); - - b.HasIndex("SubjectId", "SessionId", "Type"); - - b.ToTable("IdentityServerPersistedGrants"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); - - b.Property("DisplayName") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Emphasize") - .HasColumnType("tinyint(1)"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Required") - .HasColumnType("tinyint(1)"); - - b.Property("ShowInDiscoveryDocument") - .HasColumnType("tinyint(1)"); - - b.HasKey("Id"); - - b.ToTable("IdentityServerIdentityResources"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceClaim", b => - { - b.Property("IdentityResourceId") - .HasColumnType("char(36)"); - - b.Property("Type") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("IdentityResourceId", "Type"); - - b.ToTable("IdentityServerIdentityResourceClaims"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceProperty", b => - { - b.Property("IdentityResourceId") - .HasColumnType("char(36)"); - - b.Property("Key") - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.Property("Value") - .HasMaxLength(300) - .HasColumnType("varchar(300)"); - - b.HasKey("IdentityResourceId", "Key", "Value"); - - b.ToTable("IdentityServerIdentityResourceProperties"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => - { - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany("Claims") - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Claims") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Logins") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany() - .HasForeignKey("OrganizationUnitId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("OrganizationUnits") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => - { - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Roles") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Tokens") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany() - .HasForeignKey("ParentId"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany("Roles") - .HasForeignKey("OrganizationUnitId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => - { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) - .WithMany("UserClaims") - .HasForeignKey("ApiResourceId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b => - { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) - .WithMany("Properties") - .HasForeignKey("ApiResourceId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceScope", b => - { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) - .WithMany("Scopes") - .HasForeignKey("ApiResourceId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceSecret", b => - { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) - .WithMany("Secrets") - .HasForeignKey("ApiResourceId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeClaim", b => - { - b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiScope", null) - .WithMany("UserClaims") - .HasForeignKey("ApiScopeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeProperty", b => - { - b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiScope", null) - .WithMany("Properties") - .HasForeignKey("ApiScopeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("Claims") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("AllowedCorsOrigins") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("AllowedGrantTypes") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("IdentityProviderRestrictions") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("PostLogoutRedirectUris") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("Properties") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("RedirectUris") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("AllowedScopes") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("ClientSecrets") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceClaim", b => - { - b.HasOne("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", null) - .WithMany("UserClaims") - .HasForeignKey("IdentityResourceId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceProperty", b => - { - b.HasOne("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", null) - .WithMany("Properties") - .HasForeignKey("IdentityResourceId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => - { - b.Navigation("Claims"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => - { - b.Navigation("Claims"); - - b.Navigation("Logins"); - - b.Navigation("OrganizationUnits"); - - b.Navigation("Roles"); - - b.Navigation("Tokens"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.Navigation("Roles"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b => - { - b.Navigation("Properties"); - - b.Navigation("Scopes"); - - b.Navigation("Secrets"); - - b.Navigation("UserClaims"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScope", b => - { - b.Navigation("Properties"); - - b.Navigation("UserClaims"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b => - { - b.Navigation("AllowedCorsOrigins"); - - b.Navigation("AllowedGrantTypes"); - - b.Navigation("AllowedScopes"); - - b.Navigation("Claims"); - - b.Navigation("ClientSecrets"); - - b.Navigation("IdentityProviderRestrictions"); - - b.Navigation("PostLogoutRedirectUris"); - - b.Navigation("Properties"); - - b.Navigation("RedirectUris"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b => - { - b.Navigation("Properties"); - - b.Navigation("UserClaims"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/LY.MicroService.identityServer/Migrations/20211118035301_Remove-Field-AvatarUrl-With-IdentityUser.cs b/aspnet-core/services/LY.MicroService.identityServer/Migrations/20211118035301_Remove-Field-AvatarUrl-With-IdentityUser.cs deleted file mode 100644 index 36855bc21..000000000 --- a/aspnet-core/services/LY.MicroService.identityServer/Migrations/20211118035301_Remove-Field-AvatarUrl-With-IdentityUser.cs +++ /dev/null @@ -1,25 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -namespace LY.MicroService.IdentityServer.Migrations -{ - public partial class RemoveFieldAvatarUrlWithIdentityUser : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "AvatarUrl", - table: "AbpUsers"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "AvatarUrl", - table: "AbpUsers", - type: "varchar(128)", - maxLength: 128, - nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"); - } - } -} diff --git a/aspnet-core/services/LY.MicroService.identityServer/Migrations/20211206122741_Upgrade-Abp-To-5-0-0-RC-1.Designer.cs b/aspnet-core/services/LY.MicroService.identityServer/Migrations/20211206122741_Upgrade-Abp-To-5-0-0-RC-1.Designer.cs deleted file mode 100644 index 8ce2b8dc5..000000000 --- a/aspnet-core/services/LY.MicroService.identityServer/Migrations/20211206122741_Upgrade-Abp-To-5-0-0-RC-1.Designer.cs +++ /dev/null @@ -1,1775 +0,0 @@ -// -using System; -using LY.MicroService.IdentityServer.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.IdentityServer.Migrations -{ - [DbContext(typeof(IdentityServertMigrationsDbContext))] - [Migration("20211206122741_Upgrade-Abp-To-5-0-0-RC-1")] - partial class UpgradeAbpTo500RC1 - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "6.0.0") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Description") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("Regex") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("RegexDescription") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Required") - .HasColumnType("tinyint(1)"); - - b.Property("ValueType") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("AbpClaimTypes", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("SourceTenantId") - .HasColumnType("char(36)"); - - b.Property("SourceUserId") - .HasColumnType("char(36)"); - - b.Property("TargetTenantId") - .HasColumnType("char(36)"); - - b.Property("TargetUserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") - .IsUnique(); - - b.ToTable("AbpLinkUsers", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDefault") - .HasColumnType("tinyint(1)") - .HasColumnName("IsDefault"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)") - .HasColumnName("IsPublic"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)") - .HasColumnName("IsStatic"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("NormalizedName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName"); - - b.ToTable("AbpRoles", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("ClaimType") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ClaimValue") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AbpRoleClaims", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Action") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("ApplicationName") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("BrowserInfo") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("ClientId") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ClientIpAddress") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CorrelationId") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Identity") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TenantName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Action"); - - b.HasIndex("TenantId", "ApplicationName"); - - b.HasIndex("TenantId", "Identity"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AbpSecurityLogs", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AccessFailedCount") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("AccessFailedCount"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Email") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("Email"); - - b.Property("EmailConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("EmailConfirmed"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsExternal") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsExternal"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LockoutEnabled") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("LockoutEnabled"); - - b.Property("LockoutEnd") - .HasColumnType("datetime(6)"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("NormalizedEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("NormalizedEmail"); - - b.Property("NormalizedUserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("NormalizedUserName"); - - b.Property("PasswordHash") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("PasswordHash"); - - b.Property("PhoneNumber") - .HasMaxLength(16) - .HasColumnType("varchar(16)") - .HasColumnName("PhoneNumber"); - - b.Property("PhoneNumberConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("PhoneNumberConfirmed"); - - b.Property("SecurityStamp") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("SecurityStamp"); - - b.Property("Surname") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Surname"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TwoFactorEnabled") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("TwoFactorEnabled"); - - b.Property("UserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("UserName"); - - b.HasKey("Id"); - - b.HasIndex("Email"); - - b.HasIndex("NormalizedEmail"); - - b.HasIndex("NormalizedUserName"); - - b.HasIndex("UserName"); - - b.ToTable("AbpUsers", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("ClaimType") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ClaimValue") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AbpUserClaims", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("LoginProvider") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderDisplayName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .IsRequired() - .HasMaxLength(196) - .HasColumnType("varchar(196)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("UserId", "LoginProvider"); - - b.HasIndex("LoginProvider", "ProviderKey"); - - b.ToTable("AbpUserLogins", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => - { - b.Property("OrganizationUnitId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("OrganizationUnitId", "UserId"); - - b.HasIndex("UserId", "OrganizationUnitId"); - - b.ToTable("AbpUserOrganizationUnits", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId", "UserId"); - - b.ToTable("AbpUserRoles", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("LoginProvider") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Name") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Value") - .HasColumnType("longtext"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AbpUserTokens", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(95) - .HasColumnType("varchar(95)") - .HasColumnName("Code"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Code"); - - b.HasIndex("ParentId"); - - b.ToTable("AbpOrganizationUnits", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => - { - b.Property("OrganizationUnitId") - .HasColumnType("char(36)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("OrganizationUnitId", "RoleId"); - - b.HasIndex("RoleId", "OrganizationUnitId"); - - b.ToTable("AbpOrganizationUnitRoles", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowedAccessTokenSigningAlgorithms") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); - - b.Property("DisplayName") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("ShowInDiscoveryDocument") - .HasColumnType("tinyint(1)"); - - b.HasKey("Id"); - - b.ToTable("IdentityServerApiResources", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => - { - b.Property("ApiResourceId") - .HasColumnType("char(36)"); - - b.Property("Type") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("ApiResourceId", "Type"); - - b.ToTable("IdentityServerApiResourceClaims", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b => - { - b.Property("ApiResourceId") - .HasColumnType("char(36)"); - - b.Property("Key") - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.Property("Value") - .HasMaxLength(300) - .HasColumnType("varchar(300)"); - - b.HasKey("ApiResourceId", "Key", "Value"); - - b.ToTable("IdentityServerApiResourceProperties", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceScope", b => - { - b.Property("ApiResourceId") - .HasColumnType("char(36)"); - - b.Property("Scope") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("ApiResourceId", "Scope"); - - b.ToTable("IdentityServerApiResourceScopes", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceSecret", b => - { - b.Property("ApiResourceId") - .HasColumnType("char(36)"); - - b.Property("Type") - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.Property("Value") - .HasMaxLength(300) - .HasColumnType("varchar(300)"); - - b.Property("Description") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); - - b.Property("Expiration") - .HasColumnType("datetime(6)"); - - b.HasKey("ApiResourceId", "Type", "Value"); - - b.ToTable("IdentityServerApiResourceSecrets", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScope", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); - - b.Property("DisplayName") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Emphasize") - .HasColumnType("tinyint(1)"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Required") - .HasColumnType("tinyint(1)"); - - b.Property("ShowInDiscoveryDocument") - .HasColumnType("tinyint(1)"); - - b.HasKey("Id"); - - b.ToTable("IdentityServerApiScopes", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeClaim", b => - { - b.Property("ApiScopeId") - .HasColumnType("char(36)"); - - b.Property("Type") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("ApiScopeId", "Type"); - - b.ToTable("IdentityServerApiScopeClaims", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeProperty", b => - { - b.Property("ApiScopeId") - .HasColumnType("char(36)"); - - b.Property("Key") - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.Property("Value") - .HasMaxLength(300) - .HasColumnType("varchar(300)"); - - b.HasKey("ApiScopeId", "Key", "Value"); - - b.ToTable("IdentityServerApiScopeProperties", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AbsoluteRefreshTokenLifetime") - .HasColumnType("int"); - - b.Property("AccessTokenLifetime") - .HasColumnType("int"); - - b.Property("AccessTokenType") - .HasColumnType("int"); - - b.Property("AllowAccessTokensViaBrowser") - .HasColumnType("tinyint(1)"); - - b.Property("AllowOfflineAccess") - .HasColumnType("tinyint(1)"); - - b.Property("AllowPlainTextPkce") - .HasColumnType("tinyint(1)"); - - b.Property("AllowRememberConsent") - .HasColumnType("tinyint(1)"); - - b.Property("AllowedIdentityTokenSigningAlgorithms") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("AlwaysIncludeUserClaimsInIdToken") - .HasColumnType("tinyint(1)"); - - b.Property("AlwaysSendClientClaims") - .HasColumnType("tinyint(1)"); - - b.Property("AuthorizationCodeLifetime") - .HasColumnType("int"); - - b.Property("BackChannelLogoutSessionRequired") - .HasColumnType("tinyint(1)"); - - b.Property("BackChannelLogoutUri") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)"); - - b.Property("ClientClaimsPrefix") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("ClientId") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("ClientName") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("ClientUri") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ConsentLifetime") - .HasColumnType("int"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); - - b.Property("DeviceCodeLifetime") - .HasColumnType("int"); - - b.Property("EnableLocalLogin") - .HasColumnType("tinyint(1)"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("FrontChannelLogoutSessionRequired") - .HasColumnType("tinyint(1)"); - - b.Property("FrontChannelLogoutUri") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)"); - - b.Property("IdentityTokenLifetime") - .HasColumnType("int"); - - b.Property("IncludeJwtId") - .HasColumnType("tinyint(1)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LogoUri") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)"); - - b.Property("PairWiseSubjectSalt") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("ProtocolType") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("RefreshTokenExpiration") - .HasColumnType("int"); - - b.Property("RefreshTokenUsage") - .HasColumnType("int"); - - b.Property("RequireClientSecret") - .HasColumnType("tinyint(1)"); - - b.Property("RequireConsent") - .HasColumnType("tinyint(1)"); - - b.Property("RequirePkce") - .HasColumnType("tinyint(1)"); - - b.Property("RequireRequestObject") - .HasColumnType("tinyint(1)"); - - b.Property("SlidingRefreshTokenLifetime") - .HasColumnType("int"); - - b.Property("UpdateAccessTokenClaimsOnRefresh") - .HasColumnType("tinyint(1)"); - - b.Property("UserCodeType") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("UserSsoLifetime") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("ClientId"); - - b.ToTable("IdentityServerClients", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b => - { - b.Property("ClientId") - .HasColumnType("char(36)"); - - b.Property("Type") - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.Property("Value") - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.HasKey("ClientId", "Type", "Value"); - - b.ToTable("IdentityServerClientClaims", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b => - { - b.Property("ClientId") - .HasColumnType("char(36)"); - - b.Property("Origin") - .HasMaxLength(150) - .HasColumnType("varchar(150)"); - - b.HasKey("ClientId", "Origin"); - - b.ToTable("IdentityServerClientCorsOrigins", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b => - { - b.Property("ClientId") - .HasColumnType("char(36)"); - - b.Property("GrantType") - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.HasKey("ClientId", "GrantType"); - - b.ToTable("IdentityServerClientGrantTypes", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b => - { - b.Property("ClientId") - .HasColumnType("char(36)"); - - b.Property("Provider") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("ClientId", "Provider"); - - b.ToTable("IdentityServerClientIdPRestrictions", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b => - { - b.Property("ClientId") - .HasColumnType("char(36)"); - - b.Property("PostLogoutRedirectUri") - .HasMaxLength(300) - .HasColumnType("varchar(300)"); - - b.HasKey("ClientId", "PostLogoutRedirectUri"); - - b.ToTable("IdentityServerClientPostLogoutRedirectUris", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b => - { - b.Property("ClientId") - .HasColumnType("char(36)"); - - b.Property("Key") - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.Property("Value") - .HasMaxLength(300) - .HasColumnType("varchar(300)"); - - b.HasKey("ClientId", "Key", "Value"); - - b.ToTable("IdentityServerClientProperties", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b => - { - b.Property("ClientId") - .HasColumnType("char(36)"); - - b.Property("RedirectUri") - .HasMaxLength(300) - .HasColumnType("varchar(300)"); - - b.HasKey("ClientId", "RedirectUri"); - - b.ToTable("IdentityServerClientRedirectUris", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b => - { - b.Property("ClientId") - .HasColumnType("char(36)"); - - b.Property("Scope") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("ClientId", "Scope"); - - b.ToTable("IdentityServerClientScopes", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b => - { - b.Property("ClientId") - .HasColumnType("char(36)"); - - b.Property("Type") - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.Property("Value") - .HasMaxLength(300) - .HasColumnType("varchar(300)"); - - b.Property("Description") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)"); - - b.Property("Expiration") - .HasColumnType("datetime(6)"); - - b.HasKey("ClientId", "Type", "Value"); - - b.ToTable("IdentityServerClientSecrets", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Devices.DeviceFlowCodes", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ClientId") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Data") - .IsRequired() - .HasMaxLength(10000) - .HasColumnType("varchar(10000)"); - - b.Property("Description") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("DeviceCode") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Expiration") - .IsRequired() - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("SessionId") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("SubjectId") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("UserCode") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.HasIndex("DeviceCode") - .IsUnique(); - - b.HasIndex("Expiration"); - - b.HasIndex("UserCode"); - - b.ToTable("IdentityServerDeviceFlowCodes", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Grants.PersistedGrant", b => - { - b.Property("Key") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("ClientId") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ConsumedTime") - .HasColumnType("datetime(6)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("Data") - .IsRequired() - .HasMaxLength(10000) - .HasColumnType("varchar(10000)"); - - b.Property("Description") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Expiration") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("SessionId") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("SubjectId") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Key"); - - b.HasIndex("Expiration"); - - b.HasIndex("SubjectId", "ClientId", "Type"); - - b.HasIndex("SubjectId", "SessionId", "Type"); - - b.ToTable("IdentityServerPersistedGrants", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); - - b.Property("DisplayName") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Emphasize") - .HasColumnType("tinyint(1)"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Required") - .HasColumnType("tinyint(1)"); - - b.Property("ShowInDiscoveryDocument") - .HasColumnType("tinyint(1)"); - - b.HasKey("Id"); - - b.ToTable("IdentityServerIdentityResources", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceClaim", b => - { - b.Property("IdentityResourceId") - .HasColumnType("char(36)"); - - b.Property("Type") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("IdentityResourceId", "Type"); - - b.ToTable("IdentityServerIdentityResourceClaims", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceProperty", b => - { - b.Property("IdentityResourceId") - .HasColumnType("char(36)"); - - b.Property("Key") - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.Property("Value") - .HasMaxLength(300) - .HasColumnType("varchar(300)"); - - b.HasKey("IdentityResourceId", "Key", "Value"); - - b.ToTable("IdentityServerIdentityResourceProperties", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => - { - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany("Claims") - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Claims") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Logins") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany() - .HasForeignKey("OrganizationUnitId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("OrganizationUnits") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => - { - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Roles") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Tokens") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany() - .HasForeignKey("ParentId"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany("Roles") - .HasForeignKey("OrganizationUnitId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => - { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) - .WithMany("UserClaims") - .HasForeignKey("ApiResourceId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b => - { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) - .WithMany("Properties") - .HasForeignKey("ApiResourceId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceScope", b => - { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) - .WithMany("Scopes") - .HasForeignKey("ApiResourceId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceSecret", b => - { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) - .WithMany("Secrets") - .HasForeignKey("ApiResourceId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeClaim", b => - { - b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiScope", null) - .WithMany("UserClaims") - .HasForeignKey("ApiScopeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeProperty", b => - { - b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiScope", null) - .WithMany("Properties") - .HasForeignKey("ApiScopeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("Claims") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("AllowedCorsOrigins") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("AllowedGrantTypes") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("IdentityProviderRestrictions") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("PostLogoutRedirectUris") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("Properties") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("RedirectUris") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("AllowedScopes") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("ClientSecrets") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceClaim", b => - { - b.HasOne("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", null) - .WithMany("UserClaims") - .HasForeignKey("IdentityResourceId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceProperty", b => - { - b.HasOne("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", null) - .WithMany("Properties") - .HasForeignKey("IdentityResourceId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => - { - b.Navigation("Claims"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => - { - b.Navigation("Claims"); - - b.Navigation("Logins"); - - b.Navigation("OrganizationUnits"); - - b.Navigation("Roles"); - - b.Navigation("Tokens"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.Navigation("Roles"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b => - { - b.Navigation("Properties"); - - b.Navigation("Scopes"); - - b.Navigation("Secrets"); - - b.Navigation("UserClaims"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScope", b => - { - b.Navigation("Properties"); - - b.Navigation("UserClaims"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b => - { - b.Navigation("AllowedCorsOrigins"); - - b.Navigation("AllowedGrantTypes"); - - b.Navigation("AllowedScopes"); - - b.Navigation("Claims"); - - b.Navigation("ClientSecrets"); - - b.Navigation("IdentityProviderRestrictions"); - - b.Navigation("PostLogoutRedirectUris"); - - b.Navigation("Properties"); - - b.Navigation("RedirectUris"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b => - { - b.Navigation("Properties"); - - b.Navigation("UserClaims"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/LY.MicroService.identityServer/Migrations/20211206122741_Upgrade-Abp-To-5-0-0-RC-1.cs b/aspnet-core/services/LY.MicroService.identityServer/Migrations/20211206122741_Upgrade-Abp-To-5-0-0-RC-1.cs deleted file mode 100644 index 6359af42c..000000000 --- a/aspnet-core/services/LY.MicroService.identityServer/Migrations/20211206122741_Upgrade-Abp-To-5-0-0-RC-1.cs +++ /dev/null @@ -1,26 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.IdentityServer.Migrations -{ - public partial class UpgradeAbpTo500RC1 : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "IsActive", - table: "AbpUsers", - type: "tinyint(1)", - nullable: false, - defaultValue: false); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "IsActive", - table: "AbpUsers"); - } - } -} diff --git a/aspnet-core/services/LY.MicroService.identityServer/Migrations/IdentityServertMigrationsDbContextModelSnapshot.cs b/aspnet-core/services/LY.MicroService.identityServer/Migrations/IdentityServertMigrationsDbContextModelSnapshot.cs deleted file mode 100644 index d543aa63a..000000000 --- a/aspnet-core/services/LY.MicroService.identityServer/Migrations/IdentityServertMigrationsDbContextModelSnapshot.cs +++ /dev/null @@ -1,1773 +0,0 @@ -// -using System; -using LY.MicroService.IdentityServer.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.IdentityServer.Migrations -{ - [DbContext(typeof(IdentityServertMigrationsDbContext))] - partial class IdentityServertMigrationsDbContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "6.0.0") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Description") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("Regex") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("RegexDescription") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Required") - .HasColumnType("tinyint(1)"); - - b.Property("ValueType") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("AbpClaimTypes", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("SourceTenantId") - .HasColumnType("char(36)"); - - b.Property("SourceUserId") - .HasColumnType("char(36)"); - - b.Property("TargetTenantId") - .HasColumnType("char(36)"); - - b.Property("TargetUserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") - .IsUnique(); - - b.ToTable("AbpLinkUsers", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDefault") - .HasColumnType("tinyint(1)") - .HasColumnName("IsDefault"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)") - .HasColumnName("IsPublic"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)") - .HasColumnName("IsStatic"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("NormalizedName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName"); - - b.ToTable("AbpRoles", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("ClaimType") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ClaimValue") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AbpRoleClaims", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Action") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("ApplicationName") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("BrowserInfo") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("ClientId") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ClientIpAddress") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CorrelationId") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Identity") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TenantName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Action"); - - b.HasIndex("TenantId", "ApplicationName"); - - b.HasIndex("TenantId", "Identity"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AbpSecurityLogs", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AccessFailedCount") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("AccessFailedCount"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Email") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("Email"); - - b.Property("EmailConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("EmailConfirmed"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsExternal") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsExternal"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LockoutEnabled") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("LockoutEnabled"); - - b.Property("LockoutEnd") - .HasColumnType("datetime(6)"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("NormalizedEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("NormalizedEmail"); - - b.Property("NormalizedUserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("NormalizedUserName"); - - b.Property("PasswordHash") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("PasswordHash"); - - b.Property("PhoneNumber") - .HasMaxLength(16) - .HasColumnType("varchar(16)") - .HasColumnName("PhoneNumber"); - - b.Property("PhoneNumberConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("PhoneNumberConfirmed"); - - b.Property("SecurityStamp") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("SecurityStamp"); - - b.Property("Surname") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Surname"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TwoFactorEnabled") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("TwoFactorEnabled"); - - b.Property("UserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("UserName"); - - b.HasKey("Id"); - - b.HasIndex("Email"); - - b.HasIndex("NormalizedEmail"); - - b.HasIndex("NormalizedUserName"); - - b.HasIndex("UserName"); - - b.ToTable("AbpUsers", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("ClaimType") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ClaimValue") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AbpUserClaims", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("LoginProvider") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderDisplayName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .IsRequired() - .HasMaxLength(196) - .HasColumnType("varchar(196)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("UserId", "LoginProvider"); - - b.HasIndex("LoginProvider", "ProviderKey"); - - b.ToTable("AbpUserLogins", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => - { - b.Property("OrganizationUnitId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("OrganizationUnitId", "UserId"); - - b.HasIndex("UserId", "OrganizationUnitId"); - - b.ToTable("AbpUserOrganizationUnits", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId", "UserId"); - - b.ToTable("AbpUserRoles", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("LoginProvider") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Name") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Value") - .HasColumnType("longtext"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AbpUserTokens", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(95) - .HasColumnType("varchar(95)") - .HasColumnName("Code"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Code"); - - b.HasIndex("ParentId"); - - b.ToTable("AbpOrganizationUnits", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => - { - b.Property("OrganizationUnitId") - .HasColumnType("char(36)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("OrganizationUnitId", "RoleId"); - - b.HasIndex("RoleId", "OrganizationUnitId"); - - b.ToTable("AbpOrganizationUnitRoles", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowedAccessTokenSigningAlgorithms") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); - - b.Property("DisplayName") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("ShowInDiscoveryDocument") - .HasColumnType("tinyint(1)"); - - b.HasKey("Id"); - - b.ToTable("IdentityServerApiResources", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => - { - b.Property("ApiResourceId") - .HasColumnType("char(36)"); - - b.Property("Type") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("ApiResourceId", "Type"); - - b.ToTable("IdentityServerApiResourceClaims", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b => - { - b.Property("ApiResourceId") - .HasColumnType("char(36)"); - - b.Property("Key") - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.Property("Value") - .HasMaxLength(300) - .HasColumnType("varchar(300)"); - - b.HasKey("ApiResourceId", "Key", "Value"); - - b.ToTable("IdentityServerApiResourceProperties", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceScope", b => - { - b.Property("ApiResourceId") - .HasColumnType("char(36)"); - - b.Property("Scope") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("ApiResourceId", "Scope"); - - b.ToTable("IdentityServerApiResourceScopes", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceSecret", b => - { - b.Property("ApiResourceId") - .HasColumnType("char(36)"); - - b.Property("Type") - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.Property("Value") - .HasMaxLength(300) - .HasColumnType("varchar(300)"); - - b.Property("Description") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); - - b.Property("Expiration") - .HasColumnType("datetime(6)"); - - b.HasKey("ApiResourceId", "Type", "Value"); - - b.ToTable("IdentityServerApiResourceSecrets", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScope", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); - - b.Property("DisplayName") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Emphasize") - .HasColumnType("tinyint(1)"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Required") - .HasColumnType("tinyint(1)"); - - b.Property("ShowInDiscoveryDocument") - .HasColumnType("tinyint(1)"); - - b.HasKey("Id"); - - b.ToTable("IdentityServerApiScopes", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeClaim", b => - { - b.Property("ApiScopeId") - .HasColumnType("char(36)"); - - b.Property("Type") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("ApiScopeId", "Type"); - - b.ToTable("IdentityServerApiScopeClaims", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeProperty", b => - { - b.Property("ApiScopeId") - .HasColumnType("char(36)"); - - b.Property("Key") - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.Property("Value") - .HasMaxLength(300) - .HasColumnType("varchar(300)"); - - b.HasKey("ApiScopeId", "Key", "Value"); - - b.ToTable("IdentityServerApiScopeProperties", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AbsoluteRefreshTokenLifetime") - .HasColumnType("int"); - - b.Property("AccessTokenLifetime") - .HasColumnType("int"); - - b.Property("AccessTokenType") - .HasColumnType("int"); - - b.Property("AllowAccessTokensViaBrowser") - .HasColumnType("tinyint(1)"); - - b.Property("AllowOfflineAccess") - .HasColumnType("tinyint(1)"); - - b.Property("AllowPlainTextPkce") - .HasColumnType("tinyint(1)"); - - b.Property("AllowRememberConsent") - .HasColumnType("tinyint(1)"); - - b.Property("AllowedIdentityTokenSigningAlgorithms") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("AlwaysIncludeUserClaimsInIdToken") - .HasColumnType("tinyint(1)"); - - b.Property("AlwaysSendClientClaims") - .HasColumnType("tinyint(1)"); - - b.Property("AuthorizationCodeLifetime") - .HasColumnType("int"); - - b.Property("BackChannelLogoutSessionRequired") - .HasColumnType("tinyint(1)"); - - b.Property("BackChannelLogoutUri") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)"); - - b.Property("ClientClaimsPrefix") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("ClientId") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("ClientName") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("ClientUri") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ConsentLifetime") - .HasColumnType("int"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); - - b.Property("DeviceCodeLifetime") - .HasColumnType("int"); - - b.Property("EnableLocalLogin") - .HasColumnType("tinyint(1)"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("FrontChannelLogoutSessionRequired") - .HasColumnType("tinyint(1)"); - - b.Property("FrontChannelLogoutUri") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)"); - - b.Property("IdentityTokenLifetime") - .HasColumnType("int"); - - b.Property("IncludeJwtId") - .HasColumnType("tinyint(1)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LogoUri") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)"); - - b.Property("PairWiseSubjectSalt") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("ProtocolType") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("RefreshTokenExpiration") - .HasColumnType("int"); - - b.Property("RefreshTokenUsage") - .HasColumnType("int"); - - b.Property("RequireClientSecret") - .HasColumnType("tinyint(1)"); - - b.Property("RequireConsent") - .HasColumnType("tinyint(1)"); - - b.Property("RequirePkce") - .HasColumnType("tinyint(1)"); - - b.Property("RequireRequestObject") - .HasColumnType("tinyint(1)"); - - b.Property("SlidingRefreshTokenLifetime") - .HasColumnType("int"); - - b.Property("UpdateAccessTokenClaimsOnRefresh") - .HasColumnType("tinyint(1)"); - - b.Property("UserCodeType") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("UserSsoLifetime") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("ClientId"); - - b.ToTable("IdentityServerClients", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b => - { - b.Property("ClientId") - .HasColumnType("char(36)"); - - b.Property("Type") - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.Property("Value") - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.HasKey("ClientId", "Type", "Value"); - - b.ToTable("IdentityServerClientClaims", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b => - { - b.Property("ClientId") - .HasColumnType("char(36)"); - - b.Property("Origin") - .HasMaxLength(150) - .HasColumnType("varchar(150)"); - - b.HasKey("ClientId", "Origin"); - - b.ToTable("IdentityServerClientCorsOrigins", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b => - { - b.Property("ClientId") - .HasColumnType("char(36)"); - - b.Property("GrantType") - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.HasKey("ClientId", "GrantType"); - - b.ToTable("IdentityServerClientGrantTypes", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b => - { - b.Property("ClientId") - .HasColumnType("char(36)"); - - b.Property("Provider") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("ClientId", "Provider"); - - b.ToTable("IdentityServerClientIdPRestrictions", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b => - { - b.Property("ClientId") - .HasColumnType("char(36)"); - - b.Property("PostLogoutRedirectUri") - .HasMaxLength(300) - .HasColumnType("varchar(300)"); - - b.HasKey("ClientId", "PostLogoutRedirectUri"); - - b.ToTable("IdentityServerClientPostLogoutRedirectUris", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b => - { - b.Property("ClientId") - .HasColumnType("char(36)"); - - b.Property("Key") - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.Property("Value") - .HasMaxLength(300) - .HasColumnType("varchar(300)"); - - b.HasKey("ClientId", "Key", "Value"); - - b.ToTable("IdentityServerClientProperties", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b => - { - b.Property("ClientId") - .HasColumnType("char(36)"); - - b.Property("RedirectUri") - .HasMaxLength(300) - .HasColumnType("varchar(300)"); - - b.HasKey("ClientId", "RedirectUri"); - - b.ToTable("IdentityServerClientRedirectUris", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b => - { - b.Property("ClientId") - .HasColumnType("char(36)"); - - b.Property("Scope") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("ClientId", "Scope"); - - b.ToTable("IdentityServerClientScopes", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b => - { - b.Property("ClientId") - .HasColumnType("char(36)"); - - b.Property("Type") - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.Property("Value") - .HasMaxLength(300) - .HasColumnType("varchar(300)"); - - b.Property("Description") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)"); - - b.Property("Expiration") - .HasColumnType("datetime(6)"); - - b.HasKey("ClientId", "Type", "Value"); - - b.ToTable("IdentityServerClientSecrets", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Devices.DeviceFlowCodes", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ClientId") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Data") - .IsRequired() - .HasMaxLength(10000) - .HasColumnType("varchar(10000)"); - - b.Property("Description") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("DeviceCode") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Expiration") - .IsRequired() - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("SessionId") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("SubjectId") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("UserCode") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.HasIndex("DeviceCode") - .IsUnique(); - - b.HasIndex("Expiration"); - - b.HasIndex("UserCode"); - - b.ToTable("IdentityServerDeviceFlowCodes", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Grants.PersistedGrant", b => - { - b.Property("Key") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("ClientId") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ConsumedTime") - .HasColumnType("datetime(6)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("Data") - .IsRequired() - .HasMaxLength(10000) - .HasColumnType("varchar(10000)"); - - b.Property("Description") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Expiration") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("SessionId") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("SubjectId") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Key"); - - b.HasIndex("Expiration"); - - b.HasIndex("SubjectId", "ClientId", "Type"); - - b.HasIndex("SubjectId", "SessionId", "Type"); - - b.ToTable("IdentityServerPersistedGrants", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); - - b.Property("DisplayName") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Emphasize") - .HasColumnType("tinyint(1)"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Required") - .HasColumnType("tinyint(1)"); - - b.Property("ShowInDiscoveryDocument") - .HasColumnType("tinyint(1)"); - - b.HasKey("Id"); - - b.ToTable("IdentityServerIdentityResources", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceClaim", b => - { - b.Property("IdentityResourceId") - .HasColumnType("char(36)"); - - b.Property("Type") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("IdentityResourceId", "Type"); - - b.ToTable("IdentityServerIdentityResourceClaims", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceProperty", b => - { - b.Property("IdentityResourceId") - .HasColumnType("char(36)"); - - b.Property("Key") - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.Property("Value") - .HasMaxLength(300) - .HasColumnType("varchar(300)"); - - b.HasKey("IdentityResourceId", "Key", "Value"); - - b.ToTable("IdentityServerIdentityResourceProperties", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => - { - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany("Claims") - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Claims") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Logins") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany() - .HasForeignKey("OrganizationUnitId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("OrganizationUnits") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => - { - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Roles") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Tokens") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany() - .HasForeignKey("ParentId"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany("Roles") - .HasForeignKey("OrganizationUnitId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => - { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) - .WithMany("UserClaims") - .HasForeignKey("ApiResourceId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b => - { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) - .WithMany("Properties") - .HasForeignKey("ApiResourceId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceScope", b => - { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) - .WithMany("Scopes") - .HasForeignKey("ApiResourceId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceSecret", b => - { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) - .WithMany("Secrets") - .HasForeignKey("ApiResourceId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeClaim", b => - { - b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiScope", null) - .WithMany("UserClaims") - .HasForeignKey("ApiScopeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeProperty", b => - { - b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiScope", null) - .WithMany("Properties") - .HasForeignKey("ApiScopeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("Claims") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("AllowedCorsOrigins") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("AllowedGrantTypes") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("IdentityProviderRestrictions") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("PostLogoutRedirectUris") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("Properties") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("RedirectUris") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("AllowedScopes") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("ClientSecrets") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceClaim", b => - { - b.HasOne("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", null) - .WithMany("UserClaims") - .HasForeignKey("IdentityResourceId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceProperty", b => - { - b.HasOne("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", null) - .WithMany("Properties") - .HasForeignKey("IdentityResourceId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => - { - b.Navigation("Claims"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => - { - b.Navigation("Claims"); - - b.Navigation("Logins"); - - b.Navigation("OrganizationUnits"); - - b.Navigation("Roles"); - - b.Navigation("Tokens"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.Navigation("Roles"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b => - { - b.Navigation("Properties"); - - b.Navigation("Scopes"); - - b.Navigation("Secrets"); - - b.Navigation("UserClaims"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScope", b => - { - b.Navigation("Properties"); - - b.Navigation("UserClaims"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b => - { - b.Navigation("AllowedCorsOrigins"); - - b.Navigation("AllowedGrantTypes"); - - b.Navigation("AllowedScopes"); - - b.Navigation("Claims"); - - b.Navigation("ClientSecrets"); - - b.Navigation("IdentityProviderRestrictions"); - - b.Navigation("PostLogoutRedirectUris"); - - b.Navigation("Properties"); - - b.Navigation("RedirectUris"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b => - { - b.Navigation("Properties"); - - b.Navigation("UserClaims"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/tests/LINGYUN.Abp.IdGenerator.Tests/LINGYUN/Abp/IdGenerator/AbpIdGeneratorTestModule.cs b/aspnet-core/tests/LINGYUN.Abp.IdGenerator.Tests/LINGYUN/Abp/IdGenerator/AbpIdGeneratorTestModule.cs index dc13beb91..bc7c1c663 100644 --- a/aspnet-core/tests/LINGYUN.Abp.IdGenerator.Tests/LINGYUN/Abp/IdGenerator/AbpIdGeneratorTestModule.cs +++ b/aspnet-core/tests/LINGYUN.Abp.IdGenerator.Tests/LINGYUN/Abp/IdGenerator/AbpIdGeneratorTestModule.cs @@ -13,7 +13,7 @@ public class AbpIdGeneratorModuleTestModule : AbpModule { PreConfigure(options => { - options.WorkerId = 30010 - 30000; + options.WorkerId = 10; options.WorkerIdBits = 5; options.DatacenterId = 1; }); diff --git a/build/build-aspnetcore-common.ps1 b/build/build-aspnetcore-common.ps1 index 6d9b28f26..3bb369866 100644 --- a/build/build-aspnetcore-common.ps1 +++ b/build/build-aspnetcore-common.ps1 @@ -18,6 +18,7 @@ $serviceArray += [PsObject]@{ Path = $rootFolder + "/../gateways/internal/LINGYU [PsObject[]]$solutionArray = @() $solutionArray += [PsObject]@{ File = $rootFolder + "/../aspnet-core/LINGYUN.MicroService.All.sln" } +$solutionArray += [PsObject]@{ File = $rootFolder + "/../aspnet-core/LINGYUN.MicroService.Common.sln" } $solutionArray += [PsObject]@{ File = $rootFolder + "/../aspnet-core/LINGYUN.MicroService.TaskManagement.sln" } $solutionArray += [PsObject]@{ File = $rootFolder + "/../aspnet-core/LINGYUN.MicroService.WebhooksManagement.sln" } $solutionArray += [PsObject]@{ File = $rootFolder + "/../aspnet-core/LINGYUN.MicroService.Workflow.sln" }