diff --git a/EShopOnAbp.sln b/EShopOnAbp.sln
index 62905513..90d932d1 100644
--- a/EShopOnAbp.sln
+++ b/EShopOnAbp.sln
@@ -22,6 +22,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EShopOnAbp.AdministrationSe
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EShopOnAbp.SaasService.HttpApi.Host", "services\saas\src\EShopOnAbp.SaasService.HttpApi.Host\EShopOnAbp.SaasService.HttpApi.Host.csproj", "{9203C6CC-F491-4A9F-93B3-3BEA018D87B4}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EShopOnAbp.IdentityService.HttpApi.Host", "services\identity\src\EShopOnAbp.IdentityService.HttpApi.Host\EShopOnAbp.IdentityService.HttpApi.Host.csproj", "{FDFCA1B4-FD9D-445C-8655-3DF3F2D57CEA}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -35,6 +37,7 @@ Global
{49DDB3F1-6200-445E-9A0D-0339E31D5D77} = {B8B59303-2178-459B-91A8-DF353044E090}
{0FA9667E-6A08-4EFF-8CAF-D2A3C3C1FBBD} = {F415FFFD-E52D-4EBE-98DC-067C1EFFFFE3}
{9203C6CC-F491-4A9F-93B3-3BEA018D87B4} = {F415FFFD-E52D-4EBE-98DC-067C1EFFFFE3}
+ {FDFCA1B4-FD9D-445C-8655-3DF3F2D57CEA} = {F415FFFD-E52D-4EBE-98DC-067C1EFFFFE3}
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{09F9A583-778D-4940-83B0-958C5D4E6D52}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
@@ -65,5 +68,9 @@ Global
{9203C6CC-F491-4A9F-93B3-3BEA018D87B4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9203C6CC-F491-4A9F-93B3-3BEA018D87B4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9203C6CC-F491-4A9F-93B3-3BEA018D87B4}.Release|Any CPU.Build.0 = Release|Any CPU
+ {FDFCA1B4-FD9D-445C-8655-3DF3F2D57CEA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {FDFCA1B4-FD9D-445C-8655-3DF3F2D57CEA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {FDFCA1B4-FD9D-445C-8655-3DF3F2D57CEA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {FDFCA1B4-FD9D-445C-8655-3DF3F2D57CEA}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
diff --git a/services/identity/EShopOnAbp.IdentityService.sln b/services/identity/EShopOnAbp.IdentityService.sln
new file mode 100644
index 00000000..fc6a031a
--- /dev/null
+++ b/services/identity/EShopOnAbp.IdentityService.sln
@@ -0,0 +1,109 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.29020.237
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.IdentityService.Domain", "src\EShopOnAbp.IdentityService.Domain\EShopOnAbp.IdentityService.Domain.csproj", "{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.IdentityService.Application", "src\EShopOnAbp.IdentityService.Application\EShopOnAbp.IdentityService.Application.csproj", "{1A94A50E-06DC-43C1-80B5-B662820EC3EB}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.IdentityService.EntityFrameworkCore", "src\EShopOnAbp.IdentityService.EntityFrameworkCore\EShopOnAbp.IdentityService.EntityFrameworkCore.csproj", "{C956DD76-69C8-4A9C-83EA-D17DF83340FD}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{CA9AC87F-097E-4F15-8393-4BC07735A5B0}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{04DBDB01-70F4-4E06-B468-8F87850B22BE}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.IdentityService.Application.Tests", "test\EShopOnAbp.IdentityService.Application.Tests\EShopOnAbp.IdentityService.Application.Tests.csproj", "{50B2631D-129C-47B3-A587-029CCD6099BC}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.IdentityService.Domain.Shared", "src\EShopOnAbp.IdentityService.Domain.Shared\EShopOnAbp.IdentityService.Domain.Shared.csproj", "{42F719ED-8413-4895-B5B4-5AB56079BC66}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.IdentityService.Application.Contracts", "src\EShopOnAbp.IdentityService.Application.Contracts\EShopOnAbp.IdentityService.Application.Contracts.csproj", "{520659C8-C734-4298-A3DA-B539DB9DFC0B}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.IdentityService.HttpApi", "src\EShopOnAbp.IdentityService.HttpApi\EShopOnAbp.IdentityService.HttpApi.csproj", "{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.IdentityService.HttpApi.Client", "src\EShopOnAbp.IdentityService.HttpApi.Client\EShopOnAbp.IdentityService.HttpApi.Client.csproj", "{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.IdentityService.EntityFrameworkCore.Tests", "test\EShopOnAbp.IdentityService.EntityFrameworkCore.Tests\EShopOnAbp.IdentityService.EntityFrameworkCore.Tests.csproj", "{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.IdentityService.TestBase", "test\EShopOnAbp.IdentityService.TestBase\EShopOnAbp.IdentityService.TestBase.csproj", "{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.IdentityService.Domain.Tests", "test\EShopOnAbp.IdentityService.Domain.Tests\EShopOnAbp.IdentityService.Domain.Tests.csproj", "{E512F4D9-9375-480F-A2F6-A46509F9D824}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.IdentityService.HttpApi.Host", "src\EShopOnAbp.IdentityService.HttpApi.Host\EShopOnAbp.IdentityService.HttpApi.Host.csproj", "{748584B1-BA69-4F6A-81AA-F4BDE6BCE29D}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Release|Any CPU.Build.0 = Release|Any CPU
+ {50B2631D-129C-47B3-A587-029CCD6099BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {50B2631D-129C-47B3-A587-029CCD6099BC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {50B2631D-129C-47B3-A587-029CCD6099BC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {50B2631D-129C-47B3-A587-029CCD6099BC}.Release|Any CPU.Build.0 = Release|Any CPU
+ {42F719ED-8413-4895-B5B4-5AB56079BC66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {42F719ED-8413-4895-B5B4-5AB56079BC66}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {42F719ED-8413-4895-B5B4-5AB56079BC66}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {42F719ED-8413-4895-B5B4-5AB56079BC66}.Release|Any CPU.Build.0 = Release|Any CPU
+ {520659C8-C734-4298-A3DA-B539DB9DFC0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {520659C8-C734-4298-A3DA-B539DB9DFC0B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {520659C8-C734-4298-A3DA-B539DB9DFC0B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {520659C8-C734-4298-A3DA-B539DB9DFC0B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Release|Any CPU.Build.0 = Release|Any CPU
+ {3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Release|Any CPU.Build.0 = Release|Any CPU
+ {91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E512F4D9-9375-480F-A2F6-A46509F9D824}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E512F4D9-9375-480F-A2F6-A46509F9D824}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E512F4D9-9375-480F-A2F6-A46509F9D824}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E512F4D9-9375-480F-A2F6-A46509F9D824}.Release|Any CPU.Build.0 = Release|Any CPU
+ {748584B1-BA69-4F6A-81AA-F4BDE6BCE29D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {748584B1-BA69-4F6A-81AA-F4BDE6BCE29D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {748584B1-BA69-4F6A-81AA-F4BDE6BCE29D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {748584B1-BA69-4F6A-81AA-F4BDE6BCE29D}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {554AD327-6DBA-4F8F-96F8-81CE7A0C863F} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ {1A94A50E-06DC-43C1-80B5-B662820EC3EB} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ {C956DD76-69C8-4A9C-83EA-D17DF83340FD} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ {50B2631D-129C-47B3-A587-029CCD6099BC} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
+ {42F719ED-8413-4895-B5B4-5AB56079BC66} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ {520659C8-C734-4298-A3DA-B539DB9DFC0B} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ {4164BDF7-F527-4E85-9CE6-E3C2D7426A27} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ {3B5A0094-670D-4BB1-BFDD-61B88A8773DC} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ {1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
+ {91853F21-9CD9-4132-BC29-A7D5D84FFFE7} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
+ {E512F4D9-9375-480F-A2F6-A46509F9D824} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
+ {748584B1-BA69-4F6A-81AA-F4BDE6BCE29D} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {6AAFA1C6-603E-13FA-45E5-7910AA9F661D}
+ EndGlobalSection
+EndGlobal
diff --git a/services/identity/src/EShopOnAbp.IdentityService.Application.Contracts/EShopOnAbp.IdentityService.Application.Contracts.csproj b/services/identity/src/EShopOnAbp.IdentityService.Application.Contracts/EShopOnAbp.IdentityService.Application.Contracts.csproj
new file mode 100644
index 00000000..f8cc8be9
--- /dev/null
+++ b/services/identity/src/EShopOnAbp.IdentityService.Application.Contracts/EShopOnAbp.IdentityService.Application.Contracts.csproj
@@ -0,0 +1,17 @@
+
+
+
+ netstandard2.0
+ EShopOnAbp.IdentityService
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/services/identity/src/EShopOnAbp.IdentityService.Application.Contracts/IdentityServiceApplicationContractsModule.cs b/services/identity/src/EShopOnAbp.IdentityService.Application.Contracts/IdentityServiceApplicationContractsModule.cs
new file mode 100644
index 00000000..80694f3d
--- /dev/null
+++ b/services/identity/src/EShopOnAbp.IdentityService.Application.Contracts/IdentityServiceApplicationContractsModule.cs
@@ -0,0 +1,15 @@
+using Volo.Abp.Account;
+using Volo.Abp.Identity;
+using Volo.Abp.Modularity;
+
+namespace EShopOnAbp.IdentityService
+{
+ [DependsOn(
+ typeof(IdentityServiceDomainSharedModule),
+ typeof(AbpAccountApplicationContractsModule),
+ typeof(AbpIdentityApplicationContractsModule)
+ )]
+ public class IdentityServiceApplicationContractsModule : AbpModule
+ {
+ }
+}
diff --git a/services/identity/src/EShopOnAbp.IdentityService.Application.Contracts/IdentityServiceRemoteServiceConsts.cs b/services/identity/src/EShopOnAbp.IdentityService.Application.Contracts/IdentityServiceRemoteServiceConsts.cs
new file mode 100644
index 00000000..231360db
--- /dev/null
+++ b/services/identity/src/EShopOnAbp.IdentityService.Application.Contracts/IdentityServiceRemoteServiceConsts.cs
@@ -0,0 +1,7 @@
+namespace EShopOnAbp.IdentityService
+{
+ public class IdentityServiceRemoteServiceConsts
+ {
+ public const string RemoteServiceName = "IdentityService";
+ }
+}
\ No newline at end of file
diff --git a/services/identity/src/EShopOnAbp.IdentityService.Application/EShopOnAbp.IdentityService.Application.csproj b/services/identity/src/EShopOnAbp.IdentityService.Application/EShopOnAbp.IdentityService.Application.csproj
new file mode 100644
index 00000000..838a11ca
--- /dev/null
+++ b/services/identity/src/EShopOnAbp.IdentityService.Application/EShopOnAbp.IdentityService.Application.csproj
@@ -0,0 +1,18 @@
+
+
+
+ net5.0
+ EShopOnAbp.IdentityService
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/services/identity/src/EShopOnAbp.IdentityService.Application/IdentityServiceApplicationModule.cs b/services/identity/src/EShopOnAbp.IdentityService.Application/IdentityServiceApplicationModule.cs
new file mode 100644
index 00000000..4e7b05e3
--- /dev/null
+++ b/services/identity/src/EShopOnAbp.IdentityService.Application/IdentityServiceApplicationModule.cs
@@ -0,0 +1,26 @@
+using Microsoft.Extensions.DependencyInjection;
+using Volo.Abp.Account;
+using Volo.Abp.AutoMapper;
+using Volo.Abp.Identity;
+using Volo.Abp.Modularity;
+
+namespace EShopOnAbp.IdentityService
+{
+ [DependsOn(
+ typeof(IdentityServiceDomainModule),
+ typeof(IdentityServiceApplicationContractsModule),
+ typeof(AbpAccountApplicationModule),
+ typeof(AbpIdentityApplicationModule)
+ )]
+ public class IdentityServiceApplicationModule : AbpModule
+ {
+ public override void ConfigureServices(ServiceConfigurationContext context)
+ {
+ context.Services.AddAutoMapperObjectMapper();
+ Configure(options =>
+ {
+ options.AddMaps(validate: true);
+ });
+ }
+ }
+}
diff --git a/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/EShopOnAbp.IdentityService.Domain.Shared.csproj b/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/EShopOnAbp.IdentityService.Domain.Shared.csproj
new file mode 100644
index 00000000..ebae7c26
--- /dev/null
+++ b/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/EShopOnAbp.IdentityService.Domain.Shared.csproj
@@ -0,0 +1,22 @@
+
+
+
+ netstandard2.0
+ EShopOnAbp.IdentityService
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/IdentityServiceDomainErrorCodes.cs b/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/IdentityServiceDomainErrorCodes.cs
new file mode 100644
index 00000000..dd134edd
--- /dev/null
+++ b/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/IdentityServiceDomainErrorCodes.cs
@@ -0,0 +1,7 @@
+namespace EShopOnAbp.IdentityService
+{
+ public static class IdentityServiceDomainErrorCodes
+ {
+ /* You can add your business exception error codes here, as constants */
+ }
+}
diff --git a/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/IdentityServiceDomainSharedModule.cs b/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/IdentityServiceDomainSharedModule.cs
new file mode 100644
index 00000000..8cd6fe24
--- /dev/null
+++ b/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/IdentityServiceDomainSharedModule.cs
@@ -0,0 +1,41 @@
+using EShopOnAbp.IdentityService.Localization;
+using Volo.Abp.Identity;
+using Volo.Abp.IdentityServer;
+using Volo.Abp.Localization;
+using Volo.Abp.Localization.ExceptionHandling;
+using Volo.Abp.Modularity;
+using Volo.Abp.Validation.Localization;
+using Volo.Abp.VirtualFileSystem;
+
+namespace EShopOnAbp.IdentityService
+{
+ [DependsOn(
+ typeof(AbpIdentityDomainSharedModule),
+ typeof(AbpIdentityServerDomainSharedModule)
+ )]
+ public class IdentityServiceDomainSharedModule : AbpModule
+ {
+ public override void PreConfigureServices(ServiceConfigurationContext context)
+ {
+ IdentityServiceModuleExtensionConfigurator.Configure();
+ }
+
+ public override void ConfigureServices(ServiceConfigurationContext context)
+ {
+ Configure(options =>
+ {
+ options.FileSets.AddEmbedded();
+ });
+
+ Configure(options =>
+ {
+ options.Resources
+ .Add("en")
+ .AddBaseTypes(typeof(AbpValidationResource))
+ .AddVirtualJson("/Localization/IdentityService");
+
+ options.DefaultResourceType = typeof(IdentityServiceResource);
+ });
+ }
+ }
+}
diff --git a/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/IdentityServiceModuleExtensionConfigurator.cs b/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/IdentityServiceModuleExtensionConfigurator.cs
new file mode 100644
index 00000000..493336a1
--- /dev/null
+++ b/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/IdentityServiceModuleExtensionConfigurator.cs
@@ -0,0 +1,72 @@
+using System.ComponentModel.DataAnnotations;
+using Volo.Abp.Identity;
+using Volo.Abp.ObjectExtending;
+using Volo.Abp.Threading;
+
+namespace EShopOnAbp.IdentityService
+{
+ public static class IdentityServiceModuleExtensionConfigurator
+ {
+ private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner();
+
+ public static void Configure()
+ {
+ OneTimeRunner.Run(() =>
+ {
+ ConfigureExistingProperties();
+ ConfigureExtraProperties();
+ });
+ }
+
+ private static void ConfigureExistingProperties()
+ {
+ /* You can change max lengths for properties of the
+ * entities defined in the modules used by your application.
+ *
+ * Example: Change user and role name max lengths
+
+ IdentityUserConsts.MaxNameLength = 99;
+ IdentityRoleConsts.MaxNameLength = 99;
+
+ * Notice: It is not suggested to change property lengths
+ * unless you really need it. Go with the standard values wherever possible.
+ *
+ * If you are using EF Core, you will need to run the add-migration command after your changes.
+ */
+ }
+
+ private static void ConfigureExtraProperties()
+ {
+ /* You can configure extra properties for the
+ * entities defined in the modules used by your application.
+ *
+ * This class can be used to define these extra properties
+ * with a high level, easy to use API.
+ *
+ * Example: Add a new property to the user entity of the identity module
+
+ ObjectExtensionManager.Instance.Modules()
+ .ConfigureIdentity(identity =>
+ {
+ identity.ConfigureUser(user =>
+ {
+ user.AddOrUpdateProperty( //property type: string
+ "SocialSecurityNumber", //property name
+ property =>
+ {
+ //validation rules
+ property.Attributes.Add(new RequiredAttribute());
+ property.Attributes.Add(new StringLengthAttribute(64) {MinimumLength = 4});
+
+ //...other configurations for this property
+ }
+ );
+ });
+ });
+
+ * See the documentation for more:
+ * https://docs.abp.io/en/abp/latest/Module-Entity-Extensions
+ */
+ }
+ }
+}
diff --git a/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityService/ar.json b/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityService/ar.json
new file mode 100644
index 00000000..05cb96a9
--- /dev/null
+++ b/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityService/ar.json
@@ -0,0 +1,8 @@
+{
+ "culture": "ar",
+ "texts": {
+ "Menu:Home": "الرئيسية",
+ "Welcome": "مرحبا",
+ "LongWelcomeMessage": "مرحبا بكم في التطبيق. هذا مشروع بدء تشغيل يعتمد على إطار عمل ABP. لمزيد من المعلومات ، يرجى زيارة abp.io."
+ }
+}
\ No newline at end of file
diff --git a/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityService/cs.json b/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityService/cs.json
new file mode 100644
index 00000000..5a0bbf61
--- /dev/null
+++ b/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityService/cs.json
@@ -0,0 +1,8 @@
+{
+ "culture": "cs",
+ "texts": {
+ "Menu:Home": "Úvod",
+ "Welcome": "Vítejte",
+ "LongWelcomeMessage": "Vítejte v aplikaci. Toto je startovací projekt založený na ABP frameworku. Pro více informací, navštivte abp.io."
+ }
+}
diff --git a/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityService/de-DE.json b/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityService/de-DE.json
new file mode 100644
index 00000000..aca4528c
--- /dev/null
+++ b/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityService/de-DE.json
@@ -0,0 +1,8 @@
+{
+ "culture": "de-DE",
+ "texts": {
+ "Menu:Home": "Home",
+ "Welcome": "Willkommen",
+ "LongWelcomeMessage": "Willkommen bei der Anwendung. Dies ist ein Startup-Projekt, das auf dem ABP-Framework basiert. Weitere Informationen finden Sie unter abp.io."
+ }
+}
\ No newline at end of file
diff --git a/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityService/en-GB.json b/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityService/en-GB.json
new file mode 100644
index 00000000..d2ca0793
--- /dev/null
+++ b/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityService/en-GB.json
@@ -0,0 +1,8 @@
+{
+ "culture": "en-GB",
+ "texts": {
+ "Menu:Home": "Home",
+ "Welcome": "Welcome",
+ "LongWelcomeMessage": "Welcome to the application. This is a startup project based on the ABP framework. For more information, visit abp.io."
+ }
+}
\ No newline at end of file
diff --git a/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityService/en.json b/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityService/en.json
new file mode 100644
index 00000000..d2a6a983
--- /dev/null
+++ b/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityService/en.json
@@ -0,0 +1,8 @@
+{
+ "culture": "en",
+ "texts": {
+ "Menu:Home": "Home",
+ "Welcome": "Welcome",
+ "LongWelcomeMessage": "Welcome to the application. This is a startup project based on the ABP framework. For more information, visit abp.io."
+ }
+}
diff --git a/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityService/es.json b/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityService/es.json
new file mode 100644
index 00000000..31b4b59e
--- /dev/null
+++ b/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityService/es.json
@@ -0,0 +1,8 @@
+{
+ "culture": "es",
+ "texts": {
+ "Menu:Home": "Inicio",
+ "Welcome": "Bienvenido",
+ "LongWelcomeMessage": "Bienvenido a la aplicación, este es un proyecto base basado en el framework ABP. Para más información, visita abp.io."
+ }
+}
\ No newline at end of file
diff --git a/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityService/fr.json b/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityService/fr.json
new file mode 100644
index 00000000..e76eac0c
--- /dev/null
+++ b/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityService/fr.json
@@ -0,0 +1,8 @@
+{
+ "culture": "fr",
+ "texts": {
+ "Menu:Home": "Accueil",
+ "Welcome": "Bienvenue",
+ "LongWelcomeMessage": "Bienvenue dans l'application. Il s'agit d'un projet de démarrage basé sur le framework ABP. Pour plus d'informations, visitez abp.io."
+ }
+}
\ No newline at end of file
diff --git a/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityService/hu.json b/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityService/hu.json
new file mode 100644
index 00000000..c7b6a33a
--- /dev/null
+++ b/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityService/hu.json
@@ -0,0 +1,8 @@
+{
+ "culture": "hu",
+ "texts": {
+ "Menu:Home": "Kezdőlap",
+ "Welcome": "Üdvözlöm",
+ "LongWelcomeMessage": "Üdvözöljük az alkalmazásban. Ez egy ABP keretrendszeren alapuló startup projekt. További információkért látogasson el az abp.io oldalra."
+ }
+}
\ No newline at end of file
diff --git a/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityService/nl.json b/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityService/nl.json
new file mode 100644
index 00000000..9ba8da47
--- /dev/null
+++ b/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityService/nl.json
@@ -0,0 +1,8 @@
+{
+ "culture": "nl",
+ "texts": {
+ "Menu:Home": "Home",
+ "Welcome": "Welkom",
+ "LongWelcomeMessage": "Welkom bij de applicatie. Dit is een startup-project gebaseerd op het ABP-framework. Bezoek abp.io voor meer informatie."
+ }
+}
\ No newline at end of file
diff --git a/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityService/pl-PL.json b/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityService/pl-PL.json
new file mode 100644
index 00000000..33412f30
--- /dev/null
+++ b/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityService/pl-PL.json
@@ -0,0 +1,8 @@
+{
+ "culture": "pl-PL",
+ "texts": {
+ "Menu:Home": "Home",
+ "Welcome": "Witaj",
+ "LongWelcomeMessage": "Witaj w aplikacji. To jest inicjalny projekt bazujący na ABP framework. Po więcej informacji odwiedź stronę abp.io."
+ }
+}
\ No newline at end of file
diff --git a/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityService/pt-BR.json b/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityService/pt-BR.json
new file mode 100644
index 00000000..8c818a07
--- /dev/null
+++ b/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityService/pt-BR.json
@@ -0,0 +1,8 @@
+{
+ "culture": "pt-BR",
+ "texts": {
+ "Menu:Home": "Principal",
+ "Welcome": "Seja bem-vindo!",
+ "LongWelcomeMessage": "Bem-vindo a esta aplicação. Este é um projeto inicial baseado no ABP framework. Para mais informações, visite abp.io."
+ }
+}
\ No newline at end of file
diff --git a/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityService/ru.json b/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityService/ru.json
new file mode 100644
index 00000000..8464e443
--- /dev/null
+++ b/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityService/ru.json
@@ -0,0 +1,8 @@
+{
+ "culture": "ru",
+ "texts": {
+ "Menu:Home": "Главная",
+ "Welcome": "Добро пожаловать",
+ "LongWelcomeMessage": "Добро пожаловать в приложение. Этот запущенный проект основан на фреймворке ABP. Для получения дополнительной информации посетите сайт abp.io."
+ }
+}
diff --git a/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityService/sl.json b/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityService/sl.json
new file mode 100644
index 00000000..a066ef26
--- /dev/null
+++ b/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityService/sl.json
@@ -0,0 +1,8 @@
+{
+ "culture": "sl",
+ "texts": {
+ "Menu:Home": "Domov",
+ "Welcome": "Dobrodošli",
+ "LongWelcomeMessage": "Dobrodošli v aplikaciji. To je začetni projekt na osnovi okolja ABP. Za več informacij obiščite abp.io."
+ }
+}
diff --git a/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityService/tr.json b/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityService/tr.json
new file mode 100644
index 00000000..5bf83ee7
--- /dev/null
+++ b/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityService/tr.json
@@ -0,0 +1,8 @@
+{
+ "culture": "tr",
+ "texts": {
+ "Menu:Home": "Ana sayfa",
+ "Welcome": "Hoşgeldiniz",
+ "LongWelcomeMessage": "Uygulamaya hoşgeldiniz. Bu, ABP framework'ü üzerine bina edilmiş bir başlangıç projesidir. Daha fazla bilgi için abp.io adresini ziyaret edebilirsiniz."
+ }
+}
\ No newline at end of file
diff --git a/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityService/vi.json b/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityService/vi.json
new file mode 100644
index 00000000..c115a357
--- /dev/null
+++ b/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityService/vi.json
@@ -0,0 +1,8 @@
+{
+ "culture": "vi",
+ "texts": {
+ "Menu:Home": "Trang chủ",
+ "Welcome": "Chào mừng bạn",
+ "LongWelcomeMessage": "Chào mừng bạn đến ứng dụng. Đây là một dự án khởi nghiệp dựa trên khung ABP. Để biết thêm thông tin, hãy truy cập abp.io."
+ }
+}
diff --git a/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityService/zh-Hans.json b/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityService/zh-Hans.json
new file mode 100644
index 00000000..23790bde
--- /dev/null
+++ b/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityService/zh-Hans.json
@@ -0,0 +1,8 @@
+{
+ "culture": "zh-Hans",
+ "texts": {
+ "Menu:Home": "首页",
+ "Welcome": "欢迎",
+ "LongWelcomeMessage": "欢迎来到该应用程序. 这是一个基于ABP框架的启动项目. 有关更多信息, 请访问 abp.io."
+ }
+ }
\ No newline at end of file
diff --git a/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityService/zh-Hant.json b/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityService/zh-Hant.json
new file mode 100644
index 00000000..31e0ab5a
--- /dev/null
+++ b/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityService/zh-Hant.json
@@ -0,0 +1,8 @@
+{
+ "culture": "zh-Hant",
+ "texts": {
+ "Menu:Home": "首頁",
+ "Welcome": "歡迎",
+ "LongWelcomeMessage": "歡迎來到此應用程式. 這是一個基於ABP框架的起始專案. 有關更多訊息, 請瀏覽 abp.io."
+ }
+ }
\ No newline at end of file
diff --git a/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityServiceResource.cs b/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityServiceResource.cs
new file mode 100644
index 00000000..2702a6c9
--- /dev/null
+++ b/services/identity/src/EShopOnAbp.IdentityService.Domain.Shared/Localization/IdentityServiceResource.cs
@@ -0,0 +1,10 @@
+using Volo.Abp.Localization;
+
+namespace EShopOnAbp.IdentityService.Localization
+{
+ [LocalizationResourceName("IdentityService")]
+ public class IdentityServiceResource
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/services/identity/src/EShopOnAbp.IdentityService.Domain/EShopOnAbp.IdentityService.Domain.csproj b/services/identity/src/EShopOnAbp.IdentityService.Domain/EShopOnAbp.IdentityService.Domain.csproj
new file mode 100644
index 00000000..25b24f9f
--- /dev/null
+++ b/services/identity/src/EShopOnAbp.IdentityService.Domain/EShopOnAbp.IdentityService.Domain.csproj
@@ -0,0 +1,17 @@
+
+
+
+ net5.0
+ EShopOnAbp.IdentityService
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/services/identity/src/EShopOnAbp.IdentityService.Domain/IdentityServiceDbProperties.cs b/services/identity/src/EShopOnAbp.IdentityService.Domain/IdentityServiceDbProperties.cs
new file mode 100644
index 00000000..4a514392
--- /dev/null
+++ b/services/identity/src/EShopOnAbp.IdentityService.Domain/IdentityServiceDbProperties.cs
@@ -0,0 +1,15 @@
+namespace EShopOnAbp.IdentityService
+{
+ public static class IdentityServiceDbProperties
+ {
+ public static string DbTablePrefix { get; set; } = "";
+
+ public static string DbSchema { get; set; } = null;
+
+ public const string ConnectionStringName = "IdentityService";
+
+ public const string DefaultAdminEmailAddress = "admin@abp.io";
+
+ public const string DefaultAdminPassword = "1q2w3E*";
+ }
+}
diff --git a/services/identity/src/EShopOnAbp.IdentityService.Domain/IdentityServiceDomainModule.cs b/services/identity/src/EShopOnAbp.IdentityService.Domain/IdentityServiceDomainModule.cs
new file mode 100644
index 00000000..609aa10d
--- /dev/null
+++ b/services/identity/src/EShopOnAbp.IdentityService.Domain/IdentityServiceDomainModule.cs
@@ -0,0 +1,15 @@
+using Volo.Abp.Identity;
+using Volo.Abp.IdentityServer;
+using Volo.Abp.Modularity;
+
+namespace EShopOnAbp.IdentityService
+{
+ [DependsOn(
+ typeof(IdentityServiceDomainSharedModule),
+ typeof(AbpIdentityDomainModule),
+ typeof(AbpIdentityServerDomainModule)
+ )]
+ public class IdentityServiceDomainModule : AbpModule
+ {
+ }
+}
\ No newline at end of file
diff --git a/services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/EShopOnAbp.IdentityService.EntityFrameworkCore.csproj b/services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/EShopOnAbp.IdentityService.EntityFrameworkCore.csproj
new file mode 100644
index 00000000..59c298d0
--- /dev/null
+++ b/services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/EShopOnAbp.IdentityService.EntityFrameworkCore.csproj
@@ -0,0 +1,25 @@
+
+
+
+ net5.0
+ EShopOnAbp.IdentityService
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/EntityFrameworkCore/IdentityServiceDbContext.cs b/services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/EntityFrameworkCore/IdentityServiceDbContext.cs
new file mode 100644
index 00000000..a0a695f4
--- /dev/null
+++ b/services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/EntityFrameworkCore/IdentityServiceDbContext.cs
@@ -0,0 +1,72 @@
+using Microsoft.EntityFrameworkCore;
+using Volo.Abp.Data;
+using Volo.Abp.EntityFrameworkCore;
+using Volo.Abp.Identity;
+using Volo.Abp.Identity.EntityFrameworkCore;
+using Volo.Abp.IdentityServer.ApiResources;
+using Volo.Abp.IdentityServer.ApiScopes;
+using Volo.Abp.IdentityServer.Clients;
+using Volo.Abp.IdentityServer.Devices;
+using Volo.Abp.IdentityServer.EntityFrameworkCore;
+using Volo.Abp.IdentityServer.Grants;
+using Volo.Abp.IdentityServer.IdentityResources;
+
+namespace EShopOnAbp.IdentityService.EntityFrameworkCore
+{
+ /* This is your actual DbContext used on runtime.
+ * It includes only your entities.
+ * It does not include entities of the used modules, because each module has already
+ * its own DbContext class. If you want to share some database tables with the used modules,
+ * just create a structure like done for AppUser.
+ *
+ * Don't use this DbContext for database migrations since it does not contain tables of the
+ * used modules (as explained above). See IdentityServiceMigrationsDbContext for migrations.
+ */
+ [ConnectionStringName(IdentityServiceDbProperties.ConnectionStringName)]
+ public class IdentityServiceDbContext : AbpDbContext, IIdentityDbContext,
+ IIdentityServerDbContext
+ {
+ public DbSet Users { get; }
+ public DbSet Roles { get; }
+ public DbSet ClaimTypes { get; }
+ public DbSet OrganizationUnits { get; }
+ public DbSet SecurityLogs { get; }
+ public DbSet LinkUsers { get; }
+ public DbSet ApiResources { get; }
+ public DbSet ApiResourceSecrets { get; }
+ public DbSet ApiResourceClaims { get; }
+ public DbSet ApiResourceScopes { get; }
+ public DbSet ApiResourceProperties { get; }
+ public DbSet ApiScopes { get; }
+ public DbSet ApiScopeClaims { get; }
+ public DbSet ApiScopeProperties { get; }
+ public DbSet IdentityResources { get; }
+ public DbSet IdentityClaims { get; }
+ public DbSet IdentityResourceProperties { get; }
+ public DbSet Clients { get; }
+ public DbSet ClientGrantTypes { get; }
+ public DbSet ClientRedirectUris { get; }
+ public DbSet ClientPostLogoutRedirectUris { get; }
+ public DbSet ClientScopes { get; }
+ public DbSet ClientSecrets { get; }
+ public DbSet ClientClaims { get; }
+ public DbSet ClientIdPRestrictions { get; }
+ public DbSet ClientCorsOrigins { get; }
+ public DbSet ClientProperties { get; }
+ public DbSet PersistedGrants { get; }
+ public DbSet DeviceFlowCodes { get; }
+
+ public IdentityServiceDbContext(DbContextOptions options)
+ : base(options)
+ {
+ }
+
+ protected override void OnModelCreating(ModelBuilder builder)
+ {
+ base.OnModelCreating(builder);
+
+ builder.ConfigureIdentity();
+ builder.ConfigureIdentityServer();
+ }
+ }
+}
\ No newline at end of file
diff --git a/services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/EntityFrameworkCore/IdentityServiceDbContextFactory.cs b/services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/EntityFrameworkCore/IdentityServiceDbContextFactory.cs
new file mode 100644
index 00000000..26113817
--- /dev/null
+++ b/services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/EntityFrameworkCore/IdentityServiceDbContextFactory.cs
@@ -0,0 +1,46 @@
+using System.IO;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Design;
+using Microsoft.Extensions.Configuration;
+
+namespace EShopOnAbp.IdentityService.EntityFrameworkCore
+{
+ /* This class is needed for EF Core console commands
+ * (like Add-Migration and Update-Database commands)
+ * */
+ public class IdentityServiceDbContextFactory : IDesignTimeDbContextFactory
+ {
+ public IdentityServiceDbContext CreateDbContext(string[] args)
+ {
+ IdentityServiceEfCoreEntityExtensionMappings.Configure();
+
+ var builder = new DbContextOptionsBuilder()
+ .UseSqlServer(GetConnectionStringFromConfiguration(), b =>
+ {
+ b.MigrationsHistoryTable("__IdentityService_Migrations");
+ });
+
+ return new IdentityServiceDbContext(builder.Options);
+ }
+
+ private static string GetConnectionStringFromConfiguration()
+ {
+ return BuildConfiguration()
+ .GetConnectionString(IdentityServiceDbProperties.ConnectionStringName);
+ }
+
+ private static IConfigurationRoot BuildConfiguration()
+ {
+ var builder = new ConfigurationBuilder()
+ .SetBasePath(
+ Path.Combine(
+ Directory.GetCurrentDirectory(),
+ $"..{Path.DirectorySeparatorChar}EShopOnAbp.IdentityService.HttpApi.Host"
+ )
+ )
+ .AddJsonFile("appsettings.json", optional: false);
+
+ return builder.Build();
+ }
+ }
+}
\ No newline at end of file
diff --git a/services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/EntityFrameworkCore/IdentityServiceEfCoreEntityExtensionMappings.cs b/services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/EntityFrameworkCore/IdentityServiceEfCoreEntityExtensionMappings.cs
new file mode 100644
index 00000000..7566b3eb
--- /dev/null
+++ b/services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/EntityFrameworkCore/IdentityServiceEfCoreEntityExtensionMappings.cs
@@ -0,0 +1,44 @@
+using Microsoft.EntityFrameworkCore;
+using Volo.Abp.Identity;
+using Volo.Abp.ObjectExtending;
+using Volo.Abp.Threading;
+
+namespace EShopOnAbp.IdentityService.EntityFrameworkCore
+{
+ public static class IdentityServiceEfCoreEntityExtensionMappings
+ {
+ private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner();
+
+ public static void Configure()
+ {
+ IdentityServiceModuleExtensionConfigurator.Configure();
+
+ OneTimeRunner.Run(() =>
+ {
+ /* You can configure extra properties for the
+ * entities defined in the modules used by your application.
+ *
+ * This class can be used to map these extra properties to table fields in the database.
+ *
+ * USE THIS CLASS ONLY TO CONFIGURE EF CORE RELATED MAPPING.
+ * USE IdentityServiceModuleExtensionConfigurator CLASS (in the Domain.Shared project)
+ * FOR A HIGH LEVEL API TO DEFINE EXTRA PROPERTIES TO ENTITIES OF THE USED MODULES
+ *
+ * Example: Map a property to a table field:
+
+ ObjectExtensionManager.Instance
+ .MapEfCoreProperty(
+ "MyProperty",
+ (entityBuilder, propertyBuilder) =>
+ {
+ propertyBuilder.HasMaxLength(128);
+ }
+ );
+
+ * See the documentation for more:
+ * https://docs.abp.io/en/abp/latest/Customizing-Application-Modules-Extending-Entities
+ */
+ });
+ }
+ }
+}
diff --git a/services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/EntityFrameworkCore/IdentityServiceEntityFrameworkCoreModule.cs b/services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/EntityFrameworkCore/IdentityServiceEntityFrameworkCoreModule.cs
new file mode 100644
index 00000000..adc8a448
--- /dev/null
+++ b/services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/EntityFrameworkCore/IdentityServiceEntityFrameworkCoreModule.cs
@@ -0,0 +1,43 @@
+using Microsoft.Extensions.DependencyInjection;
+using Volo.Abp.EntityFrameworkCore;
+using Volo.Abp.EntityFrameworkCore.SqlServer;
+using Volo.Abp.Identity.EntityFrameworkCore;
+using Volo.Abp.IdentityServer.EntityFrameworkCore;
+using Volo.Abp.Modularity;
+
+namespace EShopOnAbp.IdentityService.EntityFrameworkCore
+{
+ [DependsOn(
+ typeof(IdentityServiceDomainModule),
+ typeof(AbpEntityFrameworkCoreSqlServerModule),
+ typeof(AbpIdentityEntityFrameworkCoreModule),
+ typeof(AbpIdentityServerEntityFrameworkCoreModule)
+ )]
+ public class IdentityServiceEntityFrameworkCoreModule : AbpModule
+ {
+ public override void PreConfigureServices(ServiceConfigurationContext context)
+ {
+ IdentityServiceEfCoreEntityExtensionMappings.Configure();
+ }
+
+ public override void ConfigureServices(ServiceConfigurationContext context)
+ {
+ context.Services.AddAbpDbContext(options =>
+ {
+ options.ReplaceDbContext();
+ options.ReplaceDbContext();
+
+ /* includeAllEntities: true allows to use IRepository also for non aggregate root entities */
+ options.AddDefaultRepositories(includeAllEntities: true);
+ });
+
+ Configure(options =>
+ {
+ options.Configure(c =>
+ {
+ c.UseSqlServer(b => { b.MigrationsHistoryTable("__IdentityService_Migrations"); });
+ });
+ });
+ }
+ }
+}
\ No newline at end of file
diff --git a/services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/Migrations/20210629140020_Initial.Designer.cs b/services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/Migrations/20210629140020_Initial.Designer.cs
new file mode 100644
index 00000000..db1083e0
--- /dev/null
+++ b/services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/Migrations/20210629140020_Initial.Designer.cs
@@ -0,0 +1,1762 @@
+//
+using System;
+using EShopOnAbp.IdentityService.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Volo.Abp.EntityFrameworkCore;
+
+namespace EShopOnAbp.IdentityService.Migrations
+{
+ [DbContext(typeof(IdentityServiceDbContext))]
+ [Migration("20210629140020_Initial")]
+ partial class Initial
+ {
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer)
+ .HasAnnotation("Relational:MaxIdentifierLength", 128)
+ .HasAnnotation("ProductVersion", "5.0.7")
+ .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
+
+ modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("nvarchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("Description")
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("IsStatic")
+ .HasColumnType("bit");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
+
+ b.Property("Regex")
+ .HasMaxLength(512)
+ .HasColumnType("nvarchar(512)");
+
+ b.Property("RegexDescription")
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)");
+
+ b.Property("Required")
+ .HasColumnType("bit");
+
+ b.Property("ValueType")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.ToTable("AbpClaimTypes");
+ });
+
+ modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("SourceTenantId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("SourceUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TargetTenantId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TargetUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId")
+ .IsUnique()
+ .HasFilter("[SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL");
+
+ b.ToTable("AbpLinkUsers");
+ });
+
+ modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("nvarchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("IsDefault")
+ .HasColumnType("bit")
+ .HasColumnName("IsDefault");
+
+ b.Property("IsPublic")
+ .HasColumnType("bit")
+ .HasColumnName("IsPublic");
+
+ b.Property("IsStatic")
+ .HasColumnType("bit")
+ .HasColumnName("IsStatic");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
+
+ b.Property("NormalizedName")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("NormalizedName");
+
+ b.ToTable("AbpRoles");
+ });
+
+ modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ClaimType")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
+
+ b.Property("ClaimValue")
+ .HasMaxLength(1024)
+ .HasColumnType("nvarchar(1024)");
+
+ b.Property("RoleId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("RoleId");
+
+ b.ToTable("AbpRoleClaims");
+ });
+
+ modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Action")
+ .HasMaxLength(96)
+ .HasColumnType("nvarchar(96)");
+
+ b.Property("ApplicationName")
+ .HasMaxLength(96)
+ .HasColumnType("nvarchar(96)");
+
+ b.Property("BrowserInfo")
+ .HasMaxLength(512)
+ .HasColumnType("nvarchar(512)");
+
+ b.Property("ClientId")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("ClientIpAddress")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("nvarchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CorrelationId")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("Identity")
+ .HasMaxLength(96)
+ .HasColumnType("nvarchar(96)");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.Property("TenantName")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("UserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("UserName")
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(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")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("AccessFailedCount")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasDefaultValue(0)
+ .HasColumnName("AccessFailedCount");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("nvarchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("DeleterId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("DeletionTime");
+
+ b.Property("Email")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)")
+ .HasColumnName("Email");
+
+ b.Property("EmailConfirmed")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(false)
+ .HasColumnName("EmailConfirmed");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("IsExternal")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(false)
+ .HasColumnName("IsExternal");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("LastModifierId");
+
+ b.Property("LockoutEnabled")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(false)
+ .HasColumnName("LockoutEnabled");
+
+ b.Property("LockoutEnd")
+ .HasColumnType("datetimeoffset");
+
+ b.Property("Name")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)")
+ .HasColumnName("Name");
+
+ b.Property("NormalizedEmail")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)")
+ .HasColumnName("NormalizedEmail");
+
+ b.Property("NormalizedUserName")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)")
+ .HasColumnName("NormalizedUserName");
+
+ b.Property("PasswordHash")
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)")
+ .HasColumnName("PasswordHash");
+
+ b.Property("PhoneNumber")
+ .HasMaxLength(16)
+ .HasColumnType("nvarchar(16)")
+ .HasColumnName("PhoneNumber");
+
+ b.Property("PhoneNumberConfirmed")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(false)
+ .HasColumnName("PhoneNumberConfirmed");
+
+ b.Property("SecurityStamp")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)")
+ .HasColumnName("SecurityStamp");
+
+ b.Property("Surname")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)")
+ .HasColumnName("Surname");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.Property("TwoFactorEnabled")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(false)
+ .HasColumnName("TwoFactorEnabled");
+
+ b.Property("UserName")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(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("uniqueidentifier");
+
+ b.Property("ClaimType")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
+
+ b.Property("ClaimValue")
+ .HasMaxLength(1024)
+ .HasColumnType("nvarchar(1024)");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.Property("UserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("UserId");
+
+ b.ToTable("AbpUserClaims");
+ });
+
+ modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b =>
+ {
+ b.Property("UserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("LoginProvider")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("ProviderDisplayName")
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)");
+
+ b.Property("ProviderKey")
+ .IsRequired()
+ .HasMaxLength(196)
+ .HasColumnType("nvarchar(196)");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.HasKey("UserId", "LoginProvider");
+
+ b.HasIndex("LoginProvider", "ProviderKey");
+
+ b.ToTable("AbpUserLogins");
+ });
+
+ modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b =>
+ {
+ b.Property("OrganizationUnitId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("UserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.HasKey("OrganizationUnitId", "UserId");
+
+ b.HasIndex("UserId", "OrganizationUnitId");
+
+ b.ToTable("AbpUserOrganizationUnits");
+ });
+
+ modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b =>
+ {
+ b.Property("UserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("RoleId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.HasKey("UserId", "RoleId");
+
+ b.HasIndex("RoleId", "UserId");
+
+ b.ToTable("AbpUserRoles");
+ });
+
+ modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b =>
+ {
+ b.Property("UserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("LoginProvider")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("Name")
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.Property("Value")
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("UserId", "LoginProvider", "Name");
+
+ b.ToTable("AbpUserTokens");
+ });
+
+ modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Code")
+ .IsRequired()
+ .HasMaxLength(95)
+ .HasColumnType("nvarchar(95)")
+ .HasColumnName("Code");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("nvarchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("DeleterId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("DeletionTime");
+
+ b.Property("DisplayName")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)")
+ .HasColumnName("DisplayName");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("LastModifierId");
+
+ b.Property("ParentId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .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("uniqueidentifier");
+
+ b.Property("RoleId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.HasKey("OrganizationUnitId", "RoleId");
+
+ b.HasIndex("RoleId", "OrganizationUnitId");
+
+ b.ToTable("AbpOrganizationUnitRoles");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("AllowedAccessTokenSigningAlgorithms")
+ .HasMaxLength(100)
+ .HasColumnType("nvarchar(100)");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("nvarchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("DeleterId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("DeletionTime");
+
+ b.Property("Description")
+ .HasMaxLength(1000)
+ .HasColumnType("nvarchar(1000)");
+
+ b.Property("DisplayName")
+ .HasMaxLength(200)
+ .HasColumnType("nvarchar(200)");
+
+ b.Property("Enabled")
+ .HasColumnType("bit");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("LastModifierId");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("nvarchar(200)");
+
+ b.Property("ShowInDiscoveryDocument")
+ .HasColumnType("bit");
+
+ b.HasKey("Id");
+
+ b.ToTable("IdentityServerApiResources");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b =>
+ {
+ b.Property("ApiResourceId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Type")
+ .HasMaxLength(200)
+ .HasColumnType("nvarchar(200)");
+
+ b.HasKey("ApiResourceId", "Type");
+
+ b.ToTable("IdentityServerApiResourceClaims");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b =>
+ {
+ b.Property("ApiResourceId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Key")
+ .HasMaxLength(250)
+ .HasColumnType("nvarchar(250)");
+
+ b.Property("Value")
+ .HasMaxLength(2000)
+ .HasColumnType("nvarchar(2000)");
+
+ b.HasKey("ApiResourceId", "Key", "Value");
+
+ b.ToTable("IdentityServerApiResourceProperties");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceScope", b =>
+ {
+ b.Property("ApiResourceId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Scope")
+ .HasMaxLength(200)
+ .HasColumnType("nvarchar(200)");
+
+ b.HasKey("ApiResourceId", "Scope");
+
+ b.ToTable("IdentityServerApiResourceScopes");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceSecret", b =>
+ {
+ b.Property("ApiResourceId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Type")
+ .HasMaxLength(250)
+ .HasColumnType("nvarchar(250)");
+
+ b.Property("Value")
+ .HasMaxLength(4000)
+ .HasColumnType("nvarchar(4000)");
+
+ b.Property("Description")
+ .HasMaxLength(1000)
+ .HasColumnType("nvarchar(1000)");
+
+ b.Property("Expiration")
+ .HasColumnType("datetime2");
+
+ b.HasKey("ApiResourceId", "Type", "Value");
+
+ b.ToTable("IdentityServerApiResourceSecrets");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScope", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("nvarchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("DeleterId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("DeletionTime");
+
+ b.Property("Description")
+ .HasMaxLength(1000)
+ .HasColumnType("nvarchar(1000)");
+
+ b.Property("DisplayName")
+ .HasMaxLength(200)
+ .HasColumnType("nvarchar(200)");
+
+ b.Property("Emphasize")
+ .HasColumnType("bit");
+
+ b.Property("Enabled")
+ .HasColumnType("bit");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("LastModifierId");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("nvarchar(200)");
+
+ b.Property("Required")
+ .HasColumnType("bit");
+
+ b.Property("ShowInDiscoveryDocument")
+ .HasColumnType("bit");
+
+ b.HasKey("Id");
+
+ b.ToTable("IdentityServerApiScopes");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeClaim", b =>
+ {
+ b.Property("ApiScopeId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Type")
+ .HasMaxLength(200)
+ .HasColumnType("nvarchar(200)");
+
+ b.HasKey("ApiScopeId", "Type");
+
+ b.ToTable("IdentityServerApiScopeClaims");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeProperty", b =>
+ {
+ b.Property("ApiScopeId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Key")
+ .HasMaxLength(250)
+ .HasColumnType("nvarchar(250)");
+
+ b.Property("Value")
+ .HasMaxLength(2000)
+ .HasColumnType("nvarchar(2000)");
+
+ b.HasKey("ApiScopeId", "Key", "Value");
+
+ b.ToTable("IdentityServerApiScopeProperties");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("AbsoluteRefreshTokenLifetime")
+ .HasColumnType("int");
+
+ b.Property("AccessTokenLifetime")
+ .HasColumnType("int");
+
+ b.Property("AccessTokenType")
+ .HasColumnType("int");
+
+ b.Property("AllowAccessTokensViaBrowser")
+ .HasColumnType("bit");
+
+ b.Property("AllowOfflineAccess")
+ .HasColumnType("bit");
+
+ b.Property("AllowPlainTextPkce")
+ .HasColumnType("bit");
+
+ b.Property("AllowRememberConsent")
+ .HasColumnType("bit");
+
+ b.Property("AllowedIdentityTokenSigningAlgorithms")
+ .HasMaxLength(100)
+ .HasColumnType("nvarchar(100)");
+
+ b.Property("AlwaysIncludeUserClaimsInIdToken")
+ .HasColumnType("bit");
+
+ b.Property("AlwaysSendClientClaims")
+ .HasColumnType("bit");
+
+ b.Property("AuthorizationCodeLifetime")
+ .HasColumnType("int");
+
+ b.Property("BackChannelLogoutSessionRequired")
+ .HasColumnType("bit");
+
+ b.Property("BackChannelLogoutUri")
+ .HasMaxLength(2000)
+ .HasColumnType("nvarchar(2000)");
+
+ b.Property("ClientClaimsPrefix")
+ .HasMaxLength(200)
+ .HasColumnType("nvarchar(200)");
+
+ b.Property("ClientId")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("nvarchar(200)");
+
+ b.Property("ClientName")
+ .HasMaxLength(200)
+ .HasColumnType("nvarchar(200)");
+
+ b.Property("ClientUri")
+ .HasMaxLength(2000)
+ .HasColumnType("nvarchar(2000)");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("nvarchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("ConsentLifetime")
+ .HasColumnType("int");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("DeleterId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("DeletionTime");
+
+ b.Property("Description")
+ .HasMaxLength(1000)
+ .HasColumnType("nvarchar(1000)");
+
+ b.Property("DeviceCodeLifetime")
+ .HasColumnType("int");
+
+ b.Property("EnableLocalLogin")
+ .HasColumnType("bit");
+
+ b.Property("Enabled")
+ .HasColumnType("bit");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("FrontChannelLogoutSessionRequired")
+ .HasColumnType("bit");
+
+ b.Property("FrontChannelLogoutUri")
+ .HasMaxLength(2000)
+ .HasColumnType("nvarchar(2000)");
+
+ b.Property("IdentityTokenLifetime")
+ .HasColumnType("int");
+
+ b.Property("IncludeJwtId")
+ .HasColumnType("bit");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("LastModifierId");
+
+ b.Property("LogoUri")
+ .HasMaxLength(2000)
+ .HasColumnType("nvarchar(2000)");
+
+ b.Property("PairWiseSubjectSalt")
+ .HasMaxLength(200)
+ .HasColumnType("nvarchar(200)");
+
+ b.Property("ProtocolType")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("nvarchar(200)");
+
+ b.Property("RefreshTokenExpiration")
+ .HasColumnType("int");
+
+ b.Property("RefreshTokenUsage")
+ .HasColumnType("int");
+
+ b.Property("RequireClientSecret")
+ .HasColumnType("bit");
+
+ b.Property("RequireConsent")
+ .HasColumnType("bit");
+
+ b.Property