diff --git a/aspnet-core/LINGYUN.MicroService.All.sln b/aspnet-core/LINGYUN.MicroService.All.sln index 5cb94c360..bec216761 100644 --- a/aspnet-core/LINGYUN.MicroService.All.sln +++ b/aspnet-core/LINGYUN.MicroService.All.sln @@ -349,7 +349,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.AuditLogging.El EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.AuditLogging.EntityFrameworkCore", "modules\auditing\LINGYUN.Abp.AuditLogging.EntityFrameworkCore\LINGYUN.Abp.AuditLogging.EntityFrameworkCore.csproj", "{F71A0D28-397D-4094-B1C2-7925E1310676}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Serilog.Enrichers.Application", "modules\logging\LINGYUN.Abp.Serilog.Enrichers.Application\LINGYUN.Abp.Serilog.Enrichers.Application.csproj", "{CEAF0044-28D3-4585-B69D-D65FF6D4745E}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Serilog.Enrichers.Application", "modules\logging\LINGYUN.Abp.Serilog.Enrichers.Application\LINGYUN.Abp.Serilog.Enrichers.Application.csproj", "{CEAF0044-28D3-4585-B69D-D65FF6D4745E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Data.DbMigrator", "modules\common\LINGYUN.Abp.Data.DbMigrator\LINGYUN.Abp.Data.DbMigrator.csproj", "{91D9F43A-BFD9-47CA-A6AD-430D1663EFF3}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -917,6 +919,10 @@ Global {CEAF0044-28D3-4585-B69D-D65FF6D4745E}.Debug|Any CPU.Build.0 = Debug|Any CPU {CEAF0044-28D3-4585-B69D-D65FF6D4745E}.Release|Any CPU.ActiveCfg = Release|Any CPU {CEAF0044-28D3-4585-B69D-D65FF6D4745E}.Release|Any CPU.Build.0 = Release|Any CPU + {91D9F43A-BFD9-47CA-A6AD-430D1663EFF3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {91D9F43A-BFD9-47CA-A6AD-430D1663EFF3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {91D9F43A-BFD9-47CA-A6AD-430D1663EFF3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {91D9F43A-BFD9-47CA-A6AD-430D1663EFF3}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1090,6 +1096,7 @@ Global {AD3CC5B5-366B-4E34-8E80-EC5BB68B573A} = {67DAB2A0-D407-4CAB-8414-AE3D0AC52FC4} {F71A0D28-397D-4094-B1C2-7925E1310676} = {67DAB2A0-D407-4CAB-8414-AE3D0AC52FC4} {CEAF0044-28D3-4585-B69D-D65FF6D4745E} = {6FC0578B-CDF1-43AD-9F7E-4AA7E4720A02} + {91D9F43A-BFD9-47CA-A6AD-430D1663EFF3} = {8AC72641-30D3-4ACF-89FA-808FADC55C2E} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {C95FDF91-16F2-4A8B-A4BE-0E62D1B66718} diff --git a/aspnet-core/LINGYUN.MicroService.BackendAdmin.sln b/aspnet-core/LINGYUN.MicroService.BackendAdmin.sln index 68f782e36..0bd386870 100644 --- a/aspnet-core/LINGYUN.MicroService.BackendAdmin.sln +++ b/aspnet-core/LINGYUN.MicroService.BackendAdmin.sln @@ -89,6 +89,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Logging.Serilog EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Serilog.Enrichers.Application", "modules\logging\LINGYUN.Abp.Serilog.Enrichers.Application\LINGYUN.Abp.Serilog.Enrichers.Application.csproj", "{2AF1B4CF-471E-40FA-AF7B-CD730DA5EB7F}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "common", "common", "{380FF8BB-8924-470B-B52A-53A7E28C324D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Data.DbMigrator", "modules\common\LINGYUN.Abp.Data.DbMigrator\LINGYUN.Abp.Data.DbMigrator.csproj", "{765D9D60-9F22-4A58-964E-5747003431BB}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -219,6 +223,10 @@ Global {2AF1B4CF-471E-40FA-AF7B-CD730DA5EB7F}.Debug|Any CPU.Build.0 = Debug|Any CPU {2AF1B4CF-471E-40FA-AF7B-CD730DA5EB7F}.Release|Any CPU.ActiveCfg = Release|Any CPU {2AF1B4CF-471E-40FA-AF7B-CD730DA5EB7F}.Release|Any CPU.Build.0 = Release|Any CPU + {765D9D60-9F22-4A58-964E-5747003431BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {765D9D60-9F22-4A58-964E-5747003431BB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {765D9D60-9F22-4A58-964E-5747003431BB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {765D9D60-9F22-4A58-964E-5747003431BB}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -265,6 +273,8 @@ Global {0C800A57-2658-4640-99A1-A02805EE6E99} = {FC5C41DC-3E6E-4775-A6A2-D5B5B490B13D} {EBDD5D30-7F82-46EB-A4E9-213932D14047} = {FC5C41DC-3E6E-4775-A6A2-D5B5B490B13D} {2AF1B4CF-471E-40FA-AF7B-CD730DA5EB7F} = {FC5C41DC-3E6E-4775-A6A2-D5B5B490B13D} + {380FF8BB-8924-470B-B52A-53A7E28C324D} = {ED23B2F3-87C1-44B6-8906-9DE739422C2C} + {765D9D60-9F22-4A58-964E-5747003431BB} = {380FF8BB-8924-470B-B52A-53A7E28C324D} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {1573B900-87BA-4AD3-B785-6DD78127ADEF} diff --git a/aspnet-core/LINGYUN.MicroService.Common.sln b/aspnet-core/LINGYUN.MicroService.Common.sln index 64c8cd270..e9129df5c 100644 --- a/aspnet-core/LINGYUN.MicroService.Common.sln +++ b/aspnet-core/LINGYUN.MicroService.Common.sln @@ -180,6 +180,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Serilog.Enriche EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Localization.Dynamic", "modules\common\LINGYUN.Abp.Localization.Dynamic\LINGYUN.Abp.Localization.Dynamic.csproj", "{4635BDFB-B647-43E2-BAA5-D3C17899AF24}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Data.DbMigrator", "modules\common\LINGYUN.Abp.Data.DbMigrator\LINGYUN.Abp.Data.DbMigrator.csproj", "{3993A315-B250-4C5D-98C7-90FD06841B66}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -466,6 +468,10 @@ Global {4635BDFB-B647-43E2-BAA5-D3C17899AF24}.Debug|Any CPU.Build.0 = Debug|Any CPU {4635BDFB-B647-43E2-BAA5-D3C17899AF24}.Release|Any CPU.ActiveCfg = Release|Any CPU {4635BDFB-B647-43E2-BAA5-D3C17899AF24}.Release|Any CPU.Build.0 = Release|Any CPU + {3993A315-B250-4C5D-98C7-90FD06841B66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3993A315-B250-4C5D-98C7-90FD06841B66}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3993A315-B250-4C5D-98C7-90FD06841B66}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3993A315-B250-4C5D-98C7-90FD06841B66}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -556,6 +562,7 @@ Global {CD556F2A-A96B-43A2-8BB3-6C0EBA27EB02} = {23F4260D-87C1-4AA6-A302-0A8A76D53BA1} {CCB4AE25-7059-4CA0-A3AB-CBB863A3F672} = {23F4260D-87C1-4AA6-A302-0A8A76D53BA1} {4635BDFB-B647-43E2-BAA5-D3C17899AF24} = {E73A0F8B-2B4B-4CED-82A4-1EE5E0B89744} + {3993A315-B250-4C5D-98C7-90FD06841B66} = {086BE5BE-8594-4DA7-8819-935FEF76DABD} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {06C707C6-02C0-411A-AD3B-2D0E13787CB8} diff --git a/aspnet-core/LINGYUN.MicroService.IdentityServer.sln b/aspnet-core/LINGYUN.MicroService.IdentityServer.sln index f8c2b3b82..c433080ee 100644 --- a/aspnet-core/LINGYUN.MicroService.IdentityServer.sln +++ b/aspnet-core/LINGYUN.MicroService.IdentityServer.sln @@ -69,6 +69,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.AuditLogging.El EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Serilog.Enrichers.Application", "modules\logging\LINGYUN.Abp.Serilog.Enrichers.Application\LINGYUN.Abp.Serilog.Enrichers.Application.csproj", "{596F645E-19F4-45C4-BED6-7BB6B32F5684}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Data.DbMigrator", "modules\common\LINGYUN.Abp.Data.DbMigrator\LINGYUN.Abp.Data.DbMigrator.csproj", "{0F8184B5-37B8-432E-8017-04B903175D31}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -163,6 +165,10 @@ Global {596F645E-19F4-45C4-BED6-7BB6B32F5684}.Debug|Any CPU.Build.0 = Debug|Any CPU {596F645E-19F4-45C4-BED6-7BB6B32F5684}.Release|Any CPU.ActiveCfg = Release|Any CPU {596F645E-19F4-45C4-BED6-7BB6B32F5684}.Release|Any CPU.Build.0 = Release|Any CPU + {0F8184B5-37B8-432E-8017-04B903175D31}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0F8184B5-37B8-432E-8017-04B903175D31}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0F8184B5-37B8-432E-8017-04B903175D31}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0F8184B5-37B8-432E-8017-04B903175D31}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -198,6 +204,7 @@ Global {6D86FA60-9969-4401-851C-6B8845B3FCC9} = {42D02351-CF36-402A-B89A-F10D3DAD8EC8} {489CC1F9-C648-4E3C-869B-0CEE0454EE9E} = {42D02351-CF36-402A-B89A-F10D3DAD8EC8} {596F645E-19F4-45C4-BED6-7BB6B32F5684} = {ACA1734A-4BF5-4DF9-94CF-3E5B3535B480} + {0F8184B5-37B8-432E-8017-04B903175D31} = {572DBB40-4637-4C01-8491-8686F7E22B45} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {FCB77471-9ECB-4666-A316-1D6A6285A468} diff --git a/aspnet-core/LINGYUN.MicroService.Localization.sln b/aspnet-core/LINGYUN.MicroService.Localization.sln index bfb6121f0..74c497a13 100644 --- a/aspnet-core/LINGYUN.MicroService.Localization.sln +++ b/aspnet-core/LINGYUN.MicroService.Localization.sln @@ -47,6 +47,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.AuditLogging", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.AuditLogging.Elasticsearch", "modules\auditing\LINGYUN.Abp.AuditLogging.Elasticsearch\LINGYUN.Abp.AuditLogging.Elasticsearch.csproj", "{EB92BC91-D883-4AB0-9F93-72AA9D7CC68C}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Data.DbMigrator", "modules\common\LINGYUN.Abp.Data.DbMigrator\LINGYUN.Abp.Data.DbMigrator.csproj", "{37E0844A-61C6-47FA-9F76-79628B412818}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -109,6 +111,10 @@ Global {EB92BC91-D883-4AB0-9F93-72AA9D7CC68C}.Debug|Any CPU.Build.0 = Debug|Any CPU {EB92BC91-D883-4AB0-9F93-72AA9D7CC68C}.Release|Any CPU.ActiveCfg = Release|Any CPU {EB92BC91-D883-4AB0-9F93-72AA9D7CC68C}.Release|Any CPU.Build.0 = Release|Any CPU + {37E0844A-61C6-47FA-9F76-79628B412818}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {37E0844A-61C6-47FA-9F76-79628B412818}.Debug|Any CPU.Build.0 = Debug|Any CPU + {37E0844A-61C6-47FA-9F76-79628B412818}.Release|Any CPU.ActiveCfg = Release|Any CPU + {37E0844A-61C6-47FA-9F76-79628B412818}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -128,6 +134,7 @@ Global {7BC49B77-7EFF-4998-9628-748DF18125C6} = {F89D9154-58D8-4F26-8DD7-F907D68DB9E5} {B71D1883-106A-409B-958A-2D1F561F4357} = {0C15D7EE-42C4-4FB5-9970-8ED75B02EE9E} {EB92BC91-D883-4AB0-9F93-72AA9D7CC68C} = {0C15D7EE-42C4-4FB5-9970-8ED75B02EE9E} + {37E0844A-61C6-47FA-9F76-79628B412818} = {19D90C55-2B0C-4E41-8BE5-23BA946071DB} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {F65E7489-B7F7-469E-8D24-7CBEEBACD119} diff --git a/aspnet-core/LINGYUN.MicroService.Messages.sln b/aspnet-core/LINGYUN.MicroService.Messages.sln index 5096aa183..a425e82cd 100644 --- a/aspnet-core/LINGYUN.MicroService.Messages.sln +++ b/aspnet-core/LINGYUN.MicroService.Messages.sln @@ -93,6 +93,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.AuditLogging", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.AuditLogging.Elasticsearch", "modules\auditing\LINGYUN.Abp.AuditLogging.Elasticsearch\LINGYUN.Abp.AuditLogging.Elasticsearch.csproj", "{69F5D2A0-480E-4461-9C30-1678F23258C1}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Data.DbMigrator", "modules\common\LINGYUN.Abp.Data.DbMigrator\LINGYUN.Abp.Data.DbMigrator.csproj", "{298D561E-3AFB-4161-82F1-DF0F8C54BBB4}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -247,6 +249,10 @@ Global {69F5D2A0-480E-4461-9C30-1678F23258C1}.Debug|Any CPU.Build.0 = Debug|Any CPU {69F5D2A0-480E-4461-9C30-1678F23258C1}.Release|Any CPU.ActiveCfg = Release|Any CPU {69F5D2A0-480E-4461-9C30-1678F23258C1}.Release|Any CPU.Build.0 = Release|Any CPU + {298D561E-3AFB-4161-82F1-DF0F8C54BBB4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {298D561E-3AFB-4161-82F1-DF0F8C54BBB4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {298D561E-3AFB-4161-82F1-DF0F8C54BBB4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {298D561E-3AFB-4161-82F1-DF0F8C54BBB4}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -294,6 +300,7 @@ Global {321FC8A7-D595-431A-AC14-1F5E1B901BCF} = {91E005C0-3A78-47C2-86F1-A21362ED350E} {4D594462-D10D-46AF-980E-95EDE676F1CF} = {F566D959-7F56-4EB4-A448-A87AEFC92178} {69F5D2A0-480E-4461-9C30-1678F23258C1} = {F566D959-7F56-4EB4-A448-A87AEFC92178} + {298D561E-3AFB-4161-82F1-DF0F8C54BBB4} = {C00828FB-E7D5-4086-BA50-02022594AB73} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {6238659A-7267-49B9-A499-8746BDEED6B8} diff --git a/aspnet-core/LINGYUN.MicroService.Platform.sln b/aspnet-core/LINGYUN.MicroService.Platform.sln index 3787e65ed..4ceb03051 100644 --- a/aspnet-core/LINGYUN.MicroService.Platform.sln +++ b/aspnet-core/LINGYUN.MicroService.Platform.sln @@ -84,6 +84,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.AuditLogging.El EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Serilog.Enrichers.Application", "modules\logging\LINGYUN.Abp.Serilog.Enrichers.Application\LINGYUN.Abp.Serilog.Enrichers.Application.csproj", "{6C048526-5A14-4835-B8BA-1C0C6E887225}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Data.DbMigrator", "modules\common\LINGYUN.Abp.Data.DbMigrator\LINGYUN.Abp.Data.DbMigrator.csproj", "{FA49E154-CD90-4E11-8216-3EF545C32294}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -206,6 +208,10 @@ Global {6C048526-5A14-4835-B8BA-1C0C6E887225}.Debug|Any CPU.Build.0 = Debug|Any CPU {6C048526-5A14-4835-B8BA-1C0C6E887225}.Release|Any CPU.ActiveCfg = Release|Any CPU {6C048526-5A14-4835-B8BA-1C0C6E887225}.Release|Any CPU.Build.0 = Release|Any CPU + {FA49E154-CD90-4E11-8216-3EF545C32294}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FA49E154-CD90-4E11-8216-3EF545C32294}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FA49E154-CD90-4E11-8216-3EF545C32294}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FA49E154-CD90-4E11-8216-3EF545C32294}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -247,6 +253,7 @@ Global {04D53D5C-873D-4A66-98D4-88195E927E20} = {20E8BAE5-C13E-4F86-9EB0-EF24F50442B5} {F90823E2-53DC-4751-BCCD-6C11B3899592} = {20E8BAE5-C13E-4F86-9EB0-EF24F50442B5} {6C048526-5A14-4835-B8BA-1C0C6E887225} = {D845545B-57C4-43A1-985B-23C372340CD6} + {FA49E154-CD90-4E11-8216-3EF545C32294} = {265D5E44-682B-49BC-984A-BDD8CA45E60E} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {03D3B66F-8926-4C00-B7AB-A21761EC859E} diff --git a/aspnet-core/modules/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/ElasticsearchAuditLogManager.cs b/aspnet-core/modules/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/ElasticsearchAuditLogManager.cs index 1dfe405f1..0a34de761 100644 --- a/aspnet-core/modules/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/ElasticsearchAuditLogManager.cs +++ b/aspnet-core/modules/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/ElasticsearchAuditLogManager.cs @@ -82,7 +82,7 @@ namespace LINGYUN.Abp.AuditLogging.Elasticsearch hasException, httpStatusCode); - var response = await client.CountAsync(dsl => + var response = await client.CountAsync(dsl => dsl.Index(CreateIndex()) .Query(log => log.Bool(b => b.Must(querys.ToArray()))), cancellationToken); @@ -115,7 +115,7 @@ namespace LINGYUN.Abp.AuditLogging.Elasticsearch var sortOrder = !sorting.IsNullOrWhiteSpace() && sorting.EndsWith("asc", StringComparison.InvariantCultureIgnoreCase) ? SortOrder.Ascending : SortOrder.Descending; - sorting = !sorting.IsNullOrWhiteSpace() + sorting = !sorting.IsNullOrWhiteSpace() ? sorting.Split()[0] : nameof(AuditLog.ExecutionTime); @@ -135,7 +135,7 @@ namespace LINGYUN.Abp.AuditLogging.Elasticsearch hasException, httpStatusCode); - SourceFilterDescriptor ConvertFileSystem(SourceFilterDescriptor selector) + SourceFilterDescriptor SourceFilter(SourceFilterDescriptor selector) { selector.IncludeAll(); if (!includeDetails) @@ -153,7 +153,7 @@ namespace LINGYUN.Abp.AuditLogging.Elasticsearch var response = await client.SearchAsync(dsl => dsl.Index(CreateIndex()) .Query(log => log.Bool(b => b.Must(querys.ToArray()))) - .Source(ConvertFileSystem) + .Source(SourceFilter) .Sort(log => log.Field(GetField(sorting), sortOrder)) .From(skipCount) .Size(maxResultCount), @@ -163,8 +163,8 @@ namespace LINGYUN.Abp.AuditLogging.Elasticsearch } public virtual async Task GetAsync( - Guid id, - bool includeDetails = false, + Guid id, + bool includeDetails = false, CancellationToken cancellationToken = default) { var client = _clientFactory.Create(); @@ -219,9 +219,9 @@ namespace LINGYUN.Abp.AuditLogging.Elasticsearch var auditLog = await _converter.ConvertAsync(auditLogInfo); var response = await client.IndexAsync( - auditLog, + auditLog, (x) => x.Index(CreateIndex()) - .Id(auditLog.Id), + .Id(auditLog.Id), cancellationToken); return response.Id; @@ -359,13 +359,12 @@ namespace LINGYUN.Abp.AuditLogging.Elasticsearch }; protected virtual string GetField(string field) { - field = _elasticsearchOptions.FieldCamelCase ? field.ToCamelCase() : field.ToPascalCase(); if (_fieldMaps.TryGetValue(field, out string mapField)) { - return mapField; + return _elasticsearchOptions.FieldCamelCase ? mapField.ToCamelCase() : mapField.ToPascalCase(); } - return field; + return _elasticsearchOptions.FieldCamelCase ? field.ToCamelCase() : field.ToPascalCase(); } } } diff --git a/aspnet-core/modules/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/ElasticsearchSecurityLogManager.cs b/aspnet-core/modules/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/ElasticsearchSecurityLogManager.cs index a2ea932cb..0f718ba03 100644 --- a/aspnet-core/modules/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/ElasticsearchSecurityLogManager.cs +++ b/aspnet-core/modules/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/ElasticsearchSecurityLogManager.cs @@ -245,7 +245,7 @@ namespace LINGYUN.Abp.AuditLogging.Elasticsearch { return $"{_options.IndexPrefix}-security-log-{_currentTenant.Id:N}"; } - return _options.IndexPrefix.IsNullOrWhiteSpace() + return _options.IndexPrefix.IsNullOrWhiteSpace() ? "security-log" : $"{_options.IndexPrefix}-security-log"; } @@ -267,13 +267,12 @@ namespace LINGYUN.Abp.AuditLogging.Elasticsearch }; protected virtual string GetField(string field) { - field = _elasticsearchOptions.FieldCamelCase ? field.ToCamelCase() : field.ToPascalCase(); if (_fieldMaps.TryGetValue(field, out string mapField)) { - return mapField; + return _elasticsearchOptions.FieldCamelCase ? mapField.ToCamelCase() : mapField.ToPascalCase(); } - return field; + return _elasticsearchOptions.FieldCamelCase ? field.ToCamelCase() : field.ToPascalCase(); } } } diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Data.DbMigrator/LINGYUN.Abp.Data.DbMigrator.csproj b/aspnet-core/modules/common/LINGYUN.Abp.Data.DbMigrator/LINGYUN.Abp.Data.DbMigrator.csproj new file mode 100644 index 000000000..23f1e7688 --- /dev/null +++ b/aspnet-core/modules/common/LINGYUN.Abp.Data.DbMigrator/LINGYUN.Abp.Data.DbMigrator.csproj @@ -0,0 +1,12 @@ + + + + net5.0 + + + + + + + + diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Data.DbMigrator/LINGYUN/Abp/Data/DbMigrator/AbpDataDbMigratorModule.cs b/aspnet-core/modules/common/LINGYUN.Abp.Data.DbMigrator/LINGYUN/Abp/Data/DbMigrator/AbpDataDbMigratorModule.cs new file mode 100644 index 000000000..fb5095963 --- /dev/null +++ b/aspnet-core/modules/common/LINGYUN.Abp.Data.DbMigrator/LINGYUN/Abp/Data/DbMigrator/AbpDataDbMigratorModule.cs @@ -0,0 +1,12 @@ +using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.Modularity; + +namespace LINGYUN.Abp.Data.DbMigrator +{ + [DependsOn( + typeof(AbpEntityFrameworkCoreModule))] + public class AbpDataDbMigratorModule : AbpModule + { + + } +} diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Data.DbMigrator/LINGYUN/Abp/Data/DbMigrator/DefaultDbSchemaMigrator.cs b/aspnet-core/modules/common/LINGYUN.Abp.Data.DbMigrator/LINGYUN/Abp/Data/DbMigrator/DefaultDbSchemaMigrator.cs new file mode 100644 index 000000000..18c1fbf8f --- /dev/null +++ b/aspnet-core/modules/common/LINGYUN.Abp.Data.DbMigrator/LINGYUN/Abp/Data/DbMigrator/DefaultDbSchemaMigrator.cs @@ -0,0 +1,49 @@ +using JetBrains.Annotations; +using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Options; +using System; +using System.Threading.Tasks; +using Volo.Abp.Data; +using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.DependencyInjection; + +namespace LINGYUN.Abp.Data.DbMigrator +{ + public class DefaultDbSchemaMigrator : IDbSchemaMigrator, ITransientDependency + { + private readonly IServiceProvider _serviceProvider; + private readonly AbpDbConnectionOptions _dbConnectionOptions; + + public DefaultDbSchemaMigrator( + IServiceProvider serviceProvider, + IOptions dbConnectionOptions) + { + _serviceProvider = serviceProvider; + _dbConnectionOptions = dbConnectionOptions.Value; + } + + public virtual async Task MigrateAsync( + [NotNull] Func, TDbContext> configureDbContext) + where TDbContext : AbpDbContext + { + var connectionStringResolver = _serviceProvider + .GetRequiredService(); + var connectionString = await connectionStringResolver.ResolveAsync(); + + // 租户连接字符串与默认连接字符串相同,则不执行迁移脚本 + if (string.Equals( + connectionString, + _dbConnectionOptions.ConnectionStrings.Default, + StringComparison.InvariantCultureIgnoreCase)) + { + return; + } + + var dbContextBuilder = new DbContextOptionsBuilder(); + using var dbContext = configureDbContext(connectionString, dbContextBuilder); + + await dbContext.Database.MigrateAsync(); + } + } +} diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Data.DbMigrator/LINGYUN/Abp/Data/DbMigrator/IDbSchemaMigrator.cs b/aspnet-core/modules/common/LINGYUN.Abp.Data.DbMigrator/LINGYUN/Abp/Data/DbMigrator/IDbSchemaMigrator.cs new file mode 100644 index 000000000..c059d940e --- /dev/null +++ b/aspnet-core/modules/common/LINGYUN.Abp.Data.DbMigrator/LINGYUN/Abp/Data/DbMigrator/IDbSchemaMigrator.cs @@ -0,0 +1,15 @@ +using JetBrains.Annotations; +using Microsoft.EntityFrameworkCore; +using System; +using System.Threading.Tasks; +using Volo.Abp.EntityFrameworkCore; + +namespace LINGYUN.Abp.Data.DbMigrator +{ + public interface IDbSchemaMigrator + { + Task MigrateAsync( + [NotNull] Func, TDbContext> configureDbContext) + where TDbContext : AbpDbContext; + } +} diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Data.DbMigrator/README.md b/aspnet-core/modules/common/LINGYUN.Abp.Data.DbMigrator/README.md new file mode 100644 index 000000000..dd51dc8c5 --- /dev/null +++ b/aspnet-core/modules/common/LINGYUN.Abp.Data.DbMigrator/README.md @@ -0,0 +1,56 @@ +# LINGYUN.Abp.Data.DbMigrator + +数据迁移模块,用于配合需要提供数据初始化的场景(例如新租户创建时) + +## 配置使用 + + +```csharp +[DependsOn(typeof(AbpDataDbMigratorModule))] +public class YouProjectModule : AbpModule +{ + // other +} + +public class FakeDbContext : AbpDbContext +{ + public FakeDbContext(DbContextOptions options) + : base(options) + { + + } + + protected override void OnModelCreating(ModelBuilder modelBuilder) + { + base.OnModelCreating(modelBuilder); + } +} + +public class FakeMigretor +{ + private readonly IDbSchemaMigrator _migrator; + + public FakeMigretor( + IDbSchemaMigrator migrator) + { + _migrator = migrator; + } + + public async Task MigrateAsync() + { + // 将执行 EF 迁移脚本, 需要提供用作数据迁移的 DbContext + await _migrator.MigrateAsync( + // connectionString: 当前租户连接字符串,用于构建连接 + // builder: 用于初始化上下文的构造器 + (connectionString, builder) => + { + + // 在委托中由用户决定数据库参数 + builder.UseMySql(connectionString, ServerVersion.AutoDetect(connectionString)); + + // 返回实例化的DbContext + return new FakeDbContext(builder.Options); + }); + } +} +``` diff --git a/aspnet-core/modules/logging/LINGYUN.Abp.Logging.Serilog.Elasticsearch/LINGYUN/Abp/AuditLogging/Serilog/Elasticsearch/AbpLoggingSerilogElasticsearchModule.cs b/aspnet-core/modules/logging/LINGYUN.Abp.Logging.Serilog.Elasticsearch/LINGYUN/Abp/AuditLogging/Serilog/Elasticsearch/AbpLoggingSerilogElasticsearchModule.cs index 448348c38..0b8de8c12 100644 --- a/aspnet-core/modules/logging/LINGYUN.Abp.Logging.Serilog.Elasticsearch/LINGYUN/Abp/AuditLogging/Serilog/Elasticsearch/AbpLoggingSerilogElasticsearchModule.cs +++ b/aspnet-core/modules/logging/LINGYUN.Abp.Logging.Serilog.Elasticsearch/LINGYUN/Abp/AuditLogging/Serilog/Elasticsearch/AbpLoggingSerilogElasticsearchModule.cs @@ -1,10 +1,7 @@ using LINGYUN.Abp.Elasticsearch; using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.DependencyInjection.Extensions; -using Microsoft.Extensions.Options; using Volo.Abp.AutoMapper; using Volo.Abp.Json; -using Volo.Abp.Json.SystemTextJson; using Volo.Abp.Modularity; namespace LINGYUN.Abp.Logging.Serilog.Elasticsearch diff --git a/aspnet-core/modules/logging/LINGYUN.Abp.Logging.Serilog.Elasticsearch/LINGYUN/Abp/AuditLogging/Serilog/Elasticsearch/SerilogElasticsearchLoggingManager.cs b/aspnet-core/modules/logging/LINGYUN.Abp.Logging.Serilog.Elasticsearch/LINGYUN/Abp/AuditLogging/Serilog/Elasticsearch/SerilogElasticsearchLoggingManager.cs index 30507803c..56a16eaa6 100644 --- a/aspnet-core/modules/logging/LINGYUN.Abp.Logging.Serilog.Elasticsearch/LINGYUN/Abp/AuditLogging/Serilog/Elasticsearch/SerilogElasticsearchLoggingManager.cs +++ b/aspnet-core/modules/logging/LINGYUN.Abp.Logging.Serilog.Elasticsearch/LINGYUN/Abp/AuditLogging/Serilog/Elasticsearch/SerilogElasticsearchLoggingManager.cs @@ -11,6 +11,7 @@ using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; using Volo.Abp.DependencyInjection; +using Volo.Abp.MultiTenancy; using Volo.Abp.ObjectMapping; namespace LINGYUN.Abp.Logging.Serilog.Elasticsearch @@ -21,6 +22,7 @@ namespace LINGYUN.Abp.Logging.Serilog.Elasticsearch private static readonly Regex IndexFormatRegex = new Regex(@"^(.*)(?:\{0\:.+\})(.*)$"); private readonly IObjectMapper _objectMapper; + private readonly ICurrentTenant _currentTenant; private readonly AbpLoggingSerilogElasticsearchOptions _options; private readonly IElasticsearchClientFactory _clientFactory; @@ -28,10 +30,12 @@ namespace LINGYUN.Abp.Logging.Serilog.Elasticsearch public SerilogElasticsearchLoggingManager( IObjectMapper objectMapper, + ICurrentTenant currentTenant, IOptions options, IElasticsearchClientFactory clientFactory) { _objectMapper = objectMapper; + _currentTenant = currentTenant; _clientFactory = clientFactory; _options = options.Value; @@ -50,15 +54,71 @@ namespace LINGYUN.Abp.Logging.Serilog.Elasticsearch { var client = _clientFactory.Create(); - var response = await client.SearchAsync( - dsl => - dsl.Index(CreateIndex()) - .Query( - (q) => q.Bool( - (b) => b.Should( - (s) => s.Term( - (t) => t.Field("@timestamp").Value(id))))), - cancellationToken); + ISearchResponse response; + + if (_currentTenant.IsAvailable) + { + /* + "query": { + "bool": { + "must": [ + { + "term": { + "fields.TenantId.keyword": { + "value": _currentTenant.GetId() + } + } + }, + { + "term": { + "@timestamp": { + "value": "2021-10-31T09:53:12.3406273+08:00" + } + } + } + ] + } + } + */ + response = await client.SearchAsync( + dsl => + dsl.Index(CreateIndex()) + .Query( + (q) => q.Bool( + (b) => b.Must( + (s) => s.Term( + (t) => t.Field("@timestamp").Value(id)), + (s) => s.Term( + (t) => t.Field(f => f.Fields.TenantId.Suffix("keyword")).Value(_currentTenant.GetId()))))), + cancellationToken); + } + else + { + /* + "query": { + "bool": { + "must": [ + { + "term": { + "@timestamp": { + "value": "2021-10-31T09:53:12.3406273+08:00" + } + } + } + ] + } + } + */ + response = await client.SearchAsync( + dsl => + dsl.Index(CreateIndex()) + .Query( + (q) => q.Bool( + (b) => b.Must( + (s) => s.Term( + (t) => t.Field("@timestamp").Value(id))))), + cancellationToken); + } return _objectMapper.Map(response.Documents.FirstOrDefault()); } @@ -96,7 +156,7 @@ namespace LINGYUN.Abp.Logging.Serilog.Elasticsearch threadId, hasException); - var response = await client.CountAsync((dsl) => + var response = await client.CountAsync((dsl) => dsl.Index(CreateIndex()) .Query(log => log.Bool(b => b.Must(querys.ToArray()))), cancellationToken); @@ -167,7 +227,7 @@ namespace LINGYUN.Abp.Logging.Serilog.Elasticsearch threadId, hasException); - SourceFilterDescriptor ConvertFileSystem(SourceFilterDescriptor selector) + SourceFilterDescriptor SourceFilter(SourceFilterDescriptor selector) { selector.IncludeAll(); if (!includeDetails) @@ -182,7 +242,7 @@ namespace LINGYUN.Abp.Logging.Serilog.Elasticsearch var response = await client.SearchAsync((dsl) => dsl.Index(CreateIndex()) .Query(log => log.Bool(b => b.Must(querys.ToArray()))) - .Source(ConvertFileSystem) + .Source(SourceFilter) .Sort(log => log.Field(GetField(sorting), sortOrder)) .From(skipCount) .Size(maxResultCount), @@ -208,6 +268,10 @@ namespace LINGYUN.Abp.Logging.Serilog.Elasticsearch { var querys = new List, QueryContainer>>(); + if (_currentTenant.IsAvailable) + { + querys.Add((log) => log.Term((q) => q.Field((f) => f.Fields.TenantId.Suffix("keyword")).Value(_currentTenant.GetId()))); + } if (startTime.HasValue) { querys.Add((log) => log.DateRange((q) => q.Field(f => f.TimeStamp).GreaterThanOrEquals(startTime))); diff --git a/aspnet-core/modules/logging/LINGYUN.Abp.Logging.Serilog.Elasticsearch/LINGYUN/Abp/AuditLogging/Serilog/Elasticsearch/SerilogField.cs b/aspnet-core/modules/logging/LINGYUN.Abp.Logging.Serilog.Elasticsearch/LINGYUN/Abp/AuditLogging/Serilog/Elasticsearch/SerilogField.cs index 2ad6938fc..7409aab49 100644 --- a/aspnet-core/modules/logging/LINGYUN.Abp.Logging.Serilog.Elasticsearch/LINGYUN/Abp/AuditLogging/Serilog/Elasticsearch/SerilogField.cs +++ b/aspnet-core/modules/logging/LINGYUN.Abp.Logging.Serilog.Elasticsearch/LINGYUN/Abp/AuditLogging/Serilog/Elasticsearch/SerilogField.cs @@ -1,4 +1,5 @@ using LINGYUN.Abp.Serilog.Enrichers.Application; +using System; namespace LINGYUN.Abp.Logging.Serilog.Elasticsearch { @@ -40,6 +41,9 @@ namespace LINGYUN.Abp.Logging.Serilog.Elasticsearch [Nest.PropertyName("UserId")] public string UserId { get; set; } + [Nest.PropertyName("TenantId")] + public Guid? TenantId { get; set; } + [Nest.PropertyName("ProcessId")] public int ProcessId { get; set; } diff --git a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Domain/LINGYUN/Abp/OssManagement/AbpOssManagementDomainModule.cs b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Domain/LINGYUN/Abp/OssManagement/AbpOssManagementDomainModule.cs index 782e06ceb..dfa4091f4 100644 --- a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Domain/LINGYUN/Abp/OssManagement/AbpOssManagementDomainModule.cs +++ b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Domain/LINGYUN/Abp/OssManagement/AbpOssManagementDomainModule.cs @@ -1,7 +1,4 @@ using LINGYUN.Abp.Features.LimitValidation; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Options; -using Volo.Abp; using Volo.Abp.Domain; using Volo.Abp.Modularity; using Volo.Abp.MultiTenancy; @@ -16,17 +13,5 @@ namespace LINGYUN.Abp.OssManagement )] public class AbpOssManagementDomainModule : AbpModule { - public override void OnApplicationInitialization(ApplicationInitializationContext context) - { - // TODO: 是否有必要自动创建容器 - var ossOptions = context.ServiceProvider.GetRequiredService>().Value; - var ossFactory = context.ServiceProvider.GetRequiredService(); - var ossContainer = ossFactory.Create(); - - foreach (var bucket in ossOptions.StaticBuckets) - { - _ = ossContainer.CreateIfNotExistsAsync(bucket); - } - } } } diff --git a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Domain/LINGYUN/Abp/OssManagement/OssStaticContainerDataSeedContributor.cs b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Domain/LINGYUN/Abp/OssManagement/OssStaticContainerDataSeedContributor.cs new file mode 100644 index 000000000..0303b87a1 --- /dev/null +++ b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Domain/LINGYUN/Abp/OssManagement/OssStaticContainerDataSeedContributor.cs @@ -0,0 +1,30 @@ +using Microsoft.Extensions.Options; +using System.Threading.Tasks; +using Volo.Abp.Data; +using Volo.Abp.DependencyInjection; + +namespace LINGYUN.Abp.OssManagement +{ + public class OssStaticContainerDataSeedContributor : IDataSeedContributor, ITransientDependency + { + private readonly AbpOssManagementOptions _options; + private readonly IOssContainerFactory _ossContainerFactory; + public OssStaticContainerDataSeedContributor( + IOptions options, + IOssContainerFactory ossContainerFactory) + { + _options = options.Value; + _ossContainerFactory = ossContainerFactory; + } + + public virtual async Task SeedAsync(DataSeedContext context) + { + var ossContainer = _ossContainerFactory.Create(); + + foreach (var bucket in _options.StaticBuckets) + { + await ossContainer.CreateIfNotExistsAsync(bucket); + } + } + } +} diff --git a/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application.Contracts/LINGYUN/Abp/TenantManagement/AbpTenantManagementApplicationContractsModule.cs b/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application.Contracts/LINGYUN/Abp/TenantManagement/AbpTenantManagementApplicationContractsModule.cs index f79a22236..d3e1e70bc 100644 --- a/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application.Contracts/LINGYUN/Abp/TenantManagement/AbpTenantManagementApplicationContractsModule.cs +++ b/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application.Contracts/LINGYUN/Abp/TenantManagement/AbpTenantManagementApplicationContractsModule.cs @@ -1,30 +1,36 @@ -using Volo.Abp.Application; -using Volo.Abp.Localization; -using Volo.Abp.Modularity; -using Volo.Abp.TenantManagement; -using Volo.Abp.TenantManagement.Localization; -using Volo.Abp.VirtualFileSystem; - -namespace LINGYUN.Abp.TenantManagement -{ - [DependsOn( - typeof(AbpDddApplicationModule), - typeof(AbpTenantManagementDomainSharedModule))] - public class AbpTenantManagementApplicationContractsModule : AbpModule - { - public override void ConfigureServices(ServiceConfigurationContext context) - { - Configure(options => - { - options.FileSets.AddEmbedded(); - }); - - Configure(options => - { - options.Resources - .Get() - .AddVirtualJson("/LINGYUN/Abp/TenantManagement/Localization/Resources"); - }); - } - } +using Volo.Abp.Application; +using Volo.Abp.Localization; +using Volo.Abp.Localization.ExceptionHandling; +using Volo.Abp.Modularity; +using Volo.Abp.TenantManagement; +using Volo.Abp.TenantManagement.Localization; +using Volo.Abp.VirtualFileSystem; + +namespace LINGYUN.Abp.TenantManagement +{ + [DependsOn( + typeof(AbpDddApplicationModule), + typeof(AbpTenantManagementDomainSharedModule))] + public class AbpTenantManagementApplicationContractsModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.FileSets.AddEmbedded(); + }); + + Configure(options => + { + options.Resources + .Get() + .AddVirtualJson("/LINGYUN/Abp/TenantManagement/Localization/Resources"); + }); + + Configure(options => + { + options.MapCodeNamespace("LINGYUN.Abp.MultiTenancy", typeof(AbpTenantManagementResource)); + }); + } + } } \ No newline at end of file diff --git a/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application.Contracts/LINGYUN/Abp/TenantManagement/Dto/TenantCreateDto.cs b/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application.Contracts/LINGYUN/Abp/TenantManagement/Dto/TenantCreateDto.cs index 31e654701..87a1b20fb 100644 --- a/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application.Contracts/LINGYUN/Abp/TenantManagement/Dto/TenantCreateDto.cs +++ b/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application.Contracts/LINGYUN/Abp/TenantManagement/Dto/TenantCreateDto.cs @@ -1,16 +1,26 @@ -using System.ComponentModel.DataAnnotations; - -namespace LINGYUN.Abp.TenantManagement -{ - public class TenantCreateDto : TenantCreateOrUpdateDtoBase - { - [Required] - [EmailAddress] - [MaxLength(256)] - public virtual string AdminEmailAddress { get; set; } - - [Required] - [MaxLength(128)] - public virtual string AdminPassword { get; set; } - } +using System.ComponentModel.DataAnnotations; + +namespace LINGYUN.Abp.TenantManagement +{ + public class TenantCreateDto : TenantCreateOrUpdateDtoBase + { + [Required] + [EmailAddress] + [MaxLength(256)] + public string AdminEmailAddress { get; set; } + + [Required] + [MaxLength(128)] + public string AdminPassword { get; set; } + + /// + /// 使用共享数据库 + /// + public bool UseSharedDatabase { get; set; } = true; + + /// + /// 默认数据库连接字符串 + /// + public string DefaultConnectionString { get; set; } + } } \ No newline at end of file diff --git a/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application.Contracts/LINGYUN/Abp/TenantManagement/Localization/Resources/en.json b/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application.Contracts/LINGYUN/Abp/TenantManagement/Localization/Resources/en.json index 19f62d4f6..c8c26a6be 100644 --- a/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application.Contracts/LINGYUN/Abp/TenantManagement/Localization/Resources/en.json +++ b/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application.Contracts/LINGYUN/Abp/TenantManagement/Localization/Resources/en.json @@ -1,9 +1,10 @@ -{ - "culture": "en", - "texts": { - "DisplayName:Name": "Name", - "DisplayName:Value": "Value", - "TenantNotFoundById": "Tenant: {0} not found!", - "TenantNotFoundByName": "Tenant: {0} not found!" - } +{ + "culture": "en", + "texts": { + "DisplayName:Name": "Name", + "DisplayName:Value": "Value", + "TenantNotFoundById": "Tenant: {0} not found!", + "TenantNotFoundByName": "Tenant: {0} not found!", + "LINGYUN.Abp.MultiTenancy:010001": "The database string that cannot be connected!" + } } \ No newline at end of file diff --git a/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application.Contracts/LINGYUN/Abp/TenantManagement/Localization/Resources/zh-Hans.json b/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application.Contracts/LINGYUN/Abp/TenantManagement/Localization/Resources/zh-Hans.json index 151957280..f12a4c7a7 100644 --- a/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application.Contracts/LINGYUN/Abp/TenantManagement/Localization/Resources/zh-Hans.json +++ b/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application.Contracts/LINGYUN/Abp/TenantManagement/Localization/Resources/zh-Hans.json @@ -1,9 +1,10 @@ -{ - "culture": "zh-Hans", - "texts": { - "DisplayName:Name": "名称", - "DisplayName:Value": "值", - "TenantNotFoundById": "租户: {0} 不存在!", - "TenantNotFoundByName": "租户: {0} 不存在!" - } +{ + "culture": "zh-Hans", + "texts": { + "DisplayName:Name": "名称", + "DisplayName:Value": "值", + "TenantNotFoundById": "租户: {0} 不存在!", + "TenantNotFoundByName": "租户: {0} 不存在!", + "LINGYUN.Abp.MultiTenancy:010001": "无法连接的数据库字符串!" + } } \ No newline at end of file diff --git a/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application/LINGYUN/Abp/TenantManagement/TenantAppService.cs b/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application/LINGYUN/Abp/TenantManagement/TenantAppService.cs index 75dd26bd5..9baf48677 100644 --- a/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application/LINGYUN/Abp/TenantManagement/TenantAppService.cs +++ b/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application/LINGYUN/Abp/TenantManagement/TenantAppService.cs @@ -70,21 +70,27 @@ namespace LINGYUN.Abp.TenantManagement var tenant = await TenantManager.CreateAsync(input.Name); input.MapExtraPropertiesTo(tenant); - await TenantRepository.InsertAsync(tenant); + if (!input.UseSharedDatabase && !input.DefaultConnectionString.IsNullOrWhiteSpace()) + { + tenant.SetDefaultConnectionString(input.DefaultConnectionString); + } - await CurrentUnitOfWork.SaveChangesAsync(); + await TenantRepository.InsertAsync(tenant); - var createEventData = new CreateEventData + CurrentUnitOfWork.OnCompleted(async () => { - Id = tenant.Id, - Name = tenant.Name, - AdminUserId = GuidGenerator.Create(), - AdminEmailAddress = input.AdminEmailAddress, - AdminPassword = input.AdminPassword - }; - // 因为项目各自独立,租户增加时添加管理用户必须通过事件总线 - // 而 TenantEto 对象没有包含所需的用户名密码,需要独立发布事件 - await EventBus.PublishAsync(createEventData); + var createEventData = new CreateEventData + { + Id = tenant.Id, + Name = tenant.Name, + AdminUserId = GuidGenerator.Create(), + AdminEmailAddress = input.AdminEmailAddress, + AdminPassword = input.AdminPassword + }; + // 因为项目各自独立,租户增加时添加管理用户必须通过事件总线 + // 而 TenantEto 对象没有包含所需的用户名密码,需要独立发布事件 + await EventBus.PublishAsync(createEventData); + }); return ObjectMapper.Map(tenant); } diff --git a/aspnet-core/services/account/AuthServer.Host/AuthIdentityServerModule.cs b/aspnet-core/services/account/AuthServer.Host/AuthIdentityServerModule.cs index a01a9d982..f83134d1c 100644 --- a/aspnet-core/services/account/AuthServer.Host/AuthIdentityServerModule.cs +++ b/aspnet-core/services/account/AuthServer.Host/AuthIdentityServerModule.cs @@ -1,5 +1,6 @@ using LINGYUN.Abp.AspNetCore.HttpOverrides; using LINGYUN.Abp.AuditLogging.Elasticsearch; +using LINGYUN.Abp.Data.DbMigrator; using LINGYUN.Abp.EventBus.CAP; using LINGYUN.Abp.Identity.EntityFrameworkCore; using LINGYUN.Abp.IdentityServer; @@ -53,6 +54,7 @@ namespace AuthServer.Host typeof(AbpSettingManagementEntityFrameworkCoreModule), typeof(AbpFeatureManagementEntityFrameworkCoreModule), typeof(AbpTenantManagementEntityFrameworkCoreModule), + typeof(AbpDataDbMigratorModule), typeof(AbpAspNetCoreAuthenticationJwtBearerModule), typeof(AbpAuditLoggingElasticsearchModule), // 放在 AbpIdentity 模块之后,避免被覆盖 typeof(AbpAspNetCoreHttpOverridesModule), diff --git a/aspnet-core/services/account/AuthServer.Host/AuthServer.Host.csproj b/aspnet-core/services/account/AuthServer.Host/AuthServer.Host.csproj index 5f2989f38..80c63836f 100644 --- a/aspnet-core/services/account/AuthServer.Host/AuthServer.Host.csproj +++ b/aspnet-core/services/account/AuthServer.Host/AuthServer.Host.csproj @@ -57,6 +57,7 @@ + diff --git a/aspnet-core/services/account/AuthServer.Host/EntityFrameworkCore/AuthServerHostMigrationsDbContext.cs b/aspnet-core/services/account/AuthServer.Host/EntityFrameworkCore/AuthServerHostMigrationsDbContext.cs index 8e847e254..252363e4b 100644 --- a/aspnet-core/services/account/AuthServer.Host/EntityFrameworkCore/AuthServerHostMigrationsDbContext.cs +++ b/aspnet-core/services/account/AuthServer.Host/EntityFrameworkCore/AuthServerHostMigrationsDbContext.cs @@ -1,25 +1,24 @@ -using Microsoft.EntityFrameworkCore; -using Volo.Abp.EntityFrameworkCore; -using Volo.Abp.Identity.EntityFrameworkCore; -using Volo.Abp.IdentityServer.EntityFrameworkCore; - -namespace AuthServer.EntityFrameworkCore -{ - public class AuthServerHostMigrationsDbContext : AbpDbContext - { - public AuthServerHostMigrationsDbContext(DbContextOptions options) - : base(options) - { - - } - - protected override void OnModelCreating(ModelBuilder modelBuilder) - { - base.OnModelCreating(modelBuilder); - - modelBuilder.UseMySQL(); - modelBuilder.ConfigureIdentity(); - modelBuilder.ConfigureIdentityServer(); - } - } -} +using Microsoft.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.Identity.EntityFrameworkCore; +using Volo.Abp.IdentityServer.EntityFrameworkCore; + +namespace AuthServer.EntityFrameworkCore +{ + public class AuthServerHostMigrationsDbContext : AbpDbContext + { + public AuthServerHostMigrationsDbContext(DbContextOptions options) + : base(options) + { + + } + + protected override void OnModelCreating(ModelBuilder modelBuilder) + { + base.OnModelCreating(modelBuilder); + + modelBuilder.ConfigureIdentity(); + modelBuilder.ConfigureIdentityServer(); + } + } +} diff --git a/aspnet-core/services/account/AuthServer.Host/EventBus/Handlers/TenantCreateEventHandler.cs b/aspnet-core/services/account/AuthServer.Host/EventBus/Handlers/TenantCreateEventHandler.cs deleted file mode 100644 index f1ef512c2..000000000 --- a/aspnet-core/services/account/AuthServer.Host/EventBus/Handlers/TenantCreateEventHandler.cs +++ /dev/null @@ -1,88 +0,0 @@ -using LINGYUN.Abp.MultiTenancy; -using Microsoft.AspNetCore.Identity; -using Microsoft.Extensions.Logging; -using System; -using System.Threading.Tasks; -using Volo.Abp.DependencyInjection; -using Volo.Abp.EventBus.Distributed; -using Volo.Abp.Guids; -using Volo.Abp.Identity; -using Volo.Abp.MultiTenancy; -using Volo.Abp.Uow; -using IdentityRole = Volo.Abp.Identity.IdentityRole; -using IdentityUser = Volo.Abp.Identity.IdentityUser; - -namespace AuthServer.Host.EventBus.Handlers -{ - public class TenantCreateEventHandler : IDistributedEventHandler, ITransientDependency - { - protected ILogger Logger { get; } - protected ICurrentTenant CurrentTenant { get; } - protected IGuidGenerator GuidGenerator { get; } - protected IdentityUserManager IdentityUserManager { get; } - protected IdentityRoleManager IdentityRoleManager { get; } - - public TenantCreateEventHandler( - ICurrentTenant currentTenant, - IGuidGenerator guidGenerator, - IdentityUserManager identityUserManager, - IdentityRoleManager identityRoleManager, - ILogger logger) - { - Logger = logger; - CurrentTenant = currentTenant; - GuidGenerator = guidGenerator; - IdentityUserManager = identityUserManager; - IdentityRoleManager = identityRoleManager; - } - - [UnitOfWork] - public async Task HandleEventAsync(CreateEventData eventData) - { - using (CurrentTenant.Change(eventData.Id, eventData.Name)) - { - const string tenantAdminRoleName = "admin"; - var tenantAdminRoleId = Guid.Empty; ; - - if (!await IdentityRoleManager.RoleExistsAsync(tenantAdminRoleName)) - { - tenantAdminRoleId = GuidGenerator.Create(); - var tenantAdminRole = new IdentityRole(tenantAdminRoleId, tenantAdminRoleName, eventData.Id) - { - IsStatic = true, - IsPublic = true - }; - (await IdentityRoleManager.CreateAsync(tenantAdminRole)).CheckErrors(); - } - else - { - var tenantAdminRole = await IdentityRoleManager.FindByNameAsync(tenantAdminRoleName); - tenantAdminRoleId = tenantAdminRole.Id; - } - - var tenantAdminUser = await IdentityUserManager.FindByNameAsync(eventData.AdminEmailAddress); - if (tenantAdminUser == null) - { - tenantAdminUser = new IdentityUser(eventData.AdminUserId, eventData.AdminEmailAddress, - eventData.AdminEmailAddress, eventData.Id); - - tenantAdminUser.AddRole(tenantAdminRoleId); - - // 创建租户管理用户 - (await IdentityUserManager.CreateAsync(tenantAdminUser)).CheckErrors(); - (await IdentityUserManager.AddPasswordAsync(tenantAdminUser, eventData.AdminPassword)).CheckErrors(); - } - //var identitySeedResult = await IdentityDataSeeder - // .SeedAsync(eventData.AdminEmailAddress, eventData.AdminPassword, eventData.Id); - //if (!identitySeedResult.CreatedAdminUser) - //{ - // Logger.LogWarning("Tenant {0} admin user {1} not created!", eventData.Name, eventData.AdminEmailAddress); - //} - //if (!identitySeedResult.CreatedAdminRole) - //{ - // Logger.LogWarning("Tenant {0} admin role not created!", eventData.Name); - //} - } - } - } -} diff --git a/aspnet-core/services/account/AuthServer.Host/EventBus/Handlers/TenantSynchronizer.cs b/aspnet-core/services/account/AuthServer.Host/EventBus/Handlers/TenantSynchronizer.cs new file mode 100644 index 000000000..e7999e7da --- /dev/null +++ b/aspnet-core/services/account/AuthServer.Host/EventBus/Handlers/TenantSynchronizer.cs @@ -0,0 +1,134 @@ +using AuthServer.EntityFrameworkCore; +using LINGYUN.Abp.Data.DbMigrator; +using LINGYUN.Abp.MultiTenancy; +using Microsoft.AspNetCore.Identity; +using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.Logging; +using System; +using System.Threading.Tasks; +using Volo.Abp.Authorization.Permissions; +using Volo.Abp.DependencyInjection; +using Volo.Abp.EventBus.Distributed; +using Volo.Abp.Guids; +using Volo.Abp.Identity; +using Volo.Abp.MultiTenancy; +using Volo.Abp.PermissionManagement; +using Volo.Abp.Uow; +using IdentityRole = Volo.Abp.Identity.IdentityRole; +using IdentityUser = Volo.Abp.Identity.IdentityUser; + +namespace AuthServer.Host.EventBus.Handlers +{ + public class TenantSynchronizer : IDistributedEventHandler, ITransientDependency + { + protected ILogger Logger { get; } + protected ICurrentTenant CurrentTenant { get; } + protected IGuidGenerator GuidGenerator { get; } + protected IdentityUserManager IdentityUserManager { get; } + protected IdentityRoleManager IdentityRoleManager { get; } + protected IPermissionDataSeeder PermissionDataSeeder { get; } + protected IDbSchemaMigrator DbSchemaMigrator { get; } + + public TenantSynchronizer( + ICurrentTenant currentTenant, + IGuidGenerator guidGenerator, + IdentityUserManager identityUserManager, + IdentityRoleManager identityRoleManager, + IPermissionDataSeeder permissionDataSeeder, + IDbSchemaMigrator dbSchemaMigrator, + ILogger logger) + { + Logger = logger; + CurrentTenant = currentTenant; + GuidGenerator = guidGenerator; + IdentityUserManager = identityUserManager; + IdentityRoleManager = identityRoleManager; + PermissionDataSeeder = permissionDataSeeder; + DbSchemaMigrator = dbSchemaMigrator; + } + + [UnitOfWork] + public async Task HandleEventAsync(CreateEventData eventData) + { + using (CurrentTenant.Change(eventData.Id, eventData.Name)) + { + Logger.LogInformation("Migrating the new tenant database with AuthServer..."); + // 迁移租户数据 + await DbSchemaMigrator.MigrateAsync( + (connectionString, builder) => + { + builder.UseMySql(connectionString, ServerVersion.AutoDetect(connectionString)); + + return new AuthServerHostMigrationsDbContext(builder.Options); + }); + + Logger.LogInformation("Migrated the new tenant database with AuthServer."); + + Logger.LogInformation("Seeding the new tenant admin user and roles..."); + await SeedTenantAdminAsync(eventData); + + Logger.LogInformation("Seeding the new tenant default roles..."); + await SeedTenantDefaultRoleAsync(eventData.Id); + + Logger.LogInformation("The new tenant identity data initialized!"); + } + } + + private async Task SeedTenantDefaultRoleAsync(Guid tenantId) + { + // 默认用户 + var roleId = GuidGenerator.Create(); + var defaultRole = new IdentityRole(roleId, "Users", tenantId) + { + IsStatic = true, + IsPublic = true, + IsDefault = true, + }; + (await IdentityRoleManager.CreateAsync(defaultRole)).CheckErrors(); + + // 所有用户都应该具有查询用户权限, 用于IM场景 + await PermissionDataSeeder.SeedAsync( + RolePermissionValueProvider.ProviderName, + defaultRole.Name, + new string[] { + IdentityPermissions.UserLookup.Default, + IdentityPermissions.Users.Default + }); + } + + private async Task SeedTenantAdminAsync(CreateEventData eventData) + { + const string tenantAdminRoleName = "admin"; + var tenantAdminRoleId = Guid.Empty; ; + + if (!await IdentityRoleManager.RoleExistsAsync(tenantAdminRoleName)) + { + tenantAdminRoleId = GuidGenerator.Create(); + var tenantAdminRole = new IdentityRole(tenantAdminRoleId, tenantAdminRoleName, eventData.Id) + { + IsStatic = true, + IsPublic = true + }; + (await IdentityRoleManager.CreateAsync(tenantAdminRole)).CheckErrors(); + } + else + { + var tenantAdminRole = await IdentityRoleManager.FindByNameAsync(tenantAdminRoleName); + tenantAdminRoleId = tenantAdminRole.Id; + } + + var tenantAdminUser = await IdentityUserManager.FindByNameAsync(eventData.AdminEmailAddress); + if (tenantAdminUser == null) + { + tenantAdminUser = new IdentityUser(eventData.AdminUserId, eventData.AdminEmailAddress, + eventData.AdminEmailAddress, eventData.Id); + + tenantAdminUser.AddRole(tenantAdminRoleId); + + // 创建租户管理用户 + (await IdentityUserManager.CreateAsync(tenantAdminUser)).CheckErrors(); + (await IdentityUserManager.AddPasswordAsync(tenantAdminUser, eventData.AdminPassword)).CheckErrors(); + } + } + } +} diff --git a/aspnet-core/services/account/AuthServer.Host/Migrations/20200513010936_Migration-IdentityServer-MySql.Designer.cs b/aspnet-core/services/account/AuthServer.Host/Migrations/20200513010936_Migration-IdentityServer-MySql.Designer.cs deleted file mode 100644 index 0929a57fc..000000000 --- a/aspnet-core/services/account/AuthServer.Host/Migrations/20200513010936_Migration-IdentityServer-MySql.Designer.cs +++ /dev/null @@ -1,1259 +0,0 @@ -// -using AuthServer.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using System; - -namespace AuthServer.Migrations -{ - [DbContext(typeof(AuthServerHostMigrationsDbContext))] - [Migration("20200513010936_Migration-IdentityServer-MySql")] - partial class MigrationIdentityServerMySql - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "3.1.3") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("Description") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("Regex") - .HasColumnType("varchar(512) CHARACTER SET utf8mb4") - .HasMaxLength(512); - - b.Property("RegexDescription") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("Required") - .HasColumnType("tinyint(1)"); - - b.Property("ValueType") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("AbpClaimTypes"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDefault") - .HasColumnName("IsDefault") - .HasColumnType("tinyint(1)"); - - b.Property("IsPublic") - .HasColumnName("IsPublic") - .HasColumnType("tinyint(1)"); - - b.Property("IsStatic") - .HasColumnName("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("NormalizedName") - .IsRequired() - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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() - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("ClaimValue") - .HasColumnType("varchar(1024) CHARACTER SET utf8mb4") - .HasMaxLength(1024); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AbpRoleClaims"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AccessFailedCount") - .ValueGeneratedOnAdd() - .HasColumnName("AccessFailedCount") - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Email") - .IsRequired() - .HasColumnName("Email") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("EmailConfirmed") - .ValueGeneratedOnAdd() - .HasColumnName("EmailConfirmed") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("LockoutEnabled") - .ValueGeneratedOnAdd() - .HasColumnName("LockoutEnabled") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LockoutEnd") - .HasColumnType("datetime(6)"); - - b.Property("Name") - .HasColumnName("Name") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("NormalizedEmail") - .IsRequired() - .HasColumnName("NormalizedEmail") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("NormalizedUserName") - .IsRequired() - .HasColumnName("NormalizedUserName") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("PasswordHash") - .HasColumnName("PasswordHash") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("PhoneNumber") - .HasColumnName("PhoneNumber") - .HasColumnType("varchar(16) CHARACTER SET utf8mb4") - .HasMaxLength(16); - - b.Property("PhoneNumberConfirmed") - .ValueGeneratedOnAdd() - .HasColumnName("PhoneNumberConfirmed") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("SecurityStamp") - .IsRequired() - .HasColumnName("SecurityStamp") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("Surname") - .HasColumnName("Surname") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("TwoFactorEnabled") - .ValueGeneratedOnAdd() - .HasColumnName("TwoFactorEnabled") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("UserName") - .IsRequired() - .HasColumnName("UserName") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - 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() - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("ClaimValue") - .HasColumnType("varchar(1024) CHARACTER SET utf8mb4") - .HasMaxLength(1024); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("ProviderDisplayName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ProviderKey") - .IsRequired() - .HasColumnType("varchar(196) CHARACTER SET utf8mb4") - .HasMaxLength(196); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.HasKey("UserId", "LoginProvider"); - - b.HasIndex("LoginProvider", "ProviderKey"); - - b.ToTable("AbpUserLogins"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("Name") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("Value") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AbpUserTokens"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnType("varchar(1000) CHARACTER SET utf8mb4") - .HasMaxLength(1000); - - b.Property("DisplayName") - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.Property("Enabled") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.Property("Properties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.HasKey("Id"); - - b.ToTable("IdentityServerApiResources"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => - { - b.Property("ApiResourceId") - .HasColumnType("char(36)"); - - b.Property("Type") - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.HasKey("ApiResourceId", "Type"); - - b.ToTable("IdentityServerApiClaims"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScope", b => - { - b.Property("ApiResourceId") - .HasColumnType("char(36)"); - - b.Property("Name") - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.Property("Description") - .HasColumnType("varchar(1000) CHARACTER SET utf8mb4") - .HasMaxLength(1000); - - b.Property("DisplayName") - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.Property("Emphasize") - .HasColumnType("tinyint(1)"); - - b.Property("Required") - .HasColumnType("tinyint(1)"); - - b.Property("ShowInDiscoveryDocument") - .HasColumnType("tinyint(1)"); - - b.HasKey("ApiResourceId", "Name"); - - b.ToTable("IdentityServerApiScopes"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b => - { - b.Property("ApiResourceId") - .HasColumnType("char(36)"); - - b.Property("Name") - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.Property("Type") - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.HasKey("ApiResourceId", "Name", "Type"); - - b.ToTable("IdentityServerApiScopeClaims"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b => - { - b.Property("ApiResourceId") - .HasColumnType("char(36)"); - - b.Property("Type") - .HasColumnType("varchar(250) CHARACTER SET utf8mb4") - .HasMaxLength(250); - - b.Property("Value") - .HasColumnType("varchar(300) CHARACTER SET utf8mb4") - .HasMaxLength(300); - - b.Property("Description") - .HasColumnType("varchar(2000) CHARACTER SET utf8mb4") - .HasMaxLength(2000); - - b.Property("Expiration") - .HasColumnType("datetime(6)"); - - b.HasKey("ApiResourceId", "Type", "Value"); - - b.ToTable("IdentityServerApiSecrets"); - }); - - 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("AlwaysIncludeUserClaimsInIdToken") - .HasColumnType("tinyint(1)"); - - b.Property("AlwaysSendClientClaims") - .HasColumnType("tinyint(1)"); - - b.Property("AuthorizationCodeLifetime") - .HasColumnType("int"); - - b.Property("BackChannelLogoutSessionRequired") - .HasColumnType("tinyint(1)"); - - b.Property("BackChannelLogoutUri") - .HasColumnType("varchar(2000) CHARACTER SET utf8mb4") - .HasMaxLength(2000); - - b.Property("ClientClaimsPrefix") - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.Property("ClientId") - .IsRequired() - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.Property("ClientName") - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.Property("ClientUri") - .HasColumnType("varchar(2000) CHARACTER SET utf8mb4") - .HasMaxLength(2000); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("ConsentLifetime") - .HasColumnType("int"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnType("varchar(1000) CHARACTER SET utf8mb4") - .HasMaxLength(1000); - - b.Property("DeviceCodeLifetime") - .HasColumnType("int"); - - b.Property("EnableLocalLogin") - .HasColumnType("tinyint(1)"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("FrontChannelLogoutSessionRequired") - .HasColumnType("tinyint(1)"); - - b.Property("FrontChannelLogoutUri") - .HasColumnType("varchar(2000) CHARACTER SET utf8mb4") - .HasMaxLength(2000); - - b.Property("IdentityTokenLifetime") - .HasColumnType("int"); - - b.Property("IncludeJwtId") - .HasColumnType("tinyint(1)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("LogoUri") - .HasColumnType("varchar(2000) CHARACTER SET utf8mb4") - .HasMaxLength(2000); - - b.Property("PairWiseSubjectSalt") - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.Property("ProtocolType") - .IsRequired() - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(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("SlidingRefreshTokenLifetime") - .HasColumnType("int"); - - b.Property("UpdateAccessTokenClaimsOnRefresh") - .HasColumnType("tinyint(1)"); - - b.Property("UserCodeType") - .HasColumnType("varchar(100) CHARACTER SET utf8mb4") - .HasMaxLength(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") - .HasColumnType("varchar(250) CHARACTER SET utf8mb4") - .HasMaxLength(250); - - b.Property("Value") - .HasColumnType("varchar(250) CHARACTER SET utf8mb4") - .HasMaxLength(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") - .HasColumnType("varchar(150) CHARACTER SET utf8mb4") - .HasMaxLength(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") - .HasColumnType("varchar(250) CHARACTER SET utf8mb4") - .HasMaxLength(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") - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(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") - .HasColumnType("varchar(300) CHARACTER SET utf8mb4") - .HasMaxLength(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") - .HasColumnType("varchar(250) CHARACTER SET utf8mb4") - .HasMaxLength(250); - - b.Property("Value") - .IsRequired() - .HasColumnType("varchar(2000) CHARACTER SET utf8mb4") - .HasMaxLength(2000); - - b.HasKey("ClientId", "Key"); - - b.ToTable("IdentityServerClientProperties"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b => - { - b.Property("ClientId") - .HasColumnType("char(36)"); - - b.Property("RedirectUri") - .HasColumnType("varchar(300) CHARACTER SET utf8mb4") - .HasMaxLength(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") - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(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") - .HasColumnType("varchar(250) CHARACTER SET utf8mb4") - .HasMaxLength(250); - - b.Property("Value") - .HasColumnType("varchar(300) CHARACTER SET utf8mb4") - .HasMaxLength(300); - - b.Property("Description") - .HasColumnType("varchar(2000) CHARACTER SET utf8mb4") - .HasMaxLength(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() - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("Data") - .IsRequired() - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasMaxLength(50000); - - b.Property("DeviceCode") - .IsRequired() - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.Property("Expiration") - .IsRequired() - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("SubjectId") - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.Property("UserCode") - .IsRequired() - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.HasKey("Id"); - - b.HasIndex("DeviceCode") - .IsUnique(); - - b.HasIndex("Expiration"); - - b.HasIndex("UserCode") - .IsUnique(); - - b.ToTable("IdentityServerDeviceFlowCodes"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Grants.PersistedGrant", b => - { - b.Property("Key") - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.Property("ClientId") - .IsRequired() - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("Data") - .IsRequired() - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasMaxLength(10000); - - b.Property("Expiration") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("SubjectId") - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.Property("Type") - .IsRequired() - .HasColumnType("varchar(50) CHARACTER SET utf8mb4") - .HasMaxLength(50); - - b.HasKey("Key"); - - b.HasIndex("Expiration"); - - b.HasIndex("SubjectId", "ClientId", "Type"); - - b.ToTable("IdentityServerPersistedGrants"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityClaim", b => - { - b.Property("IdentityResourceId") - .HasColumnType("char(36)"); - - b.Property("Type") - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.HasKey("IdentityResourceId", "Type"); - - b.ToTable("IdentityServerIdentityClaims"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnType("varchar(1000) CHARACTER SET utf8mb4") - .HasMaxLength(1000); - - b.Property("DisplayName") - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.Property("Emphasize") - .HasColumnType("tinyint(1)"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.Property("Properties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("Required") - .HasColumnType("tinyint(1)"); - - b.Property("ShowInDiscoveryDocument") - .HasColumnType("tinyint(1)"); - - b.HasKey("Id"); - - b.ToTable("IdentityServerIdentityResources"); - }); - - 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.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.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.ApiScope", b => - { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) - .WithMany("Scopes") - .HasForeignKey("ApiResourceId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b => - { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiScope", null) - .WithMany("UserClaims") - .HasForeignKey("ApiResourceId", "Name") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b => - { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) - .WithMany("Secrets") - .HasForeignKey("ApiResourceId") - .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.IdentityClaim", b => - { - b.HasOne("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", null) - .WithMany("UserClaims") - .HasForeignKey("IdentityResourceId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/account/AuthServer.Host/Migrations/20200513010936_Migration-IdentityServer-MySql.cs b/aspnet-core/services/account/AuthServer.Host/Migrations/20200513010936_Migration-IdentityServer-MySql.cs deleted file mode 100644 index 88f4b49d2..000000000 --- a/aspnet-core/services/account/AuthServer.Host/Migrations/20200513010936_Migration-IdentityServer-MySql.cs +++ /dev/null @@ -1,773 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace AuthServer.Migrations -{ - public partial class MigrationIdentityServerMySql : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "AbpClaimTypes", - columns: table => new - { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 256, nullable: false), - Name = table.Column(maxLength: 256, nullable: false), - Required = table.Column(nullable: false), - IsStatic = table.Column(nullable: false), - Regex = table.Column(maxLength: 512, nullable: true), - RegexDescription = table.Column(maxLength: 128, nullable: true), - Description = table.Column(maxLength: 256, nullable: true), - ValueType = table.Column(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpClaimTypes", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AbpRoles", - columns: table => new - { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 256, nullable: false), - TenantId = table.Column(nullable: true), - Name = table.Column(maxLength: 256, nullable: false), - NormalizedName = table.Column(maxLength: 256, nullable: false), - IsDefault = table.Column(nullable: false), - IsStatic = table.Column(nullable: false), - IsPublic = table.Column(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpRoles", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AbpUsers", - columns: table => new - { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(nullable: true), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - LastModificationTime = table.Column(nullable: true), - LastModifierId = table.Column(nullable: true), - IsDeleted = table.Column(nullable: false, defaultValue: false), - DeleterId = table.Column(nullable: true), - DeletionTime = table.Column(nullable: true), - TenantId = table.Column(nullable: true), - UserName = table.Column(maxLength: 256, nullable: false), - NormalizedUserName = table.Column(maxLength: 256, nullable: false), - Name = table.Column(maxLength: 64, nullable: true), - Surname = table.Column(maxLength: 64, nullable: true), - Email = table.Column(maxLength: 256, nullable: false), - NormalizedEmail = table.Column(maxLength: 256, nullable: false), - EmailConfirmed = table.Column(nullable: false, defaultValue: false), - PasswordHash = table.Column(maxLength: 256, nullable: true), - SecurityStamp = table.Column(maxLength: 256, nullable: false), - PhoneNumber = table.Column(maxLength: 16, nullable: true), - PhoneNumberConfirmed = table.Column(nullable: false, defaultValue: false), - TwoFactorEnabled = table.Column(nullable: false, defaultValue: false), - LockoutEnd = table.Column(nullable: true), - LockoutEnabled = table.Column(nullable: false, defaultValue: false), - AccessFailedCount = table.Column(nullable: false, defaultValue: 0) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpUsers", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerApiResources", - columns: table => new - { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(nullable: true), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - LastModificationTime = table.Column(nullable: true), - LastModifierId = table.Column(nullable: true), - IsDeleted = table.Column(nullable: false, defaultValue: false), - DeleterId = table.Column(nullable: true), - DeletionTime = table.Column(nullable: true), - Name = table.Column(maxLength: 200, nullable: false), - DisplayName = table.Column(maxLength: 200, nullable: true), - Description = table.Column(maxLength: 1000, nullable: true), - Enabled = table.Column(nullable: false), - Properties = table.Column(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerApiResources", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerClients", - columns: table => new - { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(nullable: true), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - LastModificationTime = table.Column(nullable: true), - LastModifierId = table.Column(nullable: true), - IsDeleted = table.Column(nullable: false, defaultValue: false), - DeleterId = table.Column(nullable: true), - DeletionTime = table.Column(nullable: true), - ClientId = table.Column(maxLength: 200, nullable: false), - ClientName = table.Column(maxLength: 200, nullable: true), - Description = table.Column(maxLength: 1000, nullable: true), - ClientUri = table.Column(maxLength: 2000, nullable: true), - LogoUri = table.Column(maxLength: 2000, nullable: true), - Enabled = table.Column(nullable: false), - ProtocolType = table.Column(maxLength: 200, nullable: false), - RequireClientSecret = table.Column(nullable: false), - RequireConsent = table.Column(nullable: false), - AllowRememberConsent = table.Column(nullable: false), - AlwaysIncludeUserClaimsInIdToken = table.Column(nullable: false), - RequirePkce = table.Column(nullable: false), - AllowPlainTextPkce = table.Column(nullable: false), - AllowAccessTokensViaBrowser = table.Column(nullable: false), - FrontChannelLogoutUri = table.Column(maxLength: 2000, nullable: true), - FrontChannelLogoutSessionRequired = table.Column(nullable: false), - BackChannelLogoutUri = table.Column(maxLength: 2000, nullable: true), - BackChannelLogoutSessionRequired = table.Column(nullable: false), - AllowOfflineAccess = table.Column(nullable: false), - IdentityTokenLifetime = table.Column(nullable: false), - AccessTokenLifetime = table.Column(nullable: false), - AuthorizationCodeLifetime = table.Column(nullable: false), - ConsentLifetime = table.Column(nullable: true), - AbsoluteRefreshTokenLifetime = table.Column(nullable: false), - SlidingRefreshTokenLifetime = table.Column(nullable: false), - RefreshTokenUsage = table.Column(nullable: false), - UpdateAccessTokenClaimsOnRefresh = table.Column(nullable: false), - RefreshTokenExpiration = table.Column(nullable: false), - AccessTokenType = table.Column(nullable: false), - EnableLocalLogin = table.Column(nullable: false), - IncludeJwtId = table.Column(nullable: false), - AlwaysSendClientClaims = table.Column(nullable: false), - ClientClaimsPrefix = table.Column(maxLength: 200, nullable: true), - PairWiseSubjectSalt = table.Column(maxLength: 200, nullable: true), - UserSsoLifetime = table.Column(nullable: true), - UserCodeType = table.Column(maxLength: 100, nullable: true), - DeviceCodeLifetime = table.Column(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerClients", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerDeviceFlowCodes", - columns: table => new - { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(nullable: true), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - DeviceCode = table.Column(maxLength: 200, nullable: false), - UserCode = table.Column(maxLength: 200, nullable: false), - SubjectId = table.Column(maxLength: 200, nullable: true), - ClientId = table.Column(maxLength: 200, nullable: false), - Expiration = table.Column(nullable: false), - Data = table.Column(maxLength: 50000, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerDeviceFlowCodes", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerIdentityResources", - columns: table => new - { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(nullable: true), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - LastModificationTime = table.Column(nullable: true), - LastModifierId = table.Column(nullable: true), - IsDeleted = table.Column(nullable: false, defaultValue: false), - DeleterId = table.Column(nullable: true), - DeletionTime = table.Column(nullable: true), - Name = table.Column(maxLength: 200, nullable: false), - DisplayName = table.Column(maxLength: 200, nullable: true), - Description = table.Column(maxLength: 1000, nullable: true), - Enabled = table.Column(nullable: false), - Required = table.Column(nullable: false), - Emphasize = table.Column(nullable: false), - ShowInDiscoveryDocument = table.Column(nullable: false), - Properties = table.Column(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerIdentityResources", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerPersistedGrants", - columns: table => new - { - Key = table.Column(maxLength: 200, nullable: false), - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(nullable: true), - Type = table.Column(maxLength: 50, nullable: false), - SubjectId = table.Column(maxLength: 200, nullable: true), - ClientId = table.Column(maxLength: 200, nullable: false), - CreationTime = table.Column(nullable: false), - Expiration = table.Column(nullable: true), - Data = table.Column(maxLength: 10000, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerPersistedGrants", x => x.Key); - }); - - migrationBuilder.CreateTable( - name: "AbpRoleClaims", - columns: table => new - { - Id = table.Column(nullable: false), - TenantId = table.Column(nullable: true), - ClaimType = table.Column(maxLength: 256, nullable: false), - ClaimValue = table.Column(maxLength: 1024, nullable: true), - RoleId = table.Column(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpRoleClaims", x => x.Id); - table.ForeignKey( - name: "FK_AbpRoleClaims_AbpRoles_RoleId", - column: x => x.RoleId, - principalTable: "AbpRoles", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AbpUserClaims", - columns: table => new - { - Id = table.Column(nullable: false), - TenantId = table.Column(nullable: true), - ClaimType = table.Column(maxLength: 256, nullable: false), - ClaimValue = table.Column(maxLength: 1024, nullable: true), - UserId = table.Column(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpUserClaims", x => x.Id); - table.ForeignKey( - name: "FK_AbpUserClaims_AbpUsers_UserId", - column: x => x.UserId, - principalTable: "AbpUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AbpUserLogins", - columns: table => new - { - UserId = table.Column(nullable: false), - LoginProvider = table.Column(maxLength: 64, nullable: false), - TenantId = table.Column(nullable: true), - ProviderKey = table.Column(maxLength: 196, nullable: false), - ProviderDisplayName = table.Column(maxLength: 128, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpUserLogins", x => new { x.UserId, x.LoginProvider }); - table.ForeignKey( - name: "FK_AbpUserLogins_AbpUsers_UserId", - column: x => x.UserId, - principalTable: "AbpUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AbpUserRoles", - columns: table => new - { - UserId = table.Column(nullable: false), - RoleId = table.Column(nullable: false), - TenantId = table.Column(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpUserRoles", x => new { x.UserId, x.RoleId }); - table.ForeignKey( - name: "FK_AbpUserRoles_AbpRoles_RoleId", - column: x => x.RoleId, - principalTable: "AbpRoles", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_AbpUserRoles_AbpUsers_UserId", - column: x => x.UserId, - principalTable: "AbpUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AbpUserTokens", - columns: table => new - { - UserId = table.Column(nullable: false), - LoginProvider = table.Column(maxLength: 64, nullable: false), - Name = table.Column(maxLength: 128, nullable: false), - TenantId = table.Column(nullable: true), - Value = table.Column(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpUserTokens", x => new { x.UserId, x.LoginProvider, x.Name }); - table.ForeignKey( - name: "FK_AbpUserTokens_AbpUsers_UserId", - column: x => x.UserId, - principalTable: "AbpUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerApiClaims", - columns: table => new - { - Type = table.Column(maxLength: 200, nullable: false), - ApiResourceId = table.Column(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerApiClaims", x => new { x.ApiResourceId, x.Type }); - table.ForeignKey( - name: "FK_IdentityServerApiClaims_IdentityServerApiResources_ApiResour~", - column: x => x.ApiResourceId, - principalTable: "IdentityServerApiResources", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerApiScopes", - columns: table => new - { - ApiResourceId = table.Column(nullable: false), - Name = table.Column(maxLength: 200, nullable: false), - DisplayName = table.Column(maxLength: 200, nullable: true), - Description = table.Column(maxLength: 1000, nullable: true), - Required = table.Column(nullable: false), - Emphasize = table.Column(nullable: false), - ShowInDiscoveryDocument = table.Column(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerApiScopes", x => new { x.ApiResourceId, x.Name }); - table.ForeignKey( - name: "FK_IdentityServerApiScopes_IdentityServerApiResources_ApiResour~", - column: x => x.ApiResourceId, - principalTable: "IdentityServerApiResources", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerApiSecrets", - columns: table => new - { - Type = table.Column(maxLength: 250, nullable: false), - Value = table.Column(maxLength: 300, nullable: false), - ApiResourceId = table.Column(nullable: false), - Description = table.Column(maxLength: 2000, nullable: true), - Expiration = table.Column(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerApiSecrets", x => new { x.ApiResourceId, x.Type, x.Value }); - table.ForeignKey( - name: "FK_IdentityServerApiSecrets_IdentityServerApiResources_ApiResou~", - column: x => x.ApiResourceId, - principalTable: "IdentityServerApiResources", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerClientClaims", - columns: table => new - { - ClientId = table.Column(nullable: false), - Type = table.Column(maxLength: 250, nullable: false), - Value = table.Column(maxLength: 250, nullable: false) - }, - 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); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerClientCorsOrigins", - columns: table => new - { - ClientId = table.Column(nullable: false), - Origin = table.Column(maxLength: 150, nullable: false) - }, - 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); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerClientGrantTypes", - columns: table => new - { - ClientId = table.Column(nullable: false), - GrantType = table.Column(maxLength: 250, nullable: false) - }, - 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); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerClientIdPRestrictions", - columns: table => new - { - ClientId = table.Column(nullable: false), - Provider = table.Column(maxLength: 200, nullable: false) - }, - 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); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerClientPostLogoutRedirectUris", - columns: table => new - { - ClientId = table.Column(nullable: false), - PostLogoutRedirectUri = table.Column(maxLength: 300, nullable: false) - }, - 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); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerClientProperties", - columns: table => new - { - ClientId = table.Column(nullable: false), - Key = table.Column(maxLength: 250, nullable: false), - Value = table.Column(maxLength: 2000, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerClientProperties", x => new { x.ClientId, x.Key }); - table.ForeignKey( - name: "FK_IdentityServerClientProperties_IdentityServerClients_ClientId", - column: x => x.ClientId, - principalTable: "IdentityServerClients", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerClientRedirectUris", - columns: table => new - { - ClientId = table.Column(nullable: false), - RedirectUri = table.Column(maxLength: 300, nullable: false) - }, - 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); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerClientScopes", - columns: table => new - { - ClientId = table.Column(nullable: false), - Scope = table.Column(maxLength: 200, nullable: false) - }, - 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); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerClientSecrets", - columns: table => new - { - Type = table.Column(maxLength: 250, nullable: false), - Value = table.Column(maxLength: 300, nullable: false), - ClientId = table.Column(nullable: false), - Description = table.Column(maxLength: 2000, nullable: true), - Expiration = table.Column(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); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerIdentityClaims", - columns: table => new - { - Type = table.Column(maxLength: 200, nullable: false), - IdentityResourceId = table.Column(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerIdentityClaims", x => new { x.IdentityResourceId, x.Type }); - table.ForeignKey( - name: "FK_IdentityServerIdentityClaims_IdentityServerIdentityResources~", - column: x => x.IdentityResourceId, - principalTable: "IdentityServerIdentityResources", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerApiScopeClaims", - columns: table => new - { - Type = table.Column(maxLength: 200, nullable: false), - ApiResourceId = table.Column(nullable: false), - Name = table.Column(maxLength: 200, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerApiScopeClaims", x => new { x.ApiResourceId, x.Name, x.Type }); - table.ForeignKey( - name: "FK_IdentityServerApiScopeClaims_IdentityServerApiScopes_ApiReso~", - columns: x => new { x.ApiResourceId, x.Name }, - principalTable: "IdentityServerApiScopes", - principalColumns: new[] { "ApiResourceId", "Name" }, - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateIndex( - name: "IX_AbpRoleClaims_RoleId", - table: "AbpRoleClaims", - column: "RoleId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpRoles_NormalizedName", - table: "AbpRoles", - column: "NormalizedName"); - - migrationBuilder.CreateIndex( - name: "IX_AbpUserClaims_UserId", - table: "AbpUserClaims", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpUserLogins_LoginProvider_ProviderKey", - table: "AbpUserLogins", - columns: new[] { "LoginProvider", "ProviderKey" }); - - migrationBuilder.CreateIndex( - name: "IX_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", - unique: true); - - 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" }); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AbpClaimTypes"); - - migrationBuilder.DropTable( - name: "AbpRoleClaims"); - - migrationBuilder.DropTable( - name: "AbpUserClaims"); - - migrationBuilder.DropTable( - name: "AbpUserLogins"); - - migrationBuilder.DropTable( - name: "AbpUserRoles"); - - migrationBuilder.DropTable( - name: "AbpUserTokens"); - - migrationBuilder.DropTable( - name: "IdentityServerApiClaims"); - - migrationBuilder.DropTable( - name: "IdentityServerApiScopeClaims"); - - migrationBuilder.DropTable( - name: "IdentityServerApiSecrets"); - - 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: "IdentityServerIdentityClaims"); - - migrationBuilder.DropTable( - name: "IdentityServerPersistedGrants"); - - migrationBuilder.DropTable( - name: "AbpRoles"); - - migrationBuilder.DropTable( - name: "AbpUsers"); - - migrationBuilder.DropTable( - name: "IdentityServerApiScopes"); - - migrationBuilder.DropTable( - name: "IdentityServerClients"); - - migrationBuilder.DropTable( - name: "IdentityServerIdentityResources"); - - migrationBuilder.DropTable( - name: "IdentityServerApiResources"); - } - } -} diff --git a/aspnet-core/services/account/AuthServer.Host/Migrations/20200606012143_Upgrade-Abp-2.9.0.Designer.cs b/aspnet-core/services/account/AuthServer.Host/Migrations/20200606012143_Upgrade-Abp-2.9.0.Designer.cs deleted file mode 100644 index fad8bca74..000000000 --- a/aspnet-core/services/account/AuthServer.Host/Migrations/20200606012143_Upgrade-Abp-2.9.0.Designer.cs +++ /dev/null @@ -1,1426 +0,0 @@ -// -using System; -using AuthServer.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -namespace AuthServer.Migrations -{ - [DbContext(typeof(AuthServerHostMigrationsDbContext))] - [Migration("20200606012143_Upgrade-Abp-2.9.0")] - partial class UpgradeAbp290 - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "3.1.4") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("Description") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("Regex") - .HasColumnType("varchar(512) CHARACTER SET utf8mb4") - .HasMaxLength(512); - - b.Property("RegexDescription") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("Required") - .HasColumnType("tinyint(1)"); - - b.Property("ValueType") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("AbpClaimTypes"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDefault") - .HasColumnName("IsDefault") - .HasColumnType("tinyint(1)"); - - b.Property("IsPublic") - .HasColumnName("IsPublic") - .HasColumnType("tinyint(1)"); - - b.Property("IsStatic") - .HasColumnName("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("NormalizedName") - .IsRequired() - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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() - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("ClaimValue") - .HasColumnType("varchar(1024) CHARACTER SET utf8mb4") - .HasMaxLength(1024); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AbpRoleClaims"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AccessFailedCount") - .ValueGeneratedOnAdd() - .HasColumnName("AccessFailedCount") - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Email") - .IsRequired() - .HasColumnName("Email") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("EmailConfirmed") - .ValueGeneratedOnAdd() - .HasColumnName("EmailConfirmed") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("LockoutEnabled") - .ValueGeneratedOnAdd() - .HasColumnName("LockoutEnabled") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LockoutEnd") - .HasColumnType("datetime(6)"); - - b.Property("Name") - .HasColumnName("Name") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("NormalizedEmail") - .IsRequired() - .HasColumnName("NormalizedEmail") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("NormalizedUserName") - .IsRequired() - .HasColumnName("NormalizedUserName") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("PasswordHash") - .HasColumnName("PasswordHash") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("PhoneNumber") - .HasColumnName("PhoneNumber") - .HasColumnType("varchar(16) CHARACTER SET utf8mb4") - .HasMaxLength(16); - - b.Property("PhoneNumberConfirmed") - .ValueGeneratedOnAdd() - .HasColumnName("PhoneNumberConfirmed") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("SecurityStamp") - .IsRequired() - .HasColumnName("SecurityStamp") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("Surname") - .HasColumnName("Surname") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("TwoFactorEnabled") - .ValueGeneratedOnAdd() - .HasColumnName("TwoFactorEnabled") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("UserName") - .IsRequired() - .HasColumnName("UserName") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - 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() - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("ClaimValue") - .HasColumnType("varchar(1024) CHARACTER SET utf8mb4") - .HasMaxLength(1024); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("ProviderDisplayName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ProviderKey") - .IsRequired() - .HasColumnType("varchar(196) CHARACTER SET utf8mb4") - .HasMaxLength(196); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("Name") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("Value") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - 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() - .HasColumnName("Code") - .HasColumnType("varchar(95) CHARACTER SET utf8mb4") - .HasMaxLength(95); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("DisplayName") - .IsRequired() - .HasColumnName("DisplayName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnType("varchar(1000) CHARACTER SET utf8mb4") - .HasMaxLength(1000); - - b.Property("DisplayName") - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.Property("Enabled") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.Property("Properties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.HasKey("Id"); - - b.ToTable("IdentityServerApiResources"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => - { - b.Property("ApiResourceId") - .HasColumnType("char(36)"); - - b.Property("Type") - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.HasKey("ApiResourceId", "Type"); - - b.ToTable("IdentityServerApiClaims"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScope", b => - { - b.Property("ApiResourceId") - .HasColumnType("char(36)"); - - b.Property("Name") - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.Property("Description") - .HasColumnType("varchar(1000) CHARACTER SET utf8mb4") - .HasMaxLength(1000); - - b.Property("DisplayName") - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.Property("Emphasize") - .HasColumnType("tinyint(1)"); - - b.Property("Required") - .HasColumnType("tinyint(1)"); - - b.Property("ShowInDiscoveryDocument") - .HasColumnType("tinyint(1)"); - - b.HasKey("ApiResourceId", "Name"); - - b.ToTable("IdentityServerApiScopes"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b => - { - b.Property("ApiResourceId") - .HasColumnType("char(36)"); - - b.Property("Name") - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.Property("Type") - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.HasKey("ApiResourceId", "Name", "Type"); - - b.ToTable("IdentityServerApiScopeClaims"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b => - { - b.Property("ApiResourceId") - .HasColumnType("char(36)"); - - b.Property("Type") - .HasColumnType("varchar(250) CHARACTER SET utf8mb4") - .HasMaxLength(250); - - b.Property("Value") - .HasColumnType("varchar(300) CHARACTER SET utf8mb4") - .HasMaxLength(300); - - b.Property("Description") - .HasColumnType("varchar(2000) CHARACTER SET utf8mb4") - .HasMaxLength(2000); - - b.Property("Expiration") - .HasColumnType("datetime(6)"); - - b.HasKey("ApiResourceId", "Type", "Value"); - - b.ToTable("IdentityServerApiSecrets"); - }); - - 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("AlwaysIncludeUserClaimsInIdToken") - .HasColumnType("tinyint(1)"); - - b.Property("AlwaysSendClientClaims") - .HasColumnType("tinyint(1)"); - - b.Property("AuthorizationCodeLifetime") - .HasColumnType("int"); - - b.Property("BackChannelLogoutSessionRequired") - .HasColumnType("tinyint(1)"); - - b.Property("BackChannelLogoutUri") - .HasColumnType("varchar(2000) CHARACTER SET utf8mb4") - .HasMaxLength(2000); - - b.Property("ClientClaimsPrefix") - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.Property("ClientId") - .IsRequired() - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.Property("ClientName") - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.Property("ClientUri") - .HasColumnType("varchar(2000) CHARACTER SET utf8mb4") - .HasMaxLength(2000); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("ConsentLifetime") - .HasColumnType("int"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnType("varchar(1000) CHARACTER SET utf8mb4") - .HasMaxLength(1000); - - b.Property("DeviceCodeLifetime") - .HasColumnType("int"); - - b.Property("EnableLocalLogin") - .HasColumnType("tinyint(1)"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("FrontChannelLogoutSessionRequired") - .HasColumnType("tinyint(1)"); - - b.Property("FrontChannelLogoutUri") - .HasColumnType("varchar(2000) CHARACTER SET utf8mb4") - .HasMaxLength(2000); - - b.Property("IdentityTokenLifetime") - .HasColumnType("int"); - - b.Property("IncludeJwtId") - .HasColumnType("tinyint(1)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("LogoUri") - .HasColumnType("varchar(2000) CHARACTER SET utf8mb4") - .HasMaxLength(2000); - - b.Property("PairWiseSubjectSalt") - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.Property("ProtocolType") - .IsRequired() - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(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("SlidingRefreshTokenLifetime") - .HasColumnType("int"); - - b.Property("UpdateAccessTokenClaimsOnRefresh") - .HasColumnType("tinyint(1)"); - - b.Property("UserCodeType") - .HasColumnType("varchar(100) CHARACTER SET utf8mb4") - .HasMaxLength(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") - .HasColumnType("varchar(250) CHARACTER SET utf8mb4") - .HasMaxLength(250); - - b.Property("Value") - .HasColumnType("varchar(250) CHARACTER SET utf8mb4") - .HasMaxLength(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") - .HasColumnType("varchar(150) CHARACTER SET utf8mb4") - .HasMaxLength(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") - .HasColumnType("varchar(250) CHARACTER SET utf8mb4") - .HasMaxLength(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") - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(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") - .HasColumnType("varchar(300) CHARACTER SET utf8mb4") - .HasMaxLength(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") - .HasColumnType("varchar(250) CHARACTER SET utf8mb4") - .HasMaxLength(250); - - b.Property("Value") - .IsRequired() - .HasColumnType("varchar(2000) CHARACTER SET utf8mb4") - .HasMaxLength(2000); - - b.HasKey("ClientId", "Key"); - - b.ToTable("IdentityServerClientProperties"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b => - { - b.Property("ClientId") - .HasColumnType("char(36)"); - - b.Property("RedirectUri") - .HasColumnType("varchar(300) CHARACTER SET utf8mb4") - .HasMaxLength(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") - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(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") - .HasColumnType("varchar(250) CHARACTER SET utf8mb4") - .HasMaxLength(250); - - b.Property("Value") - .HasColumnType("varchar(300) CHARACTER SET utf8mb4") - .HasMaxLength(300); - - b.Property("Description") - .HasColumnType("varchar(2000) CHARACTER SET utf8mb4") - .HasMaxLength(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() - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("Data") - .IsRequired() - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasMaxLength(50000); - - b.Property("DeviceCode") - .IsRequired() - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.Property("Expiration") - .IsRequired() - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("SubjectId") - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.Property("UserCode") - .IsRequired() - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.HasKey("Id"); - - b.HasIndex("DeviceCode") - .IsUnique(); - - b.HasIndex("Expiration"); - - b.HasIndex("UserCode") - .IsUnique(); - - b.ToTable("IdentityServerDeviceFlowCodes"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Grants.PersistedGrant", b => - { - b.Property("Key") - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.Property("ClientId") - .IsRequired() - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("Data") - .IsRequired() - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasMaxLength(10000); - - b.Property("Expiration") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("SubjectId") - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.Property("Type") - .IsRequired() - .HasColumnType("varchar(50) CHARACTER SET utf8mb4") - .HasMaxLength(50); - - b.HasKey("Key"); - - b.HasIndex("Expiration"); - - b.HasIndex("SubjectId", "ClientId", "Type"); - - b.ToTable("IdentityServerPersistedGrants"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityClaim", b => - { - b.Property("IdentityResourceId") - .HasColumnType("char(36)"); - - b.Property("Type") - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.HasKey("IdentityResourceId", "Type"); - - b.ToTable("IdentityServerIdentityClaims"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnType("varchar(1000) CHARACTER SET utf8mb4") - .HasMaxLength(1000); - - b.Property("DisplayName") - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.Property("Emphasize") - .HasColumnType("tinyint(1)"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.Property("Properties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("Required") - .HasColumnType("tinyint(1)"); - - b.Property("ShowInDiscoveryDocument") - .HasColumnType("tinyint(1)"); - - b.HasKey("Id"); - - b.ToTable("IdentityServerIdentityResources"); - }); - - 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.ApiScope", b => - { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) - .WithMany("Scopes") - .HasForeignKey("ApiResourceId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b => - { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiScope", null) - .WithMany("UserClaims") - .HasForeignKey("ApiResourceId", "Name") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b => - { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) - .WithMany("Secrets") - .HasForeignKey("ApiResourceId") - .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.IdentityClaim", b => - { - b.HasOne("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", null) - .WithMany("UserClaims") - .HasForeignKey("IdentityResourceId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/account/AuthServer.Host/Migrations/20200606012143_Upgrade-Abp-2.9.0.cs b/aspnet-core/services/account/AuthServer.Host/Migrations/20200606012143_Upgrade-Abp-2.9.0.cs deleted file mode 100644 index 4ca13f3e6..000000000 --- a/aspnet-core/services/account/AuthServer.Host/Migrations/20200606012143_Upgrade-Abp-2.9.0.cs +++ /dev/null @@ -1,199 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace AuthServer.Migrations -{ - public partial class UpgradeAbp290 : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "Value", - table: "IdentityServerClientSecrets", - maxLength: 300, - nullable: false, - oldClrType: typeof(string), - oldType: "longtext CHARACTER SET utf8mb4", - oldMaxLength: 4000); - - migrationBuilder.AlterColumn( - name: "RedirectUri", - table: "IdentityServerClientRedirectUris", - maxLength: 300, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(2000) CHARACTER SET utf8mb4", - oldMaxLength: 2000); - - migrationBuilder.AlterColumn( - name: "PostLogoutRedirectUri", - table: "IdentityServerClientPostLogoutRedirectUris", - maxLength: 300, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(2000) CHARACTER SET utf8mb4", - oldMaxLength: 2000); - - migrationBuilder.AlterColumn( - name: "Value", - table: "IdentityServerApiSecrets", - maxLength: 300, - nullable: false, - oldClrType: typeof(string), - oldType: "longtext CHARACTER SET utf8mb4", - oldMaxLength: 4000); - - migrationBuilder.CreateTable( - name: "AbpOrganizationUnits", - columns: table => new - { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(nullable: true), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - LastModificationTime = table.Column(nullable: true), - LastModifierId = table.Column(nullable: true), - IsDeleted = table.Column(nullable: false, defaultValue: false), - DeleterId = table.Column(nullable: true), - DeletionTime = table.Column(nullable: true), - TenantId = table.Column(nullable: true), - ParentId = table.Column(nullable: true), - Code = table.Column(maxLength: 95, nullable: false), - DisplayName = table.Column(maxLength: 128, nullable: false) - }, - 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); - }); - - migrationBuilder.CreateTable( - name: "AbpOrganizationUnitRoles", - columns: table => new - { - RoleId = table.Column(nullable: false), - OrganizationUnitId = table.Column(nullable: false), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - TenantId = table.Column(nullable: true) - }, - 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); - }); - - migrationBuilder.CreateTable( - name: "AbpUserOrganizationUnits", - columns: table => new - { - UserId = table.Column(nullable: false), - OrganizationUnitId = table.Column(nullable: false), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - TenantId = table.Column(nullable: true) - }, - 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); - }); - - 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_AbpUserOrganizationUnits_UserId_OrganizationUnitId", - table: "AbpUserOrganizationUnits", - columns: new[] { "UserId", "OrganizationUnitId" }); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AbpOrganizationUnitRoles"); - - migrationBuilder.DropTable( - name: "AbpUserOrganizationUnits"); - - migrationBuilder.DropTable( - name: "AbpOrganizationUnits"); - - migrationBuilder.AlterColumn( - name: "Value", - table: "IdentityServerClientSecrets", - type: "longtext CHARACTER SET utf8mb4", - maxLength: 4000, - nullable: false, - oldClrType: typeof(string), - oldMaxLength: 300); - - migrationBuilder.AlterColumn( - name: "RedirectUri", - table: "IdentityServerClientRedirectUris", - type: "varchar(2000) CHARACTER SET utf8mb4", - maxLength: 2000, - nullable: false, - oldClrType: typeof(string), - oldMaxLength: 300); - - migrationBuilder.AlterColumn( - name: "PostLogoutRedirectUri", - table: "IdentityServerClientPostLogoutRedirectUris", - type: "varchar(2000) CHARACTER SET utf8mb4", - maxLength: 2000, - nullable: false, - oldClrType: typeof(string), - oldMaxLength: 300); - - migrationBuilder.AlterColumn( - name: "Value", - table: "IdentityServerApiSecrets", - type: "longtext CHARACTER SET utf8mb4", - maxLength: 4000, - nullable: false, - oldClrType: typeof(string), - oldMaxLength: 300); - } - } -} diff --git a/aspnet-core/services/account/AuthServer.Host/Migrations/20200908015651_Upgrade-Abp-3.1.0.Designer.cs b/aspnet-core/services/account/AuthServer.Host/Migrations/20200908015651_Upgrade-Abp-3.1.0.Designer.cs deleted file mode 100644 index dfe5420ac..000000000 --- a/aspnet-core/services/account/AuthServer.Host/Migrations/20200908015651_Upgrade-Abp-3.1.0.Designer.cs +++ /dev/null @@ -1,1512 +0,0 @@ -// -using System; -using AuthServer.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -namespace AuthServer.Host.Migrations -{ - [DbContext(typeof(AuthServerHostMigrationsDbContext))] - [Migration("20200908015651_Upgrade-Abp-3.1.0")] - partial class UpgradeAbp310 - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "3.1.7") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("Description") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("Regex") - .HasColumnType("varchar(512) CHARACTER SET utf8mb4") - .HasMaxLength(512); - - b.Property("RegexDescription") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("Required") - .HasColumnType("tinyint(1)"); - - b.Property("ValueType") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("AbpClaimTypes"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDefault") - .HasColumnName("IsDefault") - .HasColumnType("tinyint(1)"); - - b.Property("IsPublic") - .HasColumnName("IsPublic") - .HasColumnType("tinyint(1)"); - - b.Property("IsStatic") - .HasColumnName("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("NormalizedName") - .IsRequired() - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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() - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("ClaimValue") - .HasColumnType("varchar(1024) CHARACTER SET utf8mb4") - .HasMaxLength(1024); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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") - .HasColumnType("varchar(96) CHARACTER SET utf8mb4") - .HasMaxLength(96); - - b.Property("ApplicationName") - .HasColumnType("varchar(96) CHARACTER SET utf8mb4") - .HasMaxLength(96); - - b.Property("BrowserInfo") - .HasColumnType("varchar(512) CHARACTER SET utf8mb4") - .HasMaxLength(512); - - b.Property("ClientId") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("ClientIpAddress") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CorrelationId") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("Identity") - .HasColumnType("varchar(96) CHARACTER SET utf8mb4") - .HasMaxLength(96); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("TenantName") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(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() - .HasColumnName("AccessFailedCount") - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Email") - .IsRequired() - .HasColumnName("Email") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("EmailConfirmed") - .ValueGeneratedOnAdd() - .HasColumnName("EmailConfirmed") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("IsExternal") - .ValueGeneratedOnAdd() - .HasColumnName("IsExternal") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("LockoutEnabled") - .ValueGeneratedOnAdd() - .HasColumnName("LockoutEnabled") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LockoutEnd") - .HasColumnType("datetime(6)"); - - b.Property("Name") - .HasColumnName("Name") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("NormalizedEmail") - .IsRequired() - .HasColumnName("NormalizedEmail") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("NormalizedUserName") - .IsRequired() - .HasColumnName("NormalizedUserName") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("PasswordHash") - .HasColumnName("PasswordHash") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("PhoneNumber") - .HasColumnName("PhoneNumber") - .HasColumnType("varchar(16) CHARACTER SET utf8mb4") - .HasMaxLength(16); - - b.Property("PhoneNumberConfirmed") - .ValueGeneratedOnAdd() - .HasColumnName("PhoneNumberConfirmed") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("SecurityStamp") - .IsRequired() - .HasColumnName("SecurityStamp") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("Surname") - .HasColumnName("Surname") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("TwoFactorEnabled") - .ValueGeneratedOnAdd() - .HasColumnName("TwoFactorEnabled") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("UserName") - .IsRequired() - .HasColumnName("UserName") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - 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() - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("ClaimValue") - .HasColumnType("varchar(1024) CHARACTER SET utf8mb4") - .HasMaxLength(1024); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("ProviderDisplayName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ProviderKey") - .IsRequired() - .HasColumnType("varchar(196) CHARACTER SET utf8mb4") - .HasMaxLength(196); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("Name") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("Value") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - 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() - .HasColumnName("Code") - .HasColumnType("varchar(95) CHARACTER SET utf8mb4") - .HasMaxLength(95); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("DisplayName") - .IsRequired() - .HasColumnName("DisplayName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnType("varchar(1000) CHARACTER SET utf8mb4") - .HasMaxLength(1000); - - b.Property("DisplayName") - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.Property("Enabled") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.Property("Properties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.HasKey("Id"); - - b.ToTable("IdentityServerApiResources"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => - { - b.Property("ApiResourceId") - .HasColumnType("char(36)"); - - b.Property("Type") - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.HasKey("ApiResourceId", "Type"); - - b.ToTable("IdentityServerApiClaims"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScope", b => - { - b.Property("ApiResourceId") - .HasColumnType("char(36)"); - - b.Property("Name") - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.Property("Description") - .HasColumnType("varchar(1000) CHARACTER SET utf8mb4") - .HasMaxLength(1000); - - b.Property("DisplayName") - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.Property("Emphasize") - .HasColumnType("tinyint(1)"); - - b.Property("Required") - .HasColumnType("tinyint(1)"); - - b.Property("ShowInDiscoveryDocument") - .HasColumnType("tinyint(1)"); - - b.HasKey("ApiResourceId", "Name"); - - b.ToTable("IdentityServerApiScopes"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b => - { - b.Property("ApiResourceId") - .HasColumnType("char(36)"); - - b.Property("Name") - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.Property("Type") - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.HasKey("ApiResourceId", "Name", "Type"); - - b.ToTable("IdentityServerApiScopeClaims"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b => - { - b.Property("ApiResourceId") - .HasColumnType("char(36)"); - - b.Property("Type") - .HasColumnType("varchar(250) CHARACTER SET utf8mb4") - .HasMaxLength(250); - - b.Property("Value") - .HasColumnType("varchar(300) CHARACTER SET utf8mb4") - .HasMaxLength(300); - - b.Property("Description") - .HasColumnType("varchar(2000) CHARACTER SET utf8mb4") - .HasMaxLength(2000); - - b.Property("Expiration") - .HasColumnType("datetime(6)"); - - b.HasKey("ApiResourceId", "Type", "Value"); - - b.ToTable("IdentityServerApiSecrets"); - }); - - 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("AlwaysIncludeUserClaimsInIdToken") - .HasColumnType("tinyint(1)"); - - b.Property("AlwaysSendClientClaims") - .HasColumnType("tinyint(1)"); - - b.Property("AuthorizationCodeLifetime") - .HasColumnType("int"); - - b.Property("BackChannelLogoutSessionRequired") - .HasColumnType("tinyint(1)"); - - b.Property("BackChannelLogoutUri") - .HasColumnType("varchar(2000) CHARACTER SET utf8mb4") - .HasMaxLength(2000); - - b.Property("ClientClaimsPrefix") - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.Property("ClientId") - .IsRequired() - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.Property("ClientName") - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.Property("ClientUri") - .HasColumnType("varchar(2000) CHARACTER SET utf8mb4") - .HasMaxLength(2000); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("ConsentLifetime") - .HasColumnType("int"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnType("varchar(1000) CHARACTER SET utf8mb4") - .HasMaxLength(1000); - - b.Property("DeviceCodeLifetime") - .HasColumnType("int"); - - b.Property("EnableLocalLogin") - .HasColumnType("tinyint(1)"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("FrontChannelLogoutSessionRequired") - .HasColumnType("tinyint(1)"); - - b.Property("FrontChannelLogoutUri") - .HasColumnType("varchar(2000) CHARACTER SET utf8mb4") - .HasMaxLength(2000); - - b.Property("IdentityTokenLifetime") - .HasColumnType("int"); - - b.Property("IncludeJwtId") - .HasColumnType("tinyint(1)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("LogoUri") - .HasColumnType("varchar(2000) CHARACTER SET utf8mb4") - .HasMaxLength(2000); - - b.Property("PairWiseSubjectSalt") - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.Property("ProtocolType") - .IsRequired() - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(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("SlidingRefreshTokenLifetime") - .HasColumnType("int"); - - b.Property("UpdateAccessTokenClaimsOnRefresh") - .HasColumnType("tinyint(1)"); - - b.Property("UserCodeType") - .HasColumnType("varchar(100) CHARACTER SET utf8mb4") - .HasMaxLength(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") - .HasColumnType("varchar(250) CHARACTER SET utf8mb4") - .HasMaxLength(250); - - b.Property("Value") - .HasColumnType("varchar(250) CHARACTER SET utf8mb4") - .HasMaxLength(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") - .HasColumnType("varchar(150) CHARACTER SET utf8mb4") - .HasMaxLength(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") - .HasColumnType("varchar(250) CHARACTER SET utf8mb4") - .HasMaxLength(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") - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(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") - .HasColumnType("varchar(300) CHARACTER SET utf8mb4") - .HasMaxLength(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") - .HasColumnType("varchar(250) CHARACTER SET utf8mb4") - .HasMaxLength(250); - - b.Property("Value") - .IsRequired() - .HasColumnType("varchar(2000) CHARACTER SET utf8mb4") - .HasMaxLength(2000); - - b.HasKey("ClientId", "Key"); - - b.ToTable("IdentityServerClientProperties"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b => - { - b.Property("ClientId") - .HasColumnType("char(36)"); - - b.Property("RedirectUri") - .HasColumnType("varchar(300) CHARACTER SET utf8mb4") - .HasMaxLength(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") - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(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") - .HasColumnType("varchar(250) CHARACTER SET utf8mb4") - .HasMaxLength(250); - - b.Property("Value") - .HasColumnType("varchar(300) CHARACTER SET utf8mb4") - .HasMaxLength(300); - - b.Property("Description") - .HasColumnType("varchar(2000) CHARACTER SET utf8mb4") - .HasMaxLength(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() - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("Data") - .IsRequired() - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasMaxLength(50000); - - b.Property("DeviceCode") - .IsRequired() - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.Property("Expiration") - .IsRequired() - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("SubjectId") - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.Property("UserCode") - .IsRequired() - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.HasKey("Id"); - - b.HasIndex("DeviceCode") - .IsUnique(); - - b.HasIndex("Expiration"); - - b.HasIndex("UserCode") - .IsUnique(); - - b.ToTable("IdentityServerDeviceFlowCodes"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Grants.PersistedGrant", b => - { - b.Property("Key") - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.Property("ClientId") - .IsRequired() - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("Data") - .IsRequired() - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasMaxLength(10000); - - b.Property("Expiration") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("SubjectId") - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.Property("Type") - .IsRequired() - .HasColumnType("varchar(50) CHARACTER SET utf8mb4") - .HasMaxLength(50); - - b.HasKey("Key"); - - b.HasIndex("Expiration"); - - b.HasIndex("SubjectId", "ClientId", "Type"); - - b.ToTable("IdentityServerPersistedGrants"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityClaim", b => - { - b.Property("IdentityResourceId") - .HasColumnType("char(36)"); - - b.Property("Type") - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.HasKey("IdentityResourceId", "Type"); - - b.ToTable("IdentityServerIdentityClaims"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnType("varchar(1000) CHARACTER SET utf8mb4") - .HasMaxLength(1000); - - b.Property("DisplayName") - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.Property("Emphasize") - .HasColumnType("tinyint(1)"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); - - b.Property("Properties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("Required") - .HasColumnType("tinyint(1)"); - - b.Property("ShowInDiscoveryDocument") - .HasColumnType("tinyint(1)"); - - b.HasKey("Id"); - - b.ToTable("IdentityServerIdentityResources"); - }); - - 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.ApiScope", b => - { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) - .WithMany("Scopes") - .HasForeignKey("ApiResourceId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b => - { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiScope", null) - .WithMany("UserClaims") - .HasForeignKey("ApiResourceId", "Name") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b => - { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) - .WithMany("Secrets") - .HasForeignKey("ApiResourceId") - .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.IdentityClaim", b => - { - b.HasOne("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", null) - .WithMany("UserClaims") - .HasForeignKey("IdentityResourceId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/account/AuthServer.Host/Migrations/20200908015651_Upgrade-Abp-3.1.0.cs b/aspnet-core/services/account/AuthServer.Host/Migrations/20200908015651_Upgrade-Abp-3.1.0.cs deleted file mode 100644 index 2b8fd02c2..000000000 --- a/aspnet-core/services/account/AuthServer.Host/Migrations/20200908015651_Upgrade-Abp-3.1.0.cs +++ /dev/null @@ -1,236 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace AuthServer.Host.Migrations -{ - public partial class UpgradeAbp310 : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "IdentityServerPersistedGrants", - maxLength: 40, - nullable: true, - oldClrType: typeof(string), - oldType: "longtext CHARACTER SET utf8mb4", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "IdentityServerIdentityResources", - maxLength: 40, - nullable: true, - oldClrType: typeof(string), - oldType: "longtext CHARACTER SET utf8mb4", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "IdentityServerDeviceFlowCodes", - maxLength: 40, - nullable: true, - oldClrType: typeof(string), - oldType: "longtext CHARACTER SET utf8mb4", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "IdentityServerClients", - maxLength: 40, - nullable: true, - oldClrType: typeof(string), - oldType: "longtext CHARACTER SET utf8mb4", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "IdentityServerApiResources", - maxLength: 40, - nullable: true, - oldClrType: typeof(string), - oldType: "longtext CHARACTER SET utf8mb4", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "AbpUsers", - maxLength: 40, - nullable: true, - oldClrType: typeof(string), - oldType: "longtext CHARACTER SET utf8mb4", - oldNullable: true); - - migrationBuilder.AddColumn( - name: "IsExternal", - table: "AbpUsers", - nullable: false, - defaultValue: false); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "AbpRoles", - maxLength: 40, - nullable: true, - oldClrType: typeof(string), - oldType: "varchar(256) CHARACTER SET utf8mb4", - oldMaxLength: 256); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "AbpOrganizationUnits", - maxLength: 40, - nullable: true, - oldClrType: typeof(string), - oldType: "longtext CHARACTER SET utf8mb4", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "AbpClaimTypes", - maxLength: 40, - nullable: true, - oldClrType: typeof(string), - oldType: "varchar(256) CHARACTER SET utf8mb4", - oldMaxLength: 256); - - migrationBuilder.CreateTable( - name: "AbpSecurityLogs", - columns: table => new - { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - TenantId = table.Column(nullable: true), - ApplicationName = table.Column(maxLength: 96, nullable: true), - Identity = table.Column(maxLength: 96, nullable: true), - Action = table.Column(maxLength: 96, nullable: true), - UserId = table.Column(nullable: true), - UserName = table.Column(maxLength: 256, nullable: true), - TenantName = table.Column(maxLength: 64, nullable: true), - ClientId = table.Column(maxLength: 64, nullable: true), - CorrelationId = table.Column(maxLength: 64, nullable: true), - ClientIpAddress = table.Column(maxLength: 64, nullable: true), - BrowserInfo = table.Column(maxLength: 512, nullable: true), - CreationTime = table.Column(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpSecurityLogs", x => x.Id); - }); - - 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" }); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AbpSecurityLogs"); - - migrationBuilder.DropColumn( - name: "IsExternal", - table: "AbpUsers"); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "IdentityServerPersistedGrants", - type: "longtext CHARACTER SET utf8mb4", - nullable: true, - oldClrType: typeof(string), - oldMaxLength: 40, - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "IdentityServerIdentityResources", - type: "longtext CHARACTER SET utf8mb4", - nullable: true, - oldClrType: typeof(string), - oldMaxLength: 40, - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "IdentityServerDeviceFlowCodes", - type: "longtext CHARACTER SET utf8mb4", - nullable: true, - oldClrType: typeof(string), - oldMaxLength: 40, - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "IdentityServerClients", - type: "longtext CHARACTER SET utf8mb4", - nullable: true, - oldClrType: typeof(string), - oldMaxLength: 40, - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "IdentityServerApiResources", - type: "longtext CHARACTER SET utf8mb4", - nullable: true, - oldClrType: typeof(string), - oldMaxLength: 40, - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "AbpUsers", - type: "longtext CHARACTER SET utf8mb4", - nullable: true, - oldClrType: typeof(string), - oldMaxLength: 40, - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "AbpRoles", - type: "varchar(256) CHARACTER SET utf8mb4", - maxLength: 256, - nullable: false, - oldClrType: typeof(string), - oldMaxLength: 40, - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "AbpOrganizationUnits", - type: "longtext CHARACTER SET utf8mb4", - nullable: true, - oldClrType: typeof(string), - oldMaxLength: 40, - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "AbpClaimTypes", - type: "varchar(256) CHARACTER SET utf8mb4", - maxLength: 256, - nullable: false, - oldClrType: typeof(string), - oldMaxLength: 40, - oldNullable: true); - } - } -} diff --git a/aspnet-core/services/account/AuthServer.Host/Migrations/20201222101851_Upgrade-Abp-4.0.0.cs b/aspnet-core/services/account/AuthServer.Host/Migrations/20201222101851_Upgrade-Abp-4.0.0.cs deleted file mode 100644 index a13c57080..000000000 --- a/aspnet-core/services/account/AuthServer.Host/Migrations/20201222101851_Upgrade-Abp-4.0.0.cs +++ /dev/null @@ -1,657 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace AuthServer.Host.Migrations -{ - public partial class UpgradeAbp400 : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropForeignKey( - name: "FK_IdentityServerApiClaims_IdentityServerApiResources_ApiResour~", - table: "IdentityServerApiClaims"); - - migrationBuilder.DropForeignKey( - name: "FK_IdentityServerApiScopeClaims_IdentityServerApiScopes_ApiReso~", - table: "IdentityServerApiScopeClaims"); - - migrationBuilder.DropForeignKey( - name: "FK_IdentityServerApiScopes_IdentityServerApiResources_ApiResour~", - table: "IdentityServerApiScopes"); - - migrationBuilder.DropTable( - name: "IdentityServerApiSecrets"); - - migrationBuilder.DropTable( - name: "IdentityServerIdentityClaims"); - - migrationBuilder.DropIndex( - name: "IX_IdentityServerDeviceFlowCodes_UserCode", - table: "IdentityServerDeviceFlowCodes"); - - migrationBuilder.DropPrimaryKey( - name: "PK_IdentityServerClientProperties", - table: "IdentityServerClientProperties"); - - migrationBuilder.DropPrimaryKey( - name: "PK_IdentityServerApiScopes", - table: "IdentityServerApiScopes"); - - migrationBuilder.DropPrimaryKey( - name: "PK_IdentityServerApiScopeClaims", - table: "IdentityServerApiScopeClaims"); - - migrationBuilder.DropPrimaryKey( - name: "PK_IdentityServerApiClaims", - table: "IdentityServerApiClaims"); - - migrationBuilder.DropColumn( - name: "Properties", - table: "IdentityServerIdentityResources"); - - migrationBuilder.DropColumn( - name: "Name", - table: "IdentityServerApiScopeClaims"); - - migrationBuilder.DropColumn( - name: "Properties", - table: "IdentityServerApiResources"); - - migrationBuilder.RenameTable( - name: "IdentityServerApiClaims", - newName: "IdentityServerApiResourceClaims"); - - migrationBuilder.RenameColumn( - name: "ApiResourceId", - table: "IdentityServerApiScopes", - newName: "Id"); - - migrationBuilder.RenameColumn( - name: "ApiResourceId", - table: "IdentityServerApiScopeClaims", - newName: "ApiScopeId"); - - migrationBuilder.AddColumn( - name: "ConsumedTime", - table: "IdentityServerPersistedGrants", - type: "datetime(6)", - nullable: true); - - migrationBuilder.AddColumn( - name: "Description", - table: "IdentityServerPersistedGrants", - type: "varchar(200) CHARACTER SET utf8mb4", - maxLength: 200, - nullable: true); - - migrationBuilder.AddColumn( - name: "SessionId", - table: "IdentityServerPersistedGrants", - type: "varchar(100) CHARACTER SET utf8mb4", - maxLength: 100, - nullable: true); - - migrationBuilder.AddColumn( - name: "Description", - table: "IdentityServerDeviceFlowCodes", - type: "varchar(200) CHARACTER SET utf8mb4", - maxLength: 200, - nullable: true); - - migrationBuilder.AddColumn( - name: "SessionId", - table: "IdentityServerDeviceFlowCodes", - type: "varchar(100) CHARACTER SET utf8mb4", - maxLength: 100, - nullable: true); - - migrationBuilder.AddColumn( - name: "AllowedIdentityTokenSigningAlgorithms", - table: "IdentityServerClients", - type: "varchar(100) CHARACTER SET utf8mb4", - maxLength: 100, - nullable: true); - - migrationBuilder.AddColumn( - name: "RequireRequestObject", - table: "IdentityServerClients", - type: "tinyint(1)", - nullable: false, - defaultValue: false); - - migrationBuilder.AlterColumn( - name: "Value", - table: "IdentityServerClientProperties", - type: "varchar(300) CHARACTER SET utf8mb4", - maxLength: 300, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(2000) CHARACTER SET utf8mb4", - oldMaxLength: 2000); - - migrationBuilder.AddColumn( - name: "ConcurrencyStamp", - table: "IdentityServerApiScopes", - type: "varchar(40) CHARACTER SET utf8mb4", - maxLength: 40, - nullable: true); - - migrationBuilder.AddColumn( - name: "CreationTime", - table: "IdentityServerApiScopes", - type: "datetime(6)", - nullable: false, - defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); - - migrationBuilder.AddColumn( - name: "CreatorId", - table: "IdentityServerApiScopes", - type: "char(36)", - nullable: true); - - migrationBuilder.AddColumn( - name: "DeleterId", - table: "IdentityServerApiScopes", - type: "char(36)", - nullable: true); - - migrationBuilder.AddColumn( - name: "DeletionTime", - table: "IdentityServerApiScopes", - type: "datetime(6)", - nullable: true); - - migrationBuilder.AddColumn( - name: "Enabled", - table: "IdentityServerApiScopes", - type: "tinyint(1)", - nullable: false, - defaultValue: false); - - migrationBuilder.AddColumn( - name: "ExtraProperties", - table: "IdentityServerApiScopes", - type: "longtext CHARACTER SET utf8mb4", - nullable: true); - - migrationBuilder.AddColumn( - name: "IsDeleted", - table: "IdentityServerApiScopes", - type: "tinyint(1)", - nullable: false, - defaultValue: false); - - migrationBuilder.AddColumn( - name: "LastModificationTime", - table: "IdentityServerApiScopes", - type: "datetime(6)", - nullable: true); - - migrationBuilder.AddColumn( - name: "LastModifierId", - table: "IdentityServerApiScopes", - type: "char(36)", - nullable: true); - - migrationBuilder.AddColumn( - name: "AllowedAccessTokenSigningAlgorithms", - table: "IdentityServerApiResources", - type: "varchar(100) CHARACTER SET utf8mb4", - maxLength: 100, - nullable: true); - - migrationBuilder.AddColumn( - name: "ShowInDiscoveryDocument", - table: "IdentityServerApiResources", - type: "tinyint(1)", - nullable: false, - defaultValue: false); - - migrationBuilder.AddPrimaryKey( - name: "PK_IdentityServerClientProperties", - table: "IdentityServerClientProperties", - columns: new[] { "ClientId", "Key", "Value" }); - - migrationBuilder.AddPrimaryKey( - name: "PK_IdentityServerApiScopes", - table: "IdentityServerApiScopes", - column: "Id"); - - migrationBuilder.AddPrimaryKey( - name: "PK_IdentityServerApiScopeClaims", - table: "IdentityServerApiScopeClaims", - columns: new[] { "ApiScopeId", "Type" }); - - migrationBuilder.AddPrimaryKey( - name: "PK_IdentityServerApiResourceClaims", - table: "IdentityServerApiResourceClaims", - columns: new[] { "ApiResourceId", "Type" }); - - migrationBuilder.CreateTable( - name: "AbpLinkUsers", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false), - SourceUserId = table.Column(type: "char(36)", nullable: false), - SourceTenantId = table.Column(type: "char(36)", nullable: true), - TargetUserId = table.Column(type: "char(36)", nullable: false), - TargetTenantId = table.Column(type: "char(36)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpLinkUsers", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerApiResourceProperties", - columns: table => new - { - ApiResourceId = table.Column(type: "char(36)", nullable: false), - Key = table.Column(type: "varchar(250) CHARACTER SET utf8mb4", maxLength: 250, nullable: false), - Value = table.Column(type: "varchar(300) CHARACTER SET utf8mb4", maxLength: 300, nullable: false) - }, - 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); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerApiResourceScopes", - columns: table => new - { - ApiResourceId = table.Column(type: "char(36)", nullable: false), - Scope = table.Column(type: "varchar(200) CHARACTER SET utf8mb4", maxLength: 200, nullable: false) - }, - 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); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerApiResourceSecrets", - columns: table => new - { - Type = table.Column(type: "varchar(250) CHARACTER SET utf8mb4", maxLength: 250, nullable: false), - Value = table.Column(type: "varchar(300) CHARACTER SET utf8mb4", maxLength: 300, nullable: false), - ApiResourceId = table.Column(type: "char(36)", nullable: false), - Description = table.Column(type: "varchar(1000) CHARACTER SET utf8mb4", maxLength: 1000, nullable: true), - 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); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerApiScopeProperties", - columns: table => new - { - ApiScopeId = table.Column(type: "char(36)", nullable: false), - Key = table.Column(type: "varchar(250) CHARACTER SET utf8mb4", maxLength: 250, nullable: false), - Value = table.Column(type: "varchar(300) CHARACTER SET utf8mb4", maxLength: 300, nullable: false) - }, - 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); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerIdentityResourceClaims", - columns: table => new - { - Type = table.Column(type: "varchar(200) CHARACTER SET utf8mb4", maxLength: 200, nullable: false), - IdentityResourceId = table.Column(type: "char(36)", nullable: false) - }, - 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); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerIdentityResourceProperties", - columns: table => new - { - IdentityResourceId = table.Column(type: "char(36)", nullable: false), - Key = table.Column(type: "varchar(250) CHARACTER SET utf8mb4", maxLength: 250, nullable: false), - Value = table.Column(type: "varchar(300) CHARACTER SET utf8mb4", maxLength: 300, nullable: false) - }, - 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); - }); - - migrationBuilder.CreateIndex( - name: "IX_IdentityServerPersistedGrants_SubjectId_SessionId_Type", - table: "IdentityServerPersistedGrants", - columns: new[] { "SubjectId", "SessionId", "Type" }); - - migrationBuilder.CreateIndex( - name: "IX_IdentityServerDeviceFlowCodes_UserCode", - table: "IdentityServerDeviceFlowCodes", - column: "UserCode"); - - migrationBuilder.CreateIndex( - name: "IX_AbpLinkUsers_SourceUserId_SourceTenantId_TargetUserId_Target~", - table: "AbpLinkUsers", - columns: new[] { "SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId" }, - unique: true); - - migrationBuilder.AddForeignKey( - name: "FK_IdentityServerApiResourceClaims_IdentityServerApiResources_A~", - table: "IdentityServerApiResourceClaims", - column: "ApiResourceId", - principalTable: "IdentityServerApiResources", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "FK_IdentityServerApiScopeClaims_IdentityServerApiScopes_ApiScop~", - table: "IdentityServerApiScopeClaims", - column: "ApiScopeId", - principalTable: "IdentityServerApiScopes", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropForeignKey( - name: "FK_IdentityServerApiResourceClaims_IdentityServerApiResources_A~", - table: "IdentityServerApiResourceClaims"); - - migrationBuilder.DropForeignKey( - name: "FK_IdentityServerApiScopeClaims_IdentityServerApiScopes_ApiScop~", - table: "IdentityServerApiScopeClaims"); - - migrationBuilder.DropTable( - name: "AbpLinkUsers"); - - migrationBuilder.DropTable( - name: "IdentityServerApiResourceProperties"); - - migrationBuilder.DropTable( - name: "IdentityServerApiResourceScopes"); - - migrationBuilder.DropTable( - name: "IdentityServerApiResourceSecrets"); - - migrationBuilder.DropTable( - name: "IdentityServerApiScopeProperties"); - - migrationBuilder.DropTable( - name: "IdentityServerIdentityResourceClaims"); - - migrationBuilder.DropTable( - name: "IdentityServerIdentityResourceProperties"); - - migrationBuilder.DropIndex( - name: "IX_IdentityServerPersistedGrants_SubjectId_SessionId_Type", - table: "IdentityServerPersistedGrants"); - - migrationBuilder.DropIndex( - name: "IX_IdentityServerDeviceFlowCodes_UserCode", - table: "IdentityServerDeviceFlowCodes"); - - migrationBuilder.DropPrimaryKey( - name: "PK_IdentityServerClientProperties", - table: "IdentityServerClientProperties"); - - migrationBuilder.DropPrimaryKey( - name: "PK_IdentityServerApiScopes", - table: "IdentityServerApiScopes"); - - migrationBuilder.DropPrimaryKey( - name: "PK_IdentityServerApiScopeClaims", - table: "IdentityServerApiScopeClaims"); - - migrationBuilder.DropPrimaryKey( - name: "PK_IdentityServerApiResourceClaims", - table: "IdentityServerApiResourceClaims"); - - migrationBuilder.DropColumn( - name: "ConsumedTime", - table: "IdentityServerPersistedGrants"); - - migrationBuilder.DropColumn( - name: "Description", - table: "IdentityServerPersistedGrants"); - - migrationBuilder.DropColumn( - name: "SessionId", - table: "IdentityServerPersistedGrants"); - - migrationBuilder.DropColumn( - name: "Description", - table: "IdentityServerDeviceFlowCodes"); - - migrationBuilder.DropColumn( - name: "SessionId", - table: "IdentityServerDeviceFlowCodes"); - - migrationBuilder.DropColumn( - name: "AllowedIdentityTokenSigningAlgorithms", - table: "IdentityServerClients"); - - migrationBuilder.DropColumn( - name: "RequireRequestObject", - table: "IdentityServerClients"); - - migrationBuilder.DropColumn( - name: "ConcurrencyStamp", - table: "IdentityServerApiScopes"); - - migrationBuilder.DropColumn( - name: "CreationTime", - table: "IdentityServerApiScopes"); - - migrationBuilder.DropColumn( - name: "CreatorId", - table: "IdentityServerApiScopes"); - - migrationBuilder.DropColumn( - name: "DeleterId", - table: "IdentityServerApiScopes"); - - migrationBuilder.DropColumn( - name: "DeletionTime", - table: "IdentityServerApiScopes"); - - migrationBuilder.DropColumn( - name: "Enabled", - table: "IdentityServerApiScopes"); - - migrationBuilder.DropColumn( - name: "ExtraProperties", - table: "IdentityServerApiScopes"); - - migrationBuilder.DropColumn( - name: "IsDeleted", - table: "IdentityServerApiScopes"); - - migrationBuilder.DropColumn( - name: "LastModificationTime", - table: "IdentityServerApiScopes"); - - migrationBuilder.DropColumn( - name: "LastModifierId", - table: "IdentityServerApiScopes"); - - migrationBuilder.DropColumn( - name: "AllowedAccessTokenSigningAlgorithms", - table: "IdentityServerApiResources"); - - migrationBuilder.DropColumn( - name: "ShowInDiscoveryDocument", - table: "IdentityServerApiResources"); - - migrationBuilder.RenameTable( - name: "IdentityServerApiResourceClaims", - newName: "IdentityServerApiClaims"); - - migrationBuilder.RenameColumn( - name: "Id", - table: "IdentityServerApiScopes", - newName: "ApiResourceId"); - - migrationBuilder.RenameColumn( - name: "ApiScopeId", - table: "IdentityServerApiScopeClaims", - newName: "ApiResourceId"); - - migrationBuilder.AddColumn( - name: "Properties", - table: "IdentityServerIdentityResources", - type: "longtext CHARACTER SET utf8mb4", - nullable: true); - - migrationBuilder.AlterColumn( - name: "Value", - table: "IdentityServerClientProperties", - type: "varchar(2000) CHARACTER SET utf8mb4", - maxLength: 2000, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(300) CHARACTER SET utf8mb4", - oldMaxLength: 300); - - migrationBuilder.AddColumn( - name: "Name", - table: "IdentityServerApiScopeClaims", - type: "varchar(200) CHARACTER SET utf8mb4", - maxLength: 200, - nullable: false, - defaultValue: ""); - - migrationBuilder.AddColumn( - name: "Properties", - table: "IdentityServerApiResources", - type: "longtext CHARACTER SET utf8mb4", - nullable: true); - - migrationBuilder.AddPrimaryKey( - name: "PK_IdentityServerClientProperties", - table: "IdentityServerClientProperties", - columns: new[] { "ClientId", "Key" }); - - migrationBuilder.AddPrimaryKey( - name: "PK_IdentityServerApiScopes", - table: "IdentityServerApiScopes", - columns: new[] { "ApiResourceId", "Name" }); - - migrationBuilder.AddPrimaryKey( - name: "PK_IdentityServerApiScopeClaims", - table: "IdentityServerApiScopeClaims", - columns: new[] { "ApiResourceId", "Name", "Type" }); - - migrationBuilder.AddPrimaryKey( - name: "PK_IdentityServerApiClaims", - table: "IdentityServerApiClaims", - columns: new[] { "ApiResourceId", "Type" }); - - migrationBuilder.CreateTable( - name: "IdentityServerApiSecrets", - columns: table => new - { - ApiResourceId = table.Column(type: "char(36)", nullable: false), - Type = table.Column(type: "varchar(250) CHARACTER SET utf8mb4", maxLength: 250, nullable: false), - Value = table.Column(type: "varchar(300) CHARACTER SET utf8mb4", maxLength: 300, nullable: false), - Description = table.Column(type: "varchar(2000) CHARACTER SET utf8mb4", maxLength: 2000, nullable: true), - Expiration = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerApiSecrets", x => new { x.ApiResourceId, x.Type, x.Value }); - table.ForeignKey( - name: "FK_IdentityServerApiSecrets_IdentityServerApiResources_ApiResou~", - column: x => x.ApiResourceId, - principalTable: "IdentityServerApiResources", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerIdentityClaims", - columns: table => new - { - IdentityResourceId = table.Column(type: "char(36)", nullable: false), - Type = table.Column(type: "varchar(200) CHARACTER SET utf8mb4", maxLength: 200, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerIdentityClaims", x => new { x.IdentityResourceId, x.Type }); - table.ForeignKey( - name: "FK_IdentityServerIdentityClaims_IdentityServerIdentityResources~", - column: x => x.IdentityResourceId, - principalTable: "IdentityServerIdentityResources", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateIndex( - name: "IX_IdentityServerDeviceFlowCodes_UserCode", - table: "IdentityServerDeviceFlowCodes", - column: "UserCode", - unique: true); - - migrationBuilder.AddForeignKey( - name: "FK_IdentityServerApiClaims_IdentityServerApiResources_ApiResour~", - table: "IdentityServerApiClaims", - column: "ApiResourceId", - principalTable: "IdentityServerApiResources", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "FK_IdentityServerApiScopeClaims_IdentityServerApiScopes_ApiReso~", - table: "IdentityServerApiScopeClaims", - columns: new[] { "ApiResourceId", "Name" }, - principalTable: "IdentityServerApiScopes", - principalColumns: new[] { "ApiResourceId", "Name" }, - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "FK_IdentityServerApiScopes_IdentityServerApiResources_ApiResour~", - table: "IdentityServerApiScopes", - column: "ApiResourceId", - principalTable: "IdentityServerApiResources", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - } - } -} diff --git a/aspnet-core/services/account/AuthServer.Host/Migrations/20210302035805_Add-IdentityUser-AvatarUrl.Designer.cs b/aspnet-core/services/account/AuthServer.Host/Migrations/20210302035805_Add-IdentityUser-AvatarUrl.Designer.cs deleted file mode 100644 index 7e05c6881..000000000 --- a/aspnet-core/services/account/AuthServer.Host/Migrations/20210302035805_Add-IdentityUser-AvatarUrl.Designer.cs +++ /dev/null @@ -1,1774 +0,0 @@ -// -using System; -using AuthServer.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -namespace AuthServer.Host.Migrations -{ - [DbContext(typeof(AuthServerHostMigrationsDbContext))] - [Migration("20210302035805_Add-IdentityUser-AvatarUrl")] - partial class AddIdentityUserAvatarUrl - { - 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("Volo.Abp.Identity.IdentityClaimType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Description") - .HasMaxLength(256) - .HasColumnType("varchar(256) CHARACTER SET utf8mb4"); - - b.Property("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasColumnName("ExtraProperties"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256) CHARACTER SET utf8mb4"); - - b.Property("Regex") - .HasMaxLength(512) - .HasColumnType("varchar(512) CHARACTER SET utf8mb4"); - - b.Property("RegexDescription") - .HasMaxLength(128) - .HasColumnType("varchar(128) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4") - .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) CHARACTER SET utf8mb4"); - - b.Property("NormalizedName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - b.Property("ClaimValue") - .HasMaxLength(1024) - .HasColumnType("varchar(1024) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - b.Property("ApplicationName") - .HasMaxLength(96) - .HasColumnType("varchar(96) CHARACTER SET utf8mb4"); - - b.Property("BrowserInfo") - .HasMaxLength(512) - .HasColumnType("varchar(512) CHARACTER SET utf8mb4"); - - b.Property("ClientId") - .HasMaxLength(64) - .HasColumnType("varchar(64) CHARACTER SET utf8mb4"); - - b.Property("ClientIpAddress") - .HasMaxLength(64) - .HasColumnType("varchar(64) CHARACTER SET utf8mb4"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CorrelationId") - .HasMaxLength(64) - .HasColumnType("varchar(64) CHARACTER SET utf8mb4"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasColumnName("ExtraProperties"); - - b.Property("Identity") - .HasMaxLength(96) - .HasColumnType("varchar(96) CHARACTER SET utf8mb4"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TenantName") - .HasMaxLength(64) - .HasColumnType("varchar(64) CHARACTER SET utf8mb4"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("varchar(256) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .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) CHARACTER SET utf8mb4") - .HasColumnName("Email"); - - b.Property("EmailConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("EmailConfirmed"); - - b.Property("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4") - .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) CHARACTER SET utf8mb4") - .HasColumnName("Name"); - - b.Property("NormalizedEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasColumnName("NormalizedEmail"); - - b.Property("NormalizedUserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasColumnName("NormalizedUserName"); - - b.Property("PasswordHash") - .HasMaxLength(256) - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasColumnName("PasswordHash"); - - b.Property("PhoneNumber") - .HasMaxLength(16) - .HasColumnType("varchar(16) CHARACTER SET utf8mb4") - .HasColumnName("PhoneNumber"); - - b.Property("PhoneNumberConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("PhoneNumberConfirmed"); - - b.Property("SecurityStamp") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasColumnName("SecurityStamp"); - - b.Property("Surname") - .HasMaxLength(64) - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .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) CHARACTER SET utf8mb4") - .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) CHARACTER SET utf8mb4"); - - b.Property("ClaimValue") - .HasMaxLength(1024) - .HasColumnType("varchar(1024) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - b.Property("ProviderDisplayName") - .HasMaxLength(128) - .HasColumnType("varchar(128) CHARACTER SET utf8mb4"); - - b.Property("ProviderKey") - .IsRequired() - .HasMaxLength(196) - .HasColumnType("varchar(196) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - b.Property("Name") - .HasMaxLength(128) - .HasColumnType("varchar(128) CHARACTER SET utf8mb4"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Value") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4") - .HasColumnName("Code"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .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) CHARACTER SET utf8mb4") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4") - .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) CHARACTER SET utf8mb4"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .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) CHARACTER SET utf8mb4"); - - b.Property("DisplayName") - .HasMaxLength(200) - .HasColumnType("varchar(200) CHARACTER SET utf8mb4"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4") - .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) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - b.Property("Value") - .HasMaxLength(300) - .HasColumnType("varchar(300) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - b.Property("Value") - .HasMaxLength(300) - .HasColumnType("varchar(300) CHARACTER SET utf8mb4"); - - b.Property("Description") - .HasMaxLength(1000) - .HasColumnType("varchar(1000) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4") - .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) CHARACTER SET utf8mb4"); - - b.Property("DisplayName") - .HasMaxLength(200) - .HasColumnType("varchar(200) CHARACTER SET utf8mb4"); - - b.Property("Emphasize") - .HasColumnType("tinyint(1)"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4") - .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) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - b.Property("Value") - .HasMaxLength(300) - .HasColumnType("varchar(300) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - b.Property("ClientClaimsPrefix") - .HasMaxLength(200) - .HasColumnType("varchar(200) CHARACTER SET utf8mb4"); - - b.Property("ClientId") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200) CHARACTER SET utf8mb4"); - - b.Property("ClientName") - .HasMaxLength(200) - .HasColumnType("varchar(200) CHARACTER SET utf8mb4"); - - b.Property("ClientUri") - .HasMaxLength(2000) - .HasColumnType("varchar(2000) CHARACTER SET utf8mb4"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .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) CHARACTER SET utf8mb4"); - - b.Property("DeviceCodeLifetime") - .HasColumnType("int"); - - b.Property("EnableLocalLogin") - .HasColumnType("tinyint(1)"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasColumnName("ExtraProperties"); - - b.Property("FrontChannelLogoutSessionRequired") - .HasColumnType("tinyint(1)"); - - b.Property("FrontChannelLogoutUri") - .HasMaxLength(2000) - .HasColumnType("varchar(2000) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - b.Property("PairWiseSubjectSalt") - .HasMaxLength(200) - .HasColumnType("varchar(200) CHARACTER SET utf8mb4"); - - b.Property("ProtocolType") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - b.Property("Value") - .HasMaxLength(250) - .HasColumnType("varchar(250) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - b.Property("Value") - .HasMaxLength(300) - .HasColumnType("varchar(300) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - b.Property("Value") - .HasMaxLength(300) - .HasColumnType("varchar(300) CHARACTER SET utf8mb4"); - - b.Property("Description") - .HasMaxLength(2000) - .HasColumnType("varchar(2000) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .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("longtext CHARACTER SET utf8mb4"); - - b.Property("Description") - .HasMaxLength(200) - .HasColumnType("varchar(200) CHARACTER SET utf8mb4"); - - b.Property("DeviceCode") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200) CHARACTER SET utf8mb4"); - - b.Property("Expiration") - .IsRequired() - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasColumnName("ExtraProperties"); - - b.Property("SessionId") - .HasMaxLength(100) - .HasColumnType("varchar(100) CHARACTER SET utf8mb4"); - - b.Property("SubjectId") - .HasMaxLength(200) - .HasColumnType("varchar(200) CHARACTER SET utf8mb4"); - - b.Property("UserCode") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - b.Property("ClientId") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200) CHARACTER SET utf8mb4"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ConsumedTime") - .HasColumnType("datetime(6)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("Data") - .IsRequired() - .HasMaxLength(10000) - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("Description") - .HasMaxLength(200) - .HasColumnType("varchar(200) CHARACTER SET utf8mb4"); - - b.Property("Expiration") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasColumnName("ExtraProperties"); - - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("SessionId") - .HasMaxLength(100) - .HasColumnType("varchar(100) CHARACTER SET utf8mb4"); - - b.Property("SubjectId") - .HasMaxLength(200) - .HasColumnType("varchar(200) CHARACTER SET utf8mb4"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4") - .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) CHARACTER SET utf8mb4"); - - b.Property("DisplayName") - .HasMaxLength(200) - .HasColumnType("varchar(200) CHARACTER SET utf8mb4"); - - b.Property("Emphasize") - .HasColumnType("tinyint(1)"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4") - .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) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - b.Property("Value") - .HasMaxLength(300) - .HasColumnType("varchar(300) CHARACTER SET utf8mb4"); - - 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/account/AuthServer.Host/Migrations/20210302035805_Add-IdentityUser-AvatarUrl.cs b/aspnet-core/services/account/AuthServer.Host/Migrations/20210302035805_Add-IdentityUser-AvatarUrl.cs deleted file mode 100644 index 11f7258a9..000000000 --- a/aspnet-core/services/account/AuthServer.Host/Migrations/20210302035805_Add-IdentityUser-AvatarUrl.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -namespace AuthServer.Host.Migrations -{ - public partial class AddIdentityUserAvatarUrl : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "AvatarUrl", - table: "AbpUsers", - type: "varchar(128) CHARACTER SET utf8mb4", - maxLength: 128, - nullable: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "AvatarUrl", - table: "AbpUsers"); - } - } -} diff --git a/aspnet-core/services/account/AuthServer.Host/Migrations/20201222101851_Upgrade-Abp-4.0.0.Designer.cs b/aspnet-core/services/account/AuthServer.Host/Migrations/20211030124247_Re-Initlize-Db-Migration.Designer.cs similarity index 86% rename from aspnet-core/services/account/AuthServer.Host/Migrations/20201222101851_Upgrade-Abp-4.0.0.Designer.cs rename to aspnet-core/services/account/AuthServer.Host/Migrations/20211030124247_Re-Initlize-Db-Migration.Designer.cs index 456ad8bbb..f6e27bae2 100644 --- a/aspnet-core/services/account/AuthServer.Host/Migrations/20201222101851_Upgrade-Abp-4.0.0.Designer.cs +++ b/aspnet-core/services/account/AuthServer.Host/Migrations/20211030124247_Re-Initlize-Db-Migration.Designer.cs @@ -1,1770 +1,1774 @@ -// -using System; -using AuthServer.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -namespace AuthServer.Host.Migrations -{ - [DbContext(typeof(AuthServerHostMigrationsDbContext))] - [Migration("20201222101851_Upgrade-Abp-4.0.0")] - partial class UpgradeAbp400 - { - 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.0"); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Description") - .HasMaxLength(256) - .HasColumnType("varchar(256) CHARACTER SET utf8mb4"); - - b.Property("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasColumnName("ExtraProperties"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256) CHARACTER SET utf8mb4"); - - b.Property("Regex") - .HasMaxLength(512) - .HasColumnType("varchar(512) CHARACTER SET utf8mb4"); - - b.Property("RegexDescription") - .HasMaxLength(128) - .HasColumnType("varchar(128) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4") - .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) CHARACTER SET utf8mb4"); - - b.Property("NormalizedName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - b.Property("ClaimValue") - .HasMaxLength(1024) - .HasColumnType("varchar(1024) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - b.Property("ApplicationName") - .HasMaxLength(96) - .HasColumnType("varchar(96) CHARACTER SET utf8mb4"); - - b.Property("BrowserInfo") - .HasMaxLength(512) - .HasColumnType("varchar(512) CHARACTER SET utf8mb4"); - - b.Property("ClientId") - .HasMaxLength(64) - .HasColumnType("varchar(64) CHARACTER SET utf8mb4"); - - b.Property("ClientIpAddress") - .HasMaxLength(64) - .HasColumnType("varchar(64) CHARACTER SET utf8mb4"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CorrelationId") - .HasMaxLength(64) - .HasColumnType("varchar(64) CHARACTER SET utf8mb4"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasColumnName("ExtraProperties"); - - b.Property("Identity") - .HasMaxLength(96) - .HasColumnType("varchar(96) CHARACTER SET utf8mb4"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TenantName") - .HasMaxLength(64) - .HasColumnType("varchar(64) CHARACTER SET utf8mb4"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("varchar(256) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4") - .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) CHARACTER SET utf8mb4") - .HasColumnName("Email"); - - b.Property("EmailConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("EmailConfirmed"); - - b.Property("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4") - .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) CHARACTER SET utf8mb4") - .HasColumnName("Name"); - - b.Property("NormalizedEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasColumnName("NormalizedEmail"); - - b.Property("NormalizedUserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasColumnName("NormalizedUserName"); - - b.Property("PasswordHash") - .HasMaxLength(256) - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasColumnName("PasswordHash"); - - b.Property("PhoneNumber") - .HasMaxLength(16) - .HasColumnType("varchar(16) CHARACTER SET utf8mb4") - .HasColumnName("PhoneNumber"); - - b.Property("PhoneNumberConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("PhoneNumberConfirmed"); - - b.Property("SecurityStamp") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasColumnName("SecurityStamp"); - - b.Property("Surname") - .HasMaxLength(64) - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .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) CHARACTER SET utf8mb4") - .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) CHARACTER SET utf8mb4"); - - b.Property("ClaimValue") - .HasMaxLength(1024) - .HasColumnType("varchar(1024) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - b.Property("ProviderDisplayName") - .HasMaxLength(128) - .HasColumnType("varchar(128) CHARACTER SET utf8mb4"); - - b.Property("ProviderKey") - .IsRequired() - .HasMaxLength(196) - .HasColumnType("varchar(196) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - b.Property("Name") - .HasMaxLength(128) - .HasColumnType("varchar(128) CHARACTER SET utf8mb4"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Value") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4") - .HasColumnName("Code"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .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) CHARACTER SET utf8mb4") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4") - .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) CHARACTER SET utf8mb4"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .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) CHARACTER SET utf8mb4"); - - b.Property("DisplayName") - .HasMaxLength(200) - .HasColumnType("varchar(200) CHARACTER SET utf8mb4"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4") - .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) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - b.Property("Value") - .HasMaxLength(300) - .HasColumnType("varchar(300) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - b.Property("Value") - .HasMaxLength(300) - .HasColumnType("varchar(300) CHARACTER SET utf8mb4"); - - b.Property("Description") - .HasMaxLength(1000) - .HasColumnType("varchar(1000) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4") - .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) CHARACTER SET utf8mb4"); - - b.Property("DisplayName") - .HasMaxLength(200) - .HasColumnType("varchar(200) CHARACTER SET utf8mb4"); - - b.Property("Emphasize") - .HasColumnType("tinyint(1)"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4") - .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) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - b.Property("Value") - .HasMaxLength(300) - .HasColumnType("varchar(300) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - b.Property("ClientClaimsPrefix") - .HasMaxLength(200) - .HasColumnType("varchar(200) CHARACTER SET utf8mb4"); - - b.Property("ClientId") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200) CHARACTER SET utf8mb4"); - - b.Property("ClientName") - .HasMaxLength(200) - .HasColumnType("varchar(200) CHARACTER SET utf8mb4"); - - b.Property("ClientUri") - .HasMaxLength(2000) - .HasColumnType("varchar(2000) CHARACTER SET utf8mb4"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .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) CHARACTER SET utf8mb4"); - - b.Property("DeviceCodeLifetime") - .HasColumnType("int"); - - b.Property("EnableLocalLogin") - .HasColumnType("tinyint(1)"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasColumnName("ExtraProperties"); - - b.Property("FrontChannelLogoutSessionRequired") - .HasColumnType("tinyint(1)"); - - b.Property("FrontChannelLogoutUri") - .HasMaxLength(2000) - .HasColumnType("varchar(2000) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - b.Property("PairWiseSubjectSalt") - .HasMaxLength(200) - .HasColumnType("varchar(200) CHARACTER SET utf8mb4"); - - b.Property("ProtocolType") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - b.Property("Value") - .HasMaxLength(250) - .HasColumnType("varchar(250) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - b.Property("Value") - .HasMaxLength(300) - .HasColumnType("varchar(300) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - b.Property("Value") - .HasMaxLength(300) - .HasColumnType("varchar(300) CHARACTER SET utf8mb4"); - - b.Property("Description") - .HasMaxLength(2000) - .HasColumnType("varchar(2000) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .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("longtext CHARACTER SET utf8mb4"); - - b.Property("Description") - .HasMaxLength(200) - .HasColumnType("varchar(200) CHARACTER SET utf8mb4"); - - b.Property("DeviceCode") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200) CHARACTER SET utf8mb4"); - - b.Property("Expiration") - .IsRequired() - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasColumnName("ExtraProperties"); - - b.Property("SessionId") - .HasMaxLength(100) - .HasColumnType("varchar(100) CHARACTER SET utf8mb4"); - - b.Property("SubjectId") - .HasMaxLength(200) - .HasColumnType("varchar(200) CHARACTER SET utf8mb4"); - - b.Property("UserCode") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - b.Property("ClientId") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200) CHARACTER SET utf8mb4"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ConsumedTime") - .HasColumnType("datetime(6)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("Data") - .IsRequired() - .HasMaxLength(10000) - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("Description") - .HasMaxLength(200) - .HasColumnType("varchar(200) CHARACTER SET utf8mb4"); - - b.Property("Expiration") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasColumnName("ExtraProperties"); - - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("SessionId") - .HasMaxLength(100) - .HasColumnType("varchar(100) CHARACTER SET utf8mb4"); - - b.Property("SubjectId") - .HasMaxLength(200) - .HasColumnType("varchar(200) CHARACTER SET utf8mb4"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4") - .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) CHARACTER SET utf8mb4"); - - b.Property("DisplayName") - .HasMaxLength(200) - .HasColumnType("varchar(200) CHARACTER SET utf8mb4"); - - b.Property("Emphasize") - .HasColumnType("tinyint(1)"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4") - .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) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - b.Property("Value") - .HasMaxLength(300) - .HasColumnType("varchar(300) CHARACTER SET utf8mb4"); - - 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 - } - } -} +// +using System; +using AuthServer.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +namespace AuthServer.Migrations +{ + [DbContext(typeof(AuthServerHostMigrationsDbContext))] + [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/account/AuthServer.Host/Migrations/20211030124247_Re-Initlize-Db-Migration.cs b/aspnet-core/services/account/AuthServer.Host/Migrations/20211030124247_Re-Initlize-Db-Migration.cs new file mode 100644 index 000000000..6d5b214ec --- /dev/null +++ b/aspnet-core/services/account/AuthServer.Host/Migrations/20211030124247_Re-Initlize-Db-Migration.cs @@ -0,0 +1,1221 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +namespace AuthServer.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/account/AuthServer.Host/Migrations/IdentityServerMigrationsDbContextModelSnapshot.cs b/aspnet-core/services/account/AuthServer.Host/Migrations/AuthServerHostMigrationsDbContextModelSnapshot.cs similarity index 86% rename from aspnet-core/services/account/AuthServer.Host/Migrations/IdentityServerMigrationsDbContextModelSnapshot.cs rename to aspnet-core/services/account/AuthServer.Host/Migrations/AuthServerHostMigrationsDbContextModelSnapshot.cs index e9a9d20e8..3d30d30eb 100644 --- a/aspnet-core/services/account/AuthServer.Host/Migrations/IdentityServerMigrationsDbContextModelSnapshot.cs +++ b/aspnet-core/services/account/AuthServer.Host/Migrations/AuthServerHostMigrationsDbContextModelSnapshot.cs @@ -1,1772 +1,1772 @@ -// -using System; -using AuthServer.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -namespace AuthServer.Migrations -{ - [DbContext(typeof(AuthServerHostMigrationsDbContext))] - partial class IdentityServerMigrationsDbContextModelSnapshot : 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("Volo.Abp.Identity.IdentityClaimType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Description") - .HasMaxLength(256) - .HasColumnType("varchar(256) CHARACTER SET utf8mb4"); - - b.Property("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasColumnName("ExtraProperties"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256) CHARACTER SET utf8mb4"); - - b.Property("Regex") - .HasMaxLength(512) - .HasColumnType("varchar(512) CHARACTER SET utf8mb4"); - - b.Property("RegexDescription") - .HasMaxLength(128) - .HasColumnType("varchar(128) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4") - .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) CHARACTER SET utf8mb4"); - - b.Property("NormalizedName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - b.Property("ClaimValue") - .HasMaxLength(1024) - .HasColumnType("varchar(1024) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - b.Property("ApplicationName") - .HasMaxLength(96) - .HasColumnType("varchar(96) CHARACTER SET utf8mb4"); - - b.Property("BrowserInfo") - .HasMaxLength(512) - .HasColumnType("varchar(512) CHARACTER SET utf8mb4"); - - b.Property("ClientId") - .HasMaxLength(64) - .HasColumnType("varchar(64) CHARACTER SET utf8mb4"); - - b.Property("ClientIpAddress") - .HasMaxLength(64) - .HasColumnType("varchar(64) CHARACTER SET utf8mb4"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CorrelationId") - .HasMaxLength(64) - .HasColumnType("varchar(64) CHARACTER SET utf8mb4"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasColumnName("ExtraProperties"); - - b.Property("Identity") - .HasMaxLength(96) - .HasColumnType("varchar(96) CHARACTER SET utf8mb4"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TenantName") - .HasMaxLength(64) - .HasColumnType("varchar(64) CHARACTER SET utf8mb4"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("varchar(256) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .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) CHARACTER SET utf8mb4") - .HasColumnName("Email"); - - b.Property("EmailConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("EmailConfirmed"); - - b.Property("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4") - .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) CHARACTER SET utf8mb4") - .HasColumnName("Name"); - - b.Property("NormalizedEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasColumnName("NormalizedEmail"); - - b.Property("NormalizedUserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasColumnName("NormalizedUserName"); - - b.Property("PasswordHash") - .HasMaxLength(256) - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasColumnName("PasswordHash"); - - b.Property("PhoneNumber") - .HasMaxLength(16) - .HasColumnType("varchar(16) CHARACTER SET utf8mb4") - .HasColumnName("PhoneNumber"); - - b.Property("PhoneNumberConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("PhoneNumberConfirmed"); - - b.Property("SecurityStamp") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasColumnName("SecurityStamp"); - - b.Property("Surname") - .HasMaxLength(64) - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .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) CHARACTER SET utf8mb4") - .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) CHARACTER SET utf8mb4"); - - b.Property("ClaimValue") - .HasMaxLength(1024) - .HasColumnType("varchar(1024) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - b.Property("ProviderDisplayName") - .HasMaxLength(128) - .HasColumnType("varchar(128) CHARACTER SET utf8mb4"); - - b.Property("ProviderKey") - .IsRequired() - .HasMaxLength(196) - .HasColumnType("varchar(196) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - b.Property("Name") - .HasMaxLength(128) - .HasColumnType("varchar(128) CHARACTER SET utf8mb4"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Value") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4") - .HasColumnName("Code"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .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) CHARACTER SET utf8mb4") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4") - .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) CHARACTER SET utf8mb4"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .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) CHARACTER SET utf8mb4"); - - b.Property("DisplayName") - .HasMaxLength(200) - .HasColumnType("varchar(200) CHARACTER SET utf8mb4"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4") - .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) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - b.Property("Value") - .HasMaxLength(300) - .HasColumnType("varchar(300) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - b.Property("Value") - .HasMaxLength(300) - .HasColumnType("varchar(300) CHARACTER SET utf8mb4"); - - b.Property("Description") - .HasMaxLength(1000) - .HasColumnType("varchar(1000) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4") - .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) CHARACTER SET utf8mb4"); - - b.Property("DisplayName") - .HasMaxLength(200) - .HasColumnType("varchar(200) CHARACTER SET utf8mb4"); - - b.Property("Emphasize") - .HasColumnType("tinyint(1)"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4") - .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) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - b.Property("Value") - .HasMaxLength(300) - .HasColumnType("varchar(300) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - b.Property("ClientClaimsPrefix") - .HasMaxLength(200) - .HasColumnType("varchar(200) CHARACTER SET utf8mb4"); - - b.Property("ClientId") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200) CHARACTER SET utf8mb4"); - - b.Property("ClientName") - .HasMaxLength(200) - .HasColumnType("varchar(200) CHARACTER SET utf8mb4"); - - b.Property("ClientUri") - .HasMaxLength(2000) - .HasColumnType("varchar(2000) CHARACTER SET utf8mb4"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .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) CHARACTER SET utf8mb4"); - - b.Property("DeviceCodeLifetime") - .HasColumnType("int"); - - b.Property("EnableLocalLogin") - .HasColumnType("tinyint(1)"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasColumnName("ExtraProperties"); - - b.Property("FrontChannelLogoutSessionRequired") - .HasColumnType("tinyint(1)"); - - b.Property("FrontChannelLogoutUri") - .HasMaxLength(2000) - .HasColumnType("varchar(2000) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - b.Property("PairWiseSubjectSalt") - .HasMaxLength(200) - .HasColumnType("varchar(200) CHARACTER SET utf8mb4"); - - b.Property("ProtocolType") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - b.Property("Value") - .HasMaxLength(250) - .HasColumnType("varchar(250) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - b.Property("Value") - .HasMaxLength(300) - .HasColumnType("varchar(300) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - b.Property("Value") - .HasMaxLength(300) - .HasColumnType("varchar(300) CHARACTER SET utf8mb4"); - - b.Property("Description") - .HasMaxLength(2000) - .HasColumnType("varchar(2000) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .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("longtext CHARACTER SET utf8mb4"); - - b.Property("Description") - .HasMaxLength(200) - .HasColumnType("varchar(200) CHARACTER SET utf8mb4"); - - b.Property("DeviceCode") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200) CHARACTER SET utf8mb4"); - - b.Property("Expiration") - .IsRequired() - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasColumnName("ExtraProperties"); - - b.Property("SessionId") - .HasMaxLength(100) - .HasColumnType("varchar(100) CHARACTER SET utf8mb4"); - - b.Property("SubjectId") - .HasMaxLength(200) - .HasColumnType("varchar(200) CHARACTER SET utf8mb4"); - - b.Property("UserCode") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - b.Property("ClientId") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200) CHARACTER SET utf8mb4"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ConsumedTime") - .HasColumnType("datetime(6)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("Data") - .IsRequired() - .HasMaxLength(10000) - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("Description") - .HasMaxLength(200) - .HasColumnType("varchar(200) CHARACTER SET utf8mb4"); - - b.Property("Expiration") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasColumnName("ExtraProperties"); - - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("SessionId") - .HasMaxLength(100) - .HasColumnType("varchar(100) CHARACTER SET utf8mb4"); - - b.Property("SubjectId") - .HasMaxLength(200) - .HasColumnType("varchar(200) CHARACTER SET utf8mb4"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4") - .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) CHARACTER SET utf8mb4"); - - b.Property("DisplayName") - .HasMaxLength(200) - .HasColumnType("varchar(200) CHARACTER SET utf8mb4"); - - b.Property("Emphasize") - .HasColumnType("tinyint(1)"); - - b.Property("Enabled") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4") - .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) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - 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) CHARACTER SET utf8mb4"); - - b.Property("Value") - .HasMaxLength(300) - .HasColumnType("varchar(300) CHARACTER SET utf8mb4"); - - 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 - } - } -} +// +using System; +using AuthServer.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +namespace AuthServer.Migrations +{ + [DbContext(typeof(AuthServerHostMigrationsDbContext))] + partial class AuthServerHostMigrationsDbContextModelSnapshot : 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.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/account/AuthServer.Host/appsettings.Development.json b/aspnet-core/services/account/AuthServer.Host/appsettings.Development.json index 56f3b2677..a6ebd0761 100644 --- a/aspnet-core/services/account/AuthServer.Host/appsettings.Development.json +++ b/aspnet-core/services/account/AuthServer.Host/appsettings.Development.json @@ -80,7 +80,7 @@ }, "AuditLogging": { "Elasticsearch": { - "IndexPrefix": "lingyun.abp.auditing" + "IndexPrefix": "abp.dev.auditing" } }, "Elasticsearch": { @@ -107,7 +107,7 @@ "Name": "Elasticsearch", "Args": { "nodeUris": "http://localhost:9200", - "indexFormat": "lingyun.abp.logging-{0:yyyy.MM.dd}", + "indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}", "autoRegisterTemplate": true, "autoRegisterTemplateVersion": "ESv7" } diff --git a/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/BackendAdminHostModule.cs b/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/BackendAdminHostModule.cs index 5f404fd37..5b567d08c 100644 --- a/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/BackendAdminHostModule.cs +++ b/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/BackendAdminHostModule.cs @@ -1,6 +1,7 @@ using LINGYUN.Abp.AspNetCore.HttpOverrides; using LINGYUN.Abp.Auditing; using LINGYUN.Abp.AuditLogging.Elasticsearch; +using LINGYUN.Abp.Data.DbMigrator; using LINGYUN.Abp.EventBus.CAP; using LINGYUN.Abp.ExceptionHandling.Emailing; using LINGYUN.Abp.FeatureManagement; @@ -64,6 +65,7 @@ namespace LINGYUN.Abp.BackendAdmin typeof(AbpPermissionManagementEntityFrameworkCoreModule), typeof(AbpFeatureManagementEntityFrameworkCoreModule), typeof(AbpLocalizationManagementEntityFrameworkCoreModule), + typeof(AbpDataDbMigratorModule), typeof(AbpAspNetCoreAuthenticationJwtBearerModule), typeof(AbpEmailingExceptionHandlingModule), typeof(AbpCAPEventBusModule), diff --git a/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/EventBus/Handlers/TenantConnectionStringCreateEventHandler.cs b/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/EventBus/Handlers/TenantConnectionStringCreateEventHandler.cs deleted file mode 100644 index a9f8b290b..000000000 --- a/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/EventBus/Handlers/TenantConnectionStringCreateEventHandler.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace LINGYUN.Abp.BackendAdmin.EventBus.Handlers -{ - public class TenantConnectionStringCreateEventHandler - { - } -} diff --git a/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/EventBus/Handlers/TenantDeleteEventHandler.cs b/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/EventBus/Handlers/TenantDeleteEventHandler.cs deleted file mode 100644 index e020ca134..000000000 --- a/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/EventBus/Handlers/TenantDeleteEventHandler.cs +++ /dev/null @@ -1,82 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using System; -using System.Text; -using System.Threading.Tasks; -using Volo.Abp.DependencyInjection; -using Volo.Abp.Domain.Entities.Events.Distributed; -using Volo.Abp.Domain.Repositories; -using Volo.Abp.EventBus.Distributed; -using Volo.Abp.Guids; -using Volo.Abp.MultiTenancy; -using Volo.Abp.PermissionManagement; -using Volo.Abp.TenantManagement; -using Volo.Abp.Uow; - -namespace LINGYUN.Abp.BackendAdmin.EventBus.Handlers -{ - public class TenantDeleteEventHandler : IDistributedEventHandler>, ITransientDependency - { - protected ICurrentTenant CurrentTenant { get; } - protected IGuidGenerator GuidGenerator { get; } - protected IUnitOfWorkManager UnitOfWorkManager { get; } - protected IPermissionGrantRepository PermissionGrantRepository { get; } - public TenantDeleteEventHandler( - ICurrentTenant currentTenant, - IGuidGenerator guidGenerator, - IUnitOfWorkManager unitOfWorkManager, - IPermissionGrantRepository permissionGrantRepository) - { - CurrentTenant = currentTenant; - GuidGenerator = guidGenerator; - UnitOfWorkManager = unitOfWorkManager; - PermissionGrantRepository = permissionGrantRepository; - } - - public async Task HandleEventAsync(EntityDeletedEto eventData) - { - using var unitOfWork = UnitOfWorkManager.Begin(); - // 订阅租户删除事件,删除管理员角色所有权限 - // TODO: 租户貌似不存在了,删除应该会失败 - // 有缓存存在的话,可以获取到租户连接字符串 - using (CurrentTenant.Change(eventData.Entity.Id)) - { - // var grantPermissions = await PermissionGrantRepository.GetListAsync("R", "admin"); - - // EfCore MySql 批量删除还是一条一条的语句? - // PermissionGrantRepository.GetDbSet().RemoveRange(grantPermissions); - var dbContext = await PermissionGrantRepository.GetDbContextAsync(); - var permissionEntityType = dbContext.Model.FindEntityType(typeof(PermissionGrant)); - var permissionTableName = permissionEntityType.GetTableName(); - var batchRmovePermissionSql = string.Empty; - if (dbContext.Database.IsMySql()) - { - batchRmovePermissionSql = BuildMySqlBatchDeleteScript(permissionTableName, eventData.Entity.Id); - } - else - { - batchRmovePermissionSql = BuildSqlServerBatchDeleteScript(permissionTableName, eventData.Entity.Id); - } - - await dbContext.Database.ExecuteSqlRawAsync(batchRmovePermissionSql); - - await unitOfWork.SaveChangesAsync(); - } - } - - protected virtual string BuildMySqlBatchDeleteScript(string tableName, Guid tenantId) - { - var batchRemovePermissionSql = new StringBuilder(128); - batchRemovePermissionSql.AppendLine($"DELETE FROM `{tableName}` WHERE `TenantId` = '{tenantId}'"); - batchRemovePermissionSql.AppendLine("AND `ProviderName`='R' AND `ProviderKey`='admin'"); - return batchRemovePermissionSql.ToString(); - } - - protected virtual string BuildSqlServerBatchDeleteScript(string tableName, Guid tenantId) - { - var batchRemovePermissionSql = new StringBuilder(128); - batchRemovePermissionSql.AppendLine($"DELETE {tableName} WHERE TenantId = '{tenantId}'"); - batchRemovePermissionSql.AppendLine("AND ProviderName='R' AND ProviderKey='admin'"); - return batchRemovePermissionSql.ToString(); - } - } -} diff --git a/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/EventBus/Handlers/TenantCreateEventHandler.cs b/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/EventBus/Handlers/TenantSynchronizer.cs similarity index 54% rename from aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/EventBus/Handlers/TenantCreateEventHandler.cs rename to aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/EventBus/Handlers/TenantSynchronizer.cs index c8251acc7..a4fcc73e8 100644 --- a/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/EventBus/Handlers/TenantCreateEventHandler.cs +++ b/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/EventBus/Handlers/TenantSynchronizer.cs @@ -1,111 +1,188 @@ -using LINGYUN.Abp.MultiTenancy; -using Microsoft.EntityFrameworkCore; -using System; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Volo.Abp.Authorization.Permissions; -using Volo.Abp.DependencyInjection; -using Volo.Abp.Domain.Repositories; -using Volo.Abp.EventBus.Distributed; -using Volo.Abp.Guids; -using Volo.Abp.MultiTenancy; -using Volo.Abp.PermissionManagement; -using Volo.Abp.Uow; - -namespace LINGYUN.Abp.BackendAdmin.EventBus.Handlers -{ - public class TenantCreateEventHandler : IDistributedEventHandler, ITransientDependency - { - protected ICurrentTenant CurrentTenant { get; } - protected IGuidGenerator GuidGenerator { get; } - protected IUnitOfWorkManager UnitOfWorkManager { get; } - protected IPermissionGrantRepository PermissionGrantRepository { get; } - protected IPermissionDefinitionManager PermissionDefinitionManager { get; } - public TenantCreateEventHandler( - ICurrentTenant currentTenant, - IGuidGenerator guidGenerator, - IUnitOfWorkManager unitOfWorkManager, - IPermissionGrantRepository permissionGrantRepository, - IPermissionDefinitionManager permissionDefinitionManager) - { - CurrentTenant = currentTenant; - GuidGenerator = guidGenerator; - UnitOfWorkManager = unitOfWorkManager; - PermissionGrantRepository = permissionGrantRepository; - PermissionDefinitionManager = permissionDefinitionManager; - } - - public async Task HandleEventAsync(CreateEventData eventData) - { - using (var unitOfWork = UnitOfWorkManager.Begin()) - { - // 订阅租户新增事件,置入管理员角色所有权限 - using (CurrentTenant.Change(eventData.Id, eventData.Name)) - { - var definitionPermissions = PermissionDefinitionManager.GetPermissions(); - var grantPermissions = definitionPermissions - .Where(p => p.MultiTenancySide.HasFlag(MultiTenancySides.Tenant)) - .Select(p => p.Name).ToArray(); - //var grantPermissions = new List(); - //foreach (var permission in definitionPermissions) - //{ - // var permissionGrant = new PermissionGrant(GuidGenerator.Create(), - // permission.Name, "R", "admin", eventData.Id); - // grantPermissions.Add(permissionGrant); - //} - // TODO: MySql 批量新增还是一条一条的语句? - // await PermissionGrantRepository.GetDbSet().AddRangeAsync(grantPermissions); - - var dbContext = await PermissionGrantRepository.GetDbContextAsync(); - var permissionEntityType = dbContext.Model.FindEntityType(typeof(PermissionGrant)); - var permissionTableName = permissionEntityType.GetTableName(); - var batchInsertPermissionSql = string.Empty; - if (dbContext.Database.IsMySql()) - { - batchInsertPermissionSql = BuildMySqlBatchInsertScript(permissionTableName, eventData.Id, grantPermissions); - } - else - { - batchInsertPermissionSql = BuildSqlServerBatchInsertScript(permissionTableName, eventData.Id, grantPermissions); - } - await dbContext.Database.ExecuteSqlRawAsync(batchInsertPermissionSql); - - await unitOfWork.SaveChangesAsync(); - } - } - } - - protected virtual string BuildMySqlBatchInsertScript(string tableName, Guid tenantId, string[] permissions) - { - var batchInsertPermissionSql = new StringBuilder(128); - batchInsertPermissionSql.AppendLine($"INSERT INTO `{tableName}`(`Id`, `TenantId`, `Name`, `ProviderName`, `ProviderKey`)"); - batchInsertPermissionSql.AppendLine("VALUES"); - for (int i = 0; i < permissions.Length; i++) - { - batchInsertPermissionSql.AppendLine($"(UUID(), '{tenantId}','{permissions[i]}','R','admin')"); - if(i < permissions.Length - 1) - { - batchInsertPermissionSql.AppendLine(","); - } - } - return batchInsertPermissionSql.ToString(); - } - - protected virtual string BuildSqlServerBatchInsertScript(string tableName, Guid tenantId, string[] permissions) - { - var batchInsertPermissionSql = new StringBuilder(128); - batchInsertPermissionSql.AppendLine($"INSERT INTO {tableName}(Id, TenantId, Name, ProviderName, ProviderKey)"); - batchInsertPermissionSql.Append("VALUES"); - for (int i = 0; i < permissions.Length; i++) - { - batchInsertPermissionSql.AppendLine($"(NEWID(), '{tenantId}','{permissions[i]}','R','admin')"); - if (i < permissions.Length - 1) - { - batchInsertPermissionSql.AppendLine(","); - } - } - return batchInsertPermissionSql.ToString(); - } - } -} +using LINGYUN.Abp.BackendAdmin.EntityFrameworkCore; +using LINGYUN.Abp.Data.DbMigrator; +using LINGYUN.Abp.MultiTenancy; +using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.Logging; +using System; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Authorization.Permissions; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Domain.Entities.Events.Distributed; +using Volo.Abp.Domain.Repositories; +using Volo.Abp.EventBus.Distributed; +using Volo.Abp.Guids; +using Volo.Abp.MultiTenancy; +using Volo.Abp.PermissionManagement; +using Volo.Abp.TenantManagement; +using Volo.Abp.Uow; + +namespace LINGYUN.Abp.BackendAdmin.EventBus.Handlers +{ + public class TenantSynchronizer : + IDistributedEventHandler, + IDistributedEventHandler>, + ITransientDependency + { + protected ILogger Logger { get; } + protected ICurrentTenant CurrentTenant { get; } + protected IGuidGenerator GuidGenerator { get; } + protected IUnitOfWorkManager UnitOfWorkManager { get; } + protected IDbSchemaMigrator DbSchemaMigrator { get; } + protected IPermissionGrantRepository PermissionGrantRepository { get; } + protected IPermissionDefinitionManager PermissionDefinitionManager { get; } + public TenantSynchronizer( + ICurrentTenant currentTenant, + IGuidGenerator guidGenerator, + IUnitOfWorkManager unitOfWorkManager, + IDbSchemaMigrator dbSchemaMigrator, + IPermissionGrantRepository permissionGrantRepository, + IPermissionDefinitionManager permissionDefinitionManager, + ILogger logger) + { + CurrentTenant = currentTenant; + GuidGenerator = guidGenerator; + UnitOfWorkManager = unitOfWorkManager; + DbSchemaMigrator = dbSchemaMigrator; + PermissionGrantRepository = permissionGrantRepository; + PermissionDefinitionManager = permissionDefinitionManager; + + Logger = logger; + } + + public async Task HandleEventAsync(EntityDeletedEto eventData) + { + using var unitOfWork = UnitOfWorkManager.Begin(); + // 订阅租户删除事件,删除管理员角色所有权限 + // TODO: 租户貌似不存在了,删除应该会失败 + // 有缓存存在的话,可以获取到租户连接字符串 + using (CurrentTenant.Change(eventData.Entity.Id)) + { + // var grantPermissions = await PermissionGrantRepository.GetListAsync("R", "admin"); + + // EfCore MySql 批量删除还是一条一条的语句? + // PermissionGrantRepository.GetDbSet().RemoveRange(grantPermissions); + var dbContext = await PermissionGrantRepository.GetDbContextAsync(); + var permissionEntityType = dbContext.Model.FindEntityType(typeof(PermissionGrant)); + var permissionTableName = permissionEntityType.GetTableName(); + var batchRmovePermissionSql = string.Empty; + if (dbContext.Database.IsMySql()) + { + batchRmovePermissionSql = BuildMySqlBatchDeleteScript(permissionTableName, eventData.Entity.Id); + } + else + { + batchRmovePermissionSql = BuildSqlServerBatchDeleteScript(permissionTableName, eventData.Entity.Id); + } + + await dbContext.Database.ExecuteSqlRawAsync(batchRmovePermissionSql); + + await unitOfWork.SaveChangesAsync(); + } + } + + public async Task HandleEventAsync(CreateEventData eventData) + { + using (var unitOfWork = UnitOfWorkManager.Begin()) + { + // 订阅租户新增事件,置入管理员角色所有权限 + using (CurrentTenant.Change(eventData.Id, eventData.Name)) + { + Logger.LogInformation("Migrating the new tenant database with platform..."); + // 迁移租户数据 + await DbSchemaMigrator.MigrateAsync( + (connectionString, builder) => + { + builder.UseMySql(connectionString, ServerVersion.AutoDetect(connectionString)); + + return new BackendAdminHostMigrationsDbContext(builder.Options); + }); + + Logger.LogInformation("Migrated the new tenant database with platform."); + + Logger.LogInformation("Seeding the new tenant admin role permissions..."); + var definitionPermissions = PermissionDefinitionManager.GetPermissions(); + var grantPermissions = definitionPermissions + .Where(p => p.MultiTenancySide.HasFlag(MultiTenancySides.Tenant)) + .Select(p => p.Name).ToArray(); + //var grantPermissions = new List(); + //foreach (var permission in definitionPermissions) + //{ + // var permissionGrant = new PermissionGrant(GuidGenerator.Create(), + // permission.Name, "R", "admin", eventData.Id); + // grantPermissions.Add(permissionGrant); + //} + // TODO: MySql 批量新增还是一条一条的语句? + // await PermissionGrantRepository.GetDbSet().AddRangeAsync(grantPermissions); + + var dbContext = await PermissionGrantRepository.GetDbContextAsync(); + var permissionEntityType = dbContext.Model.FindEntityType(typeof(PermissionGrant)); + var permissionTableName = permissionEntityType.GetTableName(); + var batchInsertPermissionSql = string.Empty; + if (dbContext.Database.IsMySql()) + { + batchInsertPermissionSql = BuildMySqlBatchInsertScript(permissionTableName, eventData.Id, grantPermissions); + } + else + { + batchInsertPermissionSql = BuildSqlServerBatchInsertScript(permissionTableName, eventData.Id, grantPermissions); + } + await dbContext.Database.ExecuteSqlRawAsync(batchInsertPermissionSql); + + await unitOfWork.SaveChangesAsync(); + + Logger.LogInformation("The new tenant permissions data initialized!"); + } + } + } + + protected virtual string BuildMySqlBatchInsertScript(string tableName, Guid tenantId, string[] permissions) + { + var batchInsertPermissionSql = new StringBuilder(128); + batchInsertPermissionSql.AppendLine($"INSERT INTO `{tableName}`(`Id`, `TenantId`, `Name`, `ProviderName`, `ProviderKey`)"); + batchInsertPermissionSql.AppendLine("VALUES"); + for (int i = 0; i < permissions.Length; i++) + { + batchInsertPermissionSql.AppendLine($"(UUID(), '{tenantId}','{permissions[i]}','R','admin')"); + if (i < permissions.Length - 1) + { + batchInsertPermissionSql.AppendLine(","); + } + } + return batchInsertPermissionSql.ToString(); + } + + protected virtual string BuildSqlServerBatchInsertScript(string tableName, Guid tenantId, string[] permissions) + { + var batchInsertPermissionSql = new StringBuilder(128); + batchInsertPermissionSql.AppendLine($"INSERT INTO {tableName}(Id, TenantId, Name, ProviderName, ProviderKey)"); + batchInsertPermissionSql.Append("VALUES"); + for (int i = 0; i < permissions.Length; i++) + { + batchInsertPermissionSql.AppendLine($"(NEWID(), '{tenantId}','{permissions[i]}','R','admin')"); + if (i < permissions.Length - 1) + { + batchInsertPermissionSql.AppendLine(","); + } + } + return batchInsertPermissionSql.ToString(); + } + + protected virtual string BuildMySqlBatchDeleteScript(string tableName, Guid tenantId) + { + var batchRemovePermissionSql = new StringBuilder(128); + batchRemovePermissionSql.AppendLine($"DELETE FROM `{tableName}` WHERE `TenantId` = '{tenantId}'"); + batchRemovePermissionSql.AppendLine("AND `ProviderName`='R' AND `ProviderKey`='admin'"); + return batchRemovePermissionSql.ToString(); + } + + protected virtual string BuildSqlServerBatchDeleteScript(string tableName, Guid tenantId) + { + var batchRemovePermissionSql = new StringBuilder(128); + batchRemovePermissionSql.AppendLine($"DELETE {tableName} WHERE TenantId = '{tenantId}'"); + batchRemovePermissionSql.AppendLine("AND ProviderName='R' AND ProviderKey='admin'"); + return batchRemovePermissionSql.ToString(); + } + } +} diff --git a/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/LINGYUN.Abp.BackendAdmin.HttpApi.Host.csproj b/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/LINGYUN.Abp.BackendAdmin.HttpApi.Host.csproj index c4b64beeb..a1616e9df 100644 --- a/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/LINGYUN.Abp.BackendAdmin.HttpApi.Host.csproj +++ b/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/LINGYUN.Abp.BackendAdmin.HttpApi.Host.csproj @@ -65,6 +65,7 @@ + @@ -81,8 +82,4 @@ - - - - diff --git a/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Migrations/20200804085641_Migration-Backend-Admin-MySql.Designer.cs b/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Migrations/20200804085641_Migration-Backend-Admin-MySql.Designer.cs deleted file mode 100644 index a9e9b5483..000000000 --- a/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Migrations/20200804085641_Migration-Backend-Admin-MySql.Designer.cs +++ /dev/null @@ -1,175 +0,0 @@ -// -using System; -using LINGYUN.Abp.BackendAdmin.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -namespace LINGYUN.Abp.BackendAdmin.Migrations -{ - [DbContext(typeof(BackendAdminHostMigrationsDbContext))] - [Migration("20200804085641_Migration-Backend-Admin-MySql")] - partial class MigrationBackendAdminMySql - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "3.1.5") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ProviderKey") - .IsRequired() - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("ProviderName") - .IsRequired() - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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() - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ProviderKey") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("ProviderName") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("Value") - .IsRequired() - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasMaxLength(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() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(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") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("Value") - .IsRequired() - .HasColumnType("varchar(1024) CHARACTER SET utf8mb4") - .HasMaxLength(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(); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Migrations/20200804085641_Migration-Backend-Admin-MySql.cs b/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Migrations/20200804085641_Migration-Backend-Admin-MySql.cs deleted file mode 100644 index 5f3db9c3e..000000000 --- a/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Migrations/20200804085641_Migration-Backend-Admin-MySql.cs +++ /dev/null @@ -1,111 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace LINGYUN.Abp.BackendAdmin.Migrations -{ - public partial class MigrationBackendAdminMySql : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "AbpPermissionGrants", - columns: table => new - { - Id = table.Column(nullable: false), - TenantId = table.Column(nullable: true), - Name = table.Column(maxLength: 128, nullable: false), - ProviderName = table.Column(maxLength: 64, nullable: false), - ProviderKey = table.Column(maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpPermissionGrants", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AbpSettings", - columns: table => new - { - Id = table.Column(nullable: false), - Name = table.Column(maxLength: 128, nullable: false), - Value = table.Column(maxLength: 2048, nullable: false), - ProviderName = table.Column(maxLength: 64, nullable: true), - ProviderKey = table.Column(maxLength: 64, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpSettings", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AbpTenants", - columns: table => new - { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - LastModificationTime = table.Column(nullable: true), - LastModifierId = table.Column(nullable: true), - IsDeleted = table.Column(nullable: false, defaultValue: false), - DeleterId = table.Column(nullable: true), - DeletionTime = table.Column(nullable: true), - Name = table.Column(maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpTenants", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AbpTenantConnectionStrings", - columns: table => new - { - TenantId = table.Column(nullable: false), - Name = table.Column(maxLength: 64, nullable: false), - Value = table.Column(maxLength: 1024, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpTenantConnectionStrings", x => new { x.TenantId, x.Name }); - table.ForeignKey( - name: "FK_AbpTenantConnectionStrings_AbpTenants_TenantId", - column: x => x.TenantId, - principalTable: "AbpTenants", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.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: "AbpPermissionGrants"); - - migrationBuilder.DropTable( - name: "AbpSettings"); - - migrationBuilder.DropTable( - name: "AbpTenantConnectionStrings"); - - migrationBuilder.DropTable( - name: "AbpTenants"); - } - } -} diff --git a/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Migrations/20200910080638_Add-abp-feature-module.cs b/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Migrations/20200910080638_Add-abp-feature-module.cs deleted file mode 100644 index 5dd13d226..000000000 --- a/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Migrations/20200910080638_Add-abp-feature-module.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace LINGYUN.Abp.BackendAdmin.Migrations -{ - public partial class Addabpfeaturemodule : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "AbpFeatureValues", - columns: table => new - { - Id = table.Column(nullable: false), - Name = table.Column(maxLength: 128, nullable: false), - Value = table.Column(maxLength: 128, nullable: false), - ProviderName = table.Column(maxLength: 64, nullable: true), - ProviderKey = table.Column(maxLength: 64, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpFeatureValues", x => x.Id); - }); - - migrationBuilder.CreateIndex( - name: "IX_AbpFeatureValues_Name_ProviderName_ProviderKey", - table: "AbpFeatureValues", - columns: new[] { "Name", "ProviderName", "ProviderKey" }); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AbpFeatureValues"); - } - } -} diff --git a/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Migrations/20200928020134_Add-abp-audit-logging-module.Designer.cs b/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Migrations/20200928020134_Add-abp-audit-logging-module.Designer.cs deleted file mode 100644 index 3237b865a..000000000 --- a/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Migrations/20200928020134_Add-abp-audit-logging-module.Designer.cs +++ /dev/null @@ -1,485 +0,0 @@ -// -using System; -using LINGYUN.Abp.BackendAdmin.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -namespace LINGYUN.Abp.BackendAdmin.Migrations -{ - [DbContext(typeof(BackendAdminHostMigrationsDbContext))] - [Migration("20200928020134_Add-abp-audit-logging-module")] - partial class Addabpauditloggingmodule - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "3.1.7") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ApplicationName") - .HasColumnName("ApplicationName") - .HasColumnType("varchar(96) CHARACTER SET utf8mb4") - .HasMaxLength(96); - - b.Property("BrowserInfo") - .HasColumnName("BrowserInfo") - .HasColumnType("varchar(512) CHARACTER SET utf8mb4") - .HasMaxLength(512); - - b.Property("ClientId") - .HasColumnName("ClientId") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("ClientIpAddress") - .HasColumnName("ClientIpAddress") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("ClientName") - .HasColumnName("ClientName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("Comments") - .HasColumnName("Comments") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CorrelationId") - .HasColumnName("CorrelationId") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("Exceptions") - .HasColumnName("Exceptions") - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasMaxLength(4000); - - b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration") - .HasColumnType("int"); - - b.Property("ExecutionTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("HttpMethod") - .HasColumnName("HttpMethod") - .HasColumnType("varchar(16) CHARACTER SET utf8mb4") - .HasMaxLength(16); - - b.Property("HttpStatusCode") - .HasColumnName("HttpStatusCode") - .HasColumnType("int"); - - b.Property("ImpersonatorTenantId") - .HasColumnName("ImpersonatorTenantId") - .HasColumnType("char(36)"); - - b.Property("ImpersonatorUserId") - .HasColumnName("ImpersonatorUserId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("TenantName") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("Url") - .HasColumnName("Url") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("UserId") - .HasColumnName("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .HasColumnName("UserName") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "ExecutionTime"); - - b.HasIndex("TenantId", "UserId", "ExecutionTime"); - - b.ToTable("AbpAuditLogs"); - }); - - modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AuditLogId") - .HasColumnName("AuditLogId") - .HasColumnType("char(36)"); - - b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration") - .HasColumnType("int"); - - b.Property("ExecutionTime") - .HasColumnName("ExecutionTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("MethodName") - .HasColumnName("MethodName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("Parameters") - .HasColumnName("Parameters") - .HasColumnType("varchar(2000) CHARACTER SET utf8mb4") - .HasMaxLength(2000); - - b.Property("ServiceName") - .HasColumnName("ServiceName") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("AuditLogId"); - - b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime"); - - b.ToTable("AbpAuditLogActions"); - }); - - modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AuditLogId") - .HasColumnName("AuditLogId") - .HasColumnType("char(36)"); - - b.Property("ChangeTime") - .HasColumnName("ChangeTime") - .HasColumnType("datetime(6)"); - - b.Property("ChangeType") - .HasColumnName("ChangeType") - .HasColumnType("tinyint unsigned"); - - b.Property("EntityId") - .IsRequired() - .HasColumnName("EntityId") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("EntityTenantId") - .HasColumnType("char(36)"); - - b.Property("EntityTypeFullName") - .IsRequired() - .HasColumnName("EntityTypeFullName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("AuditLogId"); - - b.HasIndex("TenantId", "EntityTypeFullName", "EntityId"); - - b.ToTable("AbpEntityChanges"); - }); - - modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("EntityChangeId") - .HasColumnType("char(36)"); - - b.Property("NewValue") - .HasColumnName("NewValue") - .HasColumnType("varchar(512) CHARACTER SET utf8mb4") - .HasMaxLength(512); - - b.Property("OriginalValue") - .HasColumnName("OriginalValue") - .HasColumnType("varchar(512) CHARACTER SET utf8mb4") - .HasMaxLength(512); - - b.Property("PropertyName") - .IsRequired() - .HasColumnName("PropertyName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("PropertyTypeFullName") - .IsRequired() - .HasColumnName("PropertyTypeFullName") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("EntityChangeId"); - - b.ToTable("AbpEntityPropertyChanges"); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ProviderKey") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("ProviderName") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("Value") - .IsRequired() - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(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() - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ProviderKey") - .IsRequired() - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("ProviderName") - .IsRequired() - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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() - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ProviderKey") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("ProviderName") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("Value") - .IsRequired() - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasMaxLength(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() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(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") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("Value") - .IsRequired() - .HasColumnType("varchar(1024) CHARACTER SET utf8mb4") - .HasMaxLength(1024); - - b.HasKey("TenantId", "Name"); - - b.ToTable("AbpTenantConnectionStrings"); - }); - - modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => - { - b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) - .WithMany("Actions") - .HasForeignKey("AuditLogId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => - { - b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) - .WithMany("EntityChanges") - .HasForeignKey("AuditLogId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => - { - b.HasOne("Volo.Abp.AuditLogging.EntityChange", null) - .WithMany("PropertyChanges") - .HasForeignKey("EntityChangeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => - { - b.HasOne("Volo.Abp.TenantManagement.Tenant", null) - .WithMany("ConnectionStrings") - .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Migrations/20200928020134_Add-abp-audit-logging-module.cs b/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Migrations/20200928020134_Add-abp-audit-logging-module.cs deleted file mode 100644 index d15afaff3..000000000 --- a/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Migrations/20200928020134_Add-abp-audit-logging-module.cs +++ /dev/null @@ -1,166 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace LINGYUN.Abp.BackendAdmin.Migrations -{ - public partial class Addabpauditloggingmodule : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "AbpAuditLogs", - columns: table => new - { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - ApplicationName = table.Column(maxLength: 96, nullable: true), - UserId = table.Column(nullable: true), - UserName = table.Column(maxLength: 256, nullable: true), - TenantId = table.Column(nullable: true), - TenantName = table.Column(nullable: true), - ImpersonatorUserId = table.Column(nullable: true), - ImpersonatorTenantId = table.Column(nullable: true), - ExecutionTime = table.Column(nullable: false), - ExecutionDuration = table.Column(nullable: false), - ClientIpAddress = table.Column(maxLength: 64, nullable: true), - ClientName = table.Column(maxLength: 128, nullable: true), - ClientId = table.Column(maxLength: 64, nullable: true), - CorrelationId = table.Column(maxLength: 64, nullable: true), - BrowserInfo = table.Column(maxLength: 512, nullable: true), - HttpMethod = table.Column(maxLength: 16, nullable: true), - Url = table.Column(maxLength: 256, nullable: true), - Exceptions = table.Column(maxLength: 4000, nullable: true), - Comments = table.Column(maxLength: 256, nullable: true), - HttpStatusCode = table.Column(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpAuditLogs", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AbpAuditLogActions", - columns: table => new - { - Id = table.Column(nullable: false), - TenantId = table.Column(nullable: true), - AuditLogId = table.Column(nullable: false), - ServiceName = table.Column(maxLength: 256, nullable: true), - MethodName = table.Column(maxLength: 128, nullable: true), - Parameters = table.Column(maxLength: 2000, nullable: true), - ExecutionTime = table.Column(nullable: false), - ExecutionDuration = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpAuditLogActions", x => x.Id); - table.ForeignKey( - name: "FK_AbpAuditLogActions_AbpAuditLogs_AuditLogId", - column: x => x.AuditLogId, - principalTable: "AbpAuditLogs", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AbpEntityChanges", - columns: table => new - { - Id = table.Column(nullable: false), - AuditLogId = table.Column(nullable: false), - TenantId = table.Column(nullable: true), - ChangeTime = table.Column(nullable: false), - ChangeType = table.Column(nullable: false), - EntityTenantId = table.Column(nullable: true), - EntityId = table.Column(maxLength: 128, nullable: false), - EntityTypeFullName = table.Column(maxLength: 128, nullable: false), - ExtraProperties = table.Column(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpEntityChanges", x => x.Id); - table.ForeignKey( - name: "FK_AbpEntityChanges_AbpAuditLogs_AuditLogId", - column: x => x.AuditLogId, - principalTable: "AbpAuditLogs", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AbpEntityPropertyChanges", - columns: table => new - { - Id = table.Column(nullable: false), - TenantId = table.Column(nullable: true), - EntityChangeId = table.Column(nullable: false), - NewValue = table.Column(maxLength: 512, nullable: true), - OriginalValue = table.Column(maxLength: 512, nullable: true), - PropertyName = table.Column(maxLength: 128, nullable: false), - PropertyTypeFullName = table.Column(maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpEntityPropertyChanges", x => x.Id); - table.ForeignKey( - name: "FK_AbpEntityPropertyChanges_AbpEntityChanges_EntityChangeId", - column: x => x.EntityChangeId, - principalTable: "AbpEntityChanges", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateIndex( - name: "IX_AbpAuditLogActions_AuditLogId", - table: "AbpAuditLogActions", - column: "AuditLogId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpAuditLogActions_TenantId_ServiceName_MethodName_Execution~", - table: "AbpAuditLogActions", - columns: new[] { "TenantId", "ServiceName", "MethodName", "ExecutionTime" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpAuditLogs_TenantId_ExecutionTime", - table: "AbpAuditLogs", - columns: new[] { "TenantId", "ExecutionTime" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpAuditLogs_TenantId_UserId_ExecutionTime", - table: "AbpAuditLogs", - columns: new[] { "TenantId", "UserId", "ExecutionTime" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpEntityChanges_AuditLogId", - table: "AbpEntityChanges", - column: "AuditLogId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpEntityChanges_TenantId_EntityTypeFullName_EntityId", - table: "AbpEntityChanges", - columns: new[] { "TenantId", "EntityTypeFullName", "EntityId" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpEntityPropertyChanges_EntityChangeId", - table: "AbpEntityPropertyChanges", - column: "EntityChangeId"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AbpAuditLogActions"); - - migrationBuilder.DropTable( - name: "AbpEntityPropertyChanges"); - - migrationBuilder.DropTable( - name: "AbpEntityChanges"); - - migrationBuilder.DropTable( - name: "AbpAuditLogs"); - } - } -} diff --git a/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Migrations/20200910080638_Add-abp-feature-module.Designer.cs b/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Migrations/20211030090436_Re-Initlize-Db-Migration.Designer.cs similarity index 61% rename from aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Migrations/20200910080638_Add-abp-feature-module.Designer.cs rename to aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Migrations/20211030090436_Re-Initlize-Db-Migration.Designer.cs index fba6458a2..7a576f52d 100644 --- a/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Migrations/20200910080638_Add-abp-feature-module.Designer.cs +++ b/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Migrations/20211030090436_Re-Initlize-Db-Migration.Designer.cs @@ -1,206 +1,211 @@ -// -using System; -using LINGYUN.Abp.BackendAdmin.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -namespace LINGYUN.Abp.BackendAdmin.Migrations -{ - [DbContext(typeof(BackendAdminHostMigrationsDbContext))] - [Migration("20200910080638_Add-abp-feature-module")] - partial class Addabpfeaturemodule - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "3.1.7") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ProviderKey") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("ProviderName") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("Value") - .IsRequired() - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(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() - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ProviderKey") - .IsRequired() - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("ProviderName") - .IsRequired() - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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() - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ProviderKey") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("ProviderName") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("Value") - .IsRequired() - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasMaxLength(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() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(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") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("Value") - .IsRequired() - .HasColumnType("varchar(1024) CHARACTER SET utf8mb4") - .HasMaxLength(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(); - }); -#pragma warning restore 612, 618 - } - } -} +// +using System; +using LINGYUN.Abp.BackendAdmin.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +namespace LINGYUN.Abp.BackendAdmin.Migrations +{ + [DbContext(typeof(BackendAdminHostMigrationsDbContext))] + [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/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Migrations/20211030090436_Re-Initlize-Db-Migration.cs b/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Migrations/20211030090436_Re-Initlize-Db-Migration.cs new file mode 100644 index 000000000..26c2ff958 --- /dev/null +++ b/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Migrations/20211030090436_Re-Initlize-Db-Migration.cs @@ -0,0 +1,158 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +namespace LINGYUN.Abp.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/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Migrations/BackendAdminHostMigrationsDbContextModelSnapshot.cs b/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Migrations/BackendAdminHostMigrationsDbContextModelSnapshot.cs index edd6c5c60..c54004a50 100644 --- a/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Migrations/BackendAdminHostMigrationsDbContextModelSnapshot.cs +++ b/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Migrations/BackendAdminHostMigrationsDbContextModelSnapshot.cs @@ -1,483 +1,209 @@ -// -using System; -using LINGYUN.Abp.BackendAdmin.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -namespace LINGYUN.Abp.BackendAdmin.Migrations -{ - [DbContext(typeof(BackendAdminHostMigrationsDbContext))] - partial class BackendAdminHostMigrationsDbContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "3.1.7") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ApplicationName") - .HasColumnName("ApplicationName") - .HasColumnType("varchar(96) CHARACTER SET utf8mb4") - .HasMaxLength(96); - - b.Property("BrowserInfo") - .HasColumnName("BrowserInfo") - .HasColumnType("varchar(512) CHARACTER SET utf8mb4") - .HasMaxLength(512); - - b.Property("ClientId") - .HasColumnName("ClientId") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("ClientIpAddress") - .HasColumnName("ClientIpAddress") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("ClientName") - .HasColumnName("ClientName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("Comments") - .HasColumnName("Comments") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CorrelationId") - .HasColumnName("CorrelationId") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("Exceptions") - .HasColumnName("Exceptions") - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasMaxLength(4000); - - b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration") - .HasColumnType("int"); - - b.Property("ExecutionTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("HttpMethod") - .HasColumnName("HttpMethod") - .HasColumnType("varchar(16) CHARACTER SET utf8mb4") - .HasMaxLength(16); - - b.Property("HttpStatusCode") - .HasColumnName("HttpStatusCode") - .HasColumnType("int"); - - b.Property("ImpersonatorTenantId") - .HasColumnName("ImpersonatorTenantId") - .HasColumnType("char(36)"); - - b.Property("ImpersonatorUserId") - .HasColumnName("ImpersonatorUserId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("TenantName") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("Url") - .HasColumnName("Url") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("UserId") - .HasColumnName("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .HasColumnName("UserName") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "ExecutionTime"); - - b.HasIndex("TenantId", "UserId", "ExecutionTime"); - - b.ToTable("AbpAuditLogs"); - }); - - modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AuditLogId") - .HasColumnName("AuditLogId") - .HasColumnType("char(36)"); - - b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration") - .HasColumnType("int"); - - b.Property("ExecutionTime") - .HasColumnName("ExecutionTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("MethodName") - .HasColumnName("MethodName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("Parameters") - .HasColumnName("Parameters") - .HasColumnType("varchar(2000) CHARACTER SET utf8mb4") - .HasMaxLength(2000); - - b.Property("ServiceName") - .HasColumnName("ServiceName") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("AuditLogId"); - - b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime"); - - b.ToTable("AbpAuditLogActions"); - }); - - modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AuditLogId") - .HasColumnName("AuditLogId") - .HasColumnType("char(36)"); - - b.Property("ChangeTime") - .HasColumnName("ChangeTime") - .HasColumnType("datetime(6)"); - - b.Property("ChangeType") - .HasColumnName("ChangeType") - .HasColumnType("tinyint unsigned"); - - b.Property("EntityId") - .IsRequired() - .HasColumnName("EntityId") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("EntityTenantId") - .HasColumnType("char(36)"); - - b.Property("EntityTypeFullName") - .IsRequired() - .HasColumnName("EntityTypeFullName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("AuditLogId"); - - b.HasIndex("TenantId", "EntityTypeFullName", "EntityId"); - - b.ToTable("AbpEntityChanges"); - }); - - modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("EntityChangeId") - .HasColumnType("char(36)"); - - b.Property("NewValue") - .HasColumnName("NewValue") - .HasColumnType("varchar(512) CHARACTER SET utf8mb4") - .HasMaxLength(512); - - b.Property("OriginalValue") - .HasColumnName("OriginalValue") - .HasColumnType("varchar(512) CHARACTER SET utf8mb4") - .HasMaxLength(512); - - b.Property("PropertyName") - .IsRequired() - .HasColumnName("PropertyName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("PropertyTypeFullName") - .IsRequired() - .HasColumnName("PropertyTypeFullName") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("EntityChangeId"); - - b.ToTable("AbpEntityPropertyChanges"); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ProviderKey") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("ProviderName") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("Value") - .IsRequired() - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(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() - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ProviderKey") - .IsRequired() - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("ProviderName") - .IsRequired() - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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() - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ProviderKey") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("ProviderName") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("Value") - .IsRequired() - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasMaxLength(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() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(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") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("Value") - .IsRequired() - .HasColumnType("varchar(1024) CHARACTER SET utf8mb4") - .HasMaxLength(1024); - - b.HasKey("TenantId", "Name"); - - b.ToTable("AbpTenantConnectionStrings"); - }); - - modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => - { - b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) - .WithMany("Actions") - .HasForeignKey("AuditLogId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => - { - b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) - .WithMany("EntityChanges") - .HasForeignKey("AuditLogId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => - { - b.HasOne("Volo.Abp.AuditLogging.EntityChange", null) - .WithMany("PropertyChanges") - .HasForeignKey("EntityChangeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => - { - b.HasOne("Volo.Abp.TenantManagement.Tenant", null) - .WithMany("ConnectionStrings") - .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); -#pragma warning restore 612, 618 - } - } -} +// +using System; +using LINGYUN.Abp.BackendAdmin.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +namespace LINGYUN.Abp.BackendAdmin.Migrations +{ + [DbContext(typeof(BackendAdminHostMigrationsDbContext))] + partial class BackendAdminHostMigrationsDbContextModelSnapshot : 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.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/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/appsettings.Development.json b/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/appsettings.Development.json index 35697511f..9913543e1 100644 --- a/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/appsettings.Development.json +++ b/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/appsettings.Development.json @@ -49,13 +49,13 @@ "Logging": { "Serilog": { "Elasticsearch": { - "IndexFormat": "lingyun.abp.logging-{0:yyyy.MM.dd}" + "IndexFormat": "abp.dev.logging-{0:yyyy.MM.dd}" } } }, "AuditLogging": { "Elasticsearch": { - "IndexPrefix": "lingyun.abp.auditing" + "IndexPrefix": "abp.dev.auditing" } }, "Elasticsearch": { @@ -82,7 +82,7 @@ "Name": "Elasticsearch", "Args": { "nodeUris": "http://localhost:9200", - "indexFormat": "lingyun.abp.logging-{0:yyyy.MM.dd}", + "indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}", "autoRegisterTemplate": true, "autoRegisterTemplateVersion": "ESv7" } diff --git a/aspnet-core/services/apigateway/LINGYUN.ApiGateway.Host/appsettings.Development.json b/aspnet-core/services/apigateway/LINGYUN.ApiGateway.Host/appsettings.Development.json index 45de74e69..2adaa12db 100644 --- a/aspnet-core/services/apigateway/LINGYUN.ApiGateway.Host/appsettings.Development.json +++ b/aspnet-core/services/apigateway/LINGYUN.ApiGateway.Host/appsettings.Development.json @@ -69,7 +69,7 @@ "Name": "Elasticsearch", "Args": { "nodeUris": "http://localhost:9200", - "indexFormat": "lingyun.abp.logging-{0:yyyy.MM.dd}", + "indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}", "autoRegisterTemplate": true, "autoRegisterTemplateVersion": "ESv7" } diff --git a/aspnet-core/services/apigateway/LINGYUN.ApiGateway.HttpApi.Host/appsettings.Development.json b/aspnet-core/services/apigateway/LINGYUN.ApiGateway.HttpApi.Host/appsettings.Development.json index 45365e3c4..571019d66 100644 --- a/aspnet-core/services/apigateway/LINGYUN.ApiGateway.HttpApi.Host/appsettings.Development.json +++ b/aspnet-core/services/apigateway/LINGYUN.ApiGateway.HttpApi.Host/appsettings.Development.json @@ -40,7 +40,7 @@ }, "AuditLogging": { "Elasticsearch": { - "IndexPrefix": "lingyun.abp.auditing" + "IndexPrefix": "abp.dev.auditing" } }, "Elasticsearch": { @@ -67,7 +67,7 @@ "Name": "Elasticsearch", "Args": { "nodeUris": "http://localhost:9200", - "indexFormat": "lingyun.abp.logging-{0:yyyy.MM.dd}", + "indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}", "autoRegisterTemplate": true, "autoRegisterTemplateVersion": "ESv7" } diff --git a/aspnet-core/services/identity-server/LINGYUN.Abp.IdentityServer4.HttpApi.Host/appsettings.Development.json b/aspnet-core/services/identity-server/LINGYUN.Abp.IdentityServer4.HttpApi.Host/appsettings.Development.json index 759c70842..0f6c962ae 100644 --- a/aspnet-core/services/identity-server/LINGYUN.Abp.IdentityServer4.HttpApi.Host/appsettings.Development.json +++ b/aspnet-core/services/identity-server/LINGYUN.Abp.IdentityServer4.HttpApi.Host/appsettings.Development.json @@ -42,7 +42,7 @@ }, "AuditLogging": { "Elasticsearch": { - "IndexPrefix": "lingyun.abp.auditing" + "IndexPrefix": "abp.dev.auditing" } }, "Elasticsearch": { @@ -69,7 +69,7 @@ "Name": "Elasticsearch", "Args": { "nodeUris": "http://localhost:9200", - "indexFormat": "lingyun.abp.logging-{0:yyyy.MM.dd}", + "indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}", "autoRegisterTemplate": true, "autoRegisterTemplateVersion": "ESv7" } diff --git a/aspnet-core/services/localization/LINGYUN.Abp.LocalizationManagement.HttpApi.Host/AbpLocalizationManagementHttpApiHostModule.cs b/aspnet-core/services/localization/LINGYUN.Abp.LocalizationManagement.HttpApi.Host/AbpLocalizationManagementHttpApiHostModule.cs index 6e1150451..ada49950a 100644 --- a/aspnet-core/services/localization/LINGYUN.Abp.LocalizationManagement.HttpApi.Host/AbpLocalizationManagementHttpApiHostModule.cs +++ b/aspnet-core/services/localization/LINGYUN.Abp.LocalizationManagement.HttpApi.Host/AbpLocalizationManagementHttpApiHostModule.cs @@ -1,5 +1,6 @@ using LINGYUN.Abp.AspNetCore.HttpOverrides; using LINGYUN.Abp.AuditLogging.Elasticsearch; +using LINGYUN.Abp.Data.DbMigrator; using LINGYUN.Abp.EventBus.CAP; using LINGYUN.Abp.ExceptionHandling.Emailing; using LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore; @@ -34,6 +35,7 @@ namespace LINGYUN.Abp.LocalizationManagement typeof(AbpTenantManagementEntityFrameworkCoreModule), typeof(AbpSettingManagementEntityFrameworkCoreModule), typeof(AbpPermissionManagementEntityFrameworkCoreModule), + typeof(AbpDataDbMigratorModule), typeof(AbpAspNetCoreAuthenticationJwtBearerModule), typeof(AbpEmailingExceptionHandlingModule), typeof(AbpCAPEventBusModule), diff --git a/aspnet-core/services/localization/LINGYUN.Abp.LocalizationManagement.HttpApi.Host/EventBus/Handlers/TenantSynchronizer.cs b/aspnet-core/services/localization/LINGYUN.Abp.LocalizationManagement.HttpApi.Host/EventBus/Handlers/TenantSynchronizer.cs new file mode 100644 index 000000000..9759dd6da --- /dev/null +++ b/aspnet-core/services/localization/LINGYUN.Abp.LocalizationManagement.HttpApi.Host/EventBus/Handlers/TenantSynchronizer.cs @@ -0,0 +1,56 @@ +using LINGYUN.Abp.Data.DbMigrator; +using LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore; +using LINGYUN.Abp.MultiTenancy; +using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.Logging; +using System.Threading.Tasks; +using Volo.Abp.DependencyInjection; +using Volo.Abp.EventBus.Distributed; +using Volo.Abp.MultiTenancy; +using Volo.Abp.Uow; + +namespace LINGYUN.Abp.LocalizationManagement.EventBus.Handlers +{ + public class TenantSynchronizer : IDistributedEventHandler, ITransientDependency + { + protected ILogger Logger { get; } + + protected ICurrentTenant CurrentTenant { get; } + protected IUnitOfWorkManager UnitOfWorkManager { get; } + protected IDbSchemaMigrator DbSchemaMigrator { get; } + public TenantSynchronizer( + ICurrentTenant currentTenant, + IUnitOfWorkManager unitOfWorkManager, + IDbSchemaMigrator dbSchemaMigrator, + ILogger logger) + { + CurrentTenant = currentTenant; + UnitOfWorkManager = unitOfWorkManager; + DbSchemaMigrator = dbSchemaMigrator; + + Logger = logger; + } + + public async Task HandleEventAsync(CreateEventData eventData) + { + using (var unitOfWork = UnitOfWorkManager.Begin()) + { + using (CurrentTenant.Change(eventData.Id, eventData.Name)) + { + Logger.LogInformation("Migrating the new tenant database with localization.."); + // 迁移租户数据 + await DbSchemaMigrator.MigrateAsync( + (connectionString, builder) => + { + builder.UseMySql(connectionString, ServerVersion.AutoDetect(connectionString)); + + return new LocalizationManagementHttpApiHostMigrationsDbContext(builder.Options); + }); + await unitOfWork.SaveChangesAsync(); + + Logger.LogInformation("Migrated the new tenant database with localization."); + } + } + } + } +} diff --git a/aspnet-core/services/localization/LINGYUN.Abp.LocalizationManagement.HttpApi.Host/LINGYUN.Abp.LocalizationManagement.HttpApi.Host.csproj b/aspnet-core/services/localization/LINGYUN.Abp.LocalizationManagement.HttpApi.Host/LINGYUN.Abp.LocalizationManagement.HttpApi.Host.csproj index 6ab8b1fd1..965e7cf94 100644 --- a/aspnet-core/services/localization/LINGYUN.Abp.LocalizationManagement.HttpApi.Host/LINGYUN.Abp.LocalizationManagement.HttpApi.Host.csproj +++ b/aspnet-core/services/localization/LINGYUN.Abp.LocalizationManagement.HttpApi.Host/LINGYUN.Abp.LocalizationManagement.HttpApi.Host.csproj @@ -37,6 +37,7 @@ + diff --git a/aspnet-core/services/localization/LINGYUN.Abp.LocalizationManagement.HttpApi.Host/appsettings.Development.json b/aspnet-core/services/localization/LINGYUN.Abp.LocalizationManagement.HttpApi.Host/appsettings.Development.json index 61deb00b4..ccc18f747 100644 --- a/aspnet-core/services/localization/LINGYUN.Abp.LocalizationManagement.HttpApi.Host/appsettings.Development.json +++ b/aspnet-core/services/localization/LINGYUN.Abp.LocalizationManagement.HttpApi.Host/appsettings.Development.json @@ -39,7 +39,7 @@ }, "AuditLogging": { "Elasticsearch": { - "IndexPrefix": "lingyun.abp.auditing" + "IndexPrefix": "abp.dev.auditing" } }, "Elasticsearch": { @@ -66,7 +66,7 @@ "Name": "Elasticsearch", "Args": { "nodeUris": "http://localhost:9200", - "indexFormat": "lingyun.abp.logging-{0:yyyy.MM.dd}", + "indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}", "autoRegisterTemplate": true, "autoRegisterTemplateVersion": "ESv7" } diff --git a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/AbpMessageServiceHttpApiHostModule.cs b/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/AbpMessageServiceHttpApiHostModule.cs index a4c138d2e..462b207f4 100644 --- a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/AbpMessageServiceHttpApiHostModule.cs +++ b/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/AbpMessageServiceHttpApiHostModule.cs @@ -3,6 +3,7 @@ using LINGYUN.Abp.AspNetCore.HttpOverrides; using LINGYUN.Abp.AspNetCore.SignalR.Protocol.Json; using LINGYUN.Abp.AuditLogging.Elasticsearch; using LINGYUN.Abp.BackgroundJobs.Hangfire; +using LINGYUN.Abp.Data.DbMigrator; using LINGYUN.Abp.EventBus.CAP; using LINGYUN.Abp.ExceptionHandling.Notifications; using LINGYUN.Abp.Hangfire.Storage.MySql; @@ -48,6 +49,7 @@ namespace LINGYUN.Abp.MessageService typeof(AbpSettingManagementEntityFrameworkCoreModule), typeof(AbpPermissionManagementEntityFrameworkCoreModule), typeof(AbpLocalizationManagementEntityFrameworkCoreModule), + typeof(AbpDataDbMigratorModule), typeof(AbpAspNetCoreAuthenticationJwtBearerModule), typeof(AbpHangfireMySqlStorageModule), typeof(AbpBackgroundJobsHangfireModule), diff --git a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/EventBus/Distributed/NotificationEventHandler.cs b/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/EventBus/Distributed/NotificationEventHandler.cs index 631321f52..368910b85 100644 --- a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/EventBus/Distributed/NotificationEventHandler.cs +++ b/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/EventBus/Distributed/NotificationEventHandler.cs @@ -1,6 +1,4 @@ -using LINGYUN.Abp.MessageService.Utils; -using LINGYUN.Abp.Notifications; -using LINGYUN.Abp.RealTime; +using LINGYUN.Abp.Notifications; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Options; @@ -12,6 +10,7 @@ using Volo.Abp.BackgroundJobs; using Volo.Abp.DependencyInjection; using Volo.Abp.EventBus.Distributed; using Volo.Abp.Json; +using Volo.Abp.MultiTenancy; using Volo.Abp.Uow; namespace LINGYUN.Abp.MessageService.EventBus.Distributed @@ -34,6 +33,10 @@ namespace LINGYUN.Abp.MessageService.EventBus.Distributed /// protected AbpNotificationOptions Options { get; } /// + /// Reference to . + /// + protected ICurrentTenant CurrentTenant { get; } + /// /// Reference to . /// protected IJsonSerializer JsonSerializer { get; } @@ -62,6 +65,7 @@ namespace LINGYUN.Abp.MessageService.EventBus.Distributed /// Initializes a new instance of the class. /// public NotificationEventHandler( + ICurrentTenant currentTenant, IJsonSerializer jsonSerializer, IBackgroundJobManager backgroundJobManager, IOptions options, @@ -71,6 +75,7 @@ namespace LINGYUN.Abp.MessageService.EventBus.Distributed INotificationPublishProviderManager notificationPublishProviderManager) { Options = options.Value; + CurrentTenant = currentTenant; JsonSerializer = jsonSerializer; BackgroundJobManager = backgroundJobManager; NotificationStore = notificationStore; @@ -84,37 +89,40 @@ namespace LINGYUN.Abp.MessageService.EventBus.Distributed [UnitOfWork] public virtual async Task HandleEventAsync(NotificationEto eventData) { - // 如果上面过滤了应用程序,这里可以使用Get方法,否则,最好使用GetOrNull加以判断 - var notification = NotificationDefinitionManager.GetOrNull(eventData.Name); - if (notification == null) + using (CurrentTenant.Change(eventData.TenantId)) { - return; - } + // 如果上面过滤了应用程序,这里可以使用Get方法,否则,最好使用GetOrNull加以判断 + var notification = NotificationDefinitionManager.GetOrNull(eventData.Name); + if (notification == null) + { + return; + } - var notificationInfo = new NotificationInfo - { - Name = notification.Name, - CreationTime = eventData.CreationTime, - Data = eventData.Data, - Severity = eventData.Severity, - Lifetime = notification.NotificationLifetime, - TenantId = eventData.TenantId, - Type = notification.NotificationType - }; - notificationInfo.SetId(eventData.Id); + var notificationInfo = new NotificationInfo + { + Name = notification.Name, + CreationTime = eventData.CreationTime, + Data = eventData.Data, + Severity = eventData.Severity, + Lifetime = notification.NotificationLifetime, + TenantId = eventData.TenantId, + Type = notification.NotificationType + }; + notificationInfo.SetId(eventData.Id); - // TODO: 可以做成一个接口来序列化消息 - notificationInfo.Data = NotificationDataConverter.Convert(notificationInfo.Data); + // TODO: 可以做成一个接口来序列化消息 + notificationInfo.Data = NotificationDataConverter.Convert(notificationInfo.Data); - Logger.LogDebug($"Persistent notification {notificationInfo.Name}"); + Logger.LogDebug($"Persistent notification {notificationInfo.Name}"); - // 持久化通知 - await NotificationStore.InsertNotificationAsync(notificationInfo); + // 持久化通知 + await NotificationStore.InsertNotificationAsync(notificationInfo); - var providers = Enumerable - .Reverse(NotificationPublishProviderManager.Providers); + var providers = Enumerable + .Reverse(NotificationPublishProviderManager.Providers); - await PublishFromProvidersAsync(providers, eventData.Users, notificationInfo); + await PublishFromProvidersAsync(providers, eventData.Users, notificationInfo); + } } /// @@ -182,7 +190,7 @@ namespace LINGYUN.Abp.MessageService.EventBus.Distributed /// 订阅用户列表 /// protected async Task PublishAsync( - INotificationPublishProvider provider, + INotificationPublishProvider provider, NotificationInfo notificationInfo, IEnumerable subscriptionUserIdentifiers) { diff --git a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/EventBus/Distributed/TenantCreateEventHandler.cs b/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/EventBus/Distributed/TenantSynchronizer.cs similarity index 56% rename from aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/EventBus/Distributed/TenantCreateEventHandler.cs rename to aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/EventBus/Distributed/TenantSynchronizer.cs index 4f9973907..1c3a4b3f9 100644 --- a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/EventBus/Distributed/TenantCreateEventHandler.cs +++ b/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/EventBus/Distributed/TenantSynchronizer.cs @@ -1,6 +1,9 @@ -using LINGYUN.Abp.MessageService.Localization; +using LINGYUN.Abp.Data.DbMigrator; +using LINGYUN.Abp.MessageService.EntityFrameworkCore; +using LINGYUN.Abp.MessageService.Localization; using LINGYUN.Abp.MultiTenancy; using LINGYUN.Abp.Notifications; +using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Logging; using System; using System.Collections.Generic; @@ -9,30 +12,65 @@ using Volo.Abp.DependencyInjection; using Volo.Abp.EventBus.Distributed; using Volo.Abp.Localization; using Volo.Abp.MultiTenancy; +using Volo.Abp.Uow; namespace LINGYUN.Abp.MessageService.EventBus.Distributed { - public class TenantCreateEventHandler : IDistributedEventHandler, ITransientDependency + public class TenantSynchronizer : IDistributedEventHandler, ITransientDependency { - protected ILogger Logger { get; } + protected ILogger Logger { get; } + protected ICurrentTenant CurrentTenant { get; } + protected IUnitOfWorkManager UnitOfWorkManager { get; } + protected IDbSchemaMigrator DbSchemaMigrator { get; } protected INotificationSender NotificationSender { get; } protected INotificationSubscriptionManager NotificationSubscriptionManager { get; } - public TenantCreateEventHandler( + public TenantSynchronizer( + ICurrentTenant currentTenant, + IDbSchemaMigrator dbSchemaMigrator, + IUnitOfWorkManager unitOfWorkManager, INotificationSender notificationSender, INotificationSubscriptionManager notificationSubscriptionManager, - ILogger logger) + ILogger logger) { Logger = logger; + + CurrentTenant = currentTenant; + DbSchemaMigrator = dbSchemaMigrator; + UnitOfWorkManager = unitOfWorkManager; + NotificationSender = notificationSender; NotificationSubscriptionManager = notificationSubscriptionManager; } public async Task HandleEventAsync(CreateEventData eventData) + { + using (var unitOfWork = UnitOfWorkManager.Begin()) + { + using (CurrentTenant.Change(eventData.Id, eventData.Name)) + { + Logger.LogInformation("Migrating the new tenant database with messages..."); + // 迁移租户数据 + await DbSchemaMigrator.MigrateAsync( + (connectionString, builder) => + { + builder.UseMySql(connectionString, ServerVersion.AutoDetect(connectionString)); + + return new MessageServiceHostMigrationsDbContext(builder.Options); + }); + Logger.LogInformation("Migrated the new tenant database with messages."); + + await SendNotificationAsync(eventData); + + await unitOfWork.SaveChangesAsync(); + } + } + } + + private async Task SendNotificationAsync(CreateEventData eventData) { var tenantAdminUserIdentifier = new UserIdentifier(eventData.AdminUserId, eventData.AdminEmailAddress); - Logger.LogInformation("tenant administrator subscribes to new tenant events.."); // 租户管理员订阅事件 await NotificationSubscriptionManager .SubscribeAsync( @@ -67,6 +105,7 @@ namespace LINGYUN.Abp.MessageService.EventBus.Distributed tenantAdminUserIdentifier, eventData.Id, NotificationSeverity.Success); + Logger.LogInformation("tenant administrator subscribes to new tenant events.."); } } } diff --git a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/LINGYUN.Abp.MessageService.HttpApi.Host.csproj b/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/LINGYUN.Abp.MessageService.HttpApi.Host.csproj index 6d0182619..bd4c0ea93 100644 --- a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/LINGYUN.Abp.MessageService.HttpApi.Host.csproj +++ b/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/LINGYUN.Abp.MessageService.HttpApi.Host.csproj @@ -49,6 +49,7 @@ + diff --git a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20200601060701_Add-Abp-Message-Service-Module.Designer.cs b/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20200601060701_Add-Abp-Message-Service-Module.Designer.cs deleted file mode 100644 index 54ac519b1..000000000 --- a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20200601060701_Add-Abp-Message-Service-Module.Designer.cs +++ /dev/null @@ -1,130 +0,0 @@ -// -using System; -using LINGYUN.Abp.MessageService.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -namespace LINGYUN.Abp.MessageService.Migrations -{ - [DbContext(typeof(MessageServiceHostMigrationsDbContext))] - [Migration("20200601060701_Add-Abp-Message-Service-Module")] - partial class AddAbpMessageServiceModule - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "3.1.3") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Notifications.Notification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("ExpirationTime") - .HasColumnType("datetime(6)"); - - b.Property("NotificationData") - .IsRequired() - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasMaxLength(1048576); - - b.Property("NotificationId") - .HasColumnType("bigint"); - - b.Property("NotificationName") - .IsRequired() - .HasColumnType("varchar(100) CHARACTER SET utf8mb4") - .HasMaxLength(100); - - b.Property("NotificationTypeName") - .IsRequired() - .HasColumnType("varchar(512) CHARACTER SET utf8mb4") - .HasMaxLength(512); - - b.Property("Severity") - .HasColumnType("tinyint"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("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("tinyint"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "NotificationId") - .HasName("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") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("NotificationName") - .IsRequired() - .HasColumnType("varchar(100) CHARACTER SET utf8mb4") - .HasMaxLength(100); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "NotificationName") - .IsUnique() - .HasName("IX_Tenant_User_Notification_Name"); - - b.ToTable("AppUserSubscribes"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20200601060701_Add-Abp-Message-Service-Module.cs b/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20200601060701_Add-Abp-Message-Service-Module.cs deleted file mode 100644 index 4da6c6aef..000000000 --- a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20200601060701_Add-Abp-Message-Service-Module.cs +++ /dev/null @@ -1,93 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace LINGYUN.Abp.MessageService.Migrations -{ - public partial class AddAbpMessageServiceModule : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "AppNotifications", - columns: table => new - { - Id = table.Column(nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - TenantId = table.Column(nullable: true), - Severity = table.Column(nullable: false), - Type = table.Column(nullable: false), - NotificationId = table.Column(nullable: false), - NotificationName = table.Column(maxLength: 100, nullable: false), - NotificationData = table.Column(maxLength: 1048576, nullable: false), - NotificationTypeName = table.Column(maxLength: 512, nullable: false), - ExpirationTime = table.Column(nullable: true), - CreationTime = table.Column(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AppNotifications", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AppUserNotifications", - columns: table => new - { - Id = table.Column(nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - TenantId = table.Column(nullable: true), - UserId = table.Column(nullable: false), - NotificationId = table.Column(nullable: false), - ReadStatus = table.Column(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AppUserNotifications", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AppUserSubscribes", - columns: table => new - { - Id = table.Column(nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - TenantId = table.Column(nullable: true), - CreationTime = table.Column(nullable: false), - NotificationName = table.Column(maxLength: 100, nullable: false), - UserId = table.Column(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AppUserSubscribes", x => x.Id); - }); - - migrationBuilder.CreateIndex( - name: "IX_AppNotifications_NotificationName", - table: "AppNotifications", - column: "NotificationName"); - - 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: "AppNotifications"); - - migrationBuilder.DropTable( - name: "AppUserNotifications"); - - migrationBuilder.DropTable( - name: "AppUserSubscribes"); - } - } -} diff --git a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20200602134027_Add-Chat-Message-Entites.Designer.cs b/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20200602134027_Add-Chat-Message-Entites.Designer.cs deleted file mode 100644 index 6b90f18d7..000000000 --- a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20200602134027_Add-Chat-Message-Entites.Designer.cs +++ /dev/null @@ -1,494 +0,0 @@ -// -using System; -using LINGYUN.Abp.MessageService.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -namespace LINGYUN.Abp.MessageService.Migrations -{ - [DbContext(typeof(MessageServiceHostMigrationsDbContext))] - [Migration("20200602134027_Add-Chat-Message-Entites")] - partial class AddChatMessageEntites - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "3.1.3") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.ChatGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Address") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("AllowAnonymous") - .HasColumnType("tinyint(1)"); - - b.Property("AllowSendMessage") - .HasColumnType("tinyint(1)"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("Description") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("MaxUserCount") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasColumnType("varchar(20) CHARACTER SET utf8mb4") - .HasMaxLength(20); - - b.Property("Notice") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("Tag") - .HasColumnType("varchar(512) CHARACTER SET utf8mb4") - .HasMaxLength(512); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name"); - - b.ToTable("AppChatGroups"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.ChatGroupAdmin", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("AllowAddPeople") - .HasColumnType("tinyint(1)"); - - b.Property("AllowDissolveGroup") - .HasColumnType("tinyint(1)"); - - b.Property("AllowKickPeople") - .HasColumnType("tinyint(1)"); - - b.Property("AllowSendNotice") - .HasColumnType("tinyint(1)"); - - b.Property("AllowSilence") - .HasColumnType("tinyint(1)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnType("char(36)"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("IsSuperAdmin") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId"); - - b.ToTable("AppChatGroupAdmins"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.GroupChatBlack", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnType("char(36)"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("ShieldUserId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId"); - - b.ToTable("AppGroupChatBlacks"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.GroupMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Content") - .IsRequired() - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasMaxLength(1048576); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnType("char(36)"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("MessageId") - .HasColumnType("bigint"); - - b.Property("SendState") - .HasColumnType("tinyint"); - - b.Property("SendUserName") - .IsRequired() - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId"); - - b.ToTable("AppGroupMessages"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.UserChatBlack", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnType("char(36)"); - - b.Property("ShieldUserId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserChatBlacks"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.UserChatGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId", "UserId"); - - b.ToTable("AppUserChatGroups"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.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") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserChatSettings"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.UserMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Content") - .IsRequired() - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasMaxLength(1048576); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnType("char(36)"); - - b.Property("MessageId") - .HasColumnType("bigint"); - - b.Property("ReceiveUserId") - .HasColumnType("char(36)"); - - b.Property("SendState") - .HasColumnType("tinyint"); - - b.Property("SendUserName") - .IsRequired() - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "ReceiveUserId"); - - b.ToTable("AppUserMessages"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.UserSpecialFocus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnType("char(36)"); - - b.Property("FocusUserId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserSpecialFocuss"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Notifications.Notification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("ExpirationTime") - .HasColumnType("datetime(6)"); - - b.Property("NotificationData") - .IsRequired() - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasMaxLength(1048576); - - b.Property("NotificationId") - .HasColumnType("bigint"); - - b.Property("NotificationName") - .IsRequired() - .HasColumnType("varchar(100) CHARACTER SET utf8mb4") - .HasMaxLength(100); - - b.Property("NotificationTypeName") - .IsRequired() - .HasColumnType("varchar(512) CHARACTER SET utf8mb4") - .HasMaxLength(512); - - b.Property("Severity") - .HasColumnType("tinyint"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("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") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "NotificationId") - .HasName("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") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("NotificationName") - .IsRequired() - .HasColumnType("varchar(100) CHARACTER SET utf8mb4") - .HasMaxLength(100); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "NotificationName") - .IsUnique() - .HasName("IX_Tenant_User_Notification_Name"); - - b.ToTable("AppUserSubscribes"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20200602134027_Add-Chat-Message-Entites.cs b/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20200602134027_Add-Chat-Message-Entites.cs deleted file mode 100644 index c11cb75b4..000000000 --- a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20200602134027_Add-Chat-Message-Entites.cs +++ /dev/null @@ -1,281 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace LINGYUN.Abp.MessageService.Migrations -{ - public partial class AddChatMessageEntites : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "ReadStatus", - table: "AppUserNotifications", - nullable: false, - oldClrType: typeof(sbyte), - oldType: "tinyint"); - - migrationBuilder.CreateTable( - name: "AppChatGroupAdmins", - columns: table => new - { - Id = table.Column(nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - LastModificationTime = table.Column(nullable: true), - LastModifierId = table.Column(nullable: true), - TenantId = table.Column(nullable: true), - GroupId = table.Column(nullable: false), - UserId = table.Column(nullable: false), - IsSuperAdmin = table.Column(nullable: false), - AllowSilence = table.Column(nullable: false), - AllowKickPeople = table.Column(nullable: false), - AllowAddPeople = table.Column(nullable: false), - AllowSendNotice = table.Column(nullable: false), - AllowDissolveGroup = table.Column(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AppChatGroupAdmins", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AppChatGroups", - columns: table => new - { - Id = table.Column(nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - LastModificationTime = table.Column(nullable: true), - LastModifierId = table.Column(nullable: true), - TenantId = table.Column(nullable: true), - GroupId = table.Column(nullable: false), - Name = table.Column(maxLength: 20, nullable: false), - Tag = table.Column(maxLength: 512, nullable: true), - Address = table.Column(maxLength: 256, nullable: true), - Notice = table.Column(maxLength: 64, nullable: true), - MaxUserCount = table.Column(nullable: false), - AllowAnonymous = table.Column(nullable: false), - AllowSendMessage = table.Column(nullable: false), - Description = table.Column(maxLength: 128, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AppChatGroups", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AppGroupChatBlacks", - columns: table => new - { - Id = table.Column(nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - TenantId = table.Column(nullable: true), - GroupId = table.Column(nullable: false), - ShieldUserId = table.Column(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AppGroupChatBlacks", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AppGroupMessages", - columns: table => new - { - Id = table.Column(nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - TenantId = table.Column(nullable: true), - MessageId = table.Column(nullable: false), - SendUserName = table.Column(maxLength: 64, nullable: false), - Content = table.Column(maxLength: 1048576, nullable: false), - Type = table.Column(nullable: false), - SendState = table.Column(nullable: false), - GroupId = table.Column(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AppGroupMessages", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AppUserChatBlacks", - columns: table => new - { - Id = table.Column(nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - TenantId = table.Column(nullable: true), - UserId = table.Column(nullable: false), - ShieldUserId = table.Column(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AppUserChatBlacks", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AppUserChatGroups", - columns: table => new - { - Id = table.Column(nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - TenantId = table.Column(nullable: true), - UserId = table.Column(nullable: false), - GroupId = table.Column(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AppUserChatGroups", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AppUserChatSettings", - columns: table => new - { - Id = table.Column(nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - TenantId = table.Column(nullable: true), - UserId = table.Column(nullable: false), - AllowAnonymous = table.Column(nullable: false), - AllowAddFriend = table.Column(nullable: false), - RequireAddFriendValition = table.Column(nullable: false), - AllowReceiveMessage = table.Column(nullable: false), - AllowSendMessage = table.Column(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AppUserChatSettings", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AppUserMessages", - columns: table => new - { - Id = table.Column(nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - TenantId = table.Column(nullable: true), - MessageId = table.Column(nullable: false), - SendUserName = table.Column(maxLength: 64, nullable: false), - Content = table.Column(maxLength: 1048576, nullable: false), - Type = table.Column(nullable: false), - SendState = table.Column(nullable: false), - ReceiveUserId = table.Column(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AppUserMessages", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AppUserSpecialFocuss", - columns: table => new - { - Id = table.Column(nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - TenantId = table.Column(nullable: true), - UserId = table.Column(nullable: false), - FocusUserId = table.Column(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AppUserSpecialFocuss", x => x.Id); - }); - - migrationBuilder.CreateIndex( - name: "IX_AppChatGroupAdmins_TenantId_GroupId", - table: "AppChatGroupAdmins", - columns: new[] { "TenantId", "GroupId" }); - - 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_AppUserChatBlacks_TenantId_UserId", - table: "AppUserChatBlacks", - columns: new[] { "TenantId", "UserId" }); - - 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_AppUserMessages_TenantId_ReceiveUserId", - table: "AppUserMessages", - columns: new[] { "TenantId", "ReceiveUserId" }); - - migrationBuilder.CreateIndex( - name: "IX_AppUserSpecialFocuss_TenantId_UserId", - table: "AppUserSpecialFocuss", - columns: new[] { "TenantId", "UserId" }); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AppChatGroupAdmins"); - - migrationBuilder.DropTable( - name: "AppChatGroups"); - - migrationBuilder.DropTable( - name: "AppGroupChatBlacks"); - - migrationBuilder.DropTable( - name: "AppGroupMessages"); - - migrationBuilder.DropTable( - name: "AppUserChatBlacks"); - - migrationBuilder.DropTable( - name: "AppUserChatGroups"); - - migrationBuilder.DropTable( - name: "AppUserChatSettings"); - - migrationBuilder.DropTable( - name: "AppUserMessages"); - - migrationBuilder.DropTable( - name: "AppUserSpecialFocuss"); - - migrationBuilder.AlterColumn( - name: "ReadStatus", - table: "AppUserNotifications", - type: "tinyint", - nullable: false, - oldClrType: typeof(int)); - } - } -} diff --git a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20200609151853_Create-User-Subscription-Column-UserName.Designer.cs b/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20200609151853_Create-User-Subscription-Column-UserName.Designer.cs deleted file mode 100644 index 1c75e4d1d..000000000 --- a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20200609151853_Create-User-Subscription-Column-UserName.Designer.cs +++ /dev/null @@ -1,503 +0,0 @@ -// -using System; -using LINGYUN.Abp.MessageService.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -namespace LINGYUN.Abp.MessageService.Migrations -{ - [DbContext(typeof(MessageServiceHostMigrationsDbContext))] - [Migration("20200609151853_Create-User-Subscription-Column-UserName")] - partial class CreateUserSubscriptionColumnUserName - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "3.1.4") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.ChatGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Address") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("AllowAnonymous") - .HasColumnType("tinyint(1)"); - - b.Property("AllowSendMessage") - .HasColumnType("tinyint(1)"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("Description") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("MaxUserCount") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasColumnType("varchar(20) CHARACTER SET utf8mb4") - .HasMaxLength(20); - - b.Property("Notice") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("Tag") - .HasColumnType("varchar(512) CHARACTER SET utf8mb4") - .HasMaxLength(512); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name"); - - b.ToTable("AppChatGroups"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.ChatGroupAdmin", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("AllowAddPeople") - .HasColumnType("tinyint(1)"); - - b.Property("AllowDissolveGroup") - .HasColumnType("tinyint(1)"); - - b.Property("AllowKickPeople") - .HasColumnType("tinyint(1)"); - - b.Property("AllowSendNotice") - .HasColumnType("tinyint(1)"); - - b.Property("AllowSilence") - .HasColumnType("tinyint(1)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnType("char(36)"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("IsSuperAdmin") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId"); - - b.ToTable("AppChatGroupAdmins"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.GroupChatBlack", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnType("char(36)"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("ShieldUserId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId"); - - b.ToTable("AppGroupChatBlacks"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.GroupMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Content") - .IsRequired() - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasMaxLength(1048576); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnType("char(36)"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("MessageId") - .HasColumnType("bigint"); - - b.Property("SendState") - .HasColumnType("tinyint"); - - b.Property("SendUserName") - .IsRequired() - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId"); - - b.ToTable("AppGroupMessages"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.UserChatBlack", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnType("char(36)"); - - b.Property("ShieldUserId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserChatBlacks"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.UserChatGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId", "UserId"); - - b.ToTable("AppUserChatGroups"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.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") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserChatSettings"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.UserMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Content") - .IsRequired() - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasMaxLength(1048576); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnType("char(36)"); - - b.Property("MessageId") - .HasColumnType("bigint"); - - b.Property("ReceiveUserId") - .HasColumnType("char(36)"); - - b.Property("SendState") - .HasColumnType("tinyint"); - - b.Property("SendUserName") - .IsRequired() - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "ReceiveUserId"); - - b.ToTable("AppUserMessages"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.UserSpecialFocus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnType("char(36)"); - - b.Property("FocusUserId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserSpecialFocuss"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Notifications.Notification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("ExpirationTime") - .HasColumnType("datetime(6)"); - - b.Property("NotificationData") - .IsRequired() - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasMaxLength(1048576); - - b.Property("NotificationId") - .HasColumnType("bigint"); - - b.Property("NotificationName") - .IsRequired() - .HasColumnType("varchar(100) CHARACTER SET utf8mb4") - .HasMaxLength(100); - - b.Property("NotificationTypeName") - .IsRequired() - .HasColumnType("varchar(512) CHARACTER SET utf8mb4") - .HasMaxLength(512); - - b.Property("Severity") - .HasColumnType("tinyint"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("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") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "NotificationId") - .HasName("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") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("NotificationName") - .IsRequired() - .HasColumnType("varchar(100) CHARACTER SET utf8mb4") - .HasMaxLength(100); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .IsRequired() - .ValueGeneratedOnAdd() - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128) - .HasDefaultValue("/"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "NotificationName") - .IsUnique() - .HasName("IX_Tenant_User_Notification_Name"); - - b.ToTable("AppUserSubscribes"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20200609151853_Create-User-Subscription-Column-UserName.cs b/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20200609151853_Create-User-Subscription-Column-UserName.cs deleted file mode 100644 index 5c109d763..000000000 --- a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20200609151853_Create-User-Subscription-Column-UserName.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -namespace LINGYUN.Abp.MessageService.Migrations -{ - public partial class CreateUserSubscriptionColumnUserName : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "UserName", - table: "AppUserSubscribes", - maxLength: 128, - nullable: false, - defaultValue: "/"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "UserName", - table: "AppUserSubscribes"); - } - } -} diff --git a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20200617010925_Add-Notification-Column-CateGory.Designer.cs b/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20200617010925_Add-Notification-Column-CateGory.Designer.cs deleted file mode 100644 index 352a9f8ae..000000000 --- a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20200617010925_Add-Notification-Column-CateGory.Designer.cs +++ /dev/null @@ -1,508 +0,0 @@ -// -using System; -using LINGYUN.Abp.MessageService.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -namespace LINGYUN.Abp.MessageService.Migrations -{ - [DbContext(typeof(MessageServiceHostMigrationsDbContext))] - [Migration("20200617010925_Add-Notification-Column-CateGory")] - partial class AddNotificationColumnCateGory - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "3.1.4") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.ChatGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Address") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("AllowAnonymous") - .HasColumnType("tinyint(1)"); - - b.Property("AllowSendMessage") - .HasColumnType("tinyint(1)"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("Description") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("MaxUserCount") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasColumnType("varchar(20) CHARACTER SET utf8mb4") - .HasMaxLength(20); - - b.Property("Notice") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("Tag") - .HasColumnType("varchar(512) CHARACTER SET utf8mb4") - .HasMaxLength(512); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name"); - - b.ToTable("AppChatGroups"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.ChatGroupAdmin", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("AllowAddPeople") - .HasColumnType("tinyint(1)"); - - b.Property("AllowDissolveGroup") - .HasColumnType("tinyint(1)"); - - b.Property("AllowKickPeople") - .HasColumnType("tinyint(1)"); - - b.Property("AllowSendNotice") - .HasColumnType("tinyint(1)"); - - b.Property("AllowSilence") - .HasColumnType("tinyint(1)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnType("char(36)"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("IsSuperAdmin") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId"); - - b.ToTable("AppChatGroupAdmins"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.GroupChatBlack", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnType("char(36)"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("ShieldUserId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId"); - - b.ToTable("AppGroupChatBlacks"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.GroupMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Content") - .IsRequired() - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasMaxLength(1048576); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnType("char(36)"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("MessageId") - .HasColumnType("bigint"); - - b.Property("SendState") - .HasColumnType("tinyint"); - - b.Property("SendUserName") - .IsRequired() - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId"); - - b.ToTable("AppGroupMessages"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.UserChatBlack", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnType("char(36)"); - - b.Property("ShieldUserId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserChatBlacks"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.UserChatGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId", "UserId"); - - b.ToTable("AppUserChatGroups"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.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") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserChatSettings"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.UserMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Content") - .IsRequired() - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasMaxLength(1048576); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnType("char(36)"); - - b.Property("MessageId") - .HasColumnType("bigint"); - - b.Property("ReceiveUserId") - .HasColumnType("char(36)"); - - b.Property("SendState") - .HasColumnType("tinyint"); - - b.Property("SendUserName") - .IsRequired() - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "ReceiveUserId"); - - b.ToTable("AppUserMessages"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.UserSpecialFocus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnType("char(36)"); - - b.Property("FocusUserId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserSpecialFocuss"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Notifications.Notification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("ExpirationTime") - .HasColumnType("datetime(6)"); - - b.Property("NotificationCateGory") - .IsRequired() - .HasColumnType("varchar(50) CHARACTER SET utf8mb4") - .HasMaxLength(50); - - b.Property("NotificationData") - .IsRequired() - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasMaxLength(1048576); - - b.Property("NotificationId") - .HasColumnType("bigint"); - - b.Property("NotificationName") - .IsRequired() - .HasColumnType("varchar(100) CHARACTER SET utf8mb4") - .HasMaxLength(100); - - b.Property("NotificationTypeName") - .IsRequired() - .HasColumnType("varchar(512) CHARACTER SET utf8mb4") - .HasMaxLength(512); - - b.Property("Severity") - .HasColumnType("tinyint"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "NotificationId") - .HasName("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") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("NotificationName") - .IsRequired() - .HasColumnType("varchar(100) CHARACTER SET utf8mb4") - .HasMaxLength(100); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .IsRequired() - .ValueGeneratedOnAdd() - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128) - .HasDefaultValue("/"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "NotificationName") - .IsUnique() - .HasName("IX_Tenant_User_Notification_Name"); - - b.ToTable("AppUserSubscribes"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20200617010925_Add-Notification-Column-CateGory.cs b/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20200617010925_Add-Notification-Column-CateGory.cs deleted file mode 100644 index 928173a6d..000000000 --- a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20200617010925_Add-Notification-Column-CateGory.cs +++ /dev/null @@ -1,42 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -namespace LINGYUN.Abp.MessageService.Migrations -{ - public partial class AddNotificationColumnCateGory : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropIndex( - name: "IX_AppNotifications_NotificationName", - table: "AppNotifications"); - - migrationBuilder.AddColumn( - name: "NotificationCateGory", - table: "AppNotifications", - maxLength: 50, - nullable: false, - defaultValue: ""); - - migrationBuilder.CreateIndex( - name: "IX_AppNotifications_TenantId_NotificationName", - table: "AppNotifications", - columns: new[] { "TenantId", "NotificationName" }); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropIndex( - name: "IX_AppNotifications_TenantId_NotificationName", - table: "AppNotifications"); - - migrationBuilder.DropColumn( - name: "NotificationCateGory", - table: "AppNotifications"); - - migrationBuilder.CreateIndex( - name: "IX_AppNotifications_NotificationName", - table: "AppNotifications", - column: "NotificationName"); - } - } -} diff --git a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20201024093309_Add-MemberCard-Entity.Designer.cs b/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20201024093309_Add-MemberCard-Entity.Designer.cs deleted file mode 100644 index e2720f3da..000000000 --- a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20201024093309_Add-MemberCard-Entity.Designer.cs +++ /dev/null @@ -1,590 +0,0 @@ -// -using System; -using LINGYUN.Abp.MessageService.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -namespace LINGYUN.Abp.MessageService.Migrations -{ - [DbContext(typeof(MessageServiceHostMigrationsDbContext))] - [Migration("20201024093309_Add-MemberCard-Entity")] - partial class AddMemberCardEntity - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "3.1.7") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.ChatGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Address") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("AdminUserId") - .HasColumnType("char(36)"); - - b.Property("AllowAnonymous") - .HasColumnType("tinyint(1)"); - - b.Property("AllowSendMessage") - .HasColumnType("tinyint(1)"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("Description") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("MaxUserCount") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasColumnType("varchar(20) CHARACTER SET utf8mb4") - .HasMaxLength(20); - - b.Property("Notice") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("Tag") - .HasColumnType("varchar(512) CHARACTER SET utf8mb4") - .HasMaxLength(512); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name"); - - b.ToTable("AppChatGroups"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.GroupChatBlack", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnType("char(36)"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("ShieldUserId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId"); - - b.ToTable("AppGroupChatBlacks"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.GroupMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Content") - .IsRequired() - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasMaxLength(1048576); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnType("char(36)"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("MessageId") - .HasColumnType("bigint"); - - b.Property("SendState") - .HasColumnType("tinyint"); - - b.Property("SendUserName") - .IsRequired() - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId"); - - b.ToTable("AppGroupMessages"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatBlack", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnType("char(36)"); - - b.Property("ShieldUserId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserChatBlacks"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatCard", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Age") - .HasColumnType("int"); - - b.Property("AvatarUrl") - .HasColumnType("varchar(512) CHARACTER SET utf8mb4") - .HasMaxLength(512); - - b.Property("Birthday") - .HasColumnType("datetime(6)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("Description") - .HasColumnType("varchar(50) CHARACTER SET utf8mb4") - .HasMaxLength(50); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("NickName") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("Sex") - .HasColumnType("int"); - - b.Property("Sign") - .HasColumnType("varchar(30) CHARACTER SET utf8mb4") - .HasMaxLength(30); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .IsRequired() - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserChatCards"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId", "UserId"); - - b.ToTable("AppUserChatGroups"); - }); - - 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") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserChatSettings"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserGroupCard", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsAdmin") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("NickName") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("SilenceEnd") - .HasColumnType("datetime(6)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserGroupCards"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Content") - .IsRequired() - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasMaxLength(1048576); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnType("char(36)"); - - b.Property("MessageId") - .HasColumnType("bigint"); - - b.Property("ReceiveUserId") - .HasColumnType("char(36)"); - - b.Property("SendState") - .HasColumnType("tinyint"); - - b.Property("SendUserName") - .IsRequired() - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "ReceiveUserId"); - - b.ToTable("AppUserMessages"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserSpecialFocus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnType("char(36)"); - - b.Property("FocusUserId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserSpecialFocuss"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Notifications.Notification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("ExpirationTime") - .HasColumnType("datetime(6)"); - - b.Property("NotificationCateGory") - .IsRequired() - .HasColumnType("varchar(50) CHARACTER SET utf8mb4") - .HasMaxLength(50); - - b.Property("NotificationData") - .IsRequired() - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasMaxLength(1048576); - - b.Property("NotificationId") - .HasColumnType("bigint"); - - b.Property("NotificationName") - .IsRequired() - .HasColumnType("varchar(100) CHARACTER SET utf8mb4") - .HasMaxLength(100); - - b.Property("NotificationTypeName") - .IsRequired() - .HasColumnType("varchar(512) CHARACTER SET utf8mb4") - .HasMaxLength(512); - - b.Property("Severity") - .HasColumnType("tinyint"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "NotificationId") - .HasName("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") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("NotificationName") - .IsRequired() - .HasColumnType("varchar(100) CHARACTER SET utf8mb4") - .HasMaxLength(100); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .IsRequired() - .ValueGeneratedOnAdd() - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128) - .HasDefaultValue("/"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "NotificationName") - .IsUnique() - .HasName("IX_Tenant_User_Notification_Name"); - - b.ToTable("AppUserSubscribes"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20201024093309_Add-MemberCard-Entity.cs b/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20201024093309_Add-MemberCard-Entity.cs deleted file mode 100644 index 4e6bdc925..000000000 --- a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20201024093309_Add-MemberCard-Entity.cs +++ /dev/null @@ -1,125 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace LINGYUN.Abp.MessageService.Migrations -{ - public partial class AddMemberCardEntity : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AppChatGroupAdmins"); - - migrationBuilder.AddColumn( - name: "AdminUserId", - table: "AppChatGroups", - nullable: false, - defaultValue: new Guid("00000000-0000-0000-0000-000000000000")); - - migrationBuilder.CreateTable( - name: "AppUserChatCards", - columns: table => new - { - Id = table.Column(nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - LastModificationTime = table.Column(nullable: true), - LastModifierId = table.Column(nullable: true), - TenantId = table.Column(nullable: true), - UserId = table.Column(nullable: false), - UserName = table.Column(maxLength: 256, nullable: false), - Sex = table.Column(nullable: false), - Sign = table.Column(maxLength: 30, nullable: true), - NickName = table.Column(maxLength: 256, nullable: true), - Description = table.Column(maxLength: 50, nullable: true), - AvatarUrl = table.Column(maxLength: 512, nullable: true), - Birthday = table.Column(nullable: true), - Age = table.Column(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AppUserChatCards", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AppUserGroupCards", - columns: table => new - { - Id = table.Column(nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - LastModificationTime = table.Column(nullable: true), - LastModifierId = table.Column(nullable: true), - TenantId = table.Column(nullable: true), - UserId = table.Column(nullable: false), - NickName = table.Column(maxLength: 256, nullable: true), - IsAdmin = table.Column(nullable: false), - SilenceEnd = table.Column(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AppUserGroupCards", x => x.Id); - }); - - migrationBuilder.CreateIndex( - name: "IX_AppUserChatCards_TenantId_UserId", - table: "AppUserChatCards", - columns: new[] { "TenantId", "UserId" }); - - migrationBuilder.CreateIndex( - name: "IX_AppUserGroupCards_TenantId_UserId", - table: "AppUserGroupCards", - columns: new[] { "TenantId", "UserId" }); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AppUserChatCards"); - - migrationBuilder.DropTable( - name: "AppUserGroupCards"); - - migrationBuilder.DropColumn( - name: "AdminUserId", - table: "AppChatGroups"); - - migrationBuilder.CreateTable( - name: "AppChatGroupAdmins", - columns: table => new - { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - AllowAddPeople = table.Column(type: "tinyint(1)", nullable: false), - AllowDissolveGroup = table.Column(type: "tinyint(1)", nullable: false), - AllowKickPeople = table.Column(type: "tinyint(1)", nullable: false), - AllowSendNotice = table.Column(type: "tinyint(1)", nullable: false), - AllowSilence = table.Column(type: "tinyint(1)", nullable: false), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true), - GroupId = table.Column(type: "bigint", nullable: false), - IsSuperAdmin = table.Column(type: "tinyint(1)", nullable: false), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true), - TenantId = table.Column(type: "char(36)", nullable: true), - UserId = table.Column(type: "char(36)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AppChatGroupAdmins", x => x.Id); - }); - - migrationBuilder.CreateIndex( - name: "IX_AppChatGroupAdmins_TenantId_GroupId", - table: "AppChatGroupAdmins", - columns: new[] { "TenantId", "GroupId" }); - } - } -} diff --git a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20201024114206_Add-UserChatFriend-Entity.Designer.cs b/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20201024114206_Add-UserChatFriend-Entity.Designer.cs deleted file mode 100644 index 56da787fa..000000000 --- a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20201024114206_Add-UserChatFriend-Entity.Designer.cs +++ /dev/null @@ -1,634 +0,0 @@ -// -using System; -using LINGYUN.Abp.MessageService.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -namespace LINGYUN.Abp.MessageService.Migrations -{ - [DbContext(typeof(MessageServiceHostMigrationsDbContext))] - [Migration("20201024114206_Add-UserChatFriend-Entity")] - partial class AddUserChatFriendEntity - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "3.1.7") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.ChatGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Address") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("AdminUserId") - .HasColumnType("char(36)"); - - b.Property("AllowAnonymous") - .HasColumnType("tinyint(1)"); - - b.Property("AllowSendMessage") - .HasColumnType("tinyint(1)"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("Description") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("MaxUserCount") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasColumnType("varchar(20) CHARACTER SET utf8mb4") - .HasMaxLength(20); - - b.Property("Notice") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("Tag") - .HasColumnType("varchar(512) CHARACTER SET utf8mb4") - .HasMaxLength(512); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name"); - - b.ToTable("AppChatGroups"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.GroupChatBlack", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnType("char(36)"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("ShieldUserId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId"); - - b.ToTable("AppGroupChatBlacks"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.GroupMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Content") - .IsRequired() - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasMaxLength(1048576); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnType("char(36)"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("MessageId") - .HasColumnType("bigint"); - - b.Property("SendState") - .HasColumnType("tinyint"); - - b.Property("SendUserName") - .IsRequired() - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId"); - - b.ToTable("AppGroupMessages"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatBlack", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnType("char(36)"); - - b.Property("ShieldUserId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserChatBlacks"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatCard", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Age") - .HasColumnType("int"); - - b.Property("AvatarUrl") - .HasColumnType("varchar(512) CHARACTER SET utf8mb4") - .HasMaxLength(512); - - b.Property("Birthday") - .HasColumnType("datetime(6)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("Description") - .HasColumnType("varchar(50) CHARACTER SET utf8mb4") - .HasMaxLength(50); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("NickName") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("Sex") - .HasColumnType("int"); - - b.Property("Sign") - .HasColumnType("varchar(30) CHARACTER SET utf8mb4") - .HasMaxLength(30); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .IsRequired() - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(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("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DontDisturb") - .HasColumnType("tinyint(1)"); - - b.Property("FrientId") - .HasColumnType("char(36)"); - - b.Property("RemarkName") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("SpecialFocus") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "FrientId"); - - b.ToTable("AppUserChatFriends"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId", "UserId"); - - b.ToTable("AppUserChatGroups"); - }); - - 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") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserChatSettings"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserGroupCard", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsAdmin") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("NickName") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("SilenceEnd") - .HasColumnType("datetime(6)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserGroupCards"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Content") - .IsRequired() - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasMaxLength(1048576); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnType("char(36)"); - - b.Property("MessageId") - .HasColumnType("bigint"); - - b.Property("ReceiveUserId") - .HasColumnType("char(36)"); - - b.Property("SendState") - .HasColumnType("tinyint"); - - b.Property("SendUserName") - .IsRequired() - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "ReceiveUserId"); - - b.ToTable("AppUserMessages"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserSpecialFocus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnType("char(36)"); - - b.Property("FocusUserId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserSpecialFocuss"); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Notifications.Notification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("ExpirationTime") - .HasColumnType("datetime(6)"); - - b.Property("NotificationCateGory") - .IsRequired() - .HasColumnType("varchar(50) CHARACTER SET utf8mb4") - .HasMaxLength(50); - - b.Property("NotificationData") - .IsRequired() - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasMaxLength(1048576); - - b.Property("NotificationId") - .HasColumnType("bigint"); - - b.Property("NotificationName") - .IsRequired() - .HasColumnType("varchar(100) CHARACTER SET utf8mb4") - .HasMaxLength(100); - - b.Property("NotificationTypeName") - .IsRequired() - .HasColumnType("varchar(512) CHARACTER SET utf8mb4") - .HasMaxLength(512); - - b.Property("Severity") - .HasColumnType("tinyint"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "NotificationId") - .HasName("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") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("NotificationName") - .IsRequired() - .HasColumnType("varchar(100) CHARACTER SET utf8mb4") - .HasMaxLength(100); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .IsRequired() - .ValueGeneratedOnAdd() - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128) - .HasDefaultValue("/"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "NotificationName") - .IsUnique() - .HasName("IX_Tenant_User_Notification_Name"); - - b.ToTable("AppUserSubscribes"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20201024114206_Add-UserChatFriend-Entity.cs b/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20201024114206_Add-UserChatFriend-Entity.cs deleted file mode 100644 index 183413ae4..000000000 --- a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20201024114206_Add-UserChatFriend-Entity.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace LINGYUN.Abp.MessageService.Migrations -{ - public partial class AddUserChatFriendEntity : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "AppUserChatFriends", - columns: table => new - { - Id = table.Column(nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - TenantId = table.Column(nullable: true), - UserId = table.Column(nullable: false), - FrientId = table.Column(nullable: false), - Black = table.Column(nullable: false), - DontDisturb = table.Column(nullable: false), - SpecialFocus = table.Column(nullable: false), - RemarkName = table.Column(maxLength: 256, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AppUserChatFriends", x => x.Id); - }); - - migrationBuilder.CreateIndex( - name: "IX_AppUserChatFriends_TenantId_UserId_FrientId", - table: "AppUserChatFriends", - columns: new[] { "TenantId", "UserId", "FrientId" }); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AppUserChatFriends"); - } - } -} diff --git a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20201029102936_Add-UserChatFriend-Column-Description.Designer.cs b/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20201029102936_Add-UserChatFriend-Column-Description.Designer.cs deleted file mode 100644 index 0ee715669..000000000 --- a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20201029102936_Add-UserChatFriend-Column-Description.Designer.cs +++ /dev/null @@ -1,588 +0,0 @@ -// -using System; -using LINGYUN.Abp.MessageService.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -namespace LINGYUN.Abp.MessageService.Migrations -{ - [DbContext(typeof(MessageServiceHostMigrationsDbContext))] - [Migration("20201029102936_Add-UserChatFriend-Column-Description")] - partial class AddUserChatFriendColumnDescription - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "3.1.7") - .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") - .HasColumnType("varchar(512) CHARACTER SET utf8mb4") - .HasMaxLength(512); - - b.Property("Birthday") - .HasColumnType("datetime(6)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("Description") - .HasColumnType("varchar(50) CHARACTER SET utf8mb4") - .HasMaxLength(50); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("NickName") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("Sex") - .HasColumnType("int"); - - b.Property("Sign") - .HasColumnType("varchar(30) CHARACTER SET utf8mb4") - .HasMaxLength(30); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .IsRequired() - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(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() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("Description") - .HasColumnType("varchar(50) CHARACTER SET utf8mb4") - .HasMaxLength(50); - - b.Property("DontDisturb") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("FrientId") - .HasColumnType("char(36)"); - - b.Property("RemarkName") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("SpecialFocus") - .HasColumnType("tinyint(1)"); - - b.Property("Status") - .HasColumnType("tinyint unsigned"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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("Content") - .IsRequired() - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasMaxLength(1048576); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnType("char(36)"); - - b.Property("MessageId") - .HasColumnType("bigint"); - - b.Property("ReceiveUserId") - .HasColumnType("char(36)"); - - b.Property("SendState") - .HasColumnType("tinyint"); - - b.Property("SendUserName") - .IsRequired() - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("AdminUserId") - .HasColumnType("char(36)"); - - b.Property("AllowAnonymous") - .HasColumnType("tinyint(1)"); - - b.Property("AllowSendMessage") - .HasColumnType("tinyint(1)"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("Description") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("MaxUserCount") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasColumnType("varchar(20) CHARACTER SET utf8mb4") - .HasMaxLength(20); - - b.Property("Notice") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("Tag") - .HasColumnType("varchar(512) CHARACTER SET utf8mb4") - .HasMaxLength(512); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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)"); - - b.Property("CreatorId") - .HasColumnType("char(36)"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("ShieldUserId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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("Content") - .IsRequired() - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasMaxLength(1048576); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnType("char(36)"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("MessageId") - .HasColumnType("bigint"); - - b.Property("SendState") - .HasColumnType("tinyint"); - - b.Property("SendUserName") - .IsRequired() - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsAdmin") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("NickName") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("SilenceEnd") - .HasColumnType("datetime(6)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("ExpirationTime") - .HasColumnType("datetime(6)"); - - b.Property("NotificationData") - .IsRequired() - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasMaxLength(1048576); - - b.Property("NotificationId") - .HasColumnType("bigint"); - - b.Property("NotificationName") - .IsRequired() - .HasColumnType("varchar(100) CHARACTER SET utf8mb4") - .HasMaxLength(100); - - b.Property("NotificationTypeName") - .IsRequired() - .HasColumnType("varchar(512) CHARACTER SET utf8mb4") - .HasMaxLength(512); - - b.Property("Severity") - .HasColumnType("tinyint"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "NotificationId") - .HasName("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") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("NotificationName") - .IsRequired() - .HasColumnType("varchar(100) CHARACTER SET utf8mb4") - .HasMaxLength(100); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .IsRequired() - .ValueGeneratedOnAdd() - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128) - .HasDefaultValue("/"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "NotificationName") - .IsUnique() - .HasName("IX_Tenant_User_Notification_Name"); - - b.ToTable("AppUserSubscribes"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20201029102936_Add-UserChatFriend-Column-Description.cs b/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20201029102936_Add-UserChatFriend-Column-Description.cs deleted file mode 100644 index 9a155f6df..000000000 --- a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20201029102936_Add-UserChatFriend-Column-Description.cs +++ /dev/null @@ -1,116 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace LINGYUN.Abp.MessageService.Migrations -{ - public partial class AddUserChatFriendColumnDescription : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AppUserChatBlacks"); - - migrationBuilder.DropTable( - name: "AppUserSpecialFocuss"); - - migrationBuilder.DropColumn( - name: "NotificationCateGory", - table: "AppNotifications"); - - migrationBuilder.AddColumn( - name: "ConcurrencyStamp", - table: "AppUserChatFriends", - maxLength: 40, - nullable: true); - - migrationBuilder.AddColumn( - name: "Description", - table: "AppUserChatFriends", - maxLength: 50, - nullable: true); - - migrationBuilder.AddColumn( - name: "ExtraProperties", - table: "AppUserChatFriends", - nullable: true); - - migrationBuilder.AddColumn( - name: "Status", - table: "AppUserChatFriends", - nullable: false, - defaultValue: (byte)0); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "ConcurrencyStamp", - table: "AppUserChatFriends"); - - migrationBuilder.DropColumn( - name: "Description", - table: "AppUserChatFriends"); - - migrationBuilder.DropColumn( - name: "ExtraProperties", - table: "AppUserChatFriends"); - - migrationBuilder.DropColumn( - name: "Status", - table: "AppUserChatFriends"); - - migrationBuilder.AddColumn( - name: "NotificationCateGory", - table: "AppNotifications", - type: "varchar(50) CHARACTER SET utf8mb4", - maxLength: 50, - nullable: false, - defaultValue: ""); - - migrationBuilder.CreateTable( - name: "AppUserChatBlacks", - columns: table => new - { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true), - ShieldUserId = table.Column(type: "char(36)", nullable: false), - TenantId = table.Column(type: "char(36)", nullable: true), - UserId = table.Column(type: "char(36)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AppUserChatBlacks", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AppUserSpecialFocuss", - columns: table => new - { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true), - FocusUserId = table.Column(type: "char(36)", nullable: false), - TenantId = table.Column(type: "char(36)", nullable: true), - UserId = table.Column(type: "char(36)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AppUserSpecialFocuss", x => x.Id); - }); - - migrationBuilder.CreateIndex( - name: "IX_AppUserChatBlacks_TenantId_UserId", - table: "AppUserChatBlacks", - columns: new[] { "TenantId", "UserId" }); - - migrationBuilder.CreateIndex( - name: "IX_AppUserSpecialFocuss_TenantId_UserId", - table: "AppUserSpecialFocuss", - columns: new[] { "TenantId", "UserId" }); - } - } -} diff --git a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20201030032219_Based-Message-Entity-To-AggregateRoot.cs b/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20201030032219_Based-Message-Entity-To-AggregateRoot.cs deleted file mode 100644 index 0b853d840..000000000 --- a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20201030032219_Based-Message-Entity-To-AggregateRoot.cs +++ /dev/null @@ -1,51 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -namespace LINGYUN.Abp.MessageService.Migrations -{ - public partial class BasedMessageEntityToAggregateRoot : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "ConcurrencyStamp", - table: "AppUserMessages", - maxLength: 40, - nullable: true); - - migrationBuilder.AddColumn( - name: "ExtraProperties", - table: "AppUserMessages", - nullable: true); - - migrationBuilder.AddColumn( - name: "ConcurrencyStamp", - table: "AppGroupMessages", - maxLength: 40, - nullable: true); - - migrationBuilder.AddColumn( - name: "ExtraProperties", - table: "AppGroupMessages", - nullable: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "ConcurrencyStamp", - table: "AppUserMessages"); - - migrationBuilder.DropColumn( - name: "ExtraProperties", - table: "AppUserMessages"); - - migrationBuilder.DropColumn( - name: "ConcurrencyStamp", - table: "AppGroupMessages"); - - migrationBuilder.DropColumn( - name: "ExtraProperties", - table: "AppGroupMessages"); - } - } -} diff --git a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20201030032219_Based-Message-Entity-To-AggregateRoot.Designer.cs b/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20211030131449_Re-Initlize-Db-Migration.Designer.cs similarity index 64% rename from aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20201030032219_Based-Message-Entity-To-AggregateRoot.Designer.cs rename to aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20211030131449_Re-Initlize-Db-Migration.Designer.cs index 73806e490..f24b20c95 100644 --- a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20201030032219_Based-Message-Entity-To-AggregateRoot.Designer.cs +++ b/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20211030131449_Re-Initlize-Db-Migration.Designer.cs @@ -1,612 +1,612 @@ -// -using System; -using LINGYUN.Abp.MessageService.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -namespace LINGYUN.Abp.MessageService.Migrations -{ - [DbContext(typeof(MessageServiceHostMigrationsDbContext))] - [Migration("20201030032219_Based-Message-Entity-To-AggregateRoot")] - partial class BasedMessageEntityToAggregateRoot - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "3.1.7") - .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") - .HasColumnType("varchar(512) CHARACTER SET utf8mb4") - .HasMaxLength(512); - - b.Property("Birthday") - .HasColumnType("datetime(6)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("Description") - .HasColumnType("varchar(50) CHARACTER SET utf8mb4") - .HasMaxLength(50); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("NickName") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("Sex") - .HasColumnType("int"); - - b.Property("Sign") - .HasColumnType("varchar(30) CHARACTER SET utf8mb4") - .HasMaxLength(30); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .IsRequired() - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(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() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("Description") - .HasColumnType("varchar(50) CHARACTER SET utf8mb4") - .HasMaxLength(50); - - b.Property("DontDisturb") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("FrientId") - .HasColumnType("char(36)"); - - b.Property("RemarkName") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("SpecialFocus") - .HasColumnType("tinyint(1)"); - - b.Property("Status") - .HasColumnType("tinyint unsigned"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("Content") - .IsRequired() - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasMaxLength(1048576); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("MessageId") - .HasColumnType("bigint"); - - b.Property("ReceiveUserId") - .HasColumnType("char(36)"); - - b.Property("SendState") - .HasColumnType("tinyint"); - - b.Property("SendUserName") - .IsRequired() - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("AdminUserId") - .HasColumnType("char(36)"); - - b.Property("AllowAnonymous") - .HasColumnType("tinyint(1)"); - - b.Property("AllowSendMessage") - .HasColumnType("tinyint(1)"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("Description") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("MaxUserCount") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasColumnType("varchar(20) CHARACTER SET utf8mb4") - .HasMaxLength(20); - - b.Property("Notice") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("Tag") - .HasColumnType("varchar(512) CHARACTER SET utf8mb4") - .HasMaxLength(512); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("ShieldUserId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("Content") - .IsRequired() - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasMaxLength(1048576); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("MessageId") - .HasColumnType("bigint"); - - b.Property("SendState") - .HasColumnType("tinyint"); - - b.Property("SendUserName") - .IsRequired() - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsAdmin") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("NickName") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("SilenceEnd") - .HasColumnType("datetime(6)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("ExpirationTime") - .HasColumnType("datetime(6)"); - - b.Property("NotificationData") - .IsRequired() - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasMaxLength(1048576); - - b.Property("NotificationId") - .HasColumnType("bigint"); - - b.Property("NotificationName") - .IsRequired() - .HasColumnType("varchar(100) CHARACTER SET utf8mb4") - .HasMaxLength(100); - - b.Property("NotificationTypeName") - .IsRequired() - .HasColumnType("varchar(512) CHARACTER SET utf8mb4") - .HasMaxLength(512); - - b.Property("Severity") - .HasColumnType("tinyint"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "NotificationId") - .HasName("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") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("NotificationName") - .IsRequired() - .HasColumnType("varchar(100) CHARACTER SET utf8mb4") - .HasMaxLength(100); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .IsRequired() - .ValueGeneratedOnAdd() - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128) - .HasDefaultValue("/"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "NotificationName") - .IsUnique() - .HasName("IX_Tenant_User_Notification_Name"); - - b.ToTable("AppUserSubscribes"); - }); -#pragma warning restore 612, 618 - } - } -} +// +using System; +using LINGYUN.Abp.MessageService.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +namespace LINGYUN.Abp.MessageService.Migrations +{ + [DbContext(typeof(MessageServiceHostMigrationsDbContext))] + [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/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20211030131449_Re-Initlize-Db-Migration.cs b/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20211030131449_Re-Initlize-Db-Migration.cs new file mode 100644 index 000000000..336ea9e86 --- /dev/null +++ b/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/20211030131449_Re-Initlize-Db-Migration.cs @@ -0,0 +1,415 @@ +using System; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; + +namespace LINGYUN.Abp.MessageService.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/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/MessageServiceHostMigrationsDbContextModelSnapshot.cs b/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/MessageServiceHostMigrationsDbContextModelSnapshot.cs index 8fcd36cd5..37a8302b8 100644 --- a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/MessageServiceHostMigrationsDbContextModelSnapshot.cs +++ b/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Migrations/MessageServiceHostMigrationsDbContextModelSnapshot.cs @@ -1,610 +1,610 @@ -// -using System; -using LINGYUN.Abp.MessageService.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -namespace LINGYUN.Abp.MessageService.Migrations -{ - [DbContext(typeof(MessageServiceHostMigrationsDbContext))] - partial class MessageServiceHostMigrationsDbContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "3.1.7") - .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") - .HasColumnType("varchar(512) CHARACTER SET utf8mb4") - .HasMaxLength(512); - - b.Property("Birthday") - .HasColumnType("datetime(6)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("Description") - .HasColumnType("varchar(50) CHARACTER SET utf8mb4") - .HasMaxLength(50); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("NickName") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("Sex") - .HasColumnType("int"); - - b.Property("Sign") - .HasColumnType("varchar(30) CHARACTER SET utf8mb4") - .HasMaxLength(30); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .IsRequired() - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(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() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("Description") - .HasColumnType("varchar(50) CHARACTER SET utf8mb4") - .HasMaxLength(50); - - b.Property("DontDisturb") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("FrientId") - .HasColumnType("char(36)"); - - b.Property("RemarkName") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("SpecialFocus") - .HasColumnType("tinyint(1)"); - - b.Property("Status") - .HasColumnType("tinyint unsigned"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("Content") - .IsRequired() - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasMaxLength(1048576); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("MessageId") - .HasColumnType("bigint"); - - b.Property("ReceiveUserId") - .HasColumnType("char(36)"); - - b.Property("SendState") - .HasColumnType("tinyint"); - - b.Property("SendUserName") - .IsRequired() - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("AdminUserId") - .HasColumnType("char(36)"); - - b.Property("AllowAnonymous") - .HasColumnType("tinyint(1)"); - - b.Property("AllowSendMessage") - .HasColumnType("tinyint(1)"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("Description") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("MaxUserCount") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasColumnType("varchar(20) CHARACTER SET utf8mb4") - .HasMaxLength(20); - - b.Property("Notice") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("Tag") - .HasColumnType("varchar(512) CHARACTER SET utf8mb4") - .HasMaxLength(512); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("ShieldUserId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("Content") - .IsRequired() - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasMaxLength(1048576); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("MessageId") - .HasColumnType("bigint"); - - b.Property("SendState") - .HasColumnType("tinyint"); - - b.Property("SendUserName") - .IsRequired() - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsAdmin") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("NickName") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("SilenceEnd") - .HasColumnType("datetime(6)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("ExpirationTime") - .HasColumnType("datetime(6)"); - - b.Property("NotificationData") - .IsRequired() - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasMaxLength(1048576); - - b.Property("NotificationId") - .HasColumnType("bigint"); - - b.Property("NotificationName") - .IsRequired() - .HasColumnType("varchar(100) CHARACTER SET utf8mb4") - .HasMaxLength(100); - - b.Property("NotificationTypeName") - .IsRequired() - .HasColumnType("varchar(512) CHARACTER SET utf8mb4") - .HasMaxLength(512); - - b.Property("Severity") - .HasColumnType("tinyint"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "NotificationId") - .HasName("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") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("NotificationName") - .IsRequired() - .HasColumnType("varchar(100) CHARACTER SET utf8mb4") - .HasMaxLength(100); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .IsRequired() - .ValueGeneratedOnAdd() - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128) - .HasDefaultValue("/"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "NotificationName") - .IsUnique() - .HasName("IX_Tenant_User_Notification_Name"); - - b.ToTable("AppUserSubscribes"); - }); -#pragma warning restore 612, 618 - } - } -} +// +using System; +using LINGYUN.Abp.MessageService.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +namespace LINGYUN.Abp.MessageService.Migrations +{ + [DbContext(typeof(MessageServiceHostMigrationsDbContext))] + partial class MessageServiceHostMigrationsDbContextModelSnapshot : 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.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/messages/LINGYUN.Abp.MessageService.HttpApi.Host/appsettings.Development.json b/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/appsettings.Development.json index 62bde980b..5e43474e0 100644 --- a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/appsettings.Development.json +++ b/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/appsettings.Development.json @@ -69,7 +69,7 @@ }, "AuditLogging": { "Elasticsearch": { - "IndexPrefix": "lingyun.abp.auditing" + "IndexPrefix": "abp.dev.auditing" } }, "Elasticsearch": { @@ -100,7 +100,7 @@ "Name": "Elasticsearch", "Args": { "nodeUris": "http://localhost:9200", - "indexFormat": "lingyun.abp.logging-{0:yyyy.MM.dd}", + "indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}", "autoRegisterTemplate": true, "autoRegisterTemplateVersion": "ESv7" } diff --git a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/AppPlatformHttpApiHostModule.cs b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/AppPlatformHttpApiHostModule.cs index ff2dcaa56..d31c487d7 100644 --- a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/AppPlatformHttpApiHostModule.cs +++ b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/AppPlatformHttpApiHostModule.cs @@ -1,5 +1,6 @@ using LINGYUN.Abp.AspNetCore.HttpOverrides; using LINGYUN.Abp.AuditLogging.Elasticsearch; +using LINGYUN.Abp.Data.DbMigrator; using LINGYUN.Abp.EventBus.CAP; using LINGYUN.Abp.ExceptionHandling.Emailing; using LINGYUN.Abp.Features.LimitValidation.Redis; @@ -55,6 +56,7 @@ namespace LINGYUN.Platform typeof(AbpSettingManagementEntityFrameworkCoreModule), typeof(AbpPermissionManagementEntityFrameworkCoreModule), typeof(AbpLocalizationManagementEntityFrameworkCoreModule), + typeof(AbpDataDbMigratorModule), typeof(AbpAspNetCoreAuthenticationJwtBearerModule), typeof(AbpNotificationModule), typeof(AbpEmailingExceptionHandlingModule), diff --git a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/EventBus/Handlers/TenantSynchronizer.cs b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/EventBus/Handlers/TenantSynchronizer.cs index dc04a3d0b..d3bcc57b6 100644 --- a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/EventBus/Handlers/TenantSynchronizer.cs +++ b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/EventBus/Handlers/TenantSynchronizer.cs @@ -1,8 +1,14 @@ -using LINGYUN.Abp.MultiTenancy; +using LINGYUN.Abp.Data.DbMigrator; +using LINGYUN.Abp.MultiTenancy; +using LINGYUN.Platform.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.Logging; using System.Threading.Tasks; using Volo.Abp.Data; using Volo.Abp.DependencyInjection; using Volo.Abp.EventBus.Distributed; +using Volo.Abp.MultiTenancy; +using Volo.Abp.Uow; namespace LINGYUN.Platform.EventBus.Handlers { @@ -11,10 +17,25 @@ namespace LINGYUN.Platform.EventBus.Handlers ITransientDependency { protected IDataSeeder DataSeeder { get; } + protected ICurrentTenant CurrentTenant { get; } + protected IDbSchemaMigrator DbSchemaMigrator { get; } + protected IUnitOfWorkManager UnitOfWorkManager { get; } - public TenantSynchronizer(IDataSeeder dataSeeder) + protected ILogger Logger { get; } + + public TenantSynchronizer( + IDataSeeder dataSeeder, + ICurrentTenant currentTenant, + IDbSchemaMigrator dbSchemaMigrator, + IUnitOfWorkManager unitOfWorkManager, + ILogger logger) { DataSeeder = dataSeeder; + CurrentTenant = currentTenant; + DbSchemaMigrator = dbSchemaMigrator; + UnitOfWorkManager = unitOfWorkManager; + + Logger = logger; } /// @@ -24,8 +45,26 @@ namespace LINGYUN.Platform.EventBus.Handlers /// public virtual async Task HandleEventAsync(CreateEventData eventData) { - await DataSeeder.SeedAsync( - new DataSeedContext(eventData.Id)); + using (var unitOfWork = UnitOfWorkManager.Begin()) + { + using (CurrentTenant.Change(eventData.Id, eventData.Name)) + { + Logger.LogInformation("Migrating the new tenant database with platform..."); + // 迁移租户数据 + await DbSchemaMigrator.MigrateAsync( + (connectionString, builder) => + { + builder.UseMySql(connectionString, ServerVersion.AutoDetect(connectionString)); + + return new PlatformHttpApiHostMigrationsDbContext(builder.Options); + }); + Logger.LogInformation("Migrated the new tenant database with platform."); + + await DataSeeder.SeedAsync(new DataSeedContext(eventData.Id)); + + await unitOfWork.SaveChangesAsync(); + } + } } } } diff --git a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/LINGYUN.Platform.HttpApi.Host.csproj b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/LINGYUN.Platform.HttpApi.Host.csproj index ac14f3eca..d56bba768 100644 --- a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/LINGYUN.Platform.HttpApi.Host.csproj +++ b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/LINGYUN.Platform.HttpApi.Host.csproj @@ -55,6 +55,7 @@ + diff --git a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20200723133732_Add-Platform-Module.Designer.cs b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20200723133732_Add-Platform-Module.Designer.cs deleted file mode 100644 index e797c115e..000000000 --- a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20200723133732_Add-Platform-Module.Designer.cs +++ /dev/null @@ -1,397 +0,0 @@ -// -using System; -using LINGYUN.Platform.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -namespace LINGYUN.Platform.Migrations -{ - [DbContext(typeof(PlatformHttpApiHostMigrationsDbContext))] - [Migration("20200723133732_Add-Platform-Module")] - partial class AddPlatformModule - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "3.1.5") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Platform.Routes.RoleRoute", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("IsDeleted") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("RoleName") - .IsRequired() - .HasColumnName("RoleName") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("RouteId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("RoleName", "RouteId"); - - b.ToTable("AppPlatformRoleRoute"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Routes.Route", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AlwaysShow") - .HasColumnType("tinyint(1)"); - - b.Property("Code") - .IsRequired() - .HasColumnName("Code") - .HasColumnType("varchar(95) CHARACTER SET utf8mb4") - .HasMaxLength(95); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnName("Description") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("DisplayName") - .IsRequired() - .HasColumnName("DisplayName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("FullName") - .HasColumnName("FullName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("Icon") - .HasColumnName("Icon") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("IsMenu") - .HasColumnType("tinyint(1)"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)"); - - b.Property("IsSideBar") - .HasColumnType("tinyint(1)"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("IsToolBar") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("LinkUrl") - .IsRequired() - .HasColumnName("LinkUrl") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("PlatformType") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("Code"); - - b.HasIndex("ParentId"); - - b.ToTable("AppPlatformRoute"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Routes.UserRoute", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("IsDeleted") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("RouteId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "RouteId"); - - b.ToTable("AppPlatformUserRoute"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Versions.AppVersion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnName("Description") - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasMaxLength(2048); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Level") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("Title") - .IsRequired() - .HasColumnName("Title") - .HasColumnType("varchar(50) CHARACTER SET utf8mb4") - .HasMaxLength(50); - - b.Property("Version") - .IsRequired() - .HasColumnName("Version") - .HasColumnType("varchar(20) CHARACTER SET utf8mb4") - .HasMaxLength(20); - - 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") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DownloadCount") - .HasColumnType("int"); - - b.Property("FileType") - .HasColumnType("int"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("SHA256") - .IsRequired() - .HasColumnName("SHA256") - .HasColumnType("varchar(32) CHARACTER SET utf8mb4") - .HasMaxLength(32); - - b.Property("Size") - .HasColumnType("bigint"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("Version") - .IsRequired() - .HasColumnName("Version") - .HasColumnType("varchar(20) CHARACTER SET utf8mb4") - .HasMaxLength(20); - - b.HasKey("Id"); - - b.HasIndex("AppVersionId"); - - b.HasIndex("Name", "Version"); - - b.ToTable("AppPlatformVersionFile"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Routes.Route", b => - { - b.HasOne("LINGYUN.Platform.Routes.Route", null) - .WithMany() - .HasForeignKey("ParentId"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Versions.VersionFile", b => - { - b.HasOne("LINGYUN.Platform.Versions.AppVersion", "AppVersion") - .WithMany("Files") - .HasForeignKey("AppVersionId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20200723133732_Add-Platform-Module.cs b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20200723133732_Add-Platform-Module.cs deleted file mode 100644 index 3dd098539..000000000 --- a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20200723133732_Add-Platform-Module.cs +++ /dev/null @@ -1,206 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace LINGYUN.Platform.Migrations -{ - public partial class AddPlatformModule : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "AppPlatformRoleRoute", - columns: table => new - { - Id = table.Column(nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - LastModificationTime = table.Column(nullable: true), - LastModifierId = table.Column(nullable: true), - IsDeleted = table.Column(nullable: false), - DeleterId = table.Column(nullable: true), - DeletionTime = table.Column(nullable: true), - TenantId = table.Column(nullable: true), - RoleName = table.Column(maxLength: 256, nullable: false), - RouteId = table.Column(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AppPlatformRoleRoute", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AppPlatformRoute", - columns: table => new - { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - LastModificationTime = table.Column(nullable: true), - LastModifierId = table.Column(nullable: true), - IsDeleted = table.Column(nullable: false, defaultValue: false), - DeleterId = table.Column(nullable: true), - DeletionTime = table.Column(nullable: true), - TenantId = table.Column(nullable: true), - Code = table.Column(maxLength: 95, nullable: false), - Name = table.Column(maxLength: 64, nullable: false), - FullName = table.Column(maxLength: 128, nullable: true), - DisplayName = table.Column(maxLength: 128, nullable: false), - PlatformType = table.Column(nullable: false), - Description = table.Column(maxLength: 255, nullable: true), - Icon = table.Column(maxLength: 128, nullable: true), - LinkUrl = table.Column(maxLength: 255, nullable: false), - IsMenu = table.Column(nullable: false), - IsToolBar = table.Column(nullable: false), - IsSideBar = table.Column(nullable: false), - IsPublic = table.Column(nullable: false), - IsStatic = table.Column(nullable: false), - AlwaysShow = table.Column(nullable: false), - ParentId = table.Column(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AppPlatformRoute", x => x.Id); - table.ForeignKey( - name: "FK_AppPlatformRoute_AppPlatformRoute_ParentId", - column: x => x.ParentId, - principalTable: "AppPlatformRoute", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "AppPlatformUserRoute", - columns: table => new - { - Id = table.Column(nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - LastModificationTime = table.Column(nullable: true), - LastModifierId = table.Column(nullable: true), - IsDeleted = table.Column(nullable: false), - DeleterId = table.Column(nullable: true), - DeletionTime = table.Column(nullable: true), - TenantId = table.Column(nullable: true), - UserId = table.Column(nullable: false), - RouteId = table.Column(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AppPlatformUserRoute", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AppPlatformVersion", - columns: table => new - { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - LastModificationTime = table.Column(nullable: true), - LastModifierId = table.Column(nullable: true), - IsDeleted = table.Column(nullable: false, defaultValue: false), - DeleterId = table.Column(nullable: true), - DeletionTime = table.Column(nullable: true), - TenantId = table.Column(nullable: true), - Title = table.Column(maxLength: 50, nullable: false), - Version = table.Column(maxLength: 20, nullable: false), - Description = table.Column(maxLength: 2048, nullable: true), - Level = table.Column(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AppPlatformVersion", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AppPlatformVersionFile", - columns: table => new - { - Id = table.Column(nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - LastModificationTime = table.Column(nullable: true), - LastModifierId = table.Column(nullable: true), - TenantId = table.Column(nullable: true), - Name = table.Column(maxLength: 255, nullable: false), - Version = table.Column(maxLength: 20, nullable: false), - Size = table.Column(nullable: false), - FileType = table.Column(nullable: false), - SHA256 = table.Column(maxLength: 32, nullable: false), - DownloadCount = table.Column(nullable: false), - AppVersionId = table.Column(nullable: false) - }, - 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); - }); - - migrationBuilder.CreateIndex( - name: "IX_AppPlatformRoleRoute_RoleName_RouteId", - table: "AppPlatformRoleRoute", - columns: new[] { "RoleName", "RouteId" }); - - migrationBuilder.CreateIndex( - name: "IX_AppPlatformRoute_Code", - table: "AppPlatformRoute", - column: "Code"); - - migrationBuilder.CreateIndex( - name: "IX_AppPlatformRoute_ParentId", - table: "AppPlatformRoute", - column: "ParentId"); - - migrationBuilder.CreateIndex( - name: "IX_AppPlatformUserRoute_UserId_RouteId", - table: "AppPlatformUserRoute", - columns: new[] { "UserId", "RouteId" }); - - 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_Name_Version", - table: "AppPlatformVersionFile", - columns: new[] { "Name", "Version" }); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AppPlatformRoleRoute"); - - migrationBuilder.DropTable( - name: "AppPlatformRoute"); - - migrationBuilder.DropTable( - name: "AppPlatformUserRoute"); - - migrationBuilder.DropTable( - name: "AppPlatformVersionFile"); - - migrationBuilder.DropTable( - name: "AppPlatformVersion"); - } - } -} diff --git a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20200723143103_Modify-Version-File-SHA256-Length.Designer.cs b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20200723143103_Modify-Version-File-SHA256-Length.Designer.cs deleted file mode 100644 index 834493ed9..000000000 --- a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20200723143103_Modify-Version-File-SHA256-Length.Designer.cs +++ /dev/null @@ -1,397 +0,0 @@ -// -using System; -using LINGYUN.Platform.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -namespace LINGYUN.Platform.Migrations -{ - [DbContext(typeof(PlatformHttpApiHostMigrationsDbContext))] - [Migration("20200723143103_Modify-Version-File-SHA256-Length")] - partial class ModifyVersionFileSHA256Length - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "3.1.5") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Platform.Routes.RoleRoute", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("IsDeleted") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("RoleName") - .IsRequired() - .HasColumnName("RoleName") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("RouteId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("RoleName", "RouteId"); - - b.ToTable("AppPlatformRoleRoute"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Routes.Route", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AlwaysShow") - .HasColumnType("tinyint(1)"); - - b.Property("Code") - .IsRequired() - .HasColumnName("Code") - .HasColumnType("varchar(95) CHARACTER SET utf8mb4") - .HasMaxLength(95); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnName("Description") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("DisplayName") - .IsRequired() - .HasColumnName("DisplayName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("FullName") - .HasColumnName("FullName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("Icon") - .HasColumnName("Icon") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("IsMenu") - .HasColumnType("tinyint(1)"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)"); - - b.Property("IsSideBar") - .HasColumnType("tinyint(1)"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("IsToolBar") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("LinkUrl") - .IsRequired() - .HasColumnName("LinkUrl") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("PlatformType") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("Code"); - - b.HasIndex("ParentId"); - - b.ToTable("AppPlatformRoute"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Routes.UserRoute", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("IsDeleted") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("RouteId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "RouteId"); - - b.ToTable("AppPlatformUserRoute"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Versions.AppVersion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnName("Description") - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasMaxLength(2048); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Level") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("Title") - .IsRequired() - .HasColumnName("Title") - .HasColumnType("varchar(50) CHARACTER SET utf8mb4") - .HasMaxLength(50); - - b.Property("Version") - .IsRequired() - .HasColumnName("Version") - .HasColumnType("varchar(20) CHARACTER SET utf8mb4") - .HasMaxLength(20); - - 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") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DownloadCount") - .HasColumnType("int"); - - b.Property("FileType") - .HasColumnType("int"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("SHA256") - .IsRequired() - .HasColumnName("SHA256") - .HasColumnType("varchar(65) CHARACTER SET utf8mb4") - .HasMaxLength(65); - - b.Property("Size") - .HasColumnType("bigint"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("Version") - .IsRequired() - .HasColumnName("Version") - .HasColumnType("varchar(20) CHARACTER SET utf8mb4") - .HasMaxLength(20); - - b.HasKey("Id"); - - b.HasIndex("AppVersionId"); - - b.HasIndex("Name", "Version"); - - b.ToTable("AppPlatformVersionFile"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Routes.Route", b => - { - b.HasOne("LINGYUN.Platform.Routes.Route", null) - .WithMany() - .HasForeignKey("ParentId"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Versions.VersionFile", b => - { - b.HasOne("LINGYUN.Platform.Versions.AppVersion", "AppVersion") - .WithMany("Files") - .HasForeignKey("AppVersionId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20200723143103_Modify-Version-File-SHA256-Length.cs b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20200723143103_Modify-Version-File-SHA256-Length.cs deleted file mode 100644 index 9e7193a66..000000000 --- a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20200723143103_Modify-Version-File-SHA256-Length.cs +++ /dev/null @@ -1,31 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -namespace LINGYUN.Platform.Migrations -{ - public partial class ModifyVersionFileSHA256Length : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "SHA256", - table: "AppPlatformVersionFile", - maxLength: 65, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(32) CHARACTER SET utf8mb4", - oldMaxLength: 32); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "SHA256", - table: "AppPlatformVersionFile", - type: "varchar(32) CHARACTER SET utf8mb4", - maxLength: 32, - nullable: false, - oldClrType: typeof(string), - oldMaxLength: 65); - } - } -} diff --git a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20200724092022_Add-Version-File-Field-Path-And-Platform-Type.Designer.cs b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20200724092022_Add-Version-File-Field-Path-And-Platform-Type.Designer.cs deleted file mode 100644 index 9f980379f..000000000 --- a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20200724092022_Add-Version-File-Field-Path-And-Platform-Type.Designer.cs +++ /dev/null @@ -1,406 +0,0 @@ -// -using System; -using LINGYUN.Platform.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -namespace LINGYUN.Platform.Migrations -{ - [DbContext(typeof(PlatformHttpApiHostMigrationsDbContext))] - [Migration("20200724092022_Add-Version-File-Field-Path-And-Platform-Type")] - partial class AddVersionFileFieldPathAndPlatformType - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "3.1.5") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Platform.Routes.RoleRoute", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("IsDeleted") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("RoleName") - .IsRequired() - .HasColumnName("RoleName") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("RouteId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("RoleName", "RouteId"); - - b.ToTable("AppPlatformRoleRoute"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Routes.Route", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AlwaysShow") - .HasColumnType("tinyint(1)"); - - b.Property("Code") - .IsRequired() - .HasColumnName("Code") - .HasColumnType("varchar(95) CHARACTER SET utf8mb4") - .HasMaxLength(95); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnName("Description") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("DisplayName") - .IsRequired() - .HasColumnName("DisplayName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("FullName") - .HasColumnName("FullName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("Icon") - .HasColumnName("Icon") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("IsMenu") - .HasColumnType("tinyint(1)"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)"); - - b.Property("IsSideBar") - .HasColumnType("tinyint(1)"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("IsToolBar") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("LinkUrl") - .IsRequired() - .HasColumnName("LinkUrl") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("PlatformType") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("Code"); - - b.HasIndex("ParentId"); - - b.ToTable("AppPlatformRoute"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Routes.UserRoute", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("IsDeleted") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("RouteId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "RouteId"); - - b.ToTable("AppPlatformUserRoute"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Versions.AppVersion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnName("Description") - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasMaxLength(2048); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Level") - .HasColumnType("int"); - - b.Property("PlatformType") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("Title") - .IsRequired() - .HasColumnName("Title") - .HasColumnType("varchar(50) CHARACTER SET utf8mb4") - .HasMaxLength(50); - - b.Property("Version") - .IsRequired() - .HasColumnName("Version") - .HasColumnType("varchar(20) CHARACTER SET utf8mb4") - .HasMaxLength(20); - - 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") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DownloadCount") - .HasColumnType("int"); - - b.Property("FileType") - .HasColumnType("int"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("Path") - .HasColumnName("Path") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("SHA256") - .IsRequired() - .HasColumnName("SHA256") - .HasColumnType("varchar(65) CHARACTER SET utf8mb4") - .HasMaxLength(65); - - b.Property("Size") - .HasColumnType("bigint"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("Version") - .IsRequired() - .HasColumnName("Version") - .HasColumnType("varchar(20) CHARACTER SET utf8mb4") - .HasMaxLength(20); - - b.HasKey("Id"); - - b.HasIndex("AppVersionId"); - - b.HasIndex("Path", "Name", "Version") - .IsUnique(); - - b.ToTable("AppPlatformVersionFile"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Routes.Route", b => - { - b.HasOne("LINGYUN.Platform.Routes.Route", null) - .WithMany() - .HasForeignKey("ParentId"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Versions.VersionFile", b => - { - b.HasOne("LINGYUN.Platform.Versions.AppVersion", "AppVersion") - .WithMany("Files") - .HasForeignKey("AppVersionId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20200724092022_Add-Version-File-Field-Path-And-Platform-Type.cs b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20200724092022_Add-Version-File-Field-Path-And-Platform-Type.cs deleted file mode 100644 index 269bf8cfc..000000000 --- a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20200724092022_Add-Version-File-Field-Path-And-Platform-Type.cs +++ /dev/null @@ -1,52 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -namespace LINGYUN.Platform.Migrations -{ - public partial class AddVersionFileFieldPathAndPlatformType : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropIndex( - name: "IX_AppPlatformVersionFile_Name_Version", - table: "AppPlatformVersionFile"); - - migrationBuilder.AddColumn( - name: "Path", - table: "AppPlatformVersionFile", - maxLength: 255, - nullable: true); - - migrationBuilder.AddColumn( - name: "PlatformType", - table: "AppPlatformVersion", - nullable: false, - defaultValue: 0); - - migrationBuilder.CreateIndex( - name: "IX_AppPlatformVersionFile_Path_Name_Version", - table: "AppPlatformVersionFile", - columns: new[] { "Path", "Name", "Version" }, - unique: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropIndex( - name: "IX_AppPlatformVersionFile_Path_Name_Version", - table: "AppPlatformVersionFile"); - - migrationBuilder.DropColumn( - name: "Path", - table: "AppPlatformVersionFile"); - - migrationBuilder.DropColumn( - name: "PlatformType", - table: "AppPlatformVersion"); - - migrationBuilder.CreateIndex( - name: "IX_AppPlatformVersionFile_Name_Version", - table: "AppPlatformVersionFile", - columns: new[] { "Name", "Version" }); - } - } -} diff --git a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201203105205_Add-Menu-Layout-Data-And-More-Entity.Designer.cs b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201203105205_Add-Menu-Layout-Data-And-More-Entity.Designer.cs deleted file mode 100644 index 063d1f977..000000000 --- a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201203105205_Add-Menu-Layout-Data-And-More-Entity.Designer.cs +++ /dev/null @@ -1,637 +0,0 @@ -// -using System; -using LINGYUN.Platform.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -namespace LINGYUN.Platform.Migrations -{ - [DbContext(typeof(PlatformHttpApiHostMigrationsDbContext))] - [Migration("20201203105205_Add-Menu-Layout-Data-And-More-Entity")] - partial class AddMenuLayoutDataAndMoreEntity - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "3.1.8") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasColumnName("Code") - .HasColumnType("varchar(1024) CHARACTER SET utf8mb4") - .HasMaxLength(1024); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnName("Description") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("DisplayName") - .IsRequired() - .HasColumnName("DisplayName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name") - .HasColumnType("varchar(30) CHARACTER SET utf8mb4") - .HasMaxLength(30); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DataId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnName("Description") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("DisplayName") - .IsRequired() - .HasColumnName("DisplayName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name") - .HasColumnType("varchar(30) CHARACTER SET utf8mb4") - .HasMaxLength(30); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("Value") - .IsRequired() - .HasColumnName("Value") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - 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("Code") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DataId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("DisplayName") - .IsRequired() - .HasColumnName("DisplayName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("Path") - .HasColumnName("Path") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("PlatformType") - .HasColumnType("int"); - - b.Property("Redirect") - .HasColumnName("Redirect") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformLayouts"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.Menu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("Component") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("DisplayName") - .IsRequired() - .HasColumnName("DisplayName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("Path") - .HasColumnName("Path") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("PlatformType") - .HasColumnType("int"); - - b.Property("Redirect") - .HasColumnName("Redirect") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ParentId"); - - b.ToTable("AppPlatformMenus"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.RoleMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("RoleName") - .IsRequired() - .HasColumnName("RoleName") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnName("Description") - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasMaxLength(2048); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Level") - .HasColumnType("int"); - - b.Property("PlatformType") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("Title") - .IsRequired() - .HasColumnName("Title") - .HasColumnType("varchar(50) CHARACTER SET utf8mb4") - .HasMaxLength(50); - - b.Property("Version") - .IsRequired() - .HasColumnName("Version") - .HasColumnType("varchar(20) CHARACTER SET utf8mb4") - .HasMaxLength(20); - - 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") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DownloadCount") - .HasColumnType("int"); - - b.Property("FileType") - .HasColumnType("int"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("Path") - .HasColumnName("Path") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("SHA256") - .IsRequired() - .HasColumnName("SHA256") - .HasColumnType("varchar(65) CHARACTER SET utf8mb4") - .HasMaxLength(65); - - b.Property("Size") - .HasColumnType("bigint"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("Version") - .IsRequired() - .HasColumnName("Version") - .HasColumnType("varchar(20) CHARACTER SET utf8mb4") - .HasMaxLength(20); - - 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.Menus.Menu", b => - { - b.HasOne("LINGYUN.Platform.Menus.Menu", null) - .WithMany("Children") - .HasForeignKey("ParentId"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Versions.VersionFile", b => - { - b.HasOne("LINGYUN.Platform.Versions.AppVersion", "AppVersion") - .WithMany("Files") - .HasForeignKey("AppVersionId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201203105205_Add-Menu-Layout-Data-And-More-Entity.cs b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201203105205_Add-Menu-Layout-Data-And-More-Entity.cs deleted file mode 100644 index 482b88e52..000000000 --- a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201203105205_Add-Menu-Layout-Data-And-More-Entity.cs +++ /dev/null @@ -1,338 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace LINGYUN.Platform.Migrations -{ - public partial class AddMenuLayoutDataAndMoreEntity : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AppPlatformRoleRoute"); - - migrationBuilder.DropTable( - name: "AppPlatformRoute"); - - migrationBuilder.DropTable( - name: "AppPlatformUserRoute"); - - migrationBuilder.CreateTable( - name: "AppPlatformDatas", - columns: table => new - { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - LastModificationTime = table.Column(nullable: true), - LastModifierId = table.Column(nullable: true), - IsDeleted = table.Column(nullable: false, defaultValue: false), - DeleterId = table.Column(nullable: true), - DeletionTime = table.Column(nullable: true), - TenantId = table.Column(nullable: true), - Name = table.Column(maxLength: 30, nullable: false), - Code = table.Column(maxLength: 1024, nullable: false), - DisplayName = table.Column(maxLength: 128, nullable: false), - Description = table.Column(maxLength: 128, nullable: true), - ParentId = table.Column(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AppPlatformDatas", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AppPlatformLayouts", - columns: table => new - { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - LastModificationTime = table.Column(nullable: true), - LastModifierId = table.Column(nullable: true), - IsDeleted = table.Column(nullable: false, defaultValue: false), - DeleterId = table.Column(nullable: true), - DeletionTime = table.Column(nullable: true), - TenantId = table.Column(nullable: true), - Path = table.Column(maxLength: 255, nullable: true), - Name = table.Column(maxLength: 64, nullable: false), - DisplayName = table.Column(maxLength: 128, nullable: false), - Description = table.Column(nullable: true), - Redirect = table.Column(maxLength: 255, nullable: true), - Code = table.Column(nullable: true), - PlatformType = table.Column(nullable: false), - DataId = table.Column(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AppPlatformLayouts", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AppPlatformMenus", - columns: table => new - { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - LastModificationTime = table.Column(nullable: true), - LastModifierId = table.Column(nullable: true), - IsDeleted = table.Column(nullable: false, defaultValue: false), - DeleterId = table.Column(nullable: true), - DeletionTime = table.Column(nullable: true), - TenantId = table.Column(nullable: true), - Path = table.Column(maxLength: 255, nullable: true), - Name = table.Column(maxLength: 64, nullable: false), - DisplayName = table.Column(maxLength: 128, nullable: false), - Description = table.Column(nullable: true), - Redirect = table.Column(maxLength: 255, nullable: true), - PlatformType = table.Column(nullable: false), - Code = table.Column(nullable: true), - Component = table.Column(nullable: true), - ParentId = table.Column(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AppPlatformMenus", x => x.Id); - table.ForeignKey( - name: "FK_AppPlatformMenus_AppPlatformMenus_ParentId", - column: x => x.ParentId, - principalTable: "AppPlatformMenus", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "AppPlatformRoleMenus", - columns: table => new - { - Id = table.Column(nullable: false), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - LastModificationTime = table.Column(nullable: true), - LastModifierId = table.Column(nullable: true), - TenantId = table.Column(nullable: true), - MenuId = table.Column(nullable: false), - RoleName = table.Column(maxLength: 256, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AppPlatformRoleMenus", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AppPlatformUserMenus", - columns: table => new - { - Id = table.Column(nullable: false), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - LastModificationTime = table.Column(nullable: true), - LastModifierId = table.Column(nullable: true), - TenantId = table.Column(nullable: true), - MenuId = table.Column(nullable: false), - UserId = table.Column(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AppPlatformUserMenus", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AppPlatformDataItems", - columns: table => new - { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - LastModificationTime = table.Column(nullable: true), - LastModifierId = table.Column(nullable: true), - IsDeleted = table.Column(nullable: false, defaultValue: false), - DeleterId = table.Column(nullable: true), - DeletionTime = table.Column(nullable: true), - TenantId = table.Column(nullable: true), - Name = table.Column(maxLength: 30, nullable: false), - DisplayName = table.Column(maxLength: 128, nullable: false), - Value = table.Column(maxLength: 128, nullable: false), - Description = table.Column(maxLength: 128, nullable: true), - ValueType = table.Column(nullable: false), - DataId = table.Column(nullable: false) - }, - 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); - }); - - 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_AppPlatformMenus_ParentId", - table: "AppPlatformMenus", - column: "ParentId"); - - 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" }); - } - - 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: "AppPlatformDatas"); - - migrationBuilder.CreateTable( - name: "AppPlatformRoleRoute", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true), - DeleterId = table.Column(type: "char(36)", nullable: true), - DeletionTime = table.Column(type: "datetime(6)", nullable: true), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true), - RoleName = table.Column(type: "varchar(256) CHARACTER SET utf8mb4", maxLength: 256, nullable: false), - RouteId = table.Column(type: "char(36)", nullable: false), - TenantId = table.Column(type: "char(36)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AppPlatformRoleRoute", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AppPlatformRoute", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false), - AlwaysShow = table.Column(type: "tinyint(1)", nullable: false), - Code = table.Column(type: "varchar(95) CHARACTER SET utf8mb4", maxLength: 95, nullable: false), - ConcurrencyStamp = table.Column(type: "varchar(40) CHARACTER SET utf8mb4", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true), - DeleterId = table.Column(type: "char(36)", nullable: true), - DeletionTime = table.Column(type: "datetime(6)", nullable: true), - Description = table.Column(type: "varchar(255) CHARACTER SET utf8mb4", maxLength: 255, nullable: true), - DisplayName = table.Column(type: "varchar(128) CHARACTER SET utf8mb4", maxLength: 128, nullable: false), - ExtraProperties = table.Column(type: "longtext CHARACTER SET utf8mb4", nullable: true), - FullName = table.Column(type: "varchar(128) CHARACTER SET utf8mb4", maxLength: 128, nullable: true), - Icon = table.Column(type: "varchar(128) CHARACTER SET utf8mb4", maxLength: 128, nullable: true), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - IsMenu = table.Column(type: "tinyint(1)", nullable: false), - IsPublic = table.Column(type: "tinyint(1)", nullable: false), - IsSideBar = table.Column(type: "tinyint(1)", nullable: false), - IsStatic = table.Column(type: "tinyint(1)", nullable: false), - IsToolBar = table.Column(type: "tinyint(1)", nullable: false), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true), - LinkUrl = table.Column(type: "varchar(255) CHARACTER SET utf8mb4", maxLength: 255, nullable: false), - Name = table.Column(type: "varchar(64) CHARACTER SET utf8mb4", maxLength: 64, nullable: false), - ParentId = table.Column(type: "char(36)", nullable: true), - PlatformType = table.Column(type: "int", nullable: false), - TenantId = table.Column(type: "char(36)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AppPlatformRoute", x => x.Id); - table.ForeignKey( - name: "FK_AppPlatformRoute_AppPlatformRoute_ParentId", - column: x => x.ParentId, - principalTable: "AppPlatformRoute", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "AppPlatformUserRoute", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true), - DeleterId = table.Column(type: "char(36)", nullable: true), - DeletionTime = table.Column(type: "datetime(6)", nullable: true), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true), - RouteId = table.Column(type: "char(36)", nullable: false), - TenantId = table.Column(type: "char(36)", nullable: true), - UserId = table.Column(type: "char(36)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AppPlatformUserRoute", x => x.Id); - }); - - migrationBuilder.CreateIndex( - name: "IX_AppPlatformRoleRoute_RoleName_RouteId", - table: "AppPlatformRoleRoute", - columns: new[] { "RoleName", "RouteId" }); - - migrationBuilder.CreateIndex( - name: "IX_AppPlatformRoute_Code", - table: "AppPlatformRoute", - column: "Code"); - - migrationBuilder.CreateIndex( - name: "IX_AppPlatformRoute_ParentId", - table: "AppPlatformRoute", - column: "ParentId"); - - migrationBuilder.CreateIndex( - name: "IX_AppPlatformUserRoute_UserId_RouteId", - table: "AppPlatformUserRoute", - columns: new[] { "UserId", "RouteId" }); - } - } -} diff --git a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201204082313_Add-Data-Item-AllowBeNull-Field.Designer.cs b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201204082313_Add-Data-Item-AllowBeNull-Field.Designer.cs deleted file mode 100644 index 103485eb5..000000000 --- a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201204082313_Add-Data-Item-AllowBeNull-Field.Designer.cs +++ /dev/null @@ -1,643 +0,0 @@ -// -using System; -using LINGYUN.Platform.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -namespace LINGYUN.Platform.Migrations -{ - [DbContext(typeof(PlatformHttpApiHostMigrationsDbContext))] - [Migration("20201204082313_Add-Data-Item-AllowBeNull-Field")] - partial class AddDataItemAllowBeNullField - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "3.1.8") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasColumnName("Code") - .HasColumnType("varchar(1024) CHARACTER SET utf8mb4") - .HasMaxLength(1024); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnName("Description") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("DisplayName") - .IsRequired() - .HasColumnName("DisplayName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name") - .HasColumnType("varchar(30) CHARACTER SET utf8mb4") - .HasMaxLength(30); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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") - .HasColumnType("tinyint(1)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DataId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnName("Description") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("DisplayName") - .IsRequired() - .HasColumnName("DisplayName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name") - .HasColumnType("varchar(30) CHARACTER SET utf8mb4") - .HasMaxLength(30); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("Value") - .IsRequired() - .HasColumnName("Value") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - 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("Code") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DataId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("DisplayName") - .IsRequired() - .HasColumnName("DisplayName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("Path") - .HasColumnName("Path") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("PlatformType") - .HasColumnType("int"); - - b.Property("Redirect") - .HasColumnName("Redirect") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformLayouts"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.Menu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("Component") - .IsRequired() - .HasColumnName("Component") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("DisplayName") - .IsRequired() - .HasColumnName("DisplayName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("Path") - .HasColumnName("Path") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("PlatformType") - .HasColumnType("int"); - - b.Property("Redirect") - .HasColumnName("Redirect") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ParentId"); - - b.ToTable("AppPlatformMenus"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.RoleMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("RoleName") - .IsRequired() - .HasColumnName("RoleName") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnName("Description") - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasMaxLength(2048); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Level") - .HasColumnType("int"); - - b.Property("PlatformType") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("Title") - .IsRequired() - .HasColumnName("Title") - .HasColumnType("varchar(50) CHARACTER SET utf8mb4") - .HasMaxLength(50); - - b.Property("Version") - .IsRequired() - .HasColumnName("Version") - .HasColumnType("varchar(20) CHARACTER SET utf8mb4") - .HasMaxLength(20); - - 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") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DownloadCount") - .HasColumnType("int"); - - b.Property("FileType") - .HasColumnType("int"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("Path") - .HasColumnName("Path") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("SHA256") - .IsRequired() - .HasColumnName("SHA256") - .HasColumnType("varchar(65) CHARACTER SET utf8mb4") - .HasMaxLength(65); - - b.Property("Size") - .HasColumnType("bigint"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("Version") - .IsRequired() - .HasColumnName("Version") - .HasColumnType("varchar(20) CHARACTER SET utf8mb4") - .HasMaxLength(20); - - 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.Menus.Menu", b => - { - b.HasOne("LINGYUN.Platform.Menus.Menu", null) - .WithMany("Children") - .HasForeignKey("ParentId"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Versions.VersionFile", b => - { - b.HasOne("LINGYUN.Platform.Versions.AppVersion", "AppVersion") - .WithMany("Files") - .HasForeignKey("AppVersionId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201204082313_Add-Data-Item-AllowBeNull-Field.cs b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201204082313_Add-Data-Item-AllowBeNull-Field.cs deleted file mode 100644 index a2a963fd0..000000000 --- a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201204082313_Add-Data-Item-AllowBeNull-Field.cs +++ /dev/null @@ -1,40 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -namespace LINGYUN.Platform.Migrations -{ - public partial class AddDataItemAllowBeNullField : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "Component", - table: "AppPlatformMenus", - maxLength: 255, - nullable: false, - oldClrType: typeof(string), - oldType: "longtext CHARACTER SET utf8mb4", - oldNullable: true); - - migrationBuilder.AddColumn( - name: "AllowBeNull", - table: "AppPlatformDataItems", - nullable: false, - defaultValue: false); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "AllowBeNull", - table: "AppPlatformDataItems"); - - migrationBuilder.AlterColumn( - name: "Component", - table: "AppPlatformMenus", - type: "longtext CHARACTER SET utf8mb4", - nullable: true, - oldClrType: typeof(string), - oldMaxLength: 255); - } - } -} diff --git a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201204083250_Data-Description-Field-Allow-Be-Long.Designer.cs b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201204083250_Data-Description-Field-Allow-Be-Long.Designer.cs deleted file mode 100644 index 643bc76f4..000000000 --- a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201204083250_Data-Description-Field-Allow-Be-Long.Designer.cs +++ /dev/null @@ -1,645 +0,0 @@ -// -using System; -using LINGYUN.Platform.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -namespace LINGYUN.Platform.Migrations -{ - [DbContext(typeof(PlatformHttpApiHostMigrationsDbContext))] - [Migration("20201204083250_Data-Description-Field-Allow-Be-Long")] - partial class DataDescriptionFieldAllowBeLong - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "3.1.8") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasColumnName("Code") - .HasColumnType("varchar(1024) CHARACTER SET utf8mb4") - .HasMaxLength(1024); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnName("Description") - .HasColumnType("varchar(1024) CHARACTER SET utf8mb4") - .HasMaxLength(1024); - - b.Property("DisplayName") - .IsRequired() - .HasColumnName("DisplayName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name") - .HasColumnType("varchar(30) CHARACTER SET utf8mb4") - .HasMaxLength(30); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DataId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnName("Description") - .HasColumnType("varchar(1024) CHARACTER SET utf8mb4") - .HasMaxLength(1024); - - b.Property("DisplayName") - .IsRequired() - .HasColumnName("DisplayName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name") - .HasColumnType("varchar(30) CHARACTER SET utf8mb4") - .HasMaxLength(30); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("Value") - .IsRequired() - .HasColumnName("Value") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - 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("Code") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DataId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("DisplayName") - .IsRequired() - .HasColumnName("DisplayName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("Path") - .HasColumnName("Path") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("PlatformType") - .HasColumnType("int"); - - b.Property("Redirect") - .HasColumnName("Redirect") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformLayouts"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.Menu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("Component") - .IsRequired() - .HasColumnName("Component") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("DisplayName") - .IsRequired() - .HasColumnName("DisplayName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("Path") - .HasColumnName("Path") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("PlatformType") - .HasColumnType("int"); - - b.Property("Redirect") - .HasColumnName("Redirect") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ParentId"); - - b.ToTable("AppPlatformMenus"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.RoleMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("RoleName") - .IsRequired() - .HasColumnName("RoleName") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnName("Description") - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasMaxLength(2048); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Level") - .HasColumnType("int"); - - b.Property("PlatformType") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("Title") - .IsRequired() - .HasColumnName("Title") - .HasColumnType("varchar(50) CHARACTER SET utf8mb4") - .HasMaxLength(50); - - b.Property("Version") - .IsRequired() - .HasColumnName("Version") - .HasColumnType("varchar(20) CHARACTER SET utf8mb4") - .HasMaxLength(20); - - 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") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DownloadCount") - .HasColumnType("int"); - - b.Property("FileType") - .HasColumnType("int"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("Path") - .HasColumnName("Path") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("SHA256") - .IsRequired() - .HasColumnName("SHA256") - .HasColumnType("varchar(65) CHARACTER SET utf8mb4") - .HasMaxLength(65); - - b.Property("Size") - .HasColumnType("bigint"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("Version") - .IsRequired() - .HasColumnName("Version") - .HasColumnType("varchar(20) CHARACTER SET utf8mb4") - .HasMaxLength(20); - - 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.Menus.Menu", b => - { - b.HasOne("LINGYUN.Platform.Menus.Menu", null) - .WithMany("Children") - .HasForeignKey("ParentId"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Versions.VersionFile", b => - { - b.HasOne("LINGYUN.Platform.Versions.AppVersion", "AppVersion") - .WithMany("Files") - .HasForeignKey("AppVersionId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201204083250_Data-Description-Field-Allow-Be-Long.cs b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201204083250_Data-Description-Field-Allow-Be-Long.cs deleted file mode 100644 index f143e72aa..000000000 --- a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201204083250_Data-Description-Field-Allow-Be-Long.cs +++ /dev/null @@ -1,69 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -namespace LINGYUN.Platform.Migrations -{ - public partial class DataDescriptionFieldAllowBeLong : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "Description", - table: "AppPlatformDatas", - maxLength: 1024, - nullable: true, - oldClrType: typeof(string), - oldType: "varchar(128) CHARACTER SET utf8mb4", - oldMaxLength: 128, - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "Description", - table: "AppPlatformDataItems", - maxLength: 1024, - nullable: true, - oldClrType: typeof(string), - oldType: "varchar(128) CHARACTER SET utf8mb4", - oldMaxLength: 128, - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "AllowBeNull", - table: "AppPlatformDataItems", - nullable: false, - defaultValue: true, - oldClrType: typeof(bool), - oldType: "tinyint(1)"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "Description", - table: "AppPlatformDatas", - type: "varchar(128) CHARACTER SET utf8mb4", - maxLength: 128, - nullable: true, - oldClrType: typeof(string), - oldMaxLength: 1024, - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "Description", - table: "AppPlatformDataItems", - type: "varchar(128) CHARACTER SET utf8mb4", - maxLength: 128, - nullable: true, - oldClrType: typeof(string), - oldMaxLength: 1024, - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "AllowBeNull", - table: "AppPlatformDataItems", - type: "tinyint(1)", - nullable: false, - oldClrType: typeof(bool), - oldDefaultValue: true); - } - } -} diff --git a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201204093329_Menu-Code-Limit-Length.Designer.cs b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201204093329_Menu-Code-Limit-Length.Designer.cs deleted file mode 100644 index 729ff54c7..000000000 --- a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201204093329_Menu-Code-Limit-Length.Designer.cs +++ /dev/null @@ -1,649 +0,0 @@ -// -using System; -using LINGYUN.Platform.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -namespace LINGYUN.Platform.Migrations -{ - [DbContext(typeof(PlatformHttpApiHostMigrationsDbContext))] - [Migration("20201204093329_Menu-Code-Limit-Length")] - partial class MenuCodeLimitLength - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "3.1.8") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasColumnName("Code") - .HasColumnType("varchar(1024) CHARACTER SET utf8mb4") - .HasMaxLength(1024); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnName("Description") - .HasColumnType("varchar(1024) CHARACTER SET utf8mb4") - .HasMaxLength(1024); - - b.Property("DisplayName") - .IsRequired() - .HasColumnName("DisplayName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name") - .HasColumnType("varchar(30) CHARACTER SET utf8mb4") - .HasMaxLength(30); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DataId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnName("Description") - .HasColumnType("varchar(1024) CHARACTER SET utf8mb4") - .HasMaxLength(1024); - - b.Property("DisplayName") - .IsRequired() - .HasColumnName("DisplayName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name") - .HasColumnType("varchar(30) CHARACTER SET utf8mb4") - .HasMaxLength(30); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("Value") - .IsRequired() - .HasColumnName("Value") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - 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("Code") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DataId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("DisplayName") - .IsRequired() - .HasColumnName("DisplayName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("Path") - .HasColumnName("Path") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("PlatformType") - .HasColumnType("int"); - - b.Property("Redirect") - .HasColumnName("Redirect") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformLayouts"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.Menu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasColumnName("Code") - .HasColumnType("varchar(23) CHARACTER SET utf8mb4") - .HasMaxLength(23); - - b.Property("Component") - .IsRequired() - .HasColumnName("Component") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("DisplayName") - .IsRequired() - .HasColumnName("DisplayName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("Path") - .HasColumnName("Path") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("PlatformType") - .HasColumnType("int"); - - b.Property("Redirect") - .HasColumnName("Redirect") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ParentId"); - - b.ToTable("AppPlatformMenus"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.RoleMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("RoleName") - .IsRequired() - .HasColumnName("RoleName") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnName("Description") - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasMaxLength(2048); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Level") - .HasColumnType("int"); - - b.Property("PlatformType") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("Title") - .IsRequired() - .HasColumnName("Title") - .HasColumnType("varchar(50) CHARACTER SET utf8mb4") - .HasMaxLength(50); - - b.Property("Version") - .IsRequired() - .HasColumnName("Version") - .HasColumnType("varchar(20) CHARACTER SET utf8mb4") - .HasMaxLength(20); - - 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") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DownloadCount") - .HasColumnType("int"); - - b.Property("FileType") - .HasColumnType("int"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("Path") - .HasColumnName("Path") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("SHA256") - .IsRequired() - .HasColumnName("SHA256") - .HasColumnType("varchar(65) CHARACTER SET utf8mb4") - .HasMaxLength(65); - - b.Property("Size") - .HasColumnType("bigint"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("Version") - .IsRequired() - .HasColumnName("Version") - .HasColumnType("varchar(20) CHARACTER SET utf8mb4") - .HasMaxLength(20); - - 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.Menus.Menu", b => - { - b.HasOne("LINGYUN.Platform.Menus.Menu", null) - .WithMany("Children") - .HasForeignKey("ParentId") - .OnDelete(DeleteBehavior.Restrict); - }); - - modelBuilder.Entity("LINGYUN.Platform.Versions.VersionFile", b => - { - b.HasOne("LINGYUN.Platform.Versions.AppVersion", "AppVersion") - .WithMany("Files") - .HasForeignKey("AppVersionId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201204093329_Menu-Code-Limit-Length.cs b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201204093329_Menu-Code-Limit-Length.cs deleted file mode 100644 index 6155be9c7..000000000 --- a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201204093329_Menu-Code-Limit-Length.cs +++ /dev/null @@ -1,30 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -namespace LINGYUN.Platform.Migrations -{ - public partial class MenuCodeLimitLength : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "Code", - table: "AppPlatformMenus", - maxLength: 23, - nullable: false, - oldClrType: typeof(string), - oldType: "longtext CHARACTER SET utf8mb4", - oldNullable: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "Code", - table: "AppPlatformMenus", - type: "longtext CHARACTER SET utf8mb4", - nullable: true, - oldClrType: typeof(string), - oldMaxLength: 23); - } - } -} diff --git a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201208082630_Remove-Menu-Children.Designer.cs b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201208082630_Remove-Menu-Children.Designer.cs deleted file mode 100644 index f9b25e086..000000000 --- a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201208082630_Remove-Menu-Children.Designer.cs +++ /dev/null @@ -1,639 +0,0 @@ -// -using System; -using LINGYUN.Platform.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -namespace LINGYUN.Platform.Migrations -{ - [DbContext(typeof(PlatformHttpApiHostMigrationsDbContext))] - [Migration("20201208082630_Remove-Menu-Children")] - partial class RemoveMenuChildren - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "3.1.8") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasColumnName("Code") - .HasColumnType("varchar(1024) CHARACTER SET utf8mb4") - .HasMaxLength(1024); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnName("Description") - .HasColumnType("varchar(1024) CHARACTER SET utf8mb4") - .HasMaxLength(1024); - - b.Property("DisplayName") - .IsRequired() - .HasColumnName("DisplayName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name") - .HasColumnType("varchar(30) CHARACTER SET utf8mb4") - .HasMaxLength(30); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DataId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnName("Description") - .HasColumnType("varchar(1024) CHARACTER SET utf8mb4") - .HasMaxLength(1024); - - b.Property("DisplayName") - .IsRequired() - .HasColumnName("DisplayName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name") - .HasColumnType("varchar(30) CHARACTER SET utf8mb4") - .HasMaxLength(30); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("Value") - .IsRequired() - .HasColumnName("Value") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - 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("Code") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DataId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("DisplayName") - .IsRequired() - .HasColumnName("DisplayName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("Path") - .HasColumnName("Path") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("PlatformType") - .HasColumnType("int"); - - b.Property("Redirect") - .HasColumnName("Redirect") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformLayouts"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.Menu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasColumnName("Code") - .HasColumnType("varchar(23) CHARACTER SET utf8mb4") - .HasMaxLength(23); - - b.Property("Component") - .IsRequired() - .HasColumnName("Component") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("DisplayName") - .IsRequired() - .HasColumnName("DisplayName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("Path") - .HasColumnName("Path") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("PlatformType") - .HasColumnType("int"); - - b.Property("Redirect") - .HasColumnName("Redirect") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformMenus"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.RoleMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("RoleName") - .IsRequired() - .HasColumnName("RoleName") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnName("Description") - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasMaxLength(2048); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Level") - .HasColumnType("int"); - - b.Property("PlatformType") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("Title") - .IsRequired() - .HasColumnName("Title") - .HasColumnType("varchar(50) CHARACTER SET utf8mb4") - .HasMaxLength(50); - - b.Property("Version") - .IsRequired() - .HasColumnName("Version") - .HasColumnType("varchar(20) CHARACTER SET utf8mb4") - .HasMaxLength(20); - - 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") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DownloadCount") - .HasColumnType("int"); - - b.Property("FileType") - .HasColumnType("int"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("Path") - .HasColumnName("Path") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("SHA256") - .IsRequired() - .HasColumnName("SHA256") - .HasColumnType("varchar(65) CHARACTER SET utf8mb4") - .HasMaxLength(65); - - b.Property("Size") - .HasColumnType("bigint"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("Version") - .IsRequired() - .HasColumnName("Version") - .HasColumnType("varchar(20) CHARACTER SET utf8mb4") - .HasMaxLength(20); - - 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(); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201208082630_Remove-Menu-Children.cs b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201208082630_Remove-Menu-Children.cs deleted file mode 100644 index a71f4cbaf..000000000 --- a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201208082630_Remove-Menu-Children.cs +++ /dev/null @@ -1,34 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -namespace LINGYUN.Platform.Migrations -{ - public partial class RemoveMenuChildren : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropForeignKey( - name: "FK_AppPlatformMenus_AppPlatformMenus_ParentId", - table: "AppPlatformMenus"); - - migrationBuilder.DropIndex( - name: "IX_AppPlatformMenus_ParentId", - table: "AppPlatformMenus"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateIndex( - name: "IX_AppPlatformMenus_ParentId", - table: "AppPlatformMenus", - column: "ParentId"); - - migrationBuilder.AddForeignKey( - name: "FK_AppPlatformMenus_AppPlatformMenus_ParentId", - table: "AppPlatformMenus", - column: "ParentId", - principalTable: "AppPlatformMenus", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - } - } -} diff --git a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201219031303_Rename-Data-Item-Value-To-DefaultValue.Designer.cs b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201219031303_Rename-Data-Item-Value-To-DefaultValue.Designer.cs deleted file mode 100644 index e1b3a780f..000000000 --- a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201219031303_Rename-Data-Item-Value-To-DefaultValue.Designer.cs +++ /dev/null @@ -1,638 +0,0 @@ -// -using System; -using LINGYUN.Platform.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -namespace LINGYUN.Platform.Migrations -{ - [DbContext(typeof(PlatformHttpApiHostMigrationsDbContext))] - [Migration("20201219031303_Rename-Data-Item-Value-To-DefaultValue")] - partial class RenameDataItemValueToDefaultValue - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "3.1.8") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasColumnName("Code") - .HasColumnType("varchar(1024) CHARACTER SET utf8mb4") - .HasMaxLength(1024); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnName("Description") - .HasColumnType("varchar(1024) CHARACTER SET utf8mb4") - .HasMaxLength(1024); - - b.Property("DisplayName") - .IsRequired() - .HasColumnName("DisplayName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name") - .HasColumnType("varchar(30) CHARACTER SET utf8mb4") - .HasMaxLength(30); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DataId") - .HasColumnType("char(36)"); - - b.Property("DefaultValue") - .HasColumnName("DefaultValue") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnName("Description") - .HasColumnType("varchar(1024) CHARACTER SET utf8mb4") - .HasMaxLength(1024); - - b.Property("DisplayName") - .IsRequired() - .HasColumnName("DisplayName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name") - .HasColumnType("varchar(30) CHARACTER SET utf8mb4") - .HasMaxLength(30); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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("Code") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DataId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("DisplayName") - .IsRequired() - .HasColumnName("DisplayName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("Path") - .HasColumnName("Path") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("PlatformType") - .HasColumnType("int"); - - b.Property("Redirect") - .HasColumnName("Redirect") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformLayouts"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.Menu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasColumnName("Code") - .HasColumnType("varchar(23) CHARACTER SET utf8mb4") - .HasMaxLength(23); - - b.Property("Component") - .IsRequired() - .HasColumnName("Component") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("DisplayName") - .IsRequired() - .HasColumnName("DisplayName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("Path") - .HasColumnName("Path") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("PlatformType") - .HasColumnType("int"); - - b.Property("Redirect") - .HasColumnName("Redirect") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformMenus"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.RoleMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("RoleName") - .IsRequired() - .HasColumnName("RoleName") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnName("Description") - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasMaxLength(2048); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Level") - .HasColumnType("int"); - - b.Property("PlatformType") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("Title") - .IsRequired() - .HasColumnName("Title") - .HasColumnType("varchar(50) CHARACTER SET utf8mb4") - .HasMaxLength(50); - - b.Property("Version") - .IsRequired() - .HasColumnName("Version") - .HasColumnType("varchar(20) CHARACTER SET utf8mb4") - .HasMaxLength(20); - - 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") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DownloadCount") - .HasColumnType("int"); - - b.Property("FileType") - .HasColumnType("int"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("Path") - .HasColumnName("Path") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("SHA256") - .IsRequired() - .HasColumnName("SHA256") - .HasColumnType("varchar(65) CHARACTER SET utf8mb4") - .HasMaxLength(65); - - b.Property("Size") - .HasColumnType("bigint"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("Version") - .IsRequired() - .HasColumnName("Version") - .HasColumnType("varchar(20) CHARACTER SET utf8mb4") - .HasMaxLength(20); - - 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(); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201219031303_Rename-Data-Item-Value-To-DefaultValue.cs b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201219031303_Rename-Data-Item-Value-To-DefaultValue.cs deleted file mode 100644 index dca448a80..000000000 --- a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201219031303_Rename-Data-Item-Value-To-DefaultValue.cs +++ /dev/null @@ -1,35 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -namespace LINGYUN.Platform.Migrations -{ - public partial class RenameDataItemValueToDefaultValue : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "Value", - table: "AppPlatformDataItems"); - - migrationBuilder.AddColumn( - name: "DefaultValue", - table: "AppPlatformDataItems", - maxLength: 128, - nullable: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "DefaultValue", - table: "AppPlatformDataItems"); - - migrationBuilder.AddColumn( - name: "Value", - table: "AppPlatformDataItems", - type: "varchar(128) CHARACTER SET utf8mb4", - maxLength: 128, - nullable: false, - defaultValue: ""); - } - } -} diff --git a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201219092956_Add-Layout-Id-Column-To-Menu.Designer.cs b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201219092956_Add-Layout-Id-Column-To-Menu.Designer.cs deleted file mode 100644 index da24916ef..000000000 --- a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201219092956_Add-Layout-Id-Column-To-Menu.Designer.cs +++ /dev/null @@ -1,641 +0,0 @@ -// -using System; -using LINGYUN.Platform.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -namespace LINGYUN.Platform.Migrations -{ - [DbContext(typeof(PlatformHttpApiHostMigrationsDbContext))] - [Migration("20201219092956_Add-Layout-Id-Column-To-Menu")] - partial class AddLayoutIdColumnToMenu - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "3.1.8") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasColumnName("Code") - .HasColumnType("varchar(1024) CHARACTER SET utf8mb4") - .HasMaxLength(1024); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnName("Description") - .HasColumnType("varchar(1024) CHARACTER SET utf8mb4") - .HasMaxLength(1024); - - b.Property("DisplayName") - .IsRequired() - .HasColumnName("DisplayName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name") - .HasColumnType("varchar(30) CHARACTER SET utf8mb4") - .HasMaxLength(30); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DataId") - .HasColumnType("char(36)"); - - b.Property("DefaultValue") - .HasColumnName("DefaultValue") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnName("Description") - .HasColumnType("varchar(1024) CHARACTER SET utf8mb4") - .HasMaxLength(1024); - - b.Property("DisplayName") - .IsRequired() - .HasColumnName("DisplayName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name") - .HasColumnType("varchar(30) CHARACTER SET utf8mb4") - .HasMaxLength(30); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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("Code") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DataId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("DisplayName") - .IsRequired() - .HasColumnName("DisplayName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("Path") - .HasColumnName("Path") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("PlatformType") - .HasColumnType("int"); - - b.Property("Redirect") - .HasColumnName("Redirect") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformLayouts"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.Menu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasColumnName("Code") - .HasColumnType("varchar(23) CHARACTER SET utf8mb4") - .HasMaxLength(23); - - b.Property("Component") - .IsRequired() - .HasColumnName("Component") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("DisplayName") - .IsRequired() - .HasColumnName("DisplayName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("LayoutId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("Path") - .HasColumnName("Path") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("PlatformType") - .HasColumnType("int"); - - b.Property("Redirect") - .HasColumnName("Redirect") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformMenus"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.RoleMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("RoleName") - .IsRequired() - .HasColumnName("RoleName") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnName("Description") - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasMaxLength(2048); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Level") - .HasColumnType("int"); - - b.Property("PlatformType") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("Title") - .IsRequired() - .HasColumnName("Title") - .HasColumnType("varchar(50) CHARACTER SET utf8mb4") - .HasMaxLength(50); - - b.Property("Version") - .IsRequired() - .HasColumnName("Version") - .HasColumnType("varchar(20) CHARACTER SET utf8mb4") - .HasMaxLength(20); - - 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") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DownloadCount") - .HasColumnType("int"); - - b.Property("FileType") - .HasColumnType("int"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("Path") - .HasColumnName("Path") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("SHA256") - .IsRequired() - .HasColumnName("SHA256") - .HasColumnType("varchar(65) CHARACTER SET utf8mb4") - .HasMaxLength(65); - - b.Property("Size") - .HasColumnType("bigint"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("Version") - .IsRequired() - .HasColumnName("Version") - .HasColumnType("varchar(20) CHARACTER SET utf8mb4") - .HasMaxLength(20); - - 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(); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201219092956_Add-Layout-Id-Column-To-Menu.cs b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201219092956_Add-Layout-Id-Column-To-Menu.cs deleted file mode 100644 index 1519dee5b..000000000 --- a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201219092956_Add-Layout-Id-Column-To-Menu.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace LINGYUN.Platform.Migrations -{ - public partial class AddLayoutIdColumnToMenu : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "LayoutId", - table: "AppPlatformMenus", - nullable: false, - defaultValue: new Guid("00000000-0000-0000-0000-000000000000")); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "LayoutId", - table: "AppPlatformMenus"); - } - } -} diff --git a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201221061225_Add-Is-Public-Column-To-Menu.Designer.cs b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201221061225_Add-Is-Public-Column-To-Menu.Designer.cs deleted file mode 100644 index 5f27b7874..000000000 --- a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201221061225_Add-Is-Public-Column-To-Menu.Designer.cs +++ /dev/null @@ -1,644 +0,0 @@ -// -using System; -using LINGYUN.Platform.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -namespace LINGYUN.Platform.Migrations -{ - [DbContext(typeof(PlatformHttpApiHostMigrationsDbContext))] - [Migration("20201221061225_Add-Is-Public-Column-To-Menu")] - partial class AddIsPublicColumnToMenu - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "3.1.8") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasColumnName("Code") - .HasColumnType("varchar(1024) CHARACTER SET utf8mb4") - .HasMaxLength(1024); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnName("Description") - .HasColumnType("varchar(1024) CHARACTER SET utf8mb4") - .HasMaxLength(1024); - - b.Property("DisplayName") - .IsRequired() - .HasColumnName("DisplayName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name") - .HasColumnType("varchar(30) CHARACTER SET utf8mb4") - .HasMaxLength(30); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DataId") - .HasColumnType("char(36)"); - - b.Property("DefaultValue") - .HasColumnName("DefaultValue") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnName("Description") - .HasColumnType("varchar(1024) CHARACTER SET utf8mb4") - .HasMaxLength(1024); - - b.Property("DisplayName") - .IsRequired() - .HasColumnName("DisplayName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name") - .HasColumnType("varchar(30) CHARACTER SET utf8mb4") - .HasMaxLength(30); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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("Code") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DataId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("DisplayName") - .IsRequired() - .HasColumnName("DisplayName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("Path") - .HasColumnName("Path") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("PlatformType") - .HasColumnType("int"); - - b.Property("Redirect") - .HasColumnName("Redirect") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformLayouts"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.Menu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasColumnName("Code") - .HasColumnType("varchar(23) CHARACTER SET utf8mb4") - .HasMaxLength(23); - - b.Property("Component") - .IsRequired() - .HasColumnName("Component") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("DisplayName") - .IsRequired() - .HasColumnName("DisplayName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("LayoutId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("Path") - .HasColumnName("Path") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("PlatformType") - .HasColumnType("int"); - - b.Property("Redirect") - .HasColumnName("Redirect") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformMenus"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.RoleMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("RoleName") - .IsRequired() - .HasColumnName("RoleName") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnName("Description") - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasMaxLength(2048); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Level") - .HasColumnType("int"); - - b.Property("PlatformType") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("Title") - .IsRequired() - .HasColumnName("Title") - .HasColumnType("varchar(50) CHARACTER SET utf8mb4") - .HasMaxLength(50); - - b.Property("Version") - .IsRequired() - .HasColumnName("Version") - .HasColumnType("varchar(20) CHARACTER SET utf8mb4") - .HasMaxLength(20); - - 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") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DownloadCount") - .HasColumnType("int"); - - b.Property("FileType") - .HasColumnType("int"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("Path") - .HasColumnName("Path") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("SHA256") - .IsRequired() - .HasColumnName("SHA256") - .HasColumnType("varchar(65) CHARACTER SET utf8mb4") - .HasMaxLength(65); - - b.Property("Size") - .HasColumnType("bigint"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("Version") - .IsRequired() - .HasColumnName("Version") - .HasColumnType("varchar(20) CHARACTER SET utf8mb4") - .HasMaxLength(20); - - 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(); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201221061225_Add-Is-Public-Column-To-Menu.cs b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201221061225_Add-Is-Public-Column-To-Menu.cs deleted file mode 100644 index 89516b7f7..000000000 --- a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201221061225_Add-Is-Public-Column-To-Menu.cs +++ /dev/null @@ -1,23 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -namespace LINGYUN.Platform.Migrations -{ - public partial class AddIsPublicColumnToMenu : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "IsPublic", - table: "AppPlatformMenus", - nullable: false, - defaultValue: false); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "IsPublic", - table: "AppPlatformMenus"); - } - } -} diff --git a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201221093615_Remove-Layout-Column-Code.Designer.cs b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201221093615_Remove-Layout-Column-Code.Designer.cs deleted file mode 100644 index ea6e12d93..000000000 --- a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201221093615_Remove-Layout-Column-Code.Designer.cs +++ /dev/null @@ -1,641 +0,0 @@ -// -using System; -using LINGYUN.Platform.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -namespace LINGYUN.Platform.Migrations -{ - [DbContext(typeof(PlatformHttpApiHostMigrationsDbContext))] - [Migration("20201221093615_Remove-Layout-Column-Code")] - partial class RemoveLayoutColumnCode - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "3.1.8") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasColumnName("Code") - .HasColumnType("varchar(1024) CHARACTER SET utf8mb4") - .HasMaxLength(1024); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnName("Description") - .HasColumnType("varchar(1024) CHARACTER SET utf8mb4") - .HasMaxLength(1024); - - b.Property("DisplayName") - .IsRequired() - .HasColumnName("DisplayName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name") - .HasColumnType("varchar(30) CHARACTER SET utf8mb4") - .HasMaxLength(30); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DataId") - .HasColumnType("char(36)"); - - b.Property("DefaultValue") - .HasColumnName("DefaultValue") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnName("Description") - .HasColumnType("varchar(1024) CHARACTER SET utf8mb4") - .HasMaxLength(1024); - - b.Property("DisplayName") - .IsRequired() - .HasColumnName("DisplayName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name") - .HasColumnType("varchar(30) CHARACTER SET utf8mb4") - .HasMaxLength(30); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DataId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("DisplayName") - .IsRequired() - .HasColumnName("DisplayName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("Path") - .HasColumnName("Path") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("PlatformType") - .HasColumnType("int"); - - b.Property("Redirect") - .HasColumnName("Redirect") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformLayouts"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.Menu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasColumnName("Code") - .HasColumnType("varchar(23) CHARACTER SET utf8mb4") - .HasMaxLength(23); - - b.Property("Component") - .IsRequired() - .HasColumnName("Component") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("DisplayName") - .IsRequired() - .HasColumnName("DisplayName") - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("LayoutId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name") - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") - .HasMaxLength(64); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("Path") - .HasColumnName("Path") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("PlatformType") - .HasColumnType("int"); - - b.Property("Redirect") - .HasColumnName("Redirect") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformMenus"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.RoleMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("RoleName") - .IsRequired() - .HasColumnName("RoleName") - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") - .HasMaxLength(256); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - 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() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("char(36)"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .HasColumnName("Description") - .HasColumnType("longtext CHARACTER SET utf8mb4") - .HasMaxLength(2048); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("tinyint(1)") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Level") - .HasColumnType("int"); - - b.Property("PlatformType") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("Title") - .IsRequired() - .HasColumnName("Title") - .HasColumnType("varchar(50) CHARACTER SET utf8mb4") - .HasMaxLength(50); - - b.Property("Version") - .IsRequired() - .HasColumnName("Version") - .HasColumnType("varchar(20) CHARACTER SET utf8mb4") - .HasMaxLength(20); - - 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") - .HasColumnName("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("char(36)"); - - b.Property("DownloadCount") - .HasColumnType("int"); - - b.Property("FileType") - .HasColumnType("int"); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasColumnName("Name") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("Path") - .HasColumnName("Path") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); - - b.Property("SHA256") - .IsRequired() - .HasColumnName("SHA256") - .HasColumnType("varchar(65) CHARACTER SET utf8mb4") - .HasMaxLength(65); - - b.Property("Size") - .HasColumnType("bigint"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("char(36)"); - - b.Property("Version") - .IsRequired() - .HasColumnName("Version") - .HasColumnType("varchar(20) CHARACTER SET utf8mb4") - .HasMaxLength(20); - - 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(); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201221093615_Remove-Layout-Column-Code.cs b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201221093615_Remove-Layout-Column-Code.cs deleted file mode 100644 index 3dc9febef..000000000 --- a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20201221093615_Remove-Layout-Column-Code.cs +++ /dev/null @@ -1,23 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -namespace LINGYUN.Platform.Migrations -{ - public partial class RemoveLayoutColumnCode : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "Code", - table: "AppPlatformLayouts"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "Code", - table: "AppPlatformLayouts", - type: "longtext CHARACTER SET utf8mb4", - nullable: true); - } - } -} diff --git a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20210621020117_Rename-Route-Field-PlantType-To-Framework.cs b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20210621020117_Rename-Route-Field-PlantType-To-Framework.cs deleted file mode 100644 index fa13fc86a..000000000 --- a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20210621020117_Rename-Route-Field-PlantType-To-Framework.cs +++ /dev/null @@ -1,81 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -namespace LINGYUN.Platform.Migrations -{ - public partial class RenameRouteFieldPlantTypeToFramework : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "PlatformType", - table: "AppPlatformMenus"); - - migrationBuilder.DropColumn( - name: "PlatformType", - table: "AppPlatformLayouts"); - - migrationBuilder.AddColumn( - name: "Framework", - table: "AppPlatformMenus", - type: "varchar(64) CHARACTER SET utf8mb4", - maxLength: 64, - nullable: false, - defaultValue: ""); - - migrationBuilder.AddColumn( - name: "Framework", - table: "AppPlatformLayouts", - type: "varchar(64) CHARACTER SET utf8mb4", - maxLength: 64, - nullable: false, - defaultValue: ""); - - migrationBuilder.AddColumn( - name: "IsStatic", - table: "AppPlatformDatas", - type: "tinyint(1)", - nullable: false, - defaultValue: false); - - migrationBuilder.AddColumn( - name: "IsStatic", - table: "AppPlatformDataItems", - type: "tinyint(1)", - nullable: false, - defaultValue: false); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "Framework", - table: "AppPlatformMenus"); - - migrationBuilder.DropColumn( - name: "Framework", - table: "AppPlatformLayouts"); - - migrationBuilder.DropColumn( - name: "IsStatic", - table: "AppPlatformDatas"); - - migrationBuilder.DropColumn( - name: "IsStatic", - table: "AppPlatformDataItems"); - - migrationBuilder.AddColumn( - name: "PlatformType", - table: "AppPlatformMenus", - type: "int", - nullable: false, - defaultValue: 0); - - migrationBuilder.AddColumn( - name: "PlatformType", - table: "AppPlatformLayouts", - type: "int", - nullable: false, - defaultValue: 0); - } - } -} diff --git a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20210621020117_Rename-Route-Field-PlantType-To-Framework.Designer.cs b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20211030132911_Re-Initlize-Db-Migration.Designer.cs similarity index 85% rename from aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20210621020117_Rename-Route-Field-PlantType-To-Framework.Designer.cs rename to aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20211030132911_Re-Initlize-Db-Migration.Designer.cs index 07f38236f..060c242da 100644 --- a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20210621020117_Rename-Route-Field-PlantType-To-Framework.Designer.cs +++ b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20211030132911_Re-Initlize-Db-Migration.Designer.cs @@ -10,8 +10,8 @@ using Volo.Abp.EntityFrameworkCore; namespace LINGYUN.Platform.Migrations { [DbContext(typeof(PlatformHttpApiHostMigrationsDbContext))] - [Migration("20210621020117_Rename-Route-Field-PlantType-To-Framework")] - partial class RenameRouteFieldPlantTypeToFramework + [Migration("20211030132911_Re-Initlize-Db-Migration")] + partial class ReInitlizeDbMigration { protected override void BuildTargetModel(ModelBuilder modelBuilder) { @@ -19,7 +19,7 @@ namespace LINGYUN.Platform.Migrations modelBuilder .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) .HasAnnotation("Relational:MaxIdentifierLength", 64) - .HasAnnotation("ProductVersion", "5.0.7"); + .HasAnnotation("ProductVersion", "5.0.11"); modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => { @@ -30,13 +30,13 @@ namespace LINGYUN.Platform.Migrations b.Property("Code") .IsRequired() .HasMaxLength(1024) - .HasColumnType("varchar(1024) CHARACTER SET utf8mb4") + .HasColumnType("varchar(1024)") .HasColumnName("Code"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") + .HasColumnType("varchar(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") @@ -57,17 +57,17 @@ namespace LINGYUN.Platform.Migrations b.Property("Description") .HasMaxLength(1024) - .HasColumnType("varchar(1024) CHARACTER SET utf8mb4") + .HasColumnType("varchar(1024)") .HasColumnName("Description"); b.Property("DisplayName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") + .HasColumnType("varchar(128)") .HasColumnName("DisplayName"); b.Property("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4") + .HasColumnType("longtext") .HasColumnName("ExtraProperties"); b.Property("IsDeleted") @@ -90,7 +90,7 @@ namespace LINGYUN.Platform.Migrations b.Property("Name") .IsRequired() .HasMaxLength(30) - .HasColumnType("varchar(30) CHARACTER SET utf8mb4") + .HasColumnType("varchar(30)") .HasColumnName("Name"); b.Property("ParentId") @@ -121,7 +121,7 @@ namespace LINGYUN.Platform.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") + .HasColumnType("varchar(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") @@ -137,7 +137,7 @@ namespace LINGYUN.Platform.Migrations b.Property("DefaultValue") .HasMaxLength(128) - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") + .HasColumnType("varchar(128)") .HasColumnName("DefaultValue"); b.Property("DeleterId") @@ -150,17 +150,17 @@ namespace LINGYUN.Platform.Migrations b.Property("Description") .HasMaxLength(1024) - .HasColumnType("varchar(1024) CHARACTER SET utf8mb4") + .HasColumnType("varchar(1024)") .HasColumnName("Description"); b.Property("DisplayName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") + .HasColumnType("varchar(128)") .HasColumnName("DisplayName"); b.Property("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4") + .HasColumnType("longtext") .HasColumnName("ExtraProperties"); b.Property("IsDeleted") @@ -183,7 +183,7 @@ namespace LINGYUN.Platform.Migrations b.Property("Name") .IsRequired() .HasMaxLength(30) - .HasColumnType("varchar(30) CHARACTER SET utf8mb4") + .HasColumnType("varchar(30)") .HasColumnName("Name"); b.Property("TenantId") @@ -211,7 +211,7 @@ namespace LINGYUN.Platform.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") + .HasColumnType("varchar(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") @@ -234,22 +234,22 @@ namespace LINGYUN.Platform.Migrations .HasColumnName("DeletionTime"); b.Property("Description") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("DisplayName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") + .HasColumnType("varchar(128)") .HasColumnName("DisplayName"); b.Property("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4") + .HasColumnType("longtext") .HasColumnName("ExtraProperties"); b.Property("Framework") .IsRequired() .HasMaxLength(64) - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") + .HasColumnType("varchar(64)") .HasColumnName("Framework"); b.Property("IsDeleted") @@ -269,17 +269,17 @@ namespace LINGYUN.Platform.Migrations b.Property("Name") .IsRequired() .HasMaxLength(64) - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") + .HasColumnType("varchar(64)") .HasColumnName("Name"); b.Property("Path") .HasMaxLength(255) - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") + .HasColumnType("varchar(255)") .HasColumnName("Path"); b.Property("Redirect") .HasMaxLength(255) - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") + .HasColumnType("varchar(255)") .HasColumnName("Redirect"); b.Property("TenantId") @@ -300,19 +300,19 @@ namespace LINGYUN.Platform.Migrations b.Property("Code") .IsRequired() .HasMaxLength(23) - .HasColumnType("varchar(23) CHARACTER SET utf8mb4") + .HasColumnType("varchar(23)") .HasColumnName("Code"); b.Property("Component") .IsRequired() .HasMaxLength(255) - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") + .HasColumnType("varchar(255)") .HasColumnName("Component"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") + .HasColumnType("varchar(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") @@ -332,22 +332,22 @@ namespace LINGYUN.Platform.Migrations .HasColumnName("DeletionTime"); b.Property("Description") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("DisplayName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") + .HasColumnType("varchar(128)") .HasColumnName("DisplayName"); b.Property("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4") + .HasColumnType("longtext") .HasColumnName("ExtraProperties"); b.Property("Framework") .IsRequired() .HasMaxLength(64) - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") + .HasColumnType("varchar(64)") .HasColumnName("Framework"); b.Property("IsDeleted") @@ -373,7 +373,7 @@ namespace LINGYUN.Platform.Migrations b.Property("Name") .IsRequired() .HasMaxLength(64) - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") + .HasColumnType("varchar(64)") .HasColumnName("Name"); b.Property("ParentId") @@ -381,12 +381,12 @@ namespace LINGYUN.Platform.Migrations b.Property("Path") .HasMaxLength(255) - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") + .HasColumnType("varchar(255)") .HasColumnName("Path"); b.Property("Redirect") .HasMaxLength(255) - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") + .HasColumnType("varchar(255)") .HasColumnName("Redirect"); b.Property("TenantId") @@ -426,7 +426,7 @@ namespace LINGYUN.Platform.Migrations b.Property("RoleName") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") + .HasColumnType("varchar(256)") .HasColumnName("RoleName"); b.Property("TenantId") @@ -488,7 +488,7 @@ namespace LINGYUN.Platform.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") + .HasColumnType("varchar(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") @@ -509,11 +509,11 @@ namespace LINGYUN.Platform.Migrations b.Property("Description") .HasMaxLength(2048) - .HasColumnType("longtext CHARACTER SET utf8mb4") + .HasColumnType("varchar(2048)") .HasColumnName("Description"); b.Property("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4") + .HasColumnType("longtext") .HasColumnName("ExtraProperties"); b.Property("IsDeleted") @@ -543,13 +543,13 @@ namespace LINGYUN.Platform.Migrations b.Property("Title") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50) CHARACTER SET utf8mb4") + .HasColumnType("varchar(50)") .HasColumnName("Title"); b.Property("Version") .IsRequired() .HasMaxLength(20) - .HasColumnType("varchar(20) CHARACTER SET utf8mb4") + .HasColumnType("varchar(20)") .HasColumnName("Version"); b.HasKey("Id"); @@ -593,18 +593,18 @@ namespace LINGYUN.Platform.Migrations b.Property("Name") .IsRequired() .HasMaxLength(255) - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") + .HasColumnType("varchar(255)") .HasColumnName("Name"); b.Property("Path") .HasMaxLength(255) - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") + .HasColumnType("varchar(255)") .HasColumnName("Path"); b.Property("SHA256") .IsRequired() .HasMaxLength(65) - .HasColumnType("varchar(65) CHARACTER SET utf8mb4") + .HasColumnType("varchar(65)") .HasColumnName("SHA256"); b.Property("Size") @@ -617,7 +617,7 @@ namespace LINGYUN.Platform.Migrations b.Property("Version") .IsRequired() .HasMaxLength(20) - .HasColumnType("varchar(20) CHARACTER SET utf8mb4") + .HasColumnType("varchar(20)") .HasColumnName("Version"); b.HasKey("Id"); diff --git a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20211030132911_Re-Initlize-Db-Migration.cs b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20211030132911_Re-Initlize-Db-Migration.cs new file mode 100644 index 000000000..d45aad433 --- /dev/null +++ b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20211030132911_Re-Initlize-Db-Migration.cs @@ -0,0 +1,346 @@ +using System; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; + +namespace LINGYUN.Platform.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/platform/LINGYUN.Platform.HttpApi.Host/Migrations/PlatformHttpApiHostMigrationsDbContextModelSnapshot.cs b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/PlatformHttpApiHostMigrationsDbContextModelSnapshot.cs index 9864ac2ba..b00a81c63 100644 --- a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/PlatformHttpApiHostMigrationsDbContextModelSnapshot.cs +++ b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/PlatformHttpApiHostMigrationsDbContextModelSnapshot.cs @@ -17,7 +17,7 @@ namespace LINGYUN.Platform.Migrations modelBuilder .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) .HasAnnotation("Relational:MaxIdentifierLength", 64) - .HasAnnotation("ProductVersion", "5.0.7"); + .HasAnnotation("ProductVersion", "5.0.11"); modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => { @@ -28,13 +28,13 @@ namespace LINGYUN.Platform.Migrations b.Property("Code") .IsRequired() .HasMaxLength(1024) - .HasColumnType("varchar(1024) CHARACTER SET utf8mb4") + .HasColumnType("varchar(1024)") .HasColumnName("Code"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") + .HasColumnType("varchar(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") @@ -55,17 +55,17 @@ namespace LINGYUN.Platform.Migrations b.Property("Description") .HasMaxLength(1024) - .HasColumnType("varchar(1024) CHARACTER SET utf8mb4") + .HasColumnType("varchar(1024)") .HasColumnName("Description"); b.Property("DisplayName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") + .HasColumnType("varchar(128)") .HasColumnName("DisplayName"); b.Property("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4") + .HasColumnType("longtext") .HasColumnName("ExtraProperties"); b.Property("IsDeleted") @@ -88,7 +88,7 @@ namespace LINGYUN.Platform.Migrations b.Property("Name") .IsRequired() .HasMaxLength(30) - .HasColumnType("varchar(30) CHARACTER SET utf8mb4") + .HasColumnType("varchar(30)") .HasColumnName("Name"); b.Property("ParentId") @@ -119,7 +119,7 @@ namespace LINGYUN.Platform.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") + .HasColumnType("varchar(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") @@ -135,7 +135,7 @@ namespace LINGYUN.Platform.Migrations b.Property("DefaultValue") .HasMaxLength(128) - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") + .HasColumnType("varchar(128)") .HasColumnName("DefaultValue"); b.Property("DeleterId") @@ -148,17 +148,17 @@ namespace LINGYUN.Platform.Migrations b.Property("Description") .HasMaxLength(1024) - .HasColumnType("varchar(1024) CHARACTER SET utf8mb4") + .HasColumnType("varchar(1024)") .HasColumnName("Description"); b.Property("DisplayName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") + .HasColumnType("varchar(128)") .HasColumnName("DisplayName"); b.Property("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4") + .HasColumnType("longtext") .HasColumnName("ExtraProperties"); b.Property("IsDeleted") @@ -181,7 +181,7 @@ namespace LINGYUN.Platform.Migrations b.Property("Name") .IsRequired() .HasMaxLength(30) - .HasColumnType("varchar(30) CHARACTER SET utf8mb4") + .HasColumnType("varchar(30)") .HasColumnName("Name"); b.Property("TenantId") @@ -209,7 +209,7 @@ namespace LINGYUN.Platform.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") + .HasColumnType("varchar(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") @@ -232,22 +232,22 @@ namespace LINGYUN.Platform.Migrations .HasColumnName("DeletionTime"); b.Property("Description") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("DisplayName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") + .HasColumnType("varchar(128)") .HasColumnName("DisplayName"); b.Property("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4") + .HasColumnType("longtext") .HasColumnName("ExtraProperties"); b.Property("Framework") .IsRequired() .HasMaxLength(64) - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") + .HasColumnType("varchar(64)") .HasColumnName("Framework"); b.Property("IsDeleted") @@ -267,17 +267,17 @@ namespace LINGYUN.Platform.Migrations b.Property("Name") .IsRequired() .HasMaxLength(64) - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") + .HasColumnType("varchar(64)") .HasColumnName("Name"); b.Property("Path") .HasMaxLength(255) - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") + .HasColumnType("varchar(255)") .HasColumnName("Path"); b.Property("Redirect") .HasMaxLength(255) - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") + .HasColumnType("varchar(255)") .HasColumnName("Redirect"); b.Property("TenantId") @@ -298,19 +298,19 @@ namespace LINGYUN.Platform.Migrations b.Property("Code") .IsRequired() .HasMaxLength(23) - .HasColumnType("varchar(23) CHARACTER SET utf8mb4") + .HasColumnType("varchar(23)") .HasColumnName("Code"); b.Property("Component") .IsRequired() .HasMaxLength(255) - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") + .HasColumnType("varchar(255)") .HasColumnName("Component"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") + .HasColumnType("varchar(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") @@ -330,22 +330,22 @@ namespace LINGYUN.Platform.Migrations .HasColumnName("DeletionTime"); b.Property("Description") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("DisplayName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128) CHARACTER SET utf8mb4") + .HasColumnType("varchar(128)") .HasColumnName("DisplayName"); b.Property("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4") + .HasColumnType("longtext") .HasColumnName("ExtraProperties"); b.Property("Framework") .IsRequired() .HasMaxLength(64) - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") + .HasColumnType("varchar(64)") .HasColumnName("Framework"); b.Property("IsDeleted") @@ -371,7 +371,7 @@ namespace LINGYUN.Platform.Migrations b.Property("Name") .IsRequired() .HasMaxLength(64) - .HasColumnType("varchar(64) CHARACTER SET utf8mb4") + .HasColumnType("varchar(64)") .HasColumnName("Name"); b.Property("ParentId") @@ -379,12 +379,12 @@ namespace LINGYUN.Platform.Migrations b.Property("Path") .HasMaxLength(255) - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") + .HasColumnType("varchar(255)") .HasColumnName("Path"); b.Property("Redirect") .HasMaxLength(255) - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") + .HasColumnType("varchar(255)") .HasColumnName("Redirect"); b.Property("TenantId") @@ -424,7 +424,7 @@ namespace LINGYUN.Platform.Migrations b.Property("RoleName") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256) CHARACTER SET utf8mb4") + .HasColumnType("varchar(256)") .HasColumnName("RoleName"); b.Property("TenantId") @@ -486,7 +486,7 @@ namespace LINGYUN.Platform.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) - .HasColumnType("varchar(40) CHARACTER SET utf8mb4") + .HasColumnType("varchar(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") @@ -507,11 +507,11 @@ namespace LINGYUN.Platform.Migrations b.Property("Description") .HasMaxLength(2048) - .HasColumnType("longtext CHARACTER SET utf8mb4") + .HasColumnType("varchar(2048)") .HasColumnName("Description"); b.Property("ExtraProperties") - .HasColumnType("longtext CHARACTER SET utf8mb4") + .HasColumnType("longtext") .HasColumnName("ExtraProperties"); b.Property("IsDeleted") @@ -541,13 +541,13 @@ namespace LINGYUN.Platform.Migrations b.Property("Title") .IsRequired() .HasMaxLength(50) - .HasColumnType("varchar(50) CHARACTER SET utf8mb4") + .HasColumnType("varchar(50)") .HasColumnName("Title"); b.Property("Version") .IsRequired() .HasMaxLength(20) - .HasColumnType("varchar(20) CHARACTER SET utf8mb4") + .HasColumnType("varchar(20)") .HasColumnName("Version"); b.HasKey("Id"); @@ -591,18 +591,18 @@ namespace LINGYUN.Platform.Migrations b.Property("Name") .IsRequired() .HasMaxLength(255) - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") + .HasColumnType("varchar(255)") .HasColumnName("Name"); b.Property("Path") .HasMaxLength(255) - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") + .HasColumnType("varchar(255)") .HasColumnName("Path"); b.Property("SHA256") .IsRequired() .HasMaxLength(65) - .HasColumnType("varchar(65) CHARACTER SET utf8mb4") + .HasColumnType("varchar(65)") .HasColumnName("SHA256"); b.Property("Size") @@ -615,7 +615,7 @@ namespace LINGYUN.Platform.Migrations b.Property("Version") .IsRequired() .HasMaxLength(20) - .HasColumnType("varchar(20) CHARACTER SET utf8mb4") + .HasColumnType("varchar(20)") .HasColumnName("Version"); b.HasKey("Id"); diff --git a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/appsettings.Development.json b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/appsettings.Development.json index 34f82c9e6..1874f7e19 100644 --- a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/appsettings.Development.json +++ b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/appsettings.Development.json @@ -70,7 +70,7 @@ }, "AuditLogging": { "Elasticsearch": { - "IndexPrefix": "lingyun.abp.auditing" + "IndexPrefix": "abp.dev.auditing" } }, "Elasticsearch": { @@ -97,7 +97,7 @@ "Name": "Elasticsearch", "Args": { "nodeUris": "http://localhost:9200", - "indexFormat": "lingyun.abp.logging-{0:yyyy.MM.dd}", + "indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}", "autoRegisterTemplate": true, "autoRegisterTemplateVersion": "ESv7" }