From e1c7ce827d0f23dcc5e36ff19cd4a2f184224e5a Mon Sep 17 00:00:00 2001 From: maliming <6908465+maliming@users.noreply.github.com> Date: Thu, 2 Jul 2020 16:43:18 +0800 Subject: [PATCH 01/76] Update the package and pass the build. --- .../Volo.Abp.IdentityServer.Domain.csproj | 4 +- .../IdentityServer/ApiResources/ApiScope.cs | 17 +++--- .../ApiResources/IApiResourceRepository.cs | 6 +- .../ApiResources/IApiScopeeRepository.cs | 16 +++++ .../AbpResourceOwnerPasswordValidator.cs | 10 +--- .../Grants/IPersistentGrantRepository.cs | 21 +++---- .../Grants/PersistedGrantStore.cs | 15 ++--- .../IIdentityResourceRepository.cs | 4 +- .../IdentityServerAutoMapperProfile.cs | 2 +- .../Volo/Abp/IdentityServer/ResourceStore.cs | 60 +++++++++++++------ ...IdentityServerEfCoreQueryableExtensions.cs | 17 +++++- .../ApiResources/ApiResourceRepository.cs | 18 +++--- .../ApiResources/ApiScopeRepository.cs | 29 +++++++++ .../Grants/PersistedGrantRepository.cs | 53 +++++++++------- .../IdentityResourceRepository.cs | 4 +- .../MongoDB/MongoApiResourceRepository.cs | 7 ++- .../MongoIdentityResourceRepository.cs | 2 +- .../MongoDB/MongoPersistedGrantRepository.cs | 41 ++++++++++++- .../Clients/IdentityResourceStore_Tests.cs | 21 +++---- .../Clients/PersistentGrant_Tests.cs | 22 +++++-- .../ApiResourceRepository_Tests.cs | 2 +- .../IdentityResourceRepository_Tests.cs | 2 +- .../PersistentGrantRepository_Tests.cs | 2 +- 23 files changed, 256 insertions(+), 119 deletions(-) create mode 100644 modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/IApiScopeeRepository.cs create mode 100644 modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiScopeRepository.cs diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo.Abp.IdentityServer.Domain.csproj b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo.Abp.IdentityServer.Domain.csproj index 0fbb06c694..18a73a1a67 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo.Abp.IdentityServer.Domain.csproj +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo.Abp.IdentityServer.Domain.csproj @@ -25,8 +25,8 @@ - - + + diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiScope.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiScope.cs index c54caea3a9..1d22dec3dc 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiScope.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiScope.cs @@ -25,6 +25,8 @@ namespace Volo.Abp.IdentityServer.ApiResources public virtual List UserClaims { get; protected set; } + public virtual Dictionary Properties { get; protected set; } + protected ApiScope() { @@ -36,12 +38,12 @@ namespace Volo.Abp.IdentityServer.ApiResources } protected internal ApiScope( - Guid apiResourceId, - [NotNull] string name, - string displayName = null, - string description = null, - bool required = false, - bool emphasize = false, + Guid apiResourceId, + [NotNull] string name, + string displayName = null, + string description = null, + bool required = false, + bool emphasize = false, bool showInDiscoveryDocument = true) { Check.NotNull(name, nameof(name)); @@ -55,6 +57,7 @@ namespace Volo.Abp.IdentityServer.ApiResources ShowInDiscoveryDocument = showInDiscoveryDocument; UserClaims = new List(); + Properties = new Dictionary(); } public virtual void AddUserClaim([NotNull] string type) @@ -82,4 +85,4 @@ namespace Volo.Abp.IdentityServer.ApiResources return new object[] { ApiResourceId, Name }; } } -} \ No newline at end of file +} diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/IApiResourceRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/IApiResourceRepository.cs index 988cd8c4a6..af1dcd6e36 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/IApiResourceRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/IApiResourceRepository.cs @@ -8,8 +8,8 @@ namespace Volo.Abp.IdentityServer.ApiResources { public interface IApiResourceRepository : IBasicRepository { - Task FindByNameAsync( - string name, + Task> FindByNameAsync( + string[] apiResourceNames, bool includeDetails = true, CancellationToken cancellationToken = default ); @@ -40,4 +40,4 @@ namespace Volo.Abp.IdentityServer.ApiResources CancellationToken cancellationToken = default ); } -} \ No newline at end of file +} diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/IApiScopeeRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/IApiScopeeRepository.cs new file mode 100644 index 0000000000..184b8d1b67 --- /dev/null +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/IApiScopeeRepository.cs @@ -0,0 +1,16 @@ +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Volo.Abp.Domain.Repositories; + +namespace Volo.Abp.IdentityServer.ApiResources +{ + public interface IApiScopeRepository : IBasicRepository + { + Task> GetListByNameAsync( + string[] scopeNames, + bool includeDetails = false, + CancellationToken cancellationToken = default + ); + } +} diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AspNetIdentity/AbpResourceOwnerPasswordValidator.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AspNetIdentity/AbpResourceOwnerPasswordValidator.cs index e45df9b3f7..c4169e367f 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AspNetIdentity/AbpResourceOwnerPasswordValidator.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AspNetIdentity/AbpResourceOwnerPasswordValidator.cs @@ -21,7 +21,6 @@ namespace Volo.Abp.IdentityServer.AspNetIdentity public class AbpResourceOwnerPasswordValidator : IResourceOwnerPasswordValidator { protected SignInManager SignInManager { get; } - protected IEventService Events { get; } protected UserManager UserManager { get; } protected ILogger> Logger { get; } protected IStringLocalizer Localizer { get; } @@ -29,13 +28,11 @@ namespace Volo.Abp.IdentityServer.AspNetIdentity public AbpResourceOwnerPasswordValidator( UserManager userManager, SignInManager signInManager, - IEventService events, - ILogger> logger, + ILogger> logger, IStringLocalizer localizer) { UserManager = userManager; SignInManager = signInManager; - Events = events; Logger = logger; Localizer = localizer; } @@ -59,7 +56,6 @@ namespace Volo.Abp.IdentityServer.AspNetIdentity var sub = await UserManager.GetUserIdAsync(user); Logger.LogInformation("Credentials validated for username: {username}", context.UserName); - await Events.RaiseAsync(new UserLoginSuccessEvent(context.UserName, sub, context.UserName, interactive: false)); var additionalClaims = new List(); @@ -76,26 +72,22 @@ namespace Volo.Abp.IdentityServer.AspNetIdentity else if (result.IsLockedOut) { Logger.LogInformation("Authentication failed for username: {username}, reason: locked out", context.UserName); - await Events.RaiseAsync(new UserLoginFailureEvent(context.UserName, "locked out", interactive: false)); errorDescription = Localizer["UserLockedOut"]; } else if (result.IsNotAllowed) { Logger.LogInformation("Authentication failed for username: {username}, reason: not allowed", context.UserName); - await Events.RaiseAsync(new UserLoginFailureEvent(context.UserName, "not allowed", interactive: false)); errorDescription = Localizer["LoginIsNotAllowed"]; } else { Logger.LogInformation("Authentication failed for username: {username}, reason: invalid credentials", context.UserName); - await Events.RaiseAsync(new UserLoginFailureEvent(context.UserName, "invalid credentials", interactive: false)); errorDescription = Localizer["InvalidUserNameOrPassword"]; } } else { Logger.LogInformation("No user found matching username: {username}", context.UserName); - await Events.RaiseAsync(new UserLoginFailureEvent(context.UserName, "invalid username", interactive: false)); errorDescription = Localizer["InvalidUsername"]; } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Grants/IPersistentGrantRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Grants/IPersistentGrantRepository.cs index 65cfabd7e7..6642440234 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Grants/IPersistentGrantRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Grants/IPersistentGrantRepository.cs @@ -8,6 +8,12 @@ namespace Volo.Abp.IdentityServer.Grants { public interface IPersistentGrantRepository : IBasicRepository { + Task> GetListAsync( + string subjectId, + string sessionId, + string clientId, + string type, bool includeDetails = false, CancellationToken cancellationToken = default); + Task FindByKeyAsync( string key, CancellationToken cancellationToken = default @@ -25,16 +31,11 @@ namespace Volo.Abp.IdentityServer.Grants ); Task DeleteAsync( - string subjectId, - string clientId, - CancellationToken cancellationToken = default - ); - - Task DeleteAsync( - string subjectId, - string clientId, - string type, + string subjectId = null, + string sessionId = null, + string clientId = null, + string type = null, CancellationToken cancellationToken = default ); } -} \ No newline at end of file +} diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Grants/PersistedGrantStore.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Grants/PersistedGrantStore.cs index 091989931b..19efb54a56 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Grants/PersistedGrantStore.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Grants/PersistedGrantStore.cs @@ -44,10 +44,10 @@ namespace Volo.Abp.IdentityServer.Grants return ObjectMapper.Map(persistedGrant); } - public virtual async Task> GetAllAsync(string subjectId) + public virtual async Task> GetAllAsync(PersistedGrantFilter filter) { - var persistedGrants = await PersistentGrantRepository.GetListBySubjectIdAsync(subjectId); - return persistedGrants.Select(x => ObjectMapper.Map(x)); + var persistedGrants = await PersistentGrantRepository.GetListAsync(filter.SubjectId, filter.SessionId, filter.ClientId, filter.Type); + return ObjectMapper.Map, List>(persistedGrants); } public virtual async Task RemoveAsync(string key) @@ -61,14 +61,9 @@ namespace Volo.Abp.IdentityServer.Grants await PersistentGrantRepository.DeleteAsync(persistedGrant); } - public virtual async Task RemoveAllAsync(string subjectId, string clientId) + public virtual async Task RemoveAllAsync(PersistedGrantFilter filter) { - await PersistentGrantRepository.DeleteAsync(subjectId, clientId); - } - - public virtual async Task RemoveAllAsync(string subjectId, string clientId, string type) - { - await PersistentGrantRepository.DeleteAsync(subjectId, clientId, type); + await PersistentGrantRepository.DeleteAsync(filter.SubjectId, filter.SessionId, filter.ClientId, filter.Type); } } } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityResources/IIdentityResourceRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityResources/IIdentityResourceRepository.cs index c8b350ce1a..4dd5472ea9 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityResources/IIdentityResourceRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityResources/IIdentityResourceRepository.cs @@ -8,7 +8,7 @@ namespace Volo.Abp.IdentityServer.IdentityResources { public interface IIdentityResourceRepository : IBasicRepository { - Task> GetListByScopesAsync( + Task> GetListByScopeNameAsync( string[] scopeNames, bool includeDetails = false, CancellationToken cancellationToken = default @@ -35,4 +35,4 @@ namespace Volo.Abp.IdentityServer.IdentityResources CancellationToken cancellationToken = default ); } -} \ No newline at end of file +} diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityServerAutoMapperProfile.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityServerAutoMapperProfile.cs index e576d9413e..502e3fa1e2 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityServerAutoMapperProfile.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityServerAutoMapperProfile.cs @@ -37,7 +37,7 @@ namespace Volo.Abp.IdentityServer CreateMap(); - CreateMap(); + CreateMap(); CreateMap>() .ReverseMap(); diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ResourceStore.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ResourceStore.cs index d01884380d..6252be400c 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ResourceStore.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ResourceStore.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using IdentityServer4.Models; @@ -6,8 +6,7 @@ using IdentityServer4.Stores; using Volo.Abp.IdentityServer.ApiResources; using Volo.Abp.IdentityServer.IdentityResources; using Volo.Abp.ObjectMapping; -using ApiResource = IdentityServer4.Models.ApiResource; -using IdentityResource = Volo.Abp.IdentityServer.IdentityResources.IdentityResource; +using ApiScope = Volo.Abp.IdentityServer.ApiResources.ApiScope; namespace Volo.Abp.IdentityServer { @@ -15,45 +14,70 @@ namespace Volo.Abp.IdentityServer { protected IIdentityResourceRepository IdentityResourceRepository { get; } protected IApiResourceRepository ApiResourceRepository { get; } + protected IApiScopeRepository ApiScopeRepository { get; } protected IObjectMapper ObjectMapper { get; } public ResourceStore( - IIdentityResourceRepository identityResourceRepository, - IObjectMapper objectMapper, - IApiResourceRepository apiResourceRepository) + IIdentityResourceRepository identityResourceRepository, + IObjectMapper objectMapper, + IApiResourceRepository apiResourceRepository, + IApiScopeRepository apiScopeRepository) { IdentityResourceRepository = identityResourceRepository; ObjectMapper = objectMapper; ApiResourceRepository = apiResourceRepository; + ApiScopeRepository = apiScopeRepository; } - public virtual async Task> FindIdentityResourcesByScopeAsync(IEnumerable scopeNames) + /// + /// Gets identity resources by scope name. + /// + public virtual async Task> FindIdentityResourcesByScopeNameAsync(IEnumerable scopeNames) { - var resource = await IdentityResourceRepository.GetListByScopesAsync(scopeNames.ToArray(), includeDetails: true); - return ObjectMapper.Map, List>(resource); + var resource = await IdentityResourceRepository.GetListByScopeNameAsync(scopeNames.ToArray(), includeDetails: true); + return ObjectMapper.Map, List>(resource); } - public virtual async Task> FindApiResourcesByScopeAsync(IEnumerable scopeNames) + /// + /// Gets API scopes by scope name. + /// + public virtual async Task> FindApiScopesByNameAsync(IEnumerable scopeNames) + { + var scopes = await ApiScopeRepository.GetListByNameAsync(scopeNames.ToArray(), includeDetails: true); + return ObjectMapper.Map, List>(scopes); + } + + /// + /// Gets API resources by scope name. + /// + public virtual async Task> FindApiResourcesByScopeNameAsync(IEnumerable scopeNames) { var resources = await ApiResourceRepository.GetListByScopesAsync(scopeNames.ToArray(), includeDetails: true); - return resources.Select(x => ObjectMapper.Map(x)); + return ObjectMapper.Map, List>(resources); } - public virtual async Task FindApiResourceAsync(string name) + /// + /// Gets API resources by API resource name. + /// + public virtual async Task> FindApiResourcesByNameAsync(IEnumerable apiResourceNames) { - var resource = await ApiResourceRepository.FindByNameAsync(name); - return ObjectMapper.Map(resource); + var resources = await ApiResourceRepository.FindByNameAsync(apiResourceNames.ToArray(), includeDetails: true); + return ObjectMapper.Map, List>(resources); } - public virtual async Task GetAllResourcesAsync() + /// + /// Gets all resources. + /// + public virtual async Task GetAllResourcesAsync() { var identityResources = await IdentityResourceRepository.GetListAsync(includeDetails: true); var apiResources = await ApiResourceRepository.GetListAsync(includeDetails: true); + var apiScopes = await ApiScopeRepository.GetListAsync(includeDetails: true); return new Resources( - ObjectMapper.Map, IdentityServer4.Models.IdentityResource[]>(identityResources), - ObjectMapper.Map, ApiResource[]>(apiResources) - ); + ObjectMapper.Map, List>(identityResources), + ObjectMapper.Map, List>(apiResources), + ObjectMapper.Map, List>(apiScopes)); } } } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/AbpIdentityServerEfCoreQueryableExtensions.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/AbpIdentityServerEfCoreQueryableExtensions.cs index 51b490fc47..a72cadb943 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/AbpIdentityServerEfCoreQueryableExtensions.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/AbpIdentityServerEfCoreQueryableExtensions.cs @@ -22,6 +22,18 @@ namespace Volo.Abp.IdentityServer .ThenInclude(s => s.UserClaims); } + public static IQueryable IncludeDetails(this IQueryable queryable, bool include = true) + { + if (!include) + { + return queryable; + } + + return queryable + .Include(x => x.UserClaims) + .Include(x => x.Properties); + } + public static IQueryable IncludeDetails(this IQueryable queryable, bool include = true) { if (!include) @@ -30,7 +42,8 @@ namespace Volo.Abp.IdentityServer } return queryable - .Include(x => x.UserClaims); + .Include(x => x.UserClaims) + .Include(x => x.Properties); } public static IQueryable IncludeDetails(this IQueryable queryable, bool include = true) @@ -52,4 +65,4 @@ namespace Volo.Abp.IdentityServer .Include(x => x.Properties); } } -} \ No newline at end of file +} diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiResourceRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiResourceRepository.cs index d4fc77ede2..d12a8208c2 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiResourceRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiResourceRepository.cs @@ -19,17 +19,14 @@ namespace Volo.Abp.IdentityServer.ApiResources } - public virtual async Task FindByNameAsync( - string name, - bool includeDetails = true, + public async Task> FindByNameAsync(string[] apiResourceNames, bool includeDetails = true, CancellationToken cancellationToken = default) { var query = from apiResource in DbSet.IncludeDetails(includeDetails) - where apiResource.Name == name - select apiResource; + where apiResourceNames.Contains(apiResource.Name) + select apiResource; - return await query - .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); + return await query.ToListAsync(GetCancellationToken(cancellationToken)); } public virtual async Task> GetListByScopesAsync( @@ -45,7 +42,10 @@ namespace Volo.Abp.IdentityServer.ApiResources } public virtual async Task> GetListAsync( - string sorting, int skipCount, int maxResultCount, string filter, bool includeDetails = false, + string sorting, int skipCount, + int maxResultCount, + string filter, + bool includeDetails = false, CancellationToken cancellationToken = default) { return await DbSet @@ -96,4 +96,4 @@ namespace Volo.Abp.IdentityServer.ApiResources return GetQueryable().IncludeDetails(); } } -} \ No newline at end of file +} diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiScopeRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiScopeRepository.cs new file mode 100644 index 0000000000..dba7405a06 --- /dev/null +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiScopeRepository.cs @@ -0,0 +1,29 @@ +using System.Collections.Generic; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.EntityFrameworkCore; +using Volo.Abp.Domain.Repositories.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.IdentityServer.EntityFrameworkCore; + +namespace Volo.Abp.IdentityServer.ApiResources +{ + public class ApiScopeRepository : EfCoreRepository, IApiScopeRepository + { + public ApiScopeRepository(IDbContextProvider dbContextProvider) : base( + dbContextProvider) + { + } + + public async Task> GetListByNameAsync(string[] scopeNames, bool includeDetails = false, + CancellationToken cancellationToken = default) + { + var query = from scope in DbSet.IncludeDetails(includeDetails) + where scopeNames.Contains(scope.Name) + select scope; + + return await query.ToListAsync(GetCancellationToken(cancellationToken)); + } + } +} diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Grants/PersistedGrantRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Grants/PersistedGrantRepository.cs index 03b752d61b..7a0bf0fbba 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Grants/PersistedGrantRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Grants/PersistedGrantRepository.cs @@ -12,19 +12,24 @@ namespace Volo.Abp.IdentityServer.Grants { public class PersistentGrantRepository : EfCoreRepository, IPersistentGrantRepository { - public PersistentGrantRepository(IDbContextProvider dbContextProvider) + public PersistentGrantRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) { } + public async Task> GetListAsync(string subjectId, string sessionId, string clientId, string type, bool includeDetails = false, + CancellationToken cancellationToken = default) + { + return await Filter(subjectId, sessionId, clientId, type) + .ToListAsync(GetCancellationToken(cancellationToken)); + } + public virtual async Task FindByKeyAsync( string key, CancellationToken cancellationToken = default) { - return await DbSet - .FirstOrDefaultAsync(x => x.Key == key, GetCancellationToken(cancellationToken)) - ; + return await DbSet.FirstOrDefaultAsync(x => x.Key == key, GetCancellationToken(cancellationToken)); } public virtual async Task> GetListBySubjectIdAsync( @@ -37,7 +42,7 @@ namespace Volo.Abp.IdentityServer.Grants } public virtual async Task> GetListByExpirationAsync( - DateTime maxExpirationDate, + DateTime maxExpirationDate, int maxResultCount, CancellationToken cancellationToken = default) { @@ -48,27 +53,33 @@ namespace Volo.Abp.IdentityServer.Grants .ToListAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task DeleteAsync( - string subjectId, - string clientId, + public async Task DeleteAsync( + string subjectId = null, + string sessionId = null, + string clientId = null, + string type = null, CancellationToken cancellationToken = default) { - await DeleteAsync( - x => x.SubjectId == subjectId && x.ClientId == clientId, - cancellationToken: GetCancellationToken(cancellationToken) - ); + var persistedGrants = await Filter(subjectId, sessionId, clientId, type).ToListAsync(GetCancellationToken(cancellationToken)); + + foreach (var persistedGrant in persistedGrants) + { + DbSet.Remove(persistedGrant); + } } - public virtual async Task DeleteAsync( - string subjectId, - string clientId, - string type, - CancellationToken cancellationToken = default) + private IQueryable Filter( + string subjectId, + string sessionId, + string clientId, + string type) { - await DeleteAsync( - x => x.SubjectId == subjectId && x.ClientId == clientId && x.Type == type, - cancellationToken: GetCancellationToken(cancellationToken) - ); + //IDS TODO: add SessionId to entity + return DbSet + .WhereIf(!subjectId.IsNullOrWhiteSpace(), x => x.SubjectId == subjectId) + // .WhereIf(!sessionId.IsNullOrWhiteSpace(), x => x.SessionId == sessionId) + .WhereIf(!clientId.IsNullOrWhiteSpace(), x => x.ClientId == clientId) + .WhereIf(!type.IsNullOrWhiteSpace(), x => x.Type == type); } } } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/IdentityResources/IdentityResourceRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/IdentityResources/IdentityResourceRepository.cs index faed5fb67a..e86732c1e5 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/IdentityResources/IdentityResourceRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/IdentityResources/IdentityResourceRepository.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Threading; @@ -19,7 +19,7 @@ namespace Volo.Abp.IdentityServer.IdentityResources } - public virtual async Task> GetListByScopesAsync( + public virtual async Task> GetListByScopeNameAsync( string[] scopeNames, bool includeDetails = false, CancellationToken cancellationToken = default) diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiResourceRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiResourceRepository.cs index d2c89f193c..de694a37c5 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiResourceRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiResourceRepository.cs @@ -18,11 +18,12 @@ namespace Volo.Abp.IdentityServer.MongoDB { } - public virtual async Task FindByNameAsync(string name, bool includeDetails = true, CancellationToken cancellationToken = default) + public async Task> FindByNameAsync(string[] apiResourceNames, bool includeDetails = true, + CancellationToken cancellationToken = default) { return await GetMongoQueryable() - .Where(ar => ar.Name == name) - .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); + .Where(ar => apiResourceNames.Contains(ar.Name)) + .ToListAsync(GetCancellationToken(cancellationToken)); } public virtual async Task> GetListByScopesAsync(string[] scopeNames, bool includeDetails = false, diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoIdentityResourceRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoIdentityResourceRepository.cs index e166ee9ec5..533136ebb3 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoIdentityResourceRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoIdentityResourceRepository.cs @@ -40,7 +40,7 @@ namespace Volo.Abp.IdentityServer.MongoDB .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task> GetListByScopesAsync(string[] scopeNames, bool includeDetails = false, + public virtual async Task> GetListByScopeNameAsync(string[] scopeNames, bool includeDetails = false, CancellationToken cancellationToken = default) { return await GetMongoQueryable() diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoPersistedGrantRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoPersistedGrantRepository.cs index e9b677453b..11559b7707 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoPersistedGrantRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoPersistedGrantRepository.cs @@ -16,6 +16,13 @@ namespace Volo.Abp.IdentityServer.MongoDB { } + public async Task> GetListAsync(string subjectId, string sessionId, string clientId, string type, bool includeDetails = false, + CancellationToken cancellationToken = default) + { + return await Filter(subjectId, sessionId, clientId, type) + .ToListAsync(GetCancellationToken(cancellationToken)); + } + public virtual async Task FindByKeyAsync(string key, CancellationToken cancellationToken = default) { @@ -27,8 +34,7 @@ namespace Volo.Abp.IdentityServer.MongoDB { return await GetMongoQueryable() .Where(x => x.SubjectId == subjectId) - .ToListAsync(GetCancellationToken(cancellationToken)) - ; + .ToListAsync(GetCancellationToken(cancellationToken)); } public virtual async Task> GetListByExpirationAsync(DateTime maxExpirationDate, int maxResultCount, @@ -41,6 +47,22 @@ namespace Volo.Abp.IdentityServer.MongoDB .ToListAsync(GetCancellationToken(cancellationToken)); } + public async Task DeleteAsync( + string subjectId = null, + string sessionId = null, + string clientId = null, + string type = null, + CancellationToken cancellationToken = default) + { + var persistedGrants = await Filter(subjectId, sessionId, clientId, type) + .ToListAsync(GetCancellationToken(cancellationToken)); + + foreach (var persistedGrant in persistedGrants) + { + await DeleteAsync(persistedGrant, false, GetCancellationToken(cancellationToken)); + } + } + public virtual async Task DeleteAsync(string subjectId, string clientId, CancellationToken cancellationToken = default) { await DeleteAsync( @@ -56,5 +78,20 @@ namespace Volo.Abp.IdentityServer.MongoDB cancellationToken: GetCancellationToken(cancellationToken) ); } + + private IMongoQueryable Filter( + string subjectId, + string sessionId, + string clientId, + string type) + { + //IDS TODO: add SessionId to entity + return GetMongoQueryable() + .WhereIf(!subjectId.IsNullOrWhiteSpace(), x => x.SubjectId == subjectId) + // .WhereIf(!sessionId.IsNullOrWhiteSpace(), x => x.SessionId == sessionId) + .WhereIf(!clientId.IsNullOrWhiteSpace(), x => x.ClientId == clientId) + .WhereIf(!type.IsNullOrWhiteSpace(), x => x.Type == type) + .As>(); + } } } diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Clients/IdentityResourceStore_Tests.cs b/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Clients/IdentityResourceStore_Tests.cs index a313c2717f..ef74266285 100644 --- a/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Clients/IdentityResourceStore_Tests.cs +++ b/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Clients/IdentityResourceStore_Tests.cs @@ -22,7 +22,7 @@ namespace Volo.Abp.IdentityServer.Clients public async Task FindApiResourceAsync_Should_Return_Null_If_Not_Found() { //Act - var resource = await _resourceStore.FindApiResourceAsync("non-existing-name"); + var resource = await _resourceStore.FindApiResourcesByNameAsync(new []{"non-existing-name"}); //Assert resource.ShouldBeNull(); @@ -32,7 +32,7 @@ namespace Volo.Abp.IdentityServer.Clients public async Task FindApiResourceAsync_Should_Return_If_Found() { //Act - var apiResource = await _resourceStore.FindApiResourceAsync("Test-ApiResource-Name-1"); + var apiResource = (await _resourceStore.FindApiResourcesByNameAsync(new []{"Test-ApiResource-Name-1"})).FirstOrDefault(); //Assert apiResource.ShouldNotBe(null); @@ -45,7 +45,7 @@ namespace Volo.Abp.IdentityServer.Clients public async Task FindApiResourcesByScopeAsync_Should_Return_If_Found() { //Act - var apiResources = (await _resourceStore.FindApiResourcesByScopeAsync(new List + var apiResources = (await _resourceStore.FindApiResourcesByScopeNameAsync(new List { "Test-ApiResource-ApiScope-Name-1" })).ToList(); @@ -60,17 +60,18 @@ namespace Volo.Abp.IdentityServer.Clients public async Task FindIdentityResourcesByScopeAsync_Should_Return_For_Given_Scopes() { //Act - var identityResourcesByScope = await _resourceStore.FindIdentityResourcesByScopeAsync(new List + var identityResourcesByScope = (await _resourceStore.FindApiResourcesByScopeNameAsync(new List { "Test-Identity-Resource-Name-1" - }); + })).ToArray(); //Assert - var resourcesByScope = identityResourcesByScope as IdentityResource[] ?? identityResourcesByScope.ToArray(); - resourcesByScope.Length.ShouldBe(1); - resourcesByScope.First().DisplayName.ShouldBe("Test-Identity-Resource-DisplayName-1"); - resourcesByScope.First().Description.ShouldBe("Test-Identity-Resource-Description-1"); - resourcesByScope.First().Required.ShouldBe(true); + identityResourcesByScope.Length.ShouldBe(1); + identityResourcesByScope.First().DisplayName.ShouldBe("Test-Identity-Resource-DisplayName-1"); + identityResourcesByScope.First().Description.ShouldBe("Test-Identity-Resource-Description-1"); + + //IDS TODO: + //identityResourcesByScope.First().Required.ShouldBe(true); } [Fact] diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Clients/PersistentGrant_Tests.cs b/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Clients/PersistentGrant_Tests.cs index 8e83f57c51..c5848ec7de 100644 --- a/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Clients/PersistentGrant_Tests.cs +++ b/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Clients/PersistentGrant_Tests.cs @@ -122,7 +122,10 @@ namespace Volo.Abp.IdentityServer.Clients public async Task GetAllAsync_Should_Get_All_PersistedGrants_For_A_Given_SubjectId() { //Act - var persistentGrants = await _persistedGrantStore.GetAllAsync("TestSubject"); + var persistentGrants = await _persistedGrantStore.GetAllAsync(new PersistedGrantFilter() + { + SubjectId = "TestSubject" + }); //Assert var persistedGrants = persistentGrants as PersistedGrant[] ?? persistentGrants.ToArray(); @@ -156,16 +159,27 @@ namespace Volo.Abp.IdentityServer.Clients public async Task RemoveAllAsync_Should_RemoveAll_PeristedGrants_For_A_Given_Subject_And_ClientId() { //Arrange - var persistedGrantsWithTestSubjectX = await _persistedGrantStore.GetAllAsync("TestSubject-X"); + var persistedGrantsWithTestSubjectX = await _persistedGrantStore.GetAllAsync(new PersistedGrantFilter() + { + SubjectId = "TestSubject-X" + }); var persistedGrantsWithTestSubjectXBeforeLength = persistedGrantsWithTestSubjectX.ToArray().Length; //Act - await _persistedGrantStore.RemoveAllAsync("TestSubject-X", "TestClientId-X"); + await _persistedGrantStore.RemoveAllAsync(new PersistedGrantFilter() + { + SubjectId = "TestSubject-X", + ClientId = "TestClientId-X" + }); //Assert persistedGrantsWithTestSubjectXBeforeLength.ShouldBe(2); - var persistedGrants = (await _persistedGrantStore.GetAllAsync("TestClientId-37")).ToArray(); + var persistedGrants = (await _persistedGrantStore.GetAllAsync(new PersistedGrantFilter() + { + SubjectId = "TestClientId-37" + })).ToArray(); + persistedGrants.ShouldNotBe(null); persistedGrants.Length.ShouldBe(0); } diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/ApiResourceRepository_Tests.cs b/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/ApiResourceRepository_Tests.cs index b79114c59a..76fbba2504 100644 --- a/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/ApiResourceRepository_Tests.cs +++ b/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/ApiResourceRepository_Tests.cs @@ -20,7 +20,7 @@ namespace Volo.Abp.IdentityServer [Fact] public async Task FindByNormalizedNameAsync() { - (await apiResourceRepository.FindByNameAsync("NewApiResource2")).ShouldNotBeNull(); + (await apiResourceRepository.FindByNameAsync(new []{"NewApiResource2"})).ShouldNotBeNull(); } [Fact] diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/IdentityResourceRepository_Tests.cs b/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/IdentityResourceRepository_Tests.cs index 3ab47dd7ce..5d41b0afd2 100644 --- a/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/IdentityResourceRepository_Tests.cs +++ b/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/IdentityResourceRepository_Tests.cs @@ -23,7 +23,7 @@ namespace Volo.Abp.IdentityServer [Fact] public async Task GetListByScopesAsync() { - (await identityResourceRepository.GetListByScopesAsync(new[] { "", "NewIdentityResource2" })).Count.ShouldBe(1); + (await identityResourceRepository.GetListByScopeNameAsync(new[] { "", "NewIdentityResource2" })).Count.ShouldBe(1); } } } diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/PersistentGrantRepository_Tests.cs b/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/PersistentGrantRepository_Tests.cs index 20f6674515..91e14bbace 100644 --- a/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/PersistentGrantRepository_Tests.cs +++ b/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/PersistentGrantRepository_Tests.cs @@ -48,7 +48,7 @@ namespace Volo.Abp.IdentityServer [Fact] public async Task DeleteBySubjectIdAndClientIdAndType() { - await _persistentGrantRepository.DeleteAsync("PersistedGrantSubjectId1", "PersistedGrantClientId1", + await _persistentGrantRepository.DeleteAsync("PersistedGrantSubjectId1", "PersistedGrantSessionId1", "PersistedGrantClientId1", "PersistedGrantClientId1"); var persistedGrants = await _persistentGrantRepository.GetListAsync(); From 85b775184cc49551746717aa081a23b5d12fdc83 Mon Sep 17 00:00:00 2001 From: maliming <6908465+maliming@users.noreply.github.com> Date: Thu, 2 Jul 2020 21:36:48 +0800 Subject: [PATCH 02/76] Update entities & fix unit tests. --- .../ApiResources/ApiScopeConsts.cs | 4 +- .../Devices/DeviceFlowCodesEto.cs | 6 +- .../AllowedSigningAlgorithmsConverter.cs | 37 ++++++++ .../ApiResources/ApiResource.cs | 48 +++++------ .../ApiResources/ApiResourceScope.cs | 38 +++++++++ .../{ApiSecret.cs => ApiResourceSecret.cs} | 20 ++--- .../IdentityServer/ApiResources/ApiScope.cs | 30 +++---- .../ApiResources/ApiScopeClaim.cs | 14 +-- .../ApiResources/ApiScopeProperty.cs | 39 +++++++++ .../Volo/Abp/IdentityServer/Clients/Client.cs | 9 +- .../IdentityServer/Devices/DeviceFlowCodes.cs | 6 +- .../IdentityServer/Grants/PersistedGrant.cs | 12 ++- .../IdentityResources/IdentityResource.cs | 32 +++---- ...ntityClaim.cs => IdentityResourceClaim.cs} | 8 +- .../IdentityResourceProperty.cs | 39 +++++++++ .../IdentityServerAutoMapperProfile.cs | 42 +++++++-- .../Volo/Abp/IdentityServer/ResourceStore.cs | 1 - ...IdentityServerEfCoreQueryableExtensions.cs | 15 +--- .../ApiResources/ApiResourceRepository.cs | 8 +- .../ApiResources/ApiScopeRepository.cs | 4 +- .../IIdentityServerDbContext.cs | 6 +- .../IdentityServerDbContext.cs | 6 +- ...yServerDbContextModelCreatingExtensions.cs | 85 +++++++++++++------ .../Grants/PersistedGrantRepository.cs | 3 +- .../MongoDB/MongoApiResourceRepository.cs | 2 +- .../MongoDB/MongoPersistedGrantRepository.cs | 11 +-- .../Clients/IdentityResourceStore_Tests.cs | 10 +-- .../AbpIdentityServerTestDataBuilder.cs | 7 +- .../AbpIdentityServerTestDataBuilder.cs | 5 +- .../PersistentGrantRepository_Tests.cs | 2 +- 30 files changed, 377 insertions(+), 172 deletions(-) create mode 100644 modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AllowedSigningAlgorithmsConverter.cs create mode 100644 modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResourceScope.cs rename modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/{ApiSecret.cs => ApiResourceSecret.cs} (74%) create mode 100644 modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiScopeProperty.cs rename modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityResources/{IdentityClaim.cs => IdentityResourceClaim.cs} (75%) create mode 100644 modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityResources/IdentityResourceProperty.cs diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiScopeConsts.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiScopeConsts.cs index d52b953921..b61aa097f4 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiScopeConsts.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiScopeConsts.cs @@ -3,7 +3,5 @@ public class ApiScopeConsts { public const int NameMaxLength = 200; - public const int DisplayNameMaxLength = 200; - public const int DescriptionMaxLength = 1000; } -} \ No newline at end of file +} diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Devices/DeviceFlowCodesEto.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Devices/DeviceFlowCodesEto.cs index f82af68bbf..66fa1f6eff 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Devices/DeviceFlowCodesEto.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Devices/DeviceFlowCodesEto.cs @@ -13,10 +13,14 @@ namespace Volo.Abp.IdentityServer.Devices public string SubjectId { get; set; } + public string SessionId { get; set; } + public string ClientId { get; set; } + public string Description { get; set; } + public DateTime? Expiration { get; set; } public string Data { get; set; } } -} \ No newline at end of file +} diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AllowedSigningAlgorithmsConverter.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AllowedSigningAlgorithmsConverter.cs new file mode 100644 index 0000000000..ba4809feab --- /dev/null +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AllowedSigningAlgorithmsConverter.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using AutoMapper; + +namespace Volo.Abp.IdentityServer +{ + public class AllowedSigningAlgorithmsConverter : + IValueConverter, string>, + IValueConverter> + { + public static AllowedSigningAlgorithmsConverter Converter = new AllowedSigningAlgorithmsConverter(); + + public string Convert(ICollection sourceMember, ResolutionContext context) + { + if (sourceMember == null || !sourceMember.Any()) + { + return null; + } + return sourceMember.Aggregate((x, y) => $"{x},{y}"); + } + + public ICollection Convert(string sourceMember, ResolutionContext context) + { + var list = new HashSet(); + if (!String.IsNullOrWhiteSpace(sourceMember)) + { + sourceMember = sourceMember.Trim(); + foreach (var item in sourceMember.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries).Distinct()) + { + list.Add(item); + } + } + return list; + } + } +} diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResource.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResource.cs index d2b1a630d4..dc795fb09b 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResource.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResource.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using IdentityServer4; @@ -18,9 +18,13 @@ namespace Volo.Abp.IdentityServer.ApiResources public virtual bool Enabled { get; set; } - public virtual List Secrets { get; protected set; } + public virtual string AllowedAccessTokenSigningAlgorithms { get; set; } - public virtual List Scopes { get; protected set; } + public virtual bool ShowInDiscoveryDocument { get; set; } = true; + + public virtual List Secrets { get; protected set; } + + public virtual List Scopes { get; protected set; } public virtual List UserClaims { get; protected set; } @@ -44,21 +48,21 @@ namespace Volo.Abp.IdentityServer.ApiResources Enabled = true; - Secrets = new List(); - Scopes = new List(); + Secrets = new List(); + Scopes = new List(); UserClaims = new List(); Properties = new Dictionary(); - Scopes.Add(new ApiScope(id, name, displayName, description)); + Scopes.Add(new ApiResourceScope(id, name)); } public virtual void AddSecret( - [NotNull] string value, + [NotNull] string value, DateTime? expiration = null, string type = IdentityServerConstants.SecretTypes.SharedSecret, string description = null) { - Secrets.Add(new ApiSecret(Id, value, expiration, type, description)); + Secrets.Add(new ApiResourceSecret(Id, value, expiration, type, description)); } public virtual void RemoveSecret([NotNull] string value, string type = IdentityServerConstants.SecretTypes.SharedSecret) @@ -66,22 +70,16 @@ namespace Volo.Abp.IdentityServer.ApiResources Secrets.RemoveAll(s => s.Value == value && s.Type == type); } - public virtual ApiSecret FindSecret([NotNull] string value, string type = IdentityServerConstants.SecretTypes.SharedSecret) + public virtual ApiResourceSecret FindSecret([NotNull] string value, string type = IdentityServerConstants.SecretTypes.SharedSecret) { return Secrets.FirstOrDefault(s => s.Type == type && s.Value == value); } - public virtual ApiScope AddScope( - [NotNull] string name, - string displayName = null, - string description = null, - bool required = false, - bool emphasize = false, - bool showInDiscoveryDocument = true) + public virtual ApiResourceScope AddScope([NotNull] string scope) { - var scope = new ApiScope(Id, name, displayName, description, required, emphasize, showInDiscoveryDocument); - Scopes.Add(scope); - return scope; + var apiResourceScope = new ApiResourceScope(Id, scope); + Scopes.Add(apiResourceScope); + return apiResourceScope; } public virtual void AddUserClaim([NotNull] string type) @@ -111,21 +109,17 @@ namespace Volo.Abp.IdentityServer.ApiResources public virtual void RemoveAllScopes() { - foreach (var scope in Scopes) - { - scope.RemoveAllUserClaims(); - } Scopes.Clear(); } - public virtual void RemoveScope(string name) + public virtual void RemoveScope(string scope) { - Scopes.RemoveAll(r => r.Name == name); + Scopes.RemoveAll(r => r.Scope == scope); } - public virtual ApiScope FindScope(string name) + public virtual ApiResourceScope FindScope(string scope) { - return Scopes.FirstOrDefault(r => r.Name == name); + return Scopes.FirstOrDefault(r => r.Scope == scope); } } } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResourceScope.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResourceScope.cs new file mode 100644 index 0000000000..4da2beaa3f --- /dev/null +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResourceScope.cs @@ -0,0 +1,38 @@ +using System; +using JetBrains.Annotations; +using Volo.Abp.Domain.Entities; + +namespace Volo.Abp.IdentityServer.ApiResources +{ + public class ApiResourceScope : Entity + { + public virtual Guid ApiResourceId { get; protected set; } + + public virtual string Scope { get; set; } + + protected ApiResourceScope() + { + + } + + public virtual bool Equals(Guid apiResourceId, [NotNull] string scope) + { + return ApiResourceId == apiResourceId && Scope == scope; + } + + protected internal ApiResourceScope( + Guid apiResourceId, + [NotNull] string scope) + { + Check.NotNull(scope, nameof(scope)); + + ApiResourceId = apiResourceId; + Scope = scope; + } + + public override object[] GetKeys() + { + return new object[] { ApiResourceId, Scope }; + } + } +} diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiSecret.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResourceSecret.cs similarity index 74% rename from modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiSecret.cs rename to modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResourceSecret.cs index e692183a71..dcc6b04768 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiSecret.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResourceSecret.cs @@ -4,11 +4,11 @@ using JetBrains.Annotations; namespace Volo.Abp.IdentityServer.ApiResources { - public class ApiSecret : Secret + public class ApiResourceSecret : Secret { public virtual Guid ApiResourceId { get; protected set; } - protected ApiSecret() + protected ApiResourceSecret() { } @@ -18,16 +18,16 @@ namespace Volo.Abp.IdentityServer.ApiResources return ApiResourceId == apiResourceId && Value == value && Type == type; } - protected internal ApiSecret( + protected internal ApiResourceSecret( Guid apiResourceId, - [NotNull] string value, - DateTime? expiration = null, - string type = IdentityServerConstants.SecretTypes.SharedSecret, + [NotNull] string value, + DateTime? expiration = null, + string type = IdentityServerConstants.SecretTypes.SharedSecret, string description = null ) : base( - value, - expiration, - type, + value, + expiration, + type, description) { ApiResourceId = apiResourceId; @@ -38,4 +38,4 @@ namespace Volo.Abp.IdentityServer.ApiResources return new object[] { ApiResourceId, Type, Value }; } } -} \ No newline at end of file +} diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiScope.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiScope.cs index 1d22dec3dc..8e8605afa1 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiScope.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiScope.cs @@ -1,14 +1,14 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using JetBrains.Annotations; -using Volo.Abp.Domain.Entities; +using Volo.Abp.Domain.Entities.Auditing; namespace Volo.Abp.IdentityServer.ApiResources { - public class ApiScope : Entity + public class ApiScope : FullAuditedAggregateRoot { - public virtual Guid ApiResourceId { get; protected set; } + public virtual bool Enabled { get; set; } [NotNull] public virtual string Name { get; protected set; } @@ -25,44 +25,39 @@ namespace Volo.Abp.IdentityServer.ApiResources public virtual List UserClaims { get; protected set; } - public virtual Dictionary Properties { get; protected set; } + public virtual List Properties { get; protected set; } protected ApiScope() { } - public virtual bool Equals(Guid apiResourceId, [NotNull] string name) - { - return ApiResourceId == apiResourceId && Name == name; - } - protected internal ApiScope( - Guid apiResourceId, [NotNull] string name, string displayName = null, string description = null, bool required = false, bool emphasize = false, - bool showInDiscoveryDocument = true) + bool showInDiscoveryDocument = true, + bool enabled = true) { Check.NotNull(name, nameof(name)); - ApiResourceId = apiResourceId; Name = name; DisplayName = displayName ?? name; Description = description; Required = required; Emphasize = emphasize; ShowInDiscoveryDocument = showInDiscoveryDocument; + Enabled = enabled; UserClaims = new List(); - Properties = new Dictionary(); + Properties = new List(); } public virtual void AddUserClaim([NotNull] string type) { - UserClaims.Add(new ApiScopeClaim(ApiResourceId, Name, type)); + UserClaims.Add(new ApiScopeClaim(Id, Name, type)); } public virtual void RemoveAllUserClaims() @@ -79,10 +74,5 @@ namespace Volo.Abp.IdentityServer.ApiResources { return UserClaims.FirstOrDefault(r => r.Name == Name && r.Type == type); } - - public override object[] GetKeys() - { - return new object[] { ApiResourceId, Name }; - } } } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiScopeClaim.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiScopeClaim.cs index 729ff9c344..e4444cbc8c 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiScopeClaim.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiScopeClaim.cs @@ -5,7 +5,7 @@ namespace Volo.Abp.IdentityServer.ApiResources { public class ApiScopeClaim : UserClaim { - public Guid ApiResourceId { get; protected set; } + public Guid ApiScopeId { get; protected set; } [NotNull] public string Name { get; protected set; } @@ -15,23 +15,23 @@ namespace Volo.Abp.IdentityServer.ApiResources } - public virtual bool Equals(Guid apiResourceId, [NotNull] string name, [NotNull] string type) + public virtual bool Equals(Guid apiScopeId, [NotNull] string name, [NotNull] string type) { - return ApiResourceId == apiResourceId && Name == name && Type == type; + return ApiScopeId == apiScopeId && Name == name && Type == type; } - protected internal ApiScopeClaim(Guid apiResourceId, [NotNull] string name, [NotNull] string type) + protected internal ApiScopeClaim(Guid apiScopeId, [NotNull] string name, [NotNull] string type) : base(type) { Check.NotNull(name, nameof(name)); - ApiResourceId = apiResourceId; + ApiScopeId = apiScopeId; Name = name; } public override object[] GetKeys() { - return new object[] { ApiResourceId, Name, Type }; + return new object[] { ApiScopeId, Name, Type }; } } -} \ No newline at end of file +} diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiScopeProperty.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiScopeProperty.cs new file mode 100644 index 0000000000..38f34567a8 --- /dev/null +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiScopeProperty.cs @@ -0,0 +1,39 @@ +using System; +using JetBrains.Annotations; +using Volo.Abp.Domain.Entities; + +namespace Volo.Abp.IdentityServer.ApiResources +{ + public class ApiScopeProperty : Entity + { + public virtual Guid ApiScopeId { get; set; } + + public virtual string Key { get; set; } + + public virtual string Value { get; set; } + + protected ApiScopeProperty() + { + + } + + public virtual bool Equals(Guid apiScopeId, [NotNull] string key, string value) + { + return ApiScopeId == apiScopeId && Key == key && Value == value; + } + + protected internal ApiScopeProperty(Guid apiScopeId, [NotNull] string key, [NotNull] string value) + { + Check.NotNull(key, nameof(key)); + + ApiScopeId = apiScopeId; + Key = key; + Value = value; + } + + public override object[] GetKeys() + { + return new object[] { ApiScopeId, Key }; + } + } +} diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/Client.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/Client.cs index b7a53ad66f..82ba75a5fb 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/Client.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/Client.cs @@ -36,6 +36,8 @@ namespace Volo.Abp.IdentityServer.Clients public virtual bool AllowPlainTextPkce { get; set; } + public virtual bool RequireRequestObject { get; set; } + public virtual bool AllowAccessTokensViaBrowser { get; set; } public virtual string FrontChannelLogoutUri { get; set; } @@ -50,6 +52,8 @@ namespace Volo.Abp.IdentityServer.Clients public virtual int IdentityTokenLifetime { get; set; } + public virtual string AllowedIdentityTokenSigningAlgorithms { get; set; } + public virtual int AccessTokenLifetime { get; set; } public virtual int AuthorizationCodeLifetime { get; set; } @@ -118,8 +122,9 @@ namespace Volo.Abp.IdentityServer.Clients ProtocolType = IdentityServerConstants.ProtocolTypes.OpenIdConnect; RequireClientSecret = true; - RequireConsent = true; + RequireConsent = false; AllowRememberConsent = true; + RequirePkce = true; FrontChannelLogoutSessionRequired = true; BackChannelLogoutSessionRequired = true; IdentityTokenLifetime = 300; @@ -319,4 +324,4 @@ namespace Volo.Abp.IdentityServer.Clients return IdentityProviderRestrictions.FirstOrDefault(r => r.Provider == provider); } } -} \ No newline at end of file +} diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Devices/DeviceFlowCodes.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Devices/DeviceFlowCodes.cs index 3961de57a2..c24452a08b 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Devices/DeviceFlowCodes.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Devices/DeviceFlowCodes.cs @@ -11,8 +11,12 @@ namespace Volo.Abp.IdentityServer.Devices public virtual string SubjectId { get; set; } + public virtual string SessionId { get; set; } + public virtual string ClientId { get; set; } + public virtual string Description { get; set; } + public virtual DateTime? Expiration { get; set; } public virtual string Data { get; set; } @@ -28,4 +32,4 @@ namespace Volo.Abp.IdentityServer.Devices } } -} \ No newline at end of file +} diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Grants/PersistedGrant.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Grants/PersistedGrant.cs index 4a2bccd456..1865ec748b 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Grants/PersistedGrant.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Grants/PersistedGrant.cs @@ -1,4 +1,4 @@ -using System; +using System; using Volo.Abp.Domain.Entities; namespace Volo.Abp.IdentityServer.Grants @@ -11,17 +11,23 @@ namespace Volo.Abp.IdentityServer.Grants public virtual string SubjectId { get; set; } + public virtual string SessionId { get; set; } + public virtual string ClientId { get; set; } + public virtual string Description { get; set; } + public virtual DateTime CreationTime { get; set; } public virtual DateTime? Expiration { get; set; } + public virtual DateTime? ConsumedTime { get; set; } + public virtual string Data { get; set; } protected PersistedGrant() { - + } public PersistedGrant(Guid id) @@ -29,4 +35,4 @@ namespace Volo.Abp.IdentityServer.Grants Id = id; } } -} \ No newline at end of file +} diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityResources/IdentityResource.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityResources/IdentityResource.cs index f5d6f6c39c..246e1ddf98 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityResources/IdentityResource.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityResources/IdentityResource.cs @@ -22,9 +22,9 @@ namespace Volo.Abp.IdentityServer.IdentityResources public virtual bool ShowInDiscoveryDocument { get; set; } - public virtual List UserClaims { get; set; } + public virtual List UserClaims { get; set; } - public virtual Dictionary Properties { get; set; } + public virtual List Properties { get; set; } protected IdentityResource() { @@ -32,13 +32,13 @@ namespace Volo.Abp.IdentityServer.IdentityResources } public IdentityResource( - Guid id, - [NotNull] string name, - string displayName = null, - string description = null, - bool enabled = true, - bool required = false, - bool emphasize = false, + Guid id, + [NotNull] string name, + string displayName = null, + string description = null, + bool enabled = true, + bool required = false, + bool emphasize = false, bool showInDiscoveryDocument = true) { Check.NotNull(name, nameof(name)); @@ -51,9 +51,9 @@ namespace Volo.Abp.IdentityServer.IdentityResources Required = required; Emphasize = emphasize; ShowInDiscoveryDocument = showInDiscoveryDocument; - - UserClaims = new List(); - Properties = new Dictionary(); + + UserClaims = new List(); + Properties = new List(); } public IdentityResource(Guid id, IdentityServer4.Models.IdentityResource resource) @@ -66,13 +66,13 @@ namespace Volo.Abp.IdentityServer.IdentityResources Required = resource.Required; Emphasize = resource.Emphasize; ShowInDiscoveryDocument = resource.ShowInDiscoveryDocument; - UserClaims = resource.UserClaims.Select(claimType => new IdentityClaim(id, claimType)).ToList(); - Properties = resource.Properties.ToDictionary(x => x.Key, x => x.Value); + UserClaims = resource.UserClaims.Select(claimType => new IdentityResourceClaim(id, claimType)).ToList(); + Properties = resource.Properties.Select(x => new IdentityResourceProperty(Id, x.Key, x.Value)).ToList(); } public virtual void AddUserClaim([NotNull] string type) { - UserClaims.Add(new IdentityClaim(Id, type)); + UserClaims.Add(new IdentityResourceClaim(Id, type)); } public virtual void RemoveAllUserClaims() @@ -85,7 +85,7 @@ namespace Volo.Abp.IdentityServer.IdentityResources UserClaims.RemoveAll(c => c.Type == type); } - public virtual IdentityClaim FindUserClaim(string type) + public virtual IdentityResourceClaim FindUserClaim(string type) { return UserClaims.FirstOrDefault(c => c.Type == type); } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityResources/IdentityClaim.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityResources/IdentityResourceClaim.cs similarity index 75% rename from modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityResources/IdentityClaim.cs rename to modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityResources/IdentityResourceClaim.cs index 8b4a22b584..2bce3f66cf 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityResources/IdentityClaim.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityResources/IdentityResourceClaim.cs @@ -3,11 +3,11 @@ using JetBrains.Annotations; namespace Volo.Abp.IdentityServer.IdentityResources { - public class IdentityClaim : UserClaim + public class IdentityResourceClaim : UserClaim { public virtual Guid IdentityResourceId { get; set; } - protected IdentityClaim() + protected IdentityResourceClaim() { } @@ -17,7 +17,7 @@ namespace Volo.Abp.IdentityServer.IdentityResources return IdentityResourceId == identityResourceId && Type == type; } - protected internal IdentityClaim(Guid identityResourceId, [NotNull] string type) + protected internal IdentityResourceClaim(Guid identityResourceId, [NotNull] string type) : base(type) { IdentityResourceId = identityResourceId; @@ -28,4 +28,4 @@ namespace Volo.Abp.IdentityServer.IdentityResources return new object[] { IdentityResourceId, Type }; } } -} \ No newline at end of file +} diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityResources/IdentityResourceProperty.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityResources/IdentityResourceProperty.cs new file mode 100644 index 0000000000..d351addfc2 --- /dev/null +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityResources/IdentityResourceProperty.cs @@ -0,0 +1,39 @@ +using System; +using System.Diagnostics.CodeAnalysis; +using Volo.Abp.Domain.Entities; + +namespace Volo.Abp.IdentityServer.IdentityResources +{ + public class IdentityResourceProperty : Entity + { + public virtual Guid IdentityResourceId { get; set; } + + public virtual string Key { get; set; } + + public virtual string Value { get; set; } + + protected IdentityResourceProperty() + { + + } + + public virtual bool Equals(Guid identityResourceId, [NotNull] string key) + { + return IdentityResourceId == identityResourceId && Key == key; + } + + protected internal IdentityResourceProperty(Guid identityResourceId, [NotNull] string key, [NotNull] string value) + { + Check.NotNull(key, nameof(key)); + + IdentityResourceId = identityResourceId; + Key = key; + Value = value; + } + + public override object[] GetKeys() + { + return new object[] { IdentityResourceId, Key }; + } + } +} diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityServerAutoMapperProfile.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityServerAutoMapperProfile.cs index 502e3fa1e2..17aae1b084 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityServerAutoMapperProfile.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityServerAutoMapperProfile.cs @@ -15,8 +15,6 @@ namespace Volo.Abp.IdentityServer { //TODO: Reverse maps will not used probably. Remove those will not used - CreateMap(); - CreateMap() .ConstructUsing(src => src.Origin) .ReverseMap() @@ -25,26 +23,53 @@ namespace Volo.Abp.IdentityServer CreateMap() .ForMember(dest => dest.ApiSecrets, opt => opt.MapFrom(src => src.Secrets)); + CreateMap(); + + //TODO: Why PersistedGrant mapping is in this profile? CreateMap().ReverseMap(); - CreateMap(); + CreateMap() + .ConstructUsing(src => new IdentityServer4.Models.IdentityResource()); + + CreateMap() + .ConstructUsing(x => x.Type) + .ReverseMap() + .ForMember(dest => dest.Type, opt => opt.MapFrom(src => src)); + + CreateMap>() + .ReverseMap(); CreateMap() .ConstructUsing(src => src.Type) .ReverseMap() .ForMember(dest => dest.Type, opt => opt.MapFrom(src => src)); - CreateMap(); + CreateMap() + .ConstructUsing(x => x.Scope) + .ReverseMap() + .ForMember(dest => dest.Scope, opt => opt.MapFrom(src => src)); - CreateMap(); + CreateMap>() + .ReverseMap(); + + CreateMap() + .ConstructUsing(x => x.Type) + .ReverseMap() + .ForMember(dest => dest.Type, opt => opt.MapFrom(src => src)); + + CreateMap(MemberList.Destination) + .ConstructUsing(src => new IdentityServer4.Models.ApiScope()) + .ReverseMap(); CreateMap>() .ReverseMap(); CreateMap() .ForMember(dest => dest.ProtocolType, opt => opt.Condition(srs => srs != null)) - .ReverseMap(); + .ForMember(x => x.AllowedIdentityTokenSigningAlgorithms, opts => opts.ConvertUsing(AllowedSigningAlgorithmsConverter.Converter, x => x.AllowedIdentityTokenSigningAlgorithms)) + .ReverseMap() + .ForMember(x => x.AllowedIdentityTokenSigningAlgorithms, opts => opts.ConvertUsing(AllowedSigningAlgorithmsConverter.Converter, x => x.AllowedIdentityTokenSigningAlgorithms)); CreateMap() .ConstructUsing(src => src.Origin) @@ -60,6 +85,10 @@ namespace Volo.Abp.IdentityServer .ConstructUsing(src => new Claim(src.Type, src.Value)) .ReverseMap(); + CreateMap(MemberList.None) + .ConstructUsing(src => new IdentityServer4.Models.ClientClaim(src.Type, src.Value, ClaimValueTypes.String)) + .ReverseMap(); + CreateMap() .ConstructUsing(src => src.Scope) .ReverseMap() @@ -89,6 +118,7 @@ namespace Volo.Abp.IdentityServer CreateMap(); CreateMap(); CreateMap(); + } } } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ResourceStore.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ResourceStore.cs index 6252be400c..975fc7f801 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ResourceStore.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ResourceStore.cs @@ -6,7 +6,6 @@ using IdentityServer4.Stores; using Volo.Abp.IdentityServer.ApiResources; using Volo.Abp.IdentityServer.IdentityResources; using Volo.Abp.ObjectMapping; -using ApiScope = Volo.Abp.IdentityServer.ApiResources.ApiScope; namespace Volo.Abp.IdentityServer { diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/AbpIdentityServerEfCoreQueryableExtensions.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/AbpIdentityServerEfCoreQueryableExtensions.cs index a72cadb943..6e47d461e4 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/AbpIdentityServerEfCoreQueryableExtensions.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/AbpIdentityServerEfCoreQueryableExtensions.cs @@ -18,20 +18,7 @@ namespace Volo.Abp.IdentityServer return queryable .Include(x => x.Secrets) .Include(x => x.UserClaims) - .Include(x => x.Scopes) - .ThenInclude(s => s.UserClaims); - } - - public static IQueryable IncludeDetails(this IQueryable queryable, bool include = true) - { - if (!include) - { - return queryable; - } - - return queryable - .Include(x => x.UserClaims) - .Include(x => x.Properties); + .Include(x => x.Scopes); } public static IQueryable IncludeDetails(this IQueryable queryable, bool include = true) diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiResourceRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiResourceRepository.cs index d12a8208c2..4d0baf7702 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiResourceRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiResourceRepository.cs @@ -35,7 +35,7 @@ namespace Volo.Abp.IdentityServer.ApiResources CancellationToken cancellationToken = default) { var query = from api in DbSet.IncludeDetails(includeDetails) - where api.Scopes.Any(x => scopeNames.Contains(x.Name)) + where api.Scopes.Any(x => scopeNames.Contains(x.Scope)) select api; return await query.ToListAsync(GetCancellationToken(cancellationToken)); @@ -74,18 +74,18 @@ namespace Volo.Abp.IdentityServer.ApiResources public override async Task DeleteAsync(Guid id, bool autoSave = false, CancellationToken cancellationToken = default) { - var scopeClaims = DbContext.Set().Where(sc => sc.ApiResourceId == id); + var scopeClaims = DbContext.Set().Where(sc => sc.ApiScopeId == id); foreach (var scopeClaim in scopeClaims) { DbContext.Set().Remove(scopeClaim); } - var scopes = DbContext.Set().Where(s => s.ApiResourceId == id); + var scopes = DbContext.Set().Where(s => s.ApiResourceId == id); foreach (var scope in scopes) { - DbContext.Set().Remove(scope); + DbContext.Set().Remove(scope); } await base.DeleteAsync(id, autoSave, cancellationToken); diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiScopeRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiScopeRepository.cs index dba7405a06..6df9f5b90a 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiScopeRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiScopeRepository.cs @@ -19,9 +19,7 @@ namespace Volo.Abp.IdentityServer.ApiResources public async Task> GetListByNameAsync(string[] scopeNames, bool includeDetails = false, CancellationToken cancellationToken = default) { - var query = from scope in DbSet.IncludeDetails(includeDetails) - where scopeNames.Contains(scope.Name) - select scope; + var query = from scope in DbSet where scopeNames.Contains(scope.Name) select scope; return await query.ToListAsync(GetCancellationToken(cancellationToken)); } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IIdentityServerDbContext.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IIdentityServerDbContext.cs index 52ba7c8e6c..93624174f9 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IIdentityServerDbContext.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IIdentityServerDbContext.cs @@ -14,17 +14,17 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore { DbSet ApiResources { get; set; } - DbSet ApiSecrets { get; set; } + DbSet ApiSecrets { get; set; } DbSet ApiResourceClaims { get; set; } - DbSet ApiScopes { get; set; } + DbSet ApiScopes { get; set; } DbSet ApiScopeClaims { get; set; } DbSet IdentityResources { get; set; } - DbSet IdentityClaims { get; set; } + DbSet IdentityClaims { get; set; } DbSet Clients { get; set; } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContext.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContext.cs index f63cd6bf1c..84ec1f802a 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContext.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContext.cs @@ -14,17 +14,17 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore { public DbSet ApiResources { get; set; } - public DbSet ApiSecrets { get; set; } + public DbSet ApiSecrets { get; set; } public DbSet ApiResourceClaims { get; set; } - public DbSet ApiScopes { get; set; } + public DbSet ApiScopes { get; set; } public DbSet ApiScopeClaims { get; set; } public DbSet IdentityResources { get; set; } - public DbSet IdentityClaims { get; set; } + public DbSet IdentityClaims { get; set; } public DbSet Clients { get; set; } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs index 8acb8a9539..54b91e9dcc 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs @@ -81,8 +81,8 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore if (IsDatabaseProvider(builder, options, EfCoreDatabaseProvider.MySql)) { ClientRedirectUriConsts.RedirectUriMaxLengthValue = 300; - } - + } + b.Property(x => x.RedirectUri).HasMaxLength(ClientRedirectUriConsts.RedirectUriMaxLengthValue).IsRequired(); }); @@ -97,8 +97,8 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore if (IsDatabaseProvider(builder, options, EfCoreDatabaseProvider.MySql)) { ClientPostLogoutRedirectUriConsts.PostLogoutRedirectUriMaxLengthValue = 300; - } - + } + b.Property(x => x.PostLogoutRedirectUri) .HasMaxLength(ClientPostLogoutRedirectUriConsts.PostLogoutRedirectUriMaxLengthValue) .IsRequired(); @@ -129,7 +129,7 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore { SecretConsts.ValueMaxLengthValue = 300; } - + b.Property(x => x.Value).HasMaxLength(SecretConsts.ValueMaxLengthValue).IsRequired(); b.Property(x => x.Description).HasMaxLength(SecretConsts.DescriptionMaxLength); @@ -195,9 +195,9 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore if (IsDatabaseProvider(builder, options, EfCoreDatabaseProvider.MySql)) { - PersistedGrantConsts.DataMaxLengthValue = 10000; //TODO: MySQL accepts 20.000. We can consider to change in v3.0. + PersistedGrantConsts.DataMaxLengthValue = 10000; //TODO: MySQL accepts 20.000. We can consider to change in v3.0. } - + b.Property(x => x.Data).HasMaxLength(PersistedGrantConsts.DataMaxLengthValue).IsRequired(); b.HasKey(x => x.Key); //TODO: What about Id!!! @@ -215,16 +215,14 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore b.Property(x => x.Name).HasMaxLength(IdentityResourceConsts.NameMaxLength).IsRequired(); b.Property(x => x.DisplayName).HasMaxLength(IdentityResourceConsts.DisplayNameMaxLength); b.Property(x => x.Description).HasMaxLength(IdentityResourceConsts.DescriptionMaxLength); - b.Property(x => x.Properties) - .HasConversion(new AbpJsonValueConverter>()) - .Metadata.SetValueComparer(new AbpDictionaryValueComparer()); b.HasMany(x => x.UserClaims).WithOne().HasForeignKey(x => x.IdentityResourceId).IsRequired(); + b.HasMany(x => x.Properties).WithOne().HasForeignKey(x => x.IdentityResourceId).IsRequired(); }); - builder.Entity(b => + builder.Entity(b => { - b.ToTable(options.TablePrefix + "IdentityClaims", options.Schema); + b.ToTable(options.TablePrefix + "IdentityResourceClaims", options.Schema); b.ConfigureByConvention(); @@ -233,6 +231,18 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore b.Property(x => x.Type).HasMaxLength(UserClaimConsts.TypeMaxLength).IsRequired(); }); + builder.Entity(b => + { + b.ToTable(options.TablePrefix + "IdentityResourceProperties", options.Schema); + + b.ConfigureByConvention(); + + b.HasKey(x => new {x.IdentityResourceId, x.Key}); + + b.Property(x => x.Key).HasMaxLength(250).IsRequired(); + b.Property(x => x.Value).HasMaxLength(2000).IsRequired(); + }); + builder.Entity(b => { b.ToTable(options.TablePrefix + "ApiResources", options.Schema); @@ -251,9 +261,9 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore b.HasMany(x => x.UserClaims).WithOne().HasForeignKey(x => x.ApiResourceId).IsRequired(); }); - builder.Entity(b => + builder.Entity(b => { - b.ToTable(options.TablePrefix + "ApiSecrets", options.Schema); + b.ToTable(options.TablePrefix + "ApiResourceSecrets", options.Schema); b.ConfigureByConvention(); @@ -265,14 +275,14 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore if (IsDatabaseProvider(builder, options, EfCoreDatabaseProvider.MySql, EfCoreDatabaseProvider.Oracle)) { SecretConsts.ValueMaxLengthValue = 300; - } - + } + b.Property(x => x.Value).HasMaxLength(SecretConsts.ValueMaxLengthValue).IsRequired(); }); builder.Entity(b => { - b.ToTable(options.TablePrefix + "ApiClaims", options.Schema); + b.ToTable(options.TablePrefix + "ApiResourceClaims", options.Schema); b.ConfigureByConvention(); @@ -281,19 +291,33 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore b.Property(x => x.Type).HasMaxLength(UserClaimConsts.TypeMaxLength).IsRequired(); }); + builder.Entity(b => + { + b.ToTable(options.TablePrefix + "ApiResourceScopes", options.Schema); + + b.ConfigureByConvention(); + + b.HasKey(x => new {x.ApiResourceId, x.Scope}); + + b.Property(x => x.Scope).HasMaxLength(ApiScopeConsts.NameMaxLength).IsRequired(); + }); + builder.Entity(b => { b.ToTable(options.TablePrefix + "ApiScopes", options.Schema); b.ConfigureByConvention(); - b.HasKey(x => new {x.ApiResourceId, x.Name}); + b.Property(x => x.Name).HasMaxLength(200).IsRequired(); + b.Property(x => x.DisplayName).HasMaxLength(200); + b.Property(x => x.Description).HasMaxLength(1000); - b.Property(x => x.Name).HasMaxLength(ApiScopeConsts.NameMaxLength).IsRequired(); - b.Property(x => x.DisplayName).HasMaxLength(ApiScopeConsts.DisplayNameMaxLength); - b.Property(x => x.Description).HasMaxLength(ApiScopeConsts.DescriptionMaxLength); + b.HasIndex(x => x.Name).IsUnique(); - b.HasMany(x => x.UserClaims).WithOne().HasForeignKey(x => new {x.ApiResourceId, x.Name}).IsRequired(); + b.HasMany(x => x.UserClaims).WithOne().HasForeignKey(x => x.ApiScopeId).IsRequired(); + + //Identity Server does not configure the relationship of Properties + //b.HasMany(x => x.Properties).WithOne().HasForeignKey(x => x.ApiScopeId).IsRequired(); }); builder.Entity(b => @@ -302,12 +326,25 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore b.ConfigureByConvention(); - b.HasKey(x => new {x.ApiResourceId, x.Name, x.Type}); + b.HasKey(x => new {x.ApiScopeId, x.Name, x.Type}); b.Property(x => x.Type).HasMaxLength(UserClaimConsts.TypeMaxLength).IsRequired(); b.Property(x => x.Name).HasMaxLength(ApiScopeConsts.NameMaxLength).IsRequired(); }); + builder.Entity(b => + { + b.ToTable(options.TablePrefix + "ApiScopeProperties", options.Schema); + + b.ConfigureByConvention(); + + b.HasKey(x => new {x.ApiScopeId, x.Key}); + + b.Property(x => x.Key).HasMaxLength(250).IsRequired(); + //oracle? + b.Property(x => x.Value).HasMaxLength(2000).IsRequired(); + }); + builder.Entity(b => { b.ToTable(options.TablePrefix + "DeviceFlowCodes", options.Schema); @@ -344,4 +381,4 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore return false; } } -} \ No newline at end of file +} diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Grants/PersistedGrantRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Grants/PersistedGrantRepository.cs index 7a0bf0fbba..9b54a4cf24 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Grants/PersistedGrantRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Grants/PersistedGrantRepository.cs @@ -74,10 +74,9 @@ namespace Volo.Abp.IdentityServer.Grants string clientId, string type) { - //IDS TODO: add SessionId to entity return DbSet .WhereIf(!subjectId.IsNullOrWhiteSpace(), x => x.SubjectId == subjectId) - // .WhereIf(!sessionId.IsNullOrWhiteSpace(), x => x.SessionId == sessionId) + .WhereIf(!sessionId.IsNullOrWhiteSpace(), x => x.SessionId == sessionId) .WhereIf(!clientId.IsNullOrWhiteSpace(), x => x.ClientId == clientId) .WhereIf(!type.IsNullOrWhiteSpace(), x => x.Type == type); } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiResourceRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiResourceRepository.cs index de694a37c5..20d55b3d0e 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiResourceRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiResourceRepository.cs @@ -30,7 +30,7 @@ namespace Volo.Abp.IdentityServer.MongoDB CancellationToken cancellationToken = default) { return await GetMongoQueryable() - .Where(ar => ar.Scopes.Any(x => scopeNames.Contains(x.Name))) + .Where(ar => ar.Scopes.Any(x => scopeNames.Contains(x.Scope))) .ToListAsync(GetCancellationToken(cancellationToken)); } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoPersistedGrantRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoPersistedGrantRepository.cs index 11559b7707..6af1f5488d 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoPersistedGrantRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoPersistedGrantRepository.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Linq; using System.Threading; using System.Threading.Tasks; using MongoDB.Driver; @@ -8,6 +9,7 @@ using Volo.Abp.Domain.Repositories.MongoDB; using Volo.Abp.IdentityServer.Grants; using Volo.Abp.MongoDB; + namespace Volo.Abp.IdentityServer.MongoDB { public class MongoPersistentGrantRepository : MongoDbRepository, IPersistentGrantRepository @@ -85,12 +87,11 @@ namespace Volo.Abp.IdentityServer.MongoDB string clientId, string type) { - //IDS TODO: add SessionId to entity return GetMongoQueryable() - .WhereIf(!subjectId.IsNullOrWhiteSpace(), x => x.SubjectId == subjectId) - // .WhereIf(!sessionId.IsNullOrWhiteSpace(), x => x.SessionId == sessionId) - .WhereIf(!clientId.IsNullOrWhiteSpace(), x => x.ClientId == clientId) - .WhereIf(!type.IsNullOrWhiteSpace(), x => x.Type == type) + .WhereIf>(!subjectId.IsNullOrWhiteSpace(), x => x.SubjectId == subjectId) + .WhereIf>(!sessionId.IsNullOrWhiteSpace(), x => x.SessionId == sessionId) + .WhereIf>(!clientId.IsNullOrWhiteSpace(), x => x.ClientId == clientId) + .WhereIf>(!type.IsNullOrWhiteSpace(), x => x.Type == type) .As>(); } } diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Clients/IdentityResourceStore_Tests.cs b/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Clients/IdentityResourceStore_Tests.cs index ef74266285..a196fd7534 100644 --- a/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Clients/IdentityResourceStore_Tests.cs +++ b/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Clients/IdentityResourceStore_Tests.cs @@ -19,13 +19,13 @@ namespace Volo.Abp.IdentityServer.Clients } [Fact] - public async Task FindApiResourceAsync_Should_Return_Null_If_Not_Found() + public async Task FindApiResourceAsync_Should_Return_Empty_If_Not_Found() { //Act var resource = await _resourceStore.FindApiResourcesByNameAsync(new []{"non-existing-name"}); //Assert - resource.ShouldBeNull(); + resource.ShouldBeEmpty(); } [Fact] @@ -60,7 +60,7 @@ namespace Volo.Abp.IdentityServer.Clients public async Task FindIdentityResourcesByScopeAsync_Should_Return_For_Given_Scopes() { //Act - var identityResourcesByScope = (await _resourceStore.FindApiResourcesByScopeNameAsync(new List + var identityResourcesByScope = (await _resourceStore.FindIdentityResourcesByScopeNameAsync(new List { "Test-Identity-Resource-Name-1" })).ToArray(); @@ -69,9 +69,7 @@ namespace Volo.Abp.IdentityServer.Clients identityResourcesByScope.Length.ShouldBe(1); identityResourcesByScope.First().DisplayName.ShouldBe("Test-Identity-Resource-DisplayName-1"); identityResourcesByScope.First().Description.ShouldBe("Test-Identity-Resource-Description-1"); - - //IDS TODO: - //identityResourcesByScope.First().Required.ShouldBe(true); + identityResourcesByScope.First().Required.ShouldBe(true); } [Fact] diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs b/modules/identityserver/test/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs index 0d87a2fd19..d2efa7b352 100644 --- a/modules/identityserver/test/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs +++ b/modules/identityserver/test/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs @@ -27,7 +27,7 @@ namespace Volo.Abp.IdentityServer IClientRepository clientRepository, IGuidGenerator guidGenerator, IPersistentGrantRepository persistentGrantRepository, - IApiResourceRepository apiResourceRepository, + IApiResourceRepository apiResourceRepository, IIdentityResourceRepository identityResourceRepository) { _clientRepository = clientRepository; @@ -51,7 +51,7 @@ namespace Volo.Abp.IdentityServer { ProtocolType = "TestProtocol-42" }; - + client42.AddCorsOrigin("Origin1"); client42.AddScope("api1"); @@ -108,7 +108,8 @@ namespace Volo.Abp.IdentityServer }; apiResource.AddSecret("secret".Sha256()); - apiResource.AddScope("Test-ApiResource-ApiScope-Name-1", "Test-ApiResource-ApiScope-DisplayName-1"); + apiResource.AddScope("Test-ApiResource-ApiScope-Name-1"); + apiResource.AddScope("Test-ApiResource-ApiScope-DisplayName-1"); apiResource.AddUserClaim("Test-ApiResource-Claim-Type-1"); await _apiResourceRepository.InsertAsync(apiResource); diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs b/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs index c36fef2d58..21e7123abe 100644 --- a/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs +++ b/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs @@ -91,6 +91,7 @@ namespace Volo.Abp.IdentityServer { Key = "PersistedGrantKey1", SubjectId = "PersistedGrantSubjectId1", + SessionId = "PersistedGrantSessionId1", ClientId = "PersistedGrantClientId1", Type = "PersistedGrantType1", Data = "" @@ -147,9 +148,9 @@ namespace Volo.Abp.IdentityServer apiResource.Description = nameof(apiResource.Description); apiResource.DisplayName = nameof(apiResource.DisplayName); - apiResource.AddScope(nameof(ApiScope.Name)); + apiResource.AddScope(nameof(ApiResourceScope.Scope)); apiResource.AddUserClaim(nameof(ApiResourceClaim.Type)); - apiResource.AddSecret(nameof(ApiSecret.Value)); + apiResource.AddSecret(nameof(ApiResourceSecret.Value)); await _apiResourceRepository.InsertAsync(apiResource); await _apiResourceRepository.InsertAsync(new ApiResource(_guidGenerator.Create(), "NewApiResource2")); diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/PersistentGrantRepository_Tests.cs b/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/PersistentGrantRepository_Tests.cs index 91e14bbace..73e2537207 100644 --- a/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/PersistentGrantRepository_Tests.cs +++ b/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/PersistentGrantRepository_Tests.cs @@ -36,7 +36,7 @@ namespace Volo.Abp.IdentityServer [Fact] public async Task DeleteBySubjectIdAndClientId() { - await _persistentGrantRepository.DeleteAsync("PersistedGrantSubjectId1", "PersistedGrantClientId1"); + await _persistentGrantRepository.DeleteAsync("PersistedGrantSubjectId1", "PersistedGrantSessionId1", "PersistedGrantClientId1"); var persistedGrants = await _persistentGrantRepository.GetListAsync(); persistedGrants.ShouldNotBeEmpty(); From b839f679325735120c329dffb230a0e17e6fc59d Mon Sep 17 00:00:00 2001 From: maliming <6908465+maliming@users.noreply.github.com> Date: Fri, 3 Jul 2020 11:36:36 +0800 Subject: [PATCH 03/76] Refactored the consensus page. --- .../ConsentOptions.cs | 17 ++ .../IdentityServerSupportedLoginModel.cs | 9 +- .../Pages/Consent.cshtml | 72 +++-- .../Pages/Consent.cshtml.cs | 252 +++++++++++------- .../Clients/IdentityResourceStore_Tests.cs | 2 +- 5 files changed, 219 insertions(+), 133 deletions(-) create mode 100644 modules/account/src/Volo.Abp.Account.Web.IdentityServer/ConsentOptions.cs diff --git a/modules/account/src/Volo.Abp.Account.Web.IdentityServer/ConsentOptions.cs b/modules/account/src/Volo.Abp.Account.Web.IdentityServer/ConsentOptions.cs new file mode 100644 index 0000000000..3aaafd5d11 --- /dev/null +++ b/modules/account/src/Volo.Abp.Account.Web.IdentityServer/ConsentOptions.cs @@ -0,0 +1,17 @@ +namespace Volo.Abp.Account.Web +{ + public class ConsentOptions + { + public static bool EnableOfflineAccess = true; + + public static string OfflineAccessDisplayName = "Offline Access"; + + public static string OfflineAccessDescription = "Access to your applications and resources, even when you are offline"; + + //TODO: How to handle this + public static readonly string MustChooseOneErrorMessage = "You must pick at least one permission"; + + //TODO: How to handle this + public static readonly string InvalidSelectionErrorMessage = "Invalid selection"; + } +} diff --git a/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Account/IdentityServerSupportedLoginModel.cs b/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Account/IdentityServerSupportedLoginModel.cs index 60f55497da..c09c9751c2 100644 --- a/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Account/IdentityServerSupportedLoginModel.cs +++ b/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Account/IdentityServerSupportedLoginModel.cs @@ -73,9 +73,9 @@ namespace Volo.Abp.Account.Web.Pages.Account EnableLocalLogin = await SettingProvider.IsTrueAsync(AccountSettingNames.EnableLocalLogin); - if (context?.ClientId != null) + if (context?.Client?.ClientId != null) { - var client = await ClientStore.FindEnabledClientByIdAsync(context.ClientId); + var client = await ClientStore.FindEnabledClientByIdAsync(context?.Client?.ClientId); if (client != null) { EnableLocalLogin = client.EnableLocalLogin; @@ -105,7 +105,10 @@ namespace Volo.Abp.Account.Web.Pages.Account return Redirect("~/"); } - await Interaction.GrantConsentAsync(context, ConsentResponse.Denied); + await Interaction.GrantConsentAsync(context, new ConsentResponse() + { + Error = AuthorizationError.AccessDenied + }); return Redirect(ReturnUrl); } diff --git a/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Consent.cshtml b/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Consent.cshtml index b61ad00152..d92e72532e 100644 --- a/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Consent.cshtml +++ b/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Consent.cshtml @@ -1,18 +1,18 @@ @page +@using IdentityServer4.Extensions @using Volo.Abp.Account.Web.Pages -@using Volo.Abp.Account.Web.Pages.Account @model ConsentModel

- @if (Model.ClientInfo.ClientLogoUrl != null) + @if (Model.Consent.ClientLogoUrl != null) { - + } - @Model.ClientInfo.ClientName + @Model.Consent.ClientName is requesting your permission

@@ -25,29 +25,30 @@
Uncheck the permissions you do not wish to grant.
- @if (!Model.ConsentInput.IdentityScopes.IsNullOrEmpty()) + @if (!Model.Consent.IdentityScopes.IsNullOrEmpty()) {

Personal Information

    - @for (var i = 0; i < Model.ConsentInput.IdentityScopes.Count; i++) + + @foreach (var identityScope in Model.Consent.IdentityScopes) {
  • -
    - @* TODO: Use attributes on the view model instead of using hidden here *@ - @if (Model.ConsentInput.IdentityScopes[i].Description != null) + @* TODO: Use attributes on the view model instead of using hidden here *@ + @if (identityScope.Description != null) { }
  • @@ -55,29 +56,30 @@
} - @if (!Model.ConsentInput.ApiScopes.IsNullOrEmpty()) + @if (!Model.Consent.ApiScopes.IsNullOrEmpty()) {

Application Access

    - @for (var i = 0; i < Model.ConsentInput.ApiScopes.Count; i++) + + @foreach (var apiScope in Model.Consent.ApiScopes) {
  • -
    - @* TODO: Use attributes on the view model instead of using hidden here *@ - @if (Model.ConsentInput.ApiScopes[i].Description != null) + @* TODO: Use attributes on the view model instead of using hidden here *@ + @if (apiScope.Description != null) { }
  • @@ -85,11 +87,23 @@
} - @if (Model.ClientInfo.AllowRememberConsent) +
+
+
+ + Description +
+
+ +
+
+
+ + @if (Model.Consent.AllowRememberConsent) {
-
@@ -98,10 +112,10 @@
- @if (Model.ClientInfo.ClientUrl != null) + @if (Model.Consent.ClientUrl != null) { - - @Model.ClientInfo.ClientName + + @Model.Consent.ClientName }
@@ -110,4 +124,4 @@ - \ No newline at end of file + diff --git a/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Consent.cshtml.cs b/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Consent.cshtml.cs index a0f0543765..64173917e3 100644 --- a/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Consent.cshtml.cs +++ b/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Consent.cshtml.cs @@ -3,12 +3,13 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Threading.Tasks; +using IdentityServer4.Extensions; using IdentityServer4.Models; using IdentityServer4.Services; using IdentityServer4.Stores; +using IdentityServer4.Validation; using Microsoft.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc.UI.RazorPages; -using Volo.Abp.UI; namespace Volo.Abp.Account.Web.Pages { @@ -24,9 +25,7 @@ namespace Volo.Abp.Account.Web.Pages public string ReturnUrlHash { get; set; } [BindProperty] - public ConsentModel.ConsentInputModel ConsentInput { get; set; } - - public ClientInfoModel ClientInfo { get; set; } + public ConsentViewModel Consent { get; set; } private readonly IIdentityServerInteractionService _interaction; private readonly IClientStore _clientStore; @@ -44,37 +43,7 @@ namespace Volo.Abp.Account.Web.Pages public virtual async Task OnGet() { - var request = await _interaction.GetAuthorizationContextAsync(ReturnUrl); - if (request == null) - { - throw new ApplicationException($"No consent request matching request: {ReturnUrl}"); - } - - var client = await _clientStore.FindEnabledClientByIdAsync(request.ClientId); - if (client == null) - { - throw new ApplicationException($"Invalid client id: {request.ClientId}"); - } - - var resources = await _resourceStore.FindEnabledResourcesByScopeAsync(request.ScopesRequested); - if (resources == null || (!resources.IdentityResources.Any() && !resources.ApiResources.Any())) - { - throw new ApplicationException($"No scopes matching: {request.ScopesRequested.Aggregate((x, y) => x + ", " + y)}"); - } - - ClientInfo = new ClientInfoModel(client); - ConsentInput = new ConsentInputModel - { - RememberConsent = true, - IdentityScopes = resources.IdentityResources.Select(x => CreateScopeViewModel(x, true)).ToList(), - ApiScopes = resources.ApiResources.SelectMany(x => x.Scopes).Select(x => CreateScopeViewModel(x, true)).ToList() - }; - - if (resources.OfflineAccess) - { - ConsentInput.ApiScopes.Add(GetOfflineAccessScope(true)); - } - + Consent = await BuildViewModelAsync(ReturnUrl); return Page(); } @@ -96,53 +65,137 @@ namespace Volo.Abp.Account.Web.Pages throw new ApplicationException("Unknown Error!"); } - protected virtual async Task ProcessConsentAsync() + protected virtual async Task ProcessConsentAsync() { - var result = new ConsentModel.ProcessConsentResult(); + var result = new ProcessConsentResult(); + + // validate return url is still valid + var request = await _interaction.GetAuthorizationContextAsync(ReturnUrl); + if (request == null) + { + return result; + } - ConsentResponse grantedConsent; + ConsentResponse grantedConsent = null; - if (ConsentInput.UserDecision == "no") + // user clicked 'no' - send back the standard 'access_denied' response + if (Consent?.Button == "no") { - grantedConsent = ConsentResponse.Denied; + grantedConsent = new ConsentResponse { Error = AuthorizationError.AccessDenied }; + // emit event + //await _events.RaiseAsync(new ConsentDeniedEvent(User.GetSubjectId(), request.Client.ClientId, request.ValidatedResources.RawScopeValues)); } - else + // user clicked 'yes' - validate the data + else if (Consent?.Button == "yes") { - if (!ConsentInput.IdentityScopes.IsNullOrEmpty() || !ConsentInput.ApiScopes.IsNullOrEmpty()) + // if the user consented to some scope, build the response model + if (!Consent.ScopesConsented.IsNullOrEmpty()) { + var scopes = Consent.ScopesConsented; + if (ConsentOptions.EnableOfflineAccess == false) + { + scopes = scopes.Where(x => x != IdentityServer4.IdentityServerConstants.StandardScopes.OfflineAccess); + } + grantedConsent = new ConsentResponse { - RememberConsent = ConsentInput.RememberConsent, - ScopesConsented = ConsentInput.GetAllowedScopeNames() + RememberConsent = Consent.RememberConsent, + ScopesValuesConsented = scopes.ToArray(), + Description = Consent.Description }; + + // emit event + //await _events.RaiseAsync(new ConsentGrantedEvent(User.GetSubjectId(), request.Client.ClientId, request.ValidatedResources.RawScopeValues, grantedConsent.ScopesValuesConsented, grantedConsent.RememberConsent)); } else { - throw new UserFriendlyException("You must pick at least one permission"); //TODO: How to handle this + //throw new UserFriendlyException("You must pick at least one permission"); //TODO: How to handle this + result.ValidationError = ConsentOptions.MustChooseOneErrorMessage; } } + else + { + result.ValidationError = ConsentOptions.InvalidSelectionErrorMessage; + } if (grantedConsent != null) { - var request = await _interaction.GetAuthorizationContextAsync(ReturnUrl); - if (request == null) - { - return result; - } - + // communicate outcome of consent back to identityserver await _interaction.GrantConsentAsync(request, grantedConsent); - result.RedirectUri = ReturnUrl; //TODO: ReturnUrlHash? + // indicate that's it ok to redirect back to authorization endpoint + result.RedirectUri = Consent.ReturnUrl; //TODO: ReturnUrlHash? + result.Client = request.Client; + } + else + { + // we need to redisplay the consent UI + + result.ViewModel = await BuildViewModelAsync(ReturnUrl, Consent); } return result; } - protected virtual ConsentModel.ScopeViewModel CreateScopeViewModel(IdentityResource identity, bool check) + private async Task BuildViewModelAsync(string returnUrl, ConsentInputModel model = null) + { + var request = await _interaction.GetAuthorizationContextAsync(returnUrl); + if (request != null) + { + return CreateConsentViewModel(model, returnUrl, request); + } + + throw new ApplicationException($"No consent request matching request: {returnUrl}"); + } + + private ConsentViewModel CreateConsentViewModel(ConsentInputModel model, string returnUrl, AuthorizationRequest request) + { + var consentViewModel = new ConsentViewModel + { + RememberConsent = model?.RememberConsent ?? true, + ScopesConsented = model?.ScopesConsented ?? Enumerable.Empty(), + Description = model?.Description, + + ReturnUrl = returnUrl, + + ClientName = request.Client.ClientName ?? request.Client.ClientId, + ClientUrl = request.Client.ClientUri, + ClientLogoUrl = request.Client.LogoUri, + AllowRememberConsent = request.Client.AllowRememberConsent + }; + + consentViewModel.IdentityScopes = request.ValidatedResources.Resources.IdentityResources.Select(x => + CreateScopeViewModel(x, consentViewModel.ScopesConsented.Contains(x.Name) || model == null)) + .ToArray(); + + var apiScopes = new List(); + foreach(var parsedScope in request.ValidatedResources.ParsedScopes) + { + var apiScope = request.ValidatedResources.Resources.FindApiScope(parsedScope.ParsedName); + if (apiScope != null) + { + var scopeVm = CreateScopeViewModel(parsedScope, apiScope, + consentViewModel.ScopesConsented.Contains(parsedScope.RawValue) || model == null); + apiScopes.Add(scopeVm); + } + } + + if (ConsentOptions.EnableOfflineAccess && request.ValidatedResources.Resources.OfflineAccess) + { + apiScopes.Add(GetOfflineAccessScope(consentViewModel.ScopesConsented.Contains(IdentityServer4.IdentityServerConstants.StandardScopes.OfflineAccess) || model == null)); + } + + consentViewModel.ApiScopes = apiScopes; + + return consentViewModel; + } + + + protected virtual ScopeViewModel CreateScopeViewModel(IdentityResource identity, bool check) { - return new ConsentModel.ScopeViewModel + return new ScopeViewModel { - Name = identity.Name, + Value = identity.Name, DisplayName = identity.DisplayName, Description = identity.Description, Emphasize = identity.Emphasize, @@ -151,24 +204,30 @@ namespace Volo.Abp.Account.Web.Pages }; } - protected virtual ConsentModel.ScopeViewModel CreateScopeViewModel(Scope scope, bool check) + protected virtual ScopeViewModel CreateScopeViewModel(ParsedScopeValue parsedScopeValue, ApiScope apiScope, bool check) { - return new ConsentModel.ScopeViewModel - { - Name = scope.Name, - DisplayName = scope.DisplayName, - Description = scope.Description, - Emphasize = scope.Emphasize, - Required = scope.Required, - Checked = check || scope.Required + var displayName = apiScope.DisplayName ?? apiScope.Name; + if (!string.IsNullOrWhiteSpace(parsedScopeValue.ParsedParameter)) + { + displayName += ":" + parsedScopeValue.ParsedParameter; + } + + return new ScopeViewModel + { + Value = parsedScopeValue.RawValue, + DisplayName = displayName, + Description = apiScope.Description, + Emphasize = apiScope.Emphasize, + Required = apiScope.Required, + Checked = check || apiScope.Required }; } - protected virtual ConsentModel.ScopeViewModel GetOfflineAccessScope(bool check) + protected virtual ScopeViewModel GetOfflineAccessScope(bool check) { - return new ConsentModel.ScopeViewModel + return new ScopeViewModel { - Name = IdentityServer4.IdentityServerConstants.StandardScopes.OfflineAccess, + Value = IdentityServer4.IdentityServerConstants.StandardScopes.OfflineAccess, DisplayName = "Offline Access", //TODO: Localize Description = "Access to your applications and resources, even when you are offline", Emphasize = true, @@ -178,28 +237,37 @@ namespace Volo.Abp.Account.Web.Pages public class ConsentInputModel { - public List IdentityScopes { get; set; } - - public List ApiScopes { get; set; } - [Required] - public string UserDecision { get; set; } + public string Button { get; set; } + public IEnumerable ScopesConsented { get; set; } public bool RememberConsent { get; set; } - public List GetAllowedScopeNames() - { - var identityScopes = IdentityScopes ?? new List(); - var apiScopes = ApiScopes ?? new List(); - return identityScopes.Union(apiScopes).Where(s => s.Checked).Select(s => s.Name).ToList(); - } + public string ReturnUrl { get; set; } + + public string Description { get; set; } + } + + + public class ConsentViewModel : ConsentInputModel + { + public string ClientName { get; set; } + public string ClientUrl { get; set; } + + public string ClientLogoUrl { get; set; } + + public bool AllowRememberConsent { get; set; } + + public IEnumerable IdentityScopes { get; set; } + + public IEnumerable ApiScopes { get; set; } } public class ScopeViewModel { [Required] [HiddenInput] - public string Name { get; set; } + public string Value { get; set; } public bool Checked { get; set; } @@ -216,29 +284,13 @@ namespace Volo.Abp.Account.Web.Pages { public bool IsRedirect => RedirectUri != null; public string RedirectUri { get; set; } + public Client Client { get; set; } + + public bool ShowView => ViewModel != null; + public ConsentViewModel ViewModel { get; set; } public bool HasValidationError => ValidationError != null; public string ValidationError { get; set; } } - - public class ClientInfoModel - { - public string ClientName { get; set; } - - public string ClientUrl { get; set; } - - public string ClientLogoUrl { get; set; } - - public bool AllowRememberConsent { get; set; } - - public ClientInfoModel(Client client) - { - //TODO: Automap - ClientName = client.ClientId; - ClientUrl = client.ClientUri; - ClientLogoUrl = client.LogoUri; - AllowRememberConsent = client.AllowRememberConsent; - } - } } -} \ No newline at end of file +} diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Clients/IdentityResourceStore_Tests.cs b/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Clients/IdentityResourceStore_Tests.cs index a196fd7534..fcbb937bc4 100644 --- a/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Clients/IdentityResourceStore_Tests.cs +++ b/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Clients/IdentityResourceStore_Tests.cs @@ -53,7 +53,7 @@ namespace Volo.Abp.IdentityServer.Clients //Assert apiResources.ShouldNotBe(null); - apiResources[0].Scopes.Count.ShouldBe(2); + apiResources[0].Scopes.Count.ShouldBe(3); } [Fact] From 6f6d238bb5ff1d10b6ab1d8556d2ff5d2141cb62 Mon Sep 17 00:00:00 2001 From: maliming <6908465+maliming@users.noreply.github.com> Date: Fri, 3 Jul 2020 12:00:16 +0800 Subject: [PATCH 04/76] Add FindByNameAsync to IApiResourceRepository. --- .../ApiResources/IApiResourceRepository.cs | 6 ++++++ .../IdentityServer/ApiResources/ApiResourceRepository.cs | 9 +++++++++ .../IdentityServer/MongoDB/MongoApiResourceRepository.cs | 7 +++++++ 3 files changed, 22 insertions(+) diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/IApiResourceRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/IApiResourceRepository.cs index af1dcd6e36..8b9057d129 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/IApiResourceRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/IApiResourceRepository.cs @@ -8,6 +8,12 @@ namespace Volo.Abp.IdentityServer.ApiResources { public interface IApiResourceRepository : IBasicRepository { + Task FindByNameAsync( + string apiResourceName, + bool includeDetails = true, + CancellationToken cancellationToken = default + ); + Task> FindByNameAsync( string[] apiResourceNames, bool includeDetails = true, diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiResourceRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiResourceRepository.cs index 4d0baf7702..1949238a3b 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiResourceRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiResourceRepository.cs @@ -19,6 +19,15 @@ namespace Volo.Abp.IdentityServer.ApiResources } + public async Task FindByNameAsync(string apiResourceName, bool includeDetails = true, CancellationToken cancellationToken = default) + { + var query = from apiResource in DbSet.IncludeDetails(includeDetails) + where apiResource.Name == apiResourceName + select apiResource; + + return await query.FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); + } + public async Task> FindByNameAsync(string[] apiResourceNames, bool includeDetails = true, CancellationToken cancellationToken = default) { diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiResourceRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiResourceRepository.cs index 20d55b3d0e..44375fce93 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiResourceRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiResourceRepository.cs @@ -18,6 +18,13 @@ namespace Volo.Abp.IdentityServer.MongoDB { } + public async Task FindByNameAsync(string apiResourceName, bool includeDetails = true, CancellationToken cancellationToken = default) + { + return await GetMongoQueryable() + .Where(ar => ar.Name == apiResourceName) + .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); + } + public async Task> FindByNameAsync(string[] apiResourceNames, bool includeDetails = true, CancellationToken cancellationToken = default) { From a40b35a089532e6d47ff1340ad13cf20b81bfa9e Mon Sep 17 00:00:00 2001 From: maliming <6908465+maliming@users.noreply.github.com> Date: Fri, 3 Jul 2020 17:18:32 +0800 Subject: [PATCH 05/76] Use constants in EF entity configuration. --- .../ApiResources/ApiResourceScopeConsts.cs | 7 ++ .../ApiResourceSecretConsts.cs} | 12 +-- .../ApiResources/ApiScopeConsts.cs | 7 -- .../ApiScopes/ApiResourceConsts.cs | 9 ++ .../ApiScopes/ApiScopeClaimConsts.cs | 7 ++ .../ApiScopes/ApiScopePropertyConsts.cs | 9 ++ .../Devices/DeviceFlowCodesConsts.cs | 12 +++ .../IdentityResourcePropertyConsts.cs | 9 ++ .../{ApiResources => ApiScopes}/ApiScope.cs | 2 +- .../ApiScopeClaim.cs | 2 +- .../ApiScopeProperty.cs | 2 +- .../IApiScopeeRepository.cs | 2 +- .../IdentityServerAutoMapperProfile.cs | 1 + .../Volo/Abp/IdentityServer/ResourceStore.cs | 5 +- .../ApiResources/ApiResourceRepository.cs | 12 ++- .../ApiResources/ApiScopeRepository.cs | 1 + .../IIdentityServerDbContext.cs | 28 +++++- .../IdentityServerDbContext.cs | 28 +++++- ...yServerDbContextModelCreatingExtensions.cs | 90 +++++++++++++------ .../AbpIdentityServerMongoDbContext.cs | 3 + 20 files changed, 193 insertions(+), 55 deletions(-) create mode 100644 modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiResourceScopeConsts.cs rename modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/{SecretConsts.cs => ApiResources/ApiResourceSecretConsts.cs} (84%) delete mode 100644 modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiScopeConsts.cs create mode 100644 modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiScopes/ApiResourceConsts.cs create mode 100644 modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiScopes/ApiScopeClaimConsts.cs create mode 100644 modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiScopes/ApiScopePropertyConsts.cs create mode 100644 modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Devices/DeviceFlowCodesConsts.cs create mode 100644 modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/IdentityResources/IdentityResourcePropertyConsts.cs rename modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/{ApiResources => ApiScopes}/ApiScope.cs (97%) rename modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/{ApiResources => ApiScopes}/ApiScopeClaim.cs (94%) rename modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/{ApiResources => ApiScopes}/ApiScopeProperty.cs (95%) rename modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/{ApiResources => ApiScopes}/IApiScopeeRepository.cs (89%) diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiResourceScopeConsts.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiResourceScopeConsts.cs new file mode 100644 index 0000000000..8b0d8f4769 --- /dev/null +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiResourceScopeConsts.cs @@ -0,0 +1,7 @@ +namespace Volo.Abp.IdentityServer.ApiResources +{ + public class ApiResourceScopeConsts + { + public const int ScopeMaxLength = 200; + } +} diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/SecretConsts.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiResourceSecretConsts.cs similarity index 84% rename from modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/SecretConsts.cs rename to modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiResourceSecretConsts.cs index 156088a97b..261f48ac2e 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/SecretConsts.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiResourceSecretConsts.cs @@ -1,22 +1,22 @@ -namespace Volo.Abp.IdentityServer +namespace Volo.Abp.IdentityServer.ApiResources { - public class SecretConsts + public class ApiResourceSecretConsts { /// /// Default value: 250 /// public static int TypeMaxLength { get; set; } = 250; - + /// /// Default value: 4000 /// public static int ValueMaxLength { get; set; } = 4000; - + public static int ValueMaxLengthValue { get; set; } = ValueMaxLength; - + /// /// Default value: 2000 /// public static int DescriptionMaxLength { get; set; } = 2000; } -} \ No newline at end of file +} diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiScopeConsts.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiScopeConsts.cs deleted file mode 100644 index b61aa097f4..0000000000 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiScopeConsts.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace Volo.Abp.IdentityServer.ApiResources -{ - public class ApiScopeConsts - { - public const int NameMaxLength = 200; - } -} diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiScopes/ApiResourceConsts.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiScopes/ApiResourceConsts.cs new file mode 100644 index 0000000000..ab268690be --- /dev/null +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiScopes/ApiResourceConsts.cs @@ -0,0 +1,9 @@ +namespace Volo.Abp.IdentityServer.ApiScopes +{ + public class ApiScopeConsts + { + public const int NameMaxLength = 200; + public const int DisplayNameMaxLength = 200; + public const int DescriptionMaxLength = 1000; + } +} diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiScopes/ApiScopeClaimConsts.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiScopes/ApiScopeClaimConsts.cs new file mode 100644 index 0000000000..f3175e8774 --- /dev/null +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiScopes/ApiScopeClaimConsts.cs @@ -0,0 +1,7 @@ +namespace Volo.Abp.IdentityServer.ApiScopes +{ + public class ApiScopeClaimConsts + { + public const int NameMaxLength = 200; + } +} diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiScopes/ApiScopePropertyConsts.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiScopes/ApiScopePropertyConsts.cs new file mode 100644 index 0000000000..5450e67030 --- /dev/null +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiScopes/ApiScopePropertyConsts.cs @@ -0,0 +1,9 @@ +namespace Volo.Abp.IdentityServer.ApiScopes +{ + public class ApiScopePropertyConsts + { + public const int KeyMaxLength = 250; + public const int ValueMaxLength = 2000; + public static int ValueMaxLengthValue { get; set; } = ValueMaxLength; + } +} diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Devices/DeviceFlowCodesConsts.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Devices/DeviceFlowCodesConsts.cs new file mode 100644 index 0000000000..b0c87fe89d --- /dev/null +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Devices/DeviceFlowCodesConsts.cs @@ -0,0 +1,12 @@ +namespace Volo.Abp.IdentityServer.Devices +{ + public class DeviceFlowCodesConsts + { + public const int DeviceCodeMaxLength = 200; + public const int UserCodeMaxLength = 200; + public const int SubjectIdMaxLength = 200; + public const int ClientIdMaxLength = 200; + public const int DataMaxLength = 50000; + public static int DataMaxLengthValue { get; set; } = DataMaxLength; + } +} diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/IdentityResources/IdentityResourcePropertyConsts.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/IdentityResources/IdentityResourcePropertyConsts.cs new file mode 100644 index 0000000000..2c9ccbb0c4 --- /dev/null +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/IdentityResources/IdentityResourcePropertyConsts.cs @@ -0,0 +1,9 @@ +namespace Volo.Abp.IdentityServer.IdentityResources +{ + public class IdentityResourcePropertyConsts + { + public const int KeyMaxLength = 250; + public const int ValueMaxLength = 2000; + public static int ValueMaxLengthValue { get; set; } = ValueMaxLength; + } +} diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiScope.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiScopes/ApiScope.cs similarity index 97% rename from modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiScope.cs rename to modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiScopes/ApiScope.cs index 8e8605afa1..d35294c27f 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiScope.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiScopes/ApiScope.cs @@ -4,7 +4,7 @@ using System.Linq; using JetBrains.Annotations; using Volo.Abp.Domain.Entities.Auditing; -namespace Volo.Abp.IdentityServer.ApiResources +namespace Volo.Abp.IdentityServer.ApiScopes { public class ApiScope : FullAuditedAggregateRoot { diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiScopeClaim.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiScopes/ApiScopeClaim.cs similarity index 94% rename from modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiScopeClaim.cs rename to modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiScopes/ApiScopeClaim.cs index e4444cbc8c..0bb6704a22 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiScopeClaim.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiScopes/ApiScopeClaim.cs @@ -1,7 +1,7 @@ using System; using JetBrains.Annotations; -namespace Volo.Abp.IdentityServer.ApiResources +namespace Volo.Abp.IdentityServer.ApiScopes { public class ApiScopeClaim : UserClaim { diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiScopeProperty.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiScopes/ApiScopeProperty.cs similarity index 95% rename from modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiScopeProperty.cs rename to modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiScopes/ApiScopeProperty.cs index 38f34567a8..b6e5d7fbe8 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiScopeProperty.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiScopes/ApiScopeProperty.cs @@ -2,7 +2,7 @@ using JetBrains.Annotations; using Volo.Abp.Domain.Entities; -namespace Volo.Abp.IdentityServer.ApiResources +namespace Volo.Abp.IdentityServer.ApiScopes { public class ApiScopeProperty : Entity { diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/IApiScopeeRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiScopes/IApiScopeeRepository.cs similarity index 89% rename from modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/IApiScopeeRepository.cs rename to modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiScopes/IApiScopeeRepository.cs index 184b8d1b67..1cbc48499e 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/IApiScopeeRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiScopes/IApiScopeeRepository.cs @@ -3,7 +3,7 @@ using System.Threading; using System.Threading.Tasks; using Volo.Abp.Domain.Repositories; -namespace Volo.Abp.IdentityServer.ApiResources +namespace Volo.Abp.IdentityServer.ApiScopes { public interface IApiScopeRepository : IBasicRepository { diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityServerAutoMapperProfile.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityServerAutoMapperProfile.cs index 17aae1b084..99d24e617d 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityServerAutoMapperProfile.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityServerAutoMapperProfile.cs @@ -2,6 +2,7 @@ using System.Security.Claims; using AutoMapper; using Volo.Abp.IdentityServer.ApiResources; +using Volo.Abp.IdentityServer.ApiScopes; using Volo.Abp.IdentityServer.Clients; using Volo.Abp.IdentityServer.Devices; using Volo.Abp.IdentityServer.Grants; diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ResourceStore.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ResourceStore.cs index 975fc7f801..5afaaf4400 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ResourceStore.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ResourceStore.cs @@ -4,6 +4,7 @@ using System.Threading.Tasks; using IdentityServer4.Models; using IdentityServer4.Stores; using Volo.Abp.IdentityServer.ApiResources; +using Volo.Abp.IdentityServer.ApiScopes; using Volo.Abp.IdentityServer.IdentityResources; using Volo.Abp.ObjectMapping; @@ -43,7 +44,7 @@ namespace Volo.Abp.IdentityServer public virtual async Task> FindApiScopesByNameAsync(IEnumerable scopeNames) { var scopes = await ApiScopeRepository.GetListByNameAsync(scopeNames.ToArray(), includeDetails: true); - return ObjectMapper.Map, List>(scopes); + return ObjectMapper.Map, List>(scopes); } /// @@ -76,7 +77,7 @@ namespace Volo.Abp.IdentityServer return new Resources( ObjectMapper.Map, List>(identityResources), ObjectMapper.Map, List>(apiResources), - ObjectMapper.Map, List>(apiScopes)); + ObjectMapper.Map, List>(apiScopes)); } } } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiResourceRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiResourceRepository.cs index 1949238a3b..74ea53d9e0 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiResourceRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiResourceRepository.cs @@ -83,16 +83,14 @@ namespace Volo.Abp.IdentityServer.ApiResources public override async Task DeleteAsync(Guid id, bool autoSave = false, CancellationToken cancellationToken = default) { - var scopeClaims = DbContext.Set().Where(sc => sc.ApiScopeId == id); - - foreach (var scopeClaim in scopeClaims) + var resourceClaims = DbContext.Set().Where(sc => sc.ApiResourceId == id); + foreach (var scopeClaim in resourceClaims) { - DbContext.Set().Remove(scopeClaim); + DbContext.Set().Remove(scopeClaim); } - var scopes = DbContext.Set().Where(s => s.ApiResourceId == id); - - foreach (var scope in scopes) + var resourceScopes = DbContext.Set().Where(s => s.ApiResourceId == id); + foreach (var scope in resourceScopes) { DbContext.Set().Remove(scope); } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiScopeRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiScopeRepository.cs index 6df9f5b90a..87f67ec330 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiScopeRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiScopeRepository.cs @@ -5,6 +5,7 @@ using System.Threading.Tasks; using Microsoft.EntityFrameworkCore; using Volo.Abp.Domain.Repositories.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.IdentityServer.ApiScopes; using Volo.Abp.IdentityServer.EntityFrameworkCore; namespace Volo.Abp.IdentityServer.ApiResources diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IIdentityServerDbContext.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IIdentityServerDbContext.cs index 93624174f9..7834db31fb 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IIdentityServerDbContext.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IIdentityServerDbContext.cs @@ -2,6 +2,7 @@ using Volo.Abp.Data; using Volo.Abp.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.Grants; @@ -12,20 +13,41 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore [ConnectionStringName(AbpIdentityServerDbProperties.ConnectionStringName)] public interface IIdentityServerDbContext : IEfCoreDbContext { + #region ApiResource + DbSet ApiResources { get; set; } - DbSet ApiSecrets { get; set; } + DbSet ApiResourceSecrets { get; set; } DbSet ApiResourceClaims { get; set; } - DbSet ApiScopes { get; set; } + DbSet ApiResourceScopes { get; set; } + + #endregion + + #region ApiScope + + DbSet ApiScopes { get; set; } DbSet ApiScopeClaims { get; set; } + DbSet ApiScopeProperties { get; set; } + + #endregion + + + #region IdentityResource + DbSet IdentityResources { get; set; } DbSet IdentityClaims { get; set; } + DbSet IdentityResourceProperties { get; set; } + + #endregion + + #region Client + DbSet Clients { get; set; } DbSet ClientGrantTypes { get; set; } @@ -46,6 +68,8 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore DbSet ClientProperties { get; set; } + #endregion + DbSet PersistedGrants { get; set; } DbSet DeviceFlowCodes { get; set; } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContext.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContext.cs index 84ec1f802a..686d2e0ac1 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContext.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContext.cs @@ -2,6 +2,7 @@ using Volo.Abp.Data; using Volo.Abp.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.Grants; @@ -12,20 +13,41 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore [ConnectionStringName(AbpIdentityServerDbProperties.ConnectionStringName)] public class IdentityServerDbContext : AbpDbContext, IIdentityServerDbContext { + #region ApiResource + public DbSet ApiResources { get; set; } - public DbSet ApiSecrets { get; set; } + public DbSet ApiResourceSecrets { get; set; } public DbSet ApiResourceClaims { get; set; } - public DbSet ApiScopes { get; set; } + public DbSet ApiResourceScopes { get; set; } + + #endregion + + #region ApiScope + + public DbSet ApiScopes { get; set; } public DbSet ApiScopeClaims { get; set; } + public DbSet ApiScopeProperties { get; set; } + + #endregion + + + #region IdentityResource + public DbSet IdentityResources { get; set; } public DbSet IdentityClaims { get; set; } + public DbSet IdentityResourceProperties { get; set; } + + #endregion + + #region Client + public DbSet Clients { get; set; } public DbSet ClientGrantTypes { get; set; } @@ -46,6 +68,8 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore public DbSet ClientProperties { get; set; } + #endregion + public DbSet PersistedGrants { get; set; } public DbSet DeviceFlowCodes { get; set; } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs index 54b91e9dcc..26b8036aba 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs @@ -6,10 +6,16 @@ using Volo.Abp.EntityFrameworkCore.Modeling; using Volo.Abp.EntityFrameworkCore.ValueComparers; using Volo.Abp.EntityFrameworkCore.ValueConverters; using Volo.Abp.IdentityServer.ApiResources; +using Volo.Abp.IdentityServer.ApiScopes; using Volo.Abp.IdentityServer.Clients; using Volo.Abp.IdentityServer.Devices; using Volo.Abp.IdentityServer.Grants; using Volo.Abp.IdentityServer.IdentityResources; +using ApiResource = Volo.Abp.IdentityServer.ApiResources.ApiResource; +using Client = Volo.Abp.IdentityServer.Clients.Client; +using ClientClaim = Volo.Abp.IdentityServer.Clients.ClientClaim; +using IdentityResource = Volo.Abp.IdentityServer.IdentityResources.IdentityResource; +using PersistedGrant = Volo.Abp.IdentityServer.Grants.PersistedGrant; namespace Volo.Abp.IdentityServer.EntityFrameworkCore { @@ -28,6 +34,8 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore optionsAction?.Invoke(options); + #region Client + builder.Entity(b => { b.ToTable(options.TablePrefix + "Clients", options.Schema); @@ -123,16 +131,16 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore b.HasKey(x => new {x.ClientId, x.Type, x.Value}); - b.Property(x => x.Type).HasMaxLength(SecretConsts.TypeMaxLength).IsRequired(); + b.Property(x => x.Type).HasMaxLength(ApiResourceSecretConsts.TypeMaxLength).IsRequired(); if (IsDatabaseProvider(builder, options, EfCoreDatabaseProvider.MySql, EfCoreDatabaseProvider.Oracle)) { - SecretConsts.ValueMaxLengthValue = 300; + ApiResourceSecretConsts.ValueMaxLengthValue = 300; } - b.Property(x => x.Value).HasMaxLength(SecretConsts.ValueMaxLengthValue).IsRequired(); + b.Property(x => x.Value).HasMaxLength(ApiResourceSecretConsts.ValueMaxLengthValue).IsRequired(); - b.Property(x => x.Description).HasMaxLength(SecretConsts.DescriptionMaxLength); + b.Property(x => x.Description).HasMaxLength(ApiResourceSecretConsts.DescriptionMaxLength); }); builder.Entity(b => @@ -206,6 +214,10 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore b.HasIndex(x => x.Expiration); }); + #endregion + + #region IdentityResource + builder.Entity(b => { b.ToTable(options.TablePrefix + "IdentityResources", options.Schema); @@ -216,6 +228,8 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore b.Property(x => x.DisplayName).HasMaxLength(IdentityResourceConsts.DisplayNameMaxLength); b.Property(x => x.Description).HasMaxLength(IdentityResourceConsts.DescriptionMaxLength); + b.HasIndex(x => x.Name).IsUnique(); + b.HasMany(x => x.UserClaims).WithOne().HasForeignKey(x => x.IdentityResourceId).IsRequired(); b.HasMany(x => x.Properties).WithOne().HasForeignKey(x => x.IdentityResourceId).IsRequired(); }); @@ -239,11 +253,19 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore b.HasKey(x => new {x.IdentityResourceId, x.Key}); - b.Property(x => x.Key).HasMaxLength(250).IsRequired(); - b.Property(x => x.Value).HasMaxLength(2000).IsRequired(); + b.Property(x => x.Key).HasMaxLength(IdentityResourcePropertyConsts.KeyMaxLength).IsRequired(); + if (IsDatabaseProvider(builder, options, EfCoreDatabaseProvider.MySql, EfCoreDatabaseProvider.Oracle)) + { + IdentityResourcePropertyConsts.ValueMaxLengthValue = 300; + } + b.Property(x => x.Value).HasMaxLength(IdentityResourcePropertyConsts.ValueMaxLengthValue).IsRequired(); }); - builder.Entity(b => + #endregion + + #region ApiResource + + builder.Entity(b => { b.ToTable(options.TablePrefix + "ApiResources", options.Schema); @@ -269,15 +291,15 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore b.HasKey(x => new {x.ApiResourceId, x.Type, x.Value}); - b.Property(x => x.Type).HasMaxLength(SecretConsts.TypeMaxLength).IsRequired(); - b.Property(x => x.Description).HasMaxLength(SecretConsts.DescriptionMaxLength); + b.Property(x => x.Type).HasMaxLength(ApiResourceSecretConsts.TypeMaxLength).IsRequired(); + b.Property(x => x.Description).HasMaxLength(ApiResourceSecretConsts.DescriptionMaxLength); if (IsDatabaseProvider(builder, options, EfCoreDatabaseProvider.MySql, EfCoreDatabaseProvider.Oracle)) { - SecretConsts.ValueMaxLengthValue = 300; + ApiResourceSecretConsts.ValueMaxLengthValue = 300; } - b.Property(x => x.Value).HasMaxLength(SecretConsts.ValueMaxLengthValue).IsRequired(); + b.Property(x => x.Value).HasMaxLength(ApiResourceSecretConsts.ValueMaxLengthValue).IsRequired(); }); builder.Entity(b => @@ -299,24 +321,28 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore b.HasKey(x => new {x.ApiResourceId, x.Scope}); - b.Property(x => x.Scope).HasMaxLength(ApiScopeConsts.NameMaxLength).IsRequired(); + b.Property(x => x.Scope).HasMaxLength(ApiResourceScopeConsts.ScopeMaxLength).IsRequired(); }); + #endregion + + #region ApiScope + builder.Entity(b => { b.ToTable(options.TablePrefix + "ApiScopes", options.Schema); b.ConfigureByConvention(); - b.Property(x => x.Name).HasMaxLength(200).IsRequired(); - b.Property(x => x.DisplayName).HasMaxLength(200); - b.Property(x => x.Description).HasMaxLength(1000); + b.Property(x => x.Name).HasMaxLength(ApiScopeConsts.NameMaxLength).IsRequired(); + b.Property(x => x.DisplayName).HasMaxLength(ApiScopeConsts.DisplayNameMaxLength); + b.Property(x => x.Description).HasMaxLength(ApiScopeConsts.DescriptionMaxLength); b.HasIndex(x => x.Name).IsUnique(); b.HasMany(x => x.UserClaims).WithOne().HasForeignKey(x => x.ApiScopeId).IsRequired(); - //Identity Server does not configure the relationship of Properties + //TODO: Identity Server does not configure the relationship of Properties //b.HasMany(x => x.Properties).WithOne().HasForeignKey(x => x.ApiScopeId).IsRequired(); }); @@ -329,7 +355,7 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore b.HasKey(x => new {x.ApiScopeId, x.Name, x.Type}); b.Property(x => x.Type).HasMaxLength(UserClaimConsts.TypeMaxLength).IsRequired(); - b.Property(x => x.Name).HasMaxLength(ApiScopeConsts.NameMaxLength).IsRequired(); + b.Property(x => x.Name).HasMaxLength(ApiScopeClaimConsts.NameMaxLength).IsRequired(); }); builder.Entity(b => @@ -340,28 +366,42 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore b.HasKey(x => new {x.ApiScopeId, x.Key}); - b.Property(x => x.Key).HasMaxLength(250).IsRequired(); - //oracle? - b.Property(x => x.Value).HasMaxLength(2000).IsRequired(); + b.Property(x => x.Key).HasMaxLength(ApiScopePropertyConsts.KeyMaxLength).IsRequired(); + if (IsDatabaseProvider(builder, options, EfCoreDatabaseProvider.MySql, EfCoreDatabaseProvider.Oracle)) + { + ApiScopePropertyConsts.ValueMaxLengthValue = 300; + } + b.Property(x => x.Value).HasMaxLength(ApiScopePropertyConsts.ValueMaxLengthValue).IsRequired(); }); + #endregion + + #region DeviceFlowCodes + builder.Entity(b => { b.ToTable(options.TablePrefix + "DeviceFlowCodes", options.Schema); b.ConfigureByConvention(); - b.Property(x => x.DeviceCode).HasMaxLength(200).IsRequired(); - b.Property(x => x.UserCode).HasMaxLength(200).IsRequired(); - b.Property(x => x.SubjectId).HasMaxLength(200); - b.Property(x => x.ClientId).HasMaxLength(200).IsRequired(); + b.Property(x => x.DeviceCode).HasMaxLength(DeviceFlowCodesConsts.DeviceCodeMaxLength).IsRequired(); + b.Property(x => x.UserCode).HasMaxLength(DeviceFlowCodesConsts.UserCodeMaxLength).IsRequired(); + b.Property(x => x.SubjectId).HasMaxLength(DeviceFlowCodesConsts.SubjectIdMaxLength); + b.Property(x => x.ClientId).HasMaxLength(DeviceFlowCodesConsts.ClientIdMaxLength).IsRequired(); b.Property(x => x.Expiration).IsRequired(); - b.Property(x => x.Data).HasMaxLength(50000).IsRequired(); + + if (IsDatabaseProvider(builder, options, EfCoreDatabaseProvider.MySql)) + { + DeviceFlowCodesConsts.DataMaxLengthValue = 10000; //TODO: MySQL accepts 20.000. We can consider to change in v3.0. + } + b.Property(x => x.Data).HasMaxLength(DeviceFlowCodesConsts.DataMaxLengthValue).IsRequired(); b.HasIndex(x => new {x.UserCode}).IsUnique(); b.HasIndex(x => x.DeviceCode).IsUnique(); b.HasIndex(x => x.Expiration); }); + + #endregion } private static bool IsDatabaseProvider( diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/AbpIdentityServerMongoDbContext.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/AbpIdentityServerMongoDbContext.cs index b4b5fe9b60..093f7434dc 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/AbpIdentityServerMongoDbContext.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/AbpIdentityServerMongoDbContext.cs @@ -1,6 +1,7 @@ using MongoDB.Driver; using Volo.Abp.Data; using Volo.Abp.IdentityServer.ApiResources; +using Volo.Abp.IdentityServer.ApiScopes; using Volo.Abp.IdentityServer.Clients; using Volo.Abp.IdentityServer.Devices; using Volo.Abp.IdentityServer.Grants; @@ -14,6 +15,8 @@ namespace Volo.Abp.IdentityServer.MongoDB { public IMongoCollection ApiResources => Collection(); + public IMongoCollection ApiScopes => Collection(); + public IMongoCollection Clients => Collection(); public IMongoCollection IdentityResources => Collection(); From 9c4a3f63d37c6a17771f5b2950a8beb3f1978e77 Mon Sep 17 00:00:00 2001 From: maliming <6908465+maliming@users.noreply.github.com> Date: Fri, 3 Jul 2020 18:31:37 +0800 Subject: [PATCH 06/76] Refactor. --- .../ApiResources/ApiResourceConsts.cs | 2 +- .../ApiResources/ApiResourceEto.cs | 2 +- .../ApiResources/ApiResourceScopeConsts.cs | 2 +- .../ApiResources/ApiResourceSecretConsts.cs | 2 +- .../AbpIdentityServerDomainModule.cs | 2 +- .../ApiResources/ApiResource.cs | 2 +- .../ApiResources/ApiResourceClaim.cs | 2 +- .../ApiResources/ApiResourceScope.cs | 2 +- .../ApiResources/ApiResourceSecret.cs | 2 +- .../ApiResources/IApiResourceRepository.cs | 2 +- .../Abp/IdentityServer/ApiScopes/ApiScope.cs | 20 ++++++++++++ .../IdentityServerAutoMapperProfile.cs | 1 - .../Volo/Abp/IdentityServer/ResourceStore.cs | 7 ++-- ...IdentityServerEfCoreQueryableExtensions.cs | 15 ++++++++- .../ApiResources/ApiResourceRepository.cs | 2 +- .../ApiScopeRepository.cs | 7 ++-- ...IdentityServerEntityFrameworkCoreModule.cs | 2 +- .../IIdentityServerDbContext.cs | 1 - .../IdentityServerDbContext.cs | 1 - ...yServerDbContextModelCreatingExtensions.cs | 3 +- .../AbpIdentityServerMongoDbContext.cs | 3 +- ...pIdentityServerMongoDbContextExtensions.cs | 12 +++++-- .../MongoDB/AbpIdentityServerMongoDbModule.cs | 7 ++-- .../IAbpIdentityServerMongoDbContext.cs | 5 ++- .../MongoDB/MongoApiResourceRepository.cs | 2 +- .../MongoDB/MongoApiScopeRepository.cs | 32 +++++++++++++++++++ .../AbpIdentityServerTestDataBuilder.cs | 4 +-- .../AbpIdentityServerTestDataBuilder.cs | 2 +- .../ApiResourceRepository_Tests.cs | 2 +- 29 files changed, 109 insertions(+), 39 deletions(-) rename modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/{ApiResources => ApiScopes}/ApiScopeRepository.cs (80%) create mode 100644 modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiScopeRepository.cs diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiResourceConsts.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiResourceConsts.cs index 1c3aecc531..b20b743b50 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiResourceConsts.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiResourceConsts.cs @@ -1,4 +1,4 @@ -namespace Volo.Abp.IdentityServer.ApiResources +namespace Volo.Abp.IdentityServer.ApiScopes { public class ApiResourceConsts { diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiResourceEto.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiResourceEto.cs index 1130b0bc92..1aeb83727f 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiResourceEto.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiResourceEto.cs @@ -1,7 +1,7 @@ using System; using JetBrains.Annotations; -namespace Volo.Abp.IdentityServer.ApiResources +namespace Volo.Abp.IdentityServer.ApiScopes { [Serializable] public class ApiResourceEto diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiResourceScopeConsts.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiResourceScopeConsts.cs index 8b0d8f4769..c9b874b12c 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiResourceScopeConsts.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiResourceScopeConsts.cs @@ -1,4 +1,4 @@ -namespace Volo.Abp.IdentityServer.ApiResources +namespace Volo.Abp.IdentityServer.ApiScopes { public class ApiResourceScopeConsts { diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiResourceSecretConsts.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiResourceSecretConsts.cs index 261f48ac2e..dce950d30c 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiResourceSecretConsts.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiResourceSecretConsts.cs @@ -1,4 +1,4 @@ -namespace Volo.Abp.IdentityServer.ApiResources +namespace Volo.Abp.IdentityServer.ApiScopes { public class ApiResourceSecretConsts { diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AbpIdentityServerDomainModule.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AbpIdentityServerDomainModule.cs index 9e36576e56..bd03a3f34e 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AbpIdentityServerDomainModule.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AbpIdentityServerDomainModule.cs @@ -8,7 +8,7 @@ using Volo.Abp.BackgroundWorkers; using Volo.Abp.Caching; using Volo.Abp.Domain.Entities.Events.Distributed; using Volo.Abp.Identity; -using Volo.Abp.IdentityServer.ApiResources; +using Volo.Abp.IdentityServer.ApiScopes; using Volo.Abp.IdentityServer.Clients; using Volo.Abp.IdentityServer.Devices; using Volo.Abp.IdentityServer.IdentityResources; diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResource.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResource.cs index dc795fb09b..9d81b95def 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResource.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResource.cs @@ -5,7 +5,7 @@ using IdentityServer4; using JetBrains.Annotations; using Volo.Abp.Domain.Entities.Auditing; -namespace Volo.Abp.IdentityServer.ApiResources +namespace Volo.Abp.IdentityServer.ApiScopes { public class ApiResource : FullAuditedAggregateRoot { diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResourceClaim.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResourceClaim.cs index e71d694656..e3e92d0721 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResourceClaim.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResourceClaim.cs @@ -1,7 +1,7 @@ using System; using JetBrains.Annotations; -namespace Volo.Abp.IdentityServer.ApiResources +namespace Volo.Abp.IdentityServer.ApiScopes { public class ApiResourceClaim : UserClaim { diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResourceScope.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResourceScope.cs index 4da2beaa3f..ecdff780e9 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResourceScope.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResourceScope.cs @@ -2,7 +2,7 @@ using JetBrains.Annotations; using Volo.Abp.Domain.Entities; -namespace Volo.Abp.IdentityServer.ApiResources +namespace Volo.Abp.IdentityServer.ApiScopes { public class ApiResourceScope : Entity { diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResourceSecret.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResourceSecret.cs index dcc6b04768..ccf63b8a3c 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResourceSecret.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResourceSecret.cs @@ -2,7 +2,7 @@ using IdentityServer4; using JetBrains.Annotations; -namespace Volo.Abp.IdentityServer.ApiResources +namespace Volo.Abp.IdentityServer.ApiScopes { public class ApiResourceSecret : Secret { diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/IApiResourceRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/IApiResourceRepository.cs index 8b9057d129..4f2abd3aed 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/IApiResourceRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/IApiResourceRepository.cs @@ -4,7 +4,7 @@ using System.Threading; using System.Threading.Tasks; using Volo.Abp.Domain.Repositories; -namespace Volo.Abp.IdentityServer.ApiResources +namespace Volo.Abp.IdentityServer.ApiScopes { public interface IApiResourceRepository : IBasicRepository { diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiScopes/ApiScope.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiScopes/ApiScope.cs index d35294c27f..047c688b67 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiScopes/ApiScope.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiScopes/ApiScope.cs @@ -74,5 +74,25 @@ namespace Volo.Abp.IdentityServer.ApiScopes { return UserClaims.FirstOrDefault(r => r.Name == Name && r.Type == type); } + + public virtual void AddProperty([NotNull] string key, string value) + { + Properties.Add(new ApiScopeProperty(Id, key, value)); + } + + public virtual void RemoveAllProperties() + { + Properties.Clear(); + } + + public virtual void RemoveProperty(string key) + { + Properties.RemoveAll(r => r.Key == key); + } + + public virtual ApiScopeProperty FindProperty(string key) + { + return Properties.FirstOrDefault(r => r.Key == key); + } } } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityServerAutoMapperProfile.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityServerAutoMapperProfile.cs index 99d24e617d..34a831ca38 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityServerAutoMapperProfile.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityServerAutoMapperProfile.cs @@ -1,7 +1,6 @@ using System.Collections.Generic; using System.Security.Claims; using AutoMapper; -using Volo.Abp.IdentityServer.ApiResources; using Volo.Abp.IdentityServer.ApiScopes; using Volo.Abp.IdentityServer.Clients; using Volo.Abp.IdentityServer.Devices; diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ResourceStore.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ResourceStore.cs index 5afaaf4400..a2d13c72fd 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ResourceStore.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ResourceStore.cs @@ -3,7 +3,6 @@ using System.Linq; using System.Threading.Tasks; using IdentityServer4.Models; using IdentityServer4.Stores; -using Volo.Abp.IdentityServer.ApiResources; using Volo.Abp.IdentityServer.ApiScopes; using Volo.Abp.IdentityServer.IdentityResources; using Volo.Abp.ObjectMapping; @@ -53,7 +52,7 @@ namespace Volo.Abp.IdentityServer public virtual async Task> FindApiResourcesByScopeNameAsync(IEnumerable scopeNames) { var resources = await ApiResourceRepository.GetListByScopesAsync(scopeNames.ToArray(), includeDetails: true); - return ObjectMapper.Map, List>(resources); + return ObjectMapper.Map, List>(resources); } /// @@ -62,7 +61,7 @@ namespace Volo.Abp.IdentityServer public virtual async Task> FindApiResourcesByNameAsync(IEnumerable apiResourceNames) { var resources = await ApiResourceRepository.FindByNameAsync(apiResourceNames.ToArray(), includeDetails: true); - return ObjectMapper.Map, List>(resources); + return ObjectMapper.Map, List>(resources); } /// @@ -76,7 +75,7 @@ namespace Volo.Abp.IdentityServer return new Resources( ObjectMapper.Map, List>(identityResources), - ObjectMapper.Map, List>(apiResources), + ObjectMapper.Map, List>(apiResources), ObjectMapper.Map, List>(apiScopes)); } } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/AbpIdentityServerEfCoreQueryableExtensions.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/AbpIdentityServerEfCoreQueryableExtensions.cs index 6e47d461e4..347b3c4d22 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/AbpIdentityServerEfCoreQueryableExtensions.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/AbpIdentityServerEfCoreQueryableExtensions.cs @@ -1,6 +1,6 @@ using System.Linq; using Microsoft.EntityFrameworkCore; -using Volo.Abp.IdentityServer.ApiResources; +using Volo.Abp.IdentityServer.ApiScopes; using Volo.Abp.IdentityServer.Clients; using Volo.Abp.IdentityServer.IdentityResources; @@ -21,6 +21,19 @@ namespace Volo.Abp.IdentityServer .Include(x => x.Scopes); } + public static IQueryable IncludeDetails(this IQueryable queryable, bool include = true) + { + if (!include) + { + return queryable; + } + + return queryable + .Include(x => x.UserClaims) + .Include(x => x.Properties); + } + + public static IQueryable IncludeDetails(this IQueryable queryable, bool include = true) { if (!include) diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiResourceRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiResourceRepository.cs index 74ea53d9e0..bf8a8c2df2 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiResourceRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiResourceRepository.cs @@ -10,7 +10,7 @@ using Volo.Abp.IdentityServer.EntityFrameworkCore; using System.Linq.Dynamic.Core; using System.Runtime.InteropServices.ComTypes; -namespace Volo.Abp.IdentityServer.ApiResources +namespace Volo.Abp.IdentityServer.ApiScopes { public class ApiResourceRepository : EfCoreRepository, IApiResourceRepository { diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiScopeRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiScopes/ApiScopeRepository.cs similarity index 80% rename from modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiScopeRepository.cs rename to modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiScopes/ApiScopeRepository.cs index 87f67ec330..9828a48d30 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiScopeRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiScopes/ApiScopeRepository.cs @@ -5,10 +5,9 @@ using System.Threading.Tasks; using Microsoft.EntityFrameworkCore; using Volo.Abp.Domain.Repositories.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore; -using Volo.Abp.IdentityServer.ApiScopes; using Volo.Abp.IdentityServer.EntityFrameworkCore; -namespace Volo.Abp.IdentityServer.ApiResources +namespace Volo.Abp.IdentityServer.ApiScopes { public class ApiScopeRepository : EfCoreRepository, IApiScopeRepository { @@ -20,7 +19,9 @@ namespace Volo.Abp.IdentityServer.ApiResources public async Task> GetListByNameAsync(string[] scopeNames, bool includeDetails = false, CancellationToken cancellationToken = default) { - var query = from scope in DbSet where scopeNames.Contains(scope.Name) select scope; + var query = from scope in DbSet.IncludeDetails(includeDetails) + where scopeNames.Contains(scope.Name) + select scope; return await query.ToListAsync(GetCancellationToken(cancellationToken)); } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/AbpIdentityServerEntityFrameworkCoreModule.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/AbpIdentityServerEntityFrameworkCoreModule.cs index a932cd3351..4d89745874 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/AbpIdentityServerEntityFrameworkCoreModule.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/AbpIdentityServerEntityFrameworkCoreModule.cs @@ -1,6 +1,6 @@ using Microsoft.Extensions.DependencyInjection; using Volo.Abp.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.Grants; diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IIdentityServerDbContext.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IIdentityServerDbContext.cs index 7834db31fb..db1017b9ab 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IIdentityServerDbContext.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IIdentityServerDbContext.cs @@ -1,7 +1,6 @@ using Microsoft.EntityFrameworkCore; using Volo.Abp.Data; using Volo.Abp.EntityFrameworkCore; -using Volo.Abp.IdentityServer.ApiResources; using Volo.Abp.IdentityServer.ApiScopes; using Volo.Abp.IdentityServer.Clients; using Volo.Abp.IdentityServer.Devices; diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContext.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContext.cs index 686d2e0ac1..f7ccb1d309 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContext.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContext.cs @@ -1,7 +1,6 @@ using Microsoft.EntityFrameworkCore; using Volo.Abp.Data; using Volo.Abp.EntityFrameworkCore; -using Volo.Abp.IdentityServer.ApiResources; using Volo.Abp.IdentityServer.ApiScopes; using Volo.Abp.IdentityServer.Clients; using Volo.Abp.IdentityServer.Devices; diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs index 26b8036aba..8d96f2c442 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs @@ -5,13 +5,12 @@ using Volo.Abp.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore.Modeling; using Volo.Abp.EntityFrameworkCore.ValueComparers; using Volo.Abp.EntityFrameworkCore.ValueConverters; -using Volo.Abp.IdentityServer.ApiResources; using Volo.Abp.IdentityServer.ApiScopes; using Volo.Abp.IdentityServer.Clients; using Volo.Abp.IdentityServer.Devices; using Volo.Abp.IdentityServer.Grants; using Volo.Abp.IdentityServer.IdentityResources; -using ApiResource = Volo.Abp.IdentityServer.ApiResources.ApiResource; +using ApiResource = Volo.Abp.IdentityServer.ApiScopes.ApiResource; using Client = Volo.Abp.IdentityServer.Clients.Client; using ClientClaim = Volo.Abp.IdentityServer.Clients.ClientClaim; using IdentityResource = Volo.Abp.IdentityServer.IdentityResources.IdentityResource; diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/AbpIdentityServerMongoDbContext.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/AbpIdentityServerMongoDbContext.cs index 093f7434dc..760505e75f 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/AbpIdentityServerMongoDbContext.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/AbpIdentityServerMongoDbContext.cs @@ -1,12 +1,11 @@ using MongoDB.Driver; using Volo.Abp.Data; -using Volo.Abp.IdentityServer.ApiResources; using Volo.Abp.IdentityServer.ApiScopes; using Volo.Abp.IdentityServer.Clients; using Volo.Abp.IdentityServer.Devices; using Volo.Abp.IdentityServer.Grants; +using Volo.Abp.IdentityServer.IdentityResources; using Volo.Abp.MongoDB; -using IdentityResource = Volo.Abp.IdentityServer.IdentityResources.IdentityResource; namespace Volo.Abp.IdentityServer.MongoDB { diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/AbpIdentityServerMongoDbContextExtensions.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/AbpIdentityServerMongoDbContextExtensions.cs index b6a20d842a..026312312a 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/AbpIdentityServerMongoDbContextExtensions.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/AbpIdentityServerMongoDbContextExtensions.cs @@ -1,5 +1,5 @@ using System; -using Volo.Abp.IdentityServer.ApiResources; +using Volo.Abp.IdentityServer.ApiScopes; using Volo.Abp.IdentityServer.Clients; using Volo.Abp.IdentityServer.Devices; using Volo.Abp.IdentityServer.Grants; @@ -27,15 +27,21 @@ namespace Volo.Abp.IdentityServer.MongoDB b.CollectionName = options.CollectionPrefix + "ApiResources"; }); - builder.Entity(b => + builder.Entity(b => { - b.CollectionName = options.CollectionPrefix + "Clients"; + b.CollectionName = options.CollectionPrefix + "ApiScopes"; }); + builder.Entity(b => { b.CollectionName = options.CollectionPrefix + "IdentityResources"; }); + builder.Entity(b => + { + b.CollectionName = options.CollectionPrefix + "Clients"; + }); + builder.Entity(b => { b.CollectionName = options.CollectionPrefix + "PersistedGrants"; diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/AbpIdentityServerMongoDbModule.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/AbpIdentityServerMongoDbModule.cs index 251378e087..1924ad3a68 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/AbpIdentityServerMongoDbModule.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/AbpIdentityServerMongoDbModule.cs @@ -1,11 +1,11 @@ using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.IdentityServer.ApiScopes; +using Volo.Abp.IdentityServer.Clients; using Volo.Abp.IdentityServer.Devices; using Volo.Abp.IdentityServer.Grants; +using Volo.Abp.IdentityServer.IdentityResources; using Volo.Abp.Modularity; using Volo.Abp.MongoDB; -using ApiResource = Volo.Abp.IdentityServer.ApiResources.ApiResource; -using Client = Volo.Abp.IdentityServer.Clients.Client; -using IdentityResource = Volo.Abp.IdentityServer.IdentityResources.IdentityResource; namespace Volo.Abp.IdentityServer.MongoDB { @@ -30,6 +30,7 @@ namespace Volo.Abp.IdentityServer.MongoDB context.Services.AddMongoDbContext(options => { options.AddRepository(); + options.AddRepository(); options.AddRepository(); options.AddRepository(); options.AddRepository(); diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/IAbpIdentityServerMongoDbContext.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/IAbpIdentityServerMongoDbContext.cs index 3bb21a8198..ad1cfbfcf5 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/IAbpIdentityServerMongoDbContext.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/IAbpIdentityServerMongoDbContext.cs @@ -1,11 +1,12 @@ using MongoDB.Driver; using Volo.Abp.Data; +using Volo.Abp.IdentityServer.ApiScopes; using Volo.Abp.IdentityServer.Clients; using Volo.Abp.IdentityServer.Devices; using Volo.Abp.IdentityServer.Grants; using Volo.Abp.IdentityServer.IdentityResources; using Volo.Abp.MongoDB; -using ApiResource = Volo.Abp.IdentityServer.ApiResources.ApiResource; +using ApiResource = Volo.Abp.IdentityServer.ApiScopes.ApiResource; namespace Volo.Abp.IdentityServer.MongoDB { @@ -14,6 +15,8 @@ namespace Volo.Abp.IdentityServer.MongoDB { IMongoCollection ApiResources { get; } + IMongoCollection ApiScopes { get; } + IMongoCollection Clients { get; } IMongoCollection IdentityResources { get; } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiResourceRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiResourceRepository.cs index 44375fce93..c7a93cdb60 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiResourceRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiResourceRepository.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; using MongoDB.Driver; using MongoDB.Driver.Linq; using Volo.Abp.Domain.Repositories.MongoDB; -using Volo.Abp.IdentityServer.ApiResources; +using Volo.Abp.IdentityServer.ApiScopes; using System.Linq.Dynamic.Core; using Volo.Abp.MongoDB; diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiScopeRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiScopeRepository.cs new file mode 100644 index 0000000000..5efa8a5a48 --- /dev/null +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiScopeRepository.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using System.Linq; +using MongoDB.Driver; +using MongoDB.Driver.Linq; +using Volo.Abp.Domain.Repositories.MongoDB; +using Volo.Abp.IdentityServer.ApiScopes; +using Volo.Abp.MongoDB; + +namespace Volo.Abp.IdentityServer.MongoDB +{ + public class MongoApiScopeRepository : MongoDbRepository, + IApiScopeRepository + { + public MongoApiScopeRepository(IMongoDbContextProvider dbContextProvider) : + base(dbContextProvider) + { + } + + public async Task> GetListByNameAsync(string[] scopeNames, bool includeDetails = false, + CancellationToken cancellationToken = default) + { + var query = from scope in GetMongoQueryable() + where scopeNames.Contains(scope.Name) + select scope; + + return await query.ToListAsync(GetCancellationToken(cancellationToken)); + } + } +} diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs b/modules/identityserver/test/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs index d2efa7b352..52fbc0513a 100644 --- a/modules/identityserver/test/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs +++ b/modules/identityserver/test/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs @@ -2,11 +2,11 @@ using IdentityServer4.Models; using Volo.Abp.DependencyInjection; using Volo.Abp.Guids; -using Volo.Abp.IdentityServer.ApiResources; +using Volo.Abp.IdentityServer.ApiScopes; using Volo.Abp.IdentityServer.Clients; using Volo.Abp.IdentityServer.Grants; using Volo.Abp.IdentityServer.IdentityResources; -using ApiResource = Volo.Abp.IdentityServer.ApiResources.ApiResource; +using ApiResource = Volo.Abp.IdentityServer.ApiScopes.ApiResource; using Client = Volo.Abp.IdentityServer.Clients.Client; using IdentityResource = Volo.Abp.IdentityServer.IdentityResources.IdentityResource; using PersistedGrant = Volo.Abp.IdentityServer.Grants.PersistedGrant; diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs b/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs index 21e7123abe..a2cf0f428c 100644 --- a/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs +++ b/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs @@ -4,7 +4,7 @@ using System.Threading.Tasks; using Volo.Abp.DependencyInjection; using Volo.Abp.Guids; using Volo.Abp.Identity; -using Volo.Abp.IdentityServer.ApiResources; +using Volo.Abp.IdentityServer.ApiScopes; using Volo.Abp.IdentityServer.Clients; using Volo.Abp.IdentityServer.Devices; using Volo.Abp.IdentityServer.Grants; diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/ApiResourceRepository_Tests.cs b/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/ApiResourceRepository_Tests.cs index 76fbba2504..d3350ab59f 100644 --- a/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/ApiResourceRepository_Tests.cs +++ b/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/ApiResourceRepository_Tests.cs @@ -1,7 +1,7 @@ using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; using Shouldly; -using Volo.Abp.IdentityServer.ApiResources; +using Volo.Abp.IdentityServer.ApiScopes; using Volo.Abp.Modularity; using Xunit; From 1b9a9b67221d4f0547a462a2556e125a0af8fb76 Mon Sep 17 00:00:00 2001 From: maliming <6908465+maliming@users.noreply.github.com> Date: Fri, 3 Jul 2020 20:05:30 +0800 Subject: [PATCH 07/76] Update IdentityServerDataSeedContributor.cs. --- .../IdentityServer/IdentityServerDataSeedContributor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/IdentityServer/IdentityServerDataSeedContributor.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/IdentityServer/IdentityServerDataSeedContributor.cs index 593169ae48..5c4da23953 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/IdentityServer/IdentityServerDataSeedContributor.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/IdentityServer/IdentityServerDataSeedContributor.cs @@ -6,7 +6,7 @@ using Volo.Abp.Authorization.Permissions; using Volo.Abp.Data; using Volo.Abp.DependencyInjection; using Volo.Abp.Guids; -using Volo.Abp.IdentityServer.ApiResources; +using Volo.Abp.IdentityServer.ApiScopes; using Volo.Abp.IdentityServer.Clients; using Volo.Abp.IdentityServer.IdentityResources; using Volo.Abp.PermissionManagement; From c77856c7c685489e51a3e764951d7314daf9260f Mon Sep 17 00:00:00 2001 From: maliming <6908465+maliming@users.noreply.github.com> Date: Fri, 3 Jul 2020 20:36:13 +0800 Subject: [PATCH 08/76] Update IdentityServerDataSeedContributor.cs. --- .../IdentityServer/IdentityServerDataSeedContributor.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/IdentityServer/IdentityServerDataSeedContributor.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/IdentityServer/IdentityServerDataSeedContributor.cs index 2bce06c77d..511a20b3ea 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/IdentityServer/IdentityServerDataSeedContributor.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/IdentityServer/IdentityServerDataSeedContributor.cs @@ -7,12 +7,12 @@ using Volo.Abp.Authorization.Permissions; using Volo.Abp.Data; using Volo.Abp.DependencyInjection; using Volo.Abp.Guids; -using Volo.Abp.IdentityServer.ApiResources; +using Volo.Abp.IdentityServer.ApiScopes; using Volo.Abp.IdentityServer.Clients; using Volo.Abp.IdentityServer.IdentityResources; using Volo.Abp.PermissionManagement; using Volo.Abp.Uow; -using ApiResource = Volo.Abp.IdentityServer.ApiResources.ApiResource; +using ApiResource = Volo.Abp.IdentityServer.ApiScopes.ApiResource; using Client = Volo.Abp.IdentityServer.Clients.Client; namespace MyCompanyName.MyProjectName.IdentityServer From b8719fbc157f043156cce2556632e513a397ebe4 Mon Sep 17 00:00:00 2001 From: maliming <6908465+maliming@users.noreply.github.com> Date: Mon, 6 Jul 2020 22:23:19 +0800 Subject: [PATCH 09/76] Update Consent. --- .../Pages/Consent.cshtml | 38 +-- .../Pages/Consent.cshtml.cs | 21 +- .../Volo.Abp.IdentityServer.Domain.csproj | 4 +- .../Abp/IdentityServer/ApiScopes/ApiScope.cs | 4 +- .../ApiScopes/IApiScopeeRepository.cs | 6 + .../ApiScopes/ApiScopeRepository.cs | 5 + .../MongoDB/MongoApiScopeRepository.cs | 5 + .../IdentityServerDataSeedContributor.cs | 18 +- ....cs => 20200706091528_Initial.Designer.cs} | 247 ++++++++++++++---- ...2_Initial.cs => 20200706091528_Initial.cs} | 179 +++++++++---- ...ectNameMigrationsDbContextModelSnapshot.cs | 245 +++++++++++++---- .../MyProjectNameIdentityServerModule.cs | 3 +- 12 files changed, 594 insertions(+), 181 deletions(-) rename templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/{20200624023152_Initial.Designer.cs => 20200706091528_Initial.Designer.cs} (90%) rename templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/{20200624023152_Initial.cs => 20200706091528_Initial.cs} (90%) diff --git a/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Consent.cshtml b/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Consent.cshtml index d92e72532e..5060e55a99 100644 --- a/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Consent.cshtml +++ b/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Consent.cshtml @@ -1,5 +1,4 @@ @page -@using IdentityServer4.Extensions @using Volo.Abp.Account.Web.Pages @model ConsentModel @@ -31,28 +30,29 @@
    - @foreach (var identityScope in Model.Consent.IdentityScopes) + @for (var i = 0; i < Model.Consent.IdentityScopes.Count; i++) {
  • -
    - @* TODO: Use attributes on the view model instead of using hidden here *@ - @if (identityScope.Description != null) + @* TODO: Use attributes on the view model instead of using hidden here *@ + @if (Model.Consent.IdentityScopes[i].Description != null) { }
  • } +
} @@ -62,24 +62,24 @@
public static int KeyMaxLength { get; set; } = 200; - + /// /// Default value: 50 /// public static int TypeMaxLength { get; set; } = 50; - + /// /// Default value: 200 /// public static int SubjectIdMaxLength { get; set; } = 200; - + + /// + /// Default value: 100 + /// + public static int SessionIdMaxLength { get; set; } = 100; + /// /// Default value: 200 /// public static int ClientIdMaxLength { get; set; } = 200; - + + /// + /// Default value: 200 + /// + public static int DescriptionMaxLength { get; set; } = 200; + /// /// Default value: 50000 /// public static int DataMaxLength { get; set; } = 50000; - + /// /// Default value: 50000 /// public static int DataMaxLengthValue { get; set; } = 50000; } -} \ No newline at end of file +} diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/IdentityResources/IdentityResourceConsts.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/IdentityResources/IdentityResourceConsts.cs index a7c713e161..66f8120b6a 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/IdentityResources/IdentityResourceConsts.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/IdentityResources/IdentityResourceConsts.cs @@ -6,15 +6,15 @@ /// Default value: 200 ///
public static int NameMaxLength { get; set; } = 200; - + /// /// Default value: 200 /// public static int DisplayNameMaxLength { get; set; } = 200; - + /// - /// Default value: 200 + /// Default value: 1000 /// public static int DescriptionMaxLength { get; set; } = 1000; } -} \ No newline at end of file +} diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/IdentityResources/IdentityResourcePropertyConsts.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/IdentityResources/IdentityResourcePropertyConsts.cs index 2c9ccbb0c4..98a5a93941 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/IdentityResources/IdentityResourcePropertyConsts.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/IdentityResources/IdentityResourcePropertyConsts.cs @@ -2,8 +2,8 @@ { public class IdentityResourcePropertyConsts { - public const int KeyMaxLength = 250; - public const int ValueMaxLength = 2000; - public static int ValueMaxLengthValue { get; set; } = ValueMaxLength; + public static int KeyMaxLength { get; set; } = 250; + + public static int ValueMaxLength { get; set; } = 2000; } } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/ObjectExtending/IdentityServerModuleExtensionConfiguration.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/ObjectExtending/IdentityServerModuleExtensionConfiguration.cs index 78a26900c9..fe89b7400a 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/ObjectExtending/IdentityServerModuleExtensionConfiguration.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/ObjectExtending/IdentityServerModuleExtensionConfiguration.cs @@ -23,6 +23,15 @@ namespace Volo.Abp.ObjectExtending ); } + public IdentityServerModuleExtensionConfiguration ConfigureApiScope( + Action configureAction) + { + return this.ConfigureEntity( + IdentityServerModuleExtensionConsts.EntityNames.ApiScope, + configureAction + ); + } + public IdentityServerModuleExtensionConfiguration ConfigureIdentityResource( Action configureAction) { diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/ObjectExtending/IdentityServerModuleExtensionConsts.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/ObjectExtending/IdentityServerModuleExtensionConsts.cs index 8623b8830a..a9396ff95a 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/ObjectExtending/IdentityServerModuleExtensionConsts.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/ObjectExtending/IdentityServerModuleExtensionConsts.cs @@ -11,6 +11,8 @@ public const string IdentityResource = "IdentityResource"; public const string ApiResource = "ApiResource"; + + public const string ApiScope = "ApiScope"; } } -} \ No newline at end of file +} diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AbpIdentityServerDomainModule.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AbpIdentityServerDomainModule.cs index bd03a3f34e..d07132e094 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AbpIdentityServerDomainModule.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AbpIdentityServerDomainModule.cs @@ -8,6 +8,7 @@ using Volo.Abp.BackgroundWorkers; using Volo.Abp.Caching; using Volo.Abp.Domain.Entities.Events.Distributed; using Volo.Abp.Identity; +using Volo.Abp.IdentityServer.ApiResources; using Volo.Abp.IdentityServer.ApiScopes; using Volo.Abp.IdentityServer.Clients; using Volo.Abp.IdentityServer.Devices; diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResource.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResource.cs index 9d81b95def..e6fe3b9318 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResource.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResource.cs @@ -4,6 +4,7 @@ using System.Linq; using IdentityServer4; using JetBrains.Annotations; using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.IdentityServer.ApiResources; namespace Volo.Abp.IdentityServer.ApiScopes { @@ -28,7 +29,7 @@ namespace Volo.Abp.IdentityServer.ApiScopes public virtual List UserClaims { get; protected set; } - public virtual Dictionary Properties { get; protected set; } + public virtual List Properties { get; protected set; } protected ApiResource() { @@ -51,7 +52,7 @@ namespace Volo.Abp.IdentityServer.ApiScopes Secrets = new List(); Scopes = new List(); UserClaims = new List(); - Properties = new Dictionary(); + Properties = new List(); Scopes.Add(new ApiResourceScope(id, name)); } @@ -121,5 +122,25 @@ namespace Volo.Abp.IdentityServer.ApiScopes { return Scopes.FirstOrDefault(r => r.Scope == scope); } + + public virtual void AddProperty([NotNull] string key, string value) + { + Properties.Add(new ApiResourceProperty(Id, key, value)); + } + + public virtual void RemoveAllProperties() + { + Properties.Clear(); + } + + public virtual void RemoveProperty(string key) + { + Properties.RemoveAll(r => r.Key == key); + } + + public virtual ApiResourceProperty FindProperty(string key) + { + return Properties.FirstOrDefault(r => r.Key == key); + } } } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResourceProperty.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResourceProperty.cs new file mode 100644 index 0000000000..7b6257c771 --- /dev/null +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResourceProperty.cs @@ -0,0 +1,39 @@ +using System; +using JetBrains.Annotations; +using Volo.Abp.Domain.Entities; + +namespace Volo.Abp.IdentityServer.ApiResources +{ + public class ApiResourceProperty : Entity + { + public virtual Guid ApiResourceId { get; protected set; } + + public virtual string Key { get; set; } + + public virtual string Value { get; set; } + + protected ApiResourceProperty() + { + + } + + public virtual bool Equals(Guid aiResourceId, [NotNull] string key, string value) + { + return ApiResourceId == aiResourceId && Key == key && Value == value; + } + + protected internal ApiResourceProperty(Guid aiResourceId, [NotNull] string key, [NotNull] string value) + { + Check.NotNull(key, nameof(key)); + + ApiResourceId = aiResourceId; + Key = key; + Value = value; + } + + public override object[] GetKeys() + { + return new object[] { ApiResourceId, Key }; + } + } +} diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/IApiResourceRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/IApiResourceRepository.cs index 4f2abd3aed..f2feff8917 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/IApiResourceRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/IApiResourceRepository.cs @@ -35,11 +35,6 @@ namespace Volo.Abp.IdentityServer.ApiScopes CancellationToken cancellationToken = default ); - Task> GetListAsync( - bool includeDetails = false, - CancellationToken cancellationToken = default - ); - Task CheckNameExistAsync( string name, Guid? expectedId = null, diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiScopes/ApiScope.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiScopes/ApiScope.cs index 2f183b8b7e..27f8ad1d58 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiScopes/ApiScope.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiScopes/ApiScope.cs @@ -59,7 +59,7 @@ namespace Volo.Abp.IdentityServer.ApiScopes public virtual void AddUserClaim([NotNull] string type) { - UserClaims.Add(new ApiScopeClaim(Id, Name, type)); + UserClaims.Add(new ApiScopeClaim(Id, type)); } public virtual void RemoveAllUserClaims() @@ -74,7 +74,7 @@ namespace Volo.Abp.IdentityServer.ApiScopes public virtual ApiScopeClaim FindClaim(string type) { - return UserClaims.FirstOrDefault(r => r.Name == Name && r.Type == type); + return UserClaims.FirstOrDefault(r => r.Type == type); } public virtual void AddProperty([NotNull] string key, string value) diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiScopes/ApiScopeClaim.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiScopes/ApiScopeClaim.cs index 0bb6704a22..95519195e7 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiScopes/ApiScopeClaim.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiScopes/ApiScopeClaim.cs @@ -7,31 +7,25 @@ namespace Volo.Abp.IdentityServer.ApiScopes { public Guid ApiScopeId { get; protected set; } - [NotNull] - public string Name { get; protected set; } - protected ApiScopeClaim() { } - public virtual bool Equals(Guid apiScopeId, [NotNull] string name, [NotNull] string type) + public virtual bool Equals(Guid apiScopeId, [NotNull] string type) { - return ApiScopeId == apiScopeId && Name == name && Type == type; + return ApiScopeId == apiScopeId && Type == type; } - protected internal ApiScopeClaim(Guid apiScopeId, [NotNull] string name, [NotNull] string type) + protected internal ApiScopeClaim(Guid apiScopeId, [NotNull] string type) : base(type) { - Check.NotNull(name, nameof(name)); - ApiScopeId = apiScopeId; - Name = name; } public override object[] GetKeys() { - return new object[] { ApiScopeId, Name, Type }; + return new object[] { ApiScopeId, Type }; } } } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityResources/IdentityResourceProperty.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityResources/IdentityResourceProperty.cs index d351addfc2..4480fdab5a 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityResources/IdentityResourceProperty.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityResources/IdentityResourceProperty.cs @@ -17,9 +17,9 @@ namespace Volo.Abp.IdentityServer.IdentityResources } - public virtual bool Equals(Guid identityResourceId, [NotNull] string key) + public virtual bool Equals(Guid identityResourceId, [NotNull] string key, string value) { - return IdentityResourceId == identityResourceId && Key == key; + return IdentityResourceId == identityResourceId && Key == key && Value == value; } protected internal IdentityResourceProperty(Guid identityResourceId, [NotNull] string key, [NotNull] string value) diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityServerAutoMapperProfile.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityServerAutoMapperProfile.cs index 34a831ca38..af155190f3 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityServerAutoMapperProfile.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityServerAutoMapperProfile.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.Security.Claims; using AutoMapper; +using Volo.Abp.IdentityServer.ApiResources; using Volo.Abp.IdentityServer.ApiScopes; using Volo.Abp.IdentityServer.Clients; using Volo.Abp.IdentityServer.Devices; @@ -11,58 +12,32 @@ namespace Volo.Abp.IdentityServer { public class IdentityServerAutoMapperProfile : Profile { + /// + /// TODO: Reverse maps will not used probably. Remove those will not used + /// public IdentityServerAutoMapperProfile() { - //TODO: Reverse maps will not used probably. Remove those will not used - - CreateMap() - .ConstructUsing(src => src.Origin) - .ReverseMap() - .ForMember(dest => dest.Origin, opt => opt.MapFrom(src => src)); - - CreateMap() - .ForMember(dest => dest.ApiSecrets, opt => opt.MapFrom(src => src.Secrets)); - - CreateMap(); - - - //TODO: Why PersistedGrant mapping is in this profile? - CreateMap().ReverseMap(); - - CreateMap() - .ConstructUsing(src => new IdentityServer4.Models.IdentityResource()); - - CreateMap() - .ConstructUsing(x => x.Type) - .ReverseMap() - .ForMember(dest => dest.Type, opt => opt.MapFrom(src => src)); - - CreateMap>() - .ReverseMap(); - CreateMap() .ConstructUsing(src => src.Type) .ReverseMap() .ForMember(dest => dest.Type, opt => opt.MapFrom(src => src)); - CreateMap() - .ConstructUsing(x => x.Scope) - .ReverseMap() - .ForMember(dest => dest.Scope, opt => opt.MapFrom(src => src)); - - CreateMap>() - .ReverseMap(); + CreateClientMap(); + CreateApiResourceMap(); + CreateApiScopeMap(); + CreateIdentityResourceMap(); + CreatePersistedGrantMap(); + CreateDeviceFlowCodesMap(); + } - CreateMap() - .ConstructUsing(x => x.Type) + private void CreateClientMap() + { + CreateMap() + .ConstructUsing(src => src.Origin) .ReverseMap() - .ForMember(dest => dest.Type, opt => opt.MapFrom(src => src)); - - CreateMap(MemberList.Destination) - .ConstructUsing(src => new IdentityServer4.Models.ApiScope()) - .ReverseMap(); + .ForMember(dest => dest.Origin, opt => opt.MapFrom(src => src)); - CreateMap>() + CreateMap>() .ReverseMap(); CreateMap() @@ -115,10 +90,64 @@ namespace Volo.Abp.IdentityServer CreateMap(); CreateMap(); - CreateMap(); - CreateMap(); + } + + private void CreateApiResourceMap() + { + CreateMap() + .ForMember(dest => dest.ApiSecrets, opt => opt.MapFrom(src => src.Secrets)); + + CreateMap(); + + CreateMap() + .ConstructUsing(x => x.Scope) + .ReverseMap() + .ForMember(dest => dest.Scope, opt => opt.MapFrom(src => src)); + + CreateMap(); + } + + private void CreateApiScopeMap() + { + CreateMap>() + .ReverseMap(); + + CreateMap() + .ConstructUsing(x => x.Type) + .ReverseMap() + .ForMember(dest => dest.Type, opt => opt.MapFrom(src => src)); + + CreateMap(MemberList.Destination) + .ConstructUsing(src => new IdentityServer4.Models.ApiScope()) + .ReverseMap(); + } + + private void CreateIdentityResourceMap() + { + CreateMap() + .ConstructUsing(src => new IdentityServer4.Models.IdentityResource()); + + CreateMap() + .ConstructUsing(x => x.Type) + .ReverseMap() + .ForMember(dest => dest.Type, opt => opt.MapFrom(src => src)); + + CreateMap>() + .ReverseMap(); + CreateMap(); + } + + private void CreatePersistedGrantMap() + { + //TODO: Why PersistedGrant mapping is in this profile? + CreateMap().ReverseMap(); + CreateMap(); + } + private void CreateDeviceFlowCodesMap() + { + CreateMap(); } } } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/AbpIdentityServerEfCoreQueryableExtensions.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/AbpIdentityServerEfCoreQueryableExtensions.cs index 347b3c4d22..d830da07e0 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/AbpIdentityServerEfCoreQueryableExtensions.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/AbpIdentityServerEfCoreQueryableExtensions.cs @@ -18,7 +18,8 @@ namespace Volo.Abp.IdentityServer return queryable .Include(x => x.Secrets) .Include(x => x.UserClaims) - .Include(x => x.Scopes); + .Include(x => x.Scopes) + .Include(x => x.Properties); } public static IQueryable IncludeDetails(this IQueryable queryable, bool include = true) diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiResourceRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiResourceRepository.cs index bf8a8c2df2..53644a1e1c 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiResourceRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiResourceRepository.cs @@ -67,15 +67,6 @@ namespace Volo.Abp.IdentityServer.ApiScopes .ToListAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task> GetListAsync( - bool includeDetails = false, - CancellationToken cancellationToken = default) - { - return await DbSet - .IncludeDetails(includeDetails) - .ToListAsync(GetCancellationToken(cancellationToken)); - } - public virtual async Task CheckNameExistAsync(string name, Guid? expectedId = null, CancellationToken cancellationToken = default) { return await DbSet.AnyAsync(ar => ar.Id != expectedId && ar.Name == name, cancellationToken: cancellationToken); diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/AbpIdentityServerEntityFrameworkCoreModule.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/AbpIdentityServerEntityFrameworkCoreModule.cs index 4d89745874..fd22e97fe4 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/AbpIdentityServerEntityFrameworkCoreModule.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/AbpIdentityServerEntityFrameworkCoreModule.cs @@ -33,6 +33,7 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore options.AddRepository(); options.AddRepository(); + options.AddRepository(); options.AddRepository(); options.AddRepository(); options.AddRepository(); diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IIdentityServerDbContext.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IIdentityServerDbContext.cs index db1017b9ab..3178fa02f2 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IIdentityServerDbContext.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IIdentityServerDbContext.cs @@ -34,7 +34,6 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore #endregion - #region IdentityResource DbSet IdentityResources { get; set; } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContext.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContext.cs index f7ccb1d309..c8dc32b183 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContext.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContext.cs @@ -34,7 +34,6 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore #endregion - #region IdentityResource public DbSet IdentityResources { get; set; } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs index 8d96f2c442..b2dba48e15 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs @@ -1,10 +1,8 @@ using System; -using System.Collections.Generic; using Microsoft.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore.Modeling; -using Volo.Abp.EntityFrameworkCore.ValueComparers; -using Volo.Abp.EntityFrameworkCore.ValueConverters; +using Volo.Abp.IdentityServer.ApiResources; using Volo.Abp.IdentityServer.ApiScopes; using Volo.Abp.IdentityServer.Clients; using Volo.Abp.IdentityServer.Devices; @@ -188,31 +186,6 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore b.Property(x => x.Value).HasMaxLength(ClientPropertyConsts.ValueMaxLength).IsRequired(); }); - builder.Entity(b => - { - b.ToTable(options.TablePrefix + "PersistedGrants", options.Schema); - - b.ConfigureByConvention(); - - b.Property(x => x.Key).HasMaxLength(PersistedGrantConsts.KeyMaxLength).ValueGeneratedNever(); - b.Property(x => x.Type).HasMaxLength(PersistedGrantConsts.TypeMaxLength).IsRequired(); - b.Property(x => x.SubjectId).HasMaxLength(PersistedGrantConsts.SubjectIdMaxLength); - b.Property(x => x.ClientId).HasMaxLength(PersistedGrantConsts.ClientIdMaxLength).IsRequired(); - b.Property(x => x.CreationTime).IsRequired(); - - if (IsDatabaseProvider(builder, options, EfCoreDatabaseProvider.MySql)) - { - PersistedGrantConsts.DataMaxLengthValue = 10000; //TODO: MySQL accepts 20.000. We can consider to change in v3.0. - } - - b.Property(x => x.Data).HasMaxLength(PersistedGrantConsts.DataMaxLengthValue).IsRequired(); - - b.HasKey(x => x.Key); //TODO: What about Id!!! - - b.HasIndex(x => new {x.SubjectId, x.ClientId, x.Type}); - b.HasIndex(x => x.Expiration); - }); - #endregion #region IdentityResource @@ -255,9 +228,9 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore b.Property(x => x.Key).HasMaxLength(IdentityResourcePropertyConsts.KeyMaxLength).IsRequired(); if (IsDatabaseProvider(builder, options, EfCoreDatabaseProvider.MySql, EfCoreDatabaseProvider.Oracle)) { - IdentityResourcePropertyConsts.ValueMaxLengthValue = 300; + IdentityResourcePropertyConsts.ValueMaxLength = 300; } - b.Property(x => x.Value).HasMaxLength(IdentityResourcePropertyConsts.ValueMaxLengthValue).IsRequired(); + b.Property(x => x.Value).HasMaxLength(IdentityResourcePropertyConsts.ValueMaxLength).IsRequired(); }); #endregion @@ -270,16 +243,16 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore b.ConfigureByConvention(); + b.HasIndex(x => x.Name).IsUnique(); + b.Property(x => x.Name).HasMaxLength(ApiResourceConsts.NameMaxLength).IsRequired(); b.Property(x => x.DisplayName).HasMaxLength(ApiResourceConsts.DisplayNameMaxLength); b.Property(x => x.Description).HasMaxLength(ApiResourceConsts.DescriptionMaxLength); - b.Property(x => x.Properties) - .HasConversion(new AbpJsonValueConverter>()) - .Metadata.SetValueComparer(new AbpDictionaryValueComparer()); b.HasMany(x => x.Secrets).WithOne().HasForeignKey(x => x.ApiResourceId).IsRequired(); b.HasMany(x => x.Scopes).WithOne().HasForeignKey(x => x.ApiResourceId).IsRequired(); b.HasMany(x => x.UserClaims).WithOne().HasForeignKey(x => x.ApiResourceId).IsRequired(); + b.HasMany(x => x.Properties).WithOne().HasForeignKey(x => x.ApiResourceId).IsRequired(); }); builder.Entity(b => @@ -291,14 +264,14 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore b.HasKey(x => new {x.ApiResourceId, x.Type, x.Value}); b.Property(x => x.Type).HasMaxLength(ApiResourceSecretConsts.TypeMaxLength).IsRequired(); - b.Property(x => x.Description).HasMaxLength(ApiResourceSecretConsts.DescriptionMaxLength); if (IsDatabaseProvider(builder, options, EfCoreDatabaseProvider.MySql, EfCoreDatabaseProvider.Oracle)) { ApiResourceSecretConsts.ValueMaxLengthValue = 300; } - b.Property(x => x.Value).HasMaxLength(ApiResourceSecretConsts.ValueMaxLengthValue).IsRequired(); + + b.Property(x => x.Description).HasMaxLength(ApiResourceSecretConsts.DescriptionMaxLength); }); builder.Entity(b => @@ -323,6 +296,22 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore b.Property(x => x.Scope).HasMaxLength(ApiResourceScopeConsts.ScopeMaxLength).IsRequired(); }); + builder.Entity(b => + { + b.ToTable(options.TablePrefix + "ApiResourceProperties", options.Schema); + + b.ConfigureByConvention(); + + b.HasKey(x => new {x.ApiResourceId, x.Key}); + + b.Property(x => x.Key).HasMaxLength(ApiResourcePropertyConsts.KeyMaxLength).IsRequired(); + if (IsDatabaseProvider(builder, options, EfCoreDatabaseProvider.MySql, EfCoreDatabaseProvider.Oracle)) + { + ApiResourcePropertyConsts.ValueMaxLength = 300; + } + b.Property(x => x.Value).HasMaxLength(ApiResourcePropertyConsts.ValueMaxLength).IsRequired(); + }); + #endregion #region ApiScope @@ -340,9 +329,7 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore b.HasIndex(x => x.Name).IsUnique(); b.HasMany(x => x.UserClaims).WithOne().HasForeignKey(x => x.ApiScopeId).IsRequired(); - - //TODO: Identity Server does not configure the relationship of Properties - //b.HasMany(x => x.Properties).WithOne().HasForeignKey(x => x.ApiScopeId).IsRequired(); + b.HasMany(x => x.Properties).WithOne().HasForeignKey(x => x.ApiScopeId).IsRequired(); }); builder.Entity(b => @@ -351,10 +338,9 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore b.ConfigureByConvention(); - b.HasKey(x => new {x.ApiScopeId, x.Name, x.Type}); + b.HasKey(x => new {x.ApiScopeId, x.Type}); b.Property(x => x.Type).HasMaxLength(UserClaimConsts.TypeMaxLength).IsRequired(); - b.Property(x => x.Name).HasMaxLength(ApiScopeClaimConsts.NameMaxLength).IsRequired(); }); builder.Entity(b => @@ -368,9 +354,41 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore b.Property(x => x.Key).HasMaxLength(ApiScopePropertyConsts.KeyMaxLength).IsRequired(); if (IsDatabaseProvider(builder, options, EfCoreDatabaseProvider.MySql, EfCoreDatabaseProvider.Oracle)) { - ApiScopePropertyConsts.ValueMaxLengthValue = 300; + ApiScopePropertyConsts.ValueMaxLength = 300; } - b.Property(x => x.Value).HasMaxLength(ApiScopePropertyConsts.ValueMaxLengthValue).IsRequired(); + b.Property(x => x.Value).HasMaxLength(ApiScopePropertyConsts.ValueMaxLength).IsRequired(); + }); + + #endregion + + #region PersistedGrant + + builder.Entity(b => + { + b.ToTable(options.TablePrefix + "PersistedGrants", options.Schema); + + b.ConfigureByConvention(); + + b.Property(x => x.Key).HasMaxLength(PersistedGrantConsts.KeyMaxLength).ValueGeneratedNever(); + b.Property(x => x.Type).HasMaxLength(PersistedGrantConsts.TypeMaxLength).IsRequired(); + b.Property(x => x.SubjectId).HasMaxLength(PersistedGrantConsts.SubjectIdMaxLength); + b.Property(x => x.SessionId).HasMaxLength(PersistedGrantConsts.SessionIdMaxLength); + b.Property(x => x.ClientId).HasMaxLength(PersistedGrantConsts.ClientIdMaxLength).IsRequired(); + b.Property(x => x.Description).HasMaxLength(PersistedGrantConsts.DescriptionMaxLength); + b.Property(x => x.CreationTime).IsRequired(); + + if (IsDatabaseProvider(builder, options, EfCoreDatabaseProvider.MySql)) + { + PersistedGrantConsts.DataMaxLengthValue = 10000; //TODO: MySQL accepts 20.000. We can consider to change in v3.0. + } + + b.Property(x => x.Data).HasMaxLength(PersistedGrantConsts.DataMaxLengthValue).IsRequired(); + + b.HasKey(x => x.Key); //TODO: What about Id!!! + + b.HasIndex(x => new {x.SubjectId, x.ClientId, x.Type}); + b.HasIndex(x => new {x.SubjectId, x.SessionId, x.Type}); + b.HasIndex(x => x.Expiration); }); #endregion @@ -386,16 +404,19 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore b.Property(x => x.DeviceCode).HasMaxLength(DeviceFlowCodesConsts.DeviceCodeMaxLength).IsRequired(); b.Property(x => x.UserCode).HasMaxLength(DeviceFlowCodesConsts.UserCodeMaxLength).IsRequired(); b.Property(x => x.SubjectId).HasMaxLength(DeviceFlowCodesConsts.SubjectIdMaxLength); + b.Property(x => x.SessionId).HasMaxLength(DeviceFlowCodesConsts.SessionIdMaxLength); b.Property(x => x.ClientId).HasMaxLength(DeviceFlowCodesConsts.ClientIdMaxLength).IsRequired(); + b.Property(x => x.Description).HasMaxLength(DeviceFlowCodesConsts.DescriptionMaxLength); + b.Property(x => x.CreationTime).IsRequired(); b.Property(x => x.Expiration).IsRequired(); if (IsDatabaseProvider(builder, options, EfCoreDatabaseProvider.MySql)) { - DeviceFlowCodesConsts.DataMaxLengthValue = 10000; //TODO: MySQL accepts 20.000. We can consider to change in v3.0. + DeviceFlowCodesConsts.DataMaxLength = 10000; //TODO: MySQL accepts 20.000. We can consider to change in v3.0. } - b.Property(x => x.Data).HasMaxLength(DeviceFlowCodesConsts.DataMaxLengthValue).IsRequired(); + b.Property(x => x.Data).HasMaxLength(DeviceFlowCodesConsts.DataMaxLength).IsRequired(); - b.HasIndex(x => new {x.UserCode}).IsUnique(); + b.HasIndex(x => new {x.UserCode}); b.HasIndex(x => x.DeviceCode).IsUnique(); b.HasIndex(x => x.Expiration); }); diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/IdentityServer/IdentityServerDataSeedContributor.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/IdentityServer/IdentityServerDataSeedContributor.cs index 0662482b65..5190687342 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/IdentityServer/IdentityServerDataSeedContributor.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/IdentityServer/IdentityServerDataSeedContributor.cs @@ -182,7 +182,7 @@ namespace MyCompanyName.MyProjectName.IdentityServer AccessTokenLifetime = 31536000, //365 days AuthorizationCodeLifetime = 300, IdentityTokenLifetime = 300, - RequireConsent = false, + RequireConsent = true, RequirePkce = false, FrontChannelLogoutUri = frontChannelLogoutUri }, From b2beaa2b0cf3e3ead74a2dffda34e5bedce47aaf Mon Sep 17 00:00:00 2001 From: maliming <6908465+maliming@users.noreply.github.com> Date: Tue, 7 Jul 2020 11:34:07 +0800 Subject: [PATCH 11/76] Update IdentityServerDataSeedContributor. --- .../IdentityServerDataSeedContributor.cs | 2 +- .../IdentityServerDataSeedContributor.cs | 54 +++++++++++++------ 2 files changed, 40 insertions(+), 16 deletions(-) diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/IdentityServer/IdentityServerDataSeedContributor.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/IdentityServer/IdentityServerDataSeedContributor.cs index 5190687342..0662482b65 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/IdentityServer/IdentityServerDataSeedContributor.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/IdentityServer/IdentityServerDataSeedContributor.cs @@ -182,7 +182,7 @@ namespace MyCompanyName.MyProjectName.IdentityServer AccessTokenLifetime = 31536000, //365 days AuthorizationCodeLifetime = 300, IdentityTokenLifetime = 300, - RequireConsent = true, + RequireConsent = false, RequirePkce = false, FrontChannelLogoutUri = frontChannelLogoutUri }, diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/IdentityServer/IdentityServerDataSeedContributor.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/IdentityServer/IdentityServerDataSeedContributor.cs index 5c4da23953..7937265409 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/IdentityServer/IdentityServerDataSeedContributor.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/IdentityServer/IdentityServerDataSeedContributor.cs @@ -1,7 +1,8 @@ -using Microsoft.Extensions.Configuration; -using System; +using System; using System.Collections.Generic; using System.Threading.Tasks; +using IdentityServer4.Models; +using Microsoft.Extensions.Configuration; using Volo.Abp.Authorization.Permissions; using Volo.Abp.Data; using Volo.Abp.DependencyInjection; @@ -11,12 +12,16 @@ using Volo.Abp.IdentityServer.Clients; using Volo.Abp.IdentityServer.IdentityResources; using Volo.Abp.PermissionManagement; using Volo.Abp.Uow; +using ApiResource = Volo.Abp.IdentityServer.ApiScopes.ApiResource; +using ApiScope = Volo.Abp.IdentityServer.ApiScopes.ApiScope; +using Client = Volo.Abp.IdentityServer.Clients.Client; namespace MyCompanyName.MyProjectName.IdentityServer { public class IdentityServerDataSeedContributor : IDataSeedContributor, ITransientDependency { private readonly IApiResourceRepository _apiResourceRepository; + private readonly IApiScopeRepository _apiScopeRepository; private readonly IClientRepository _clientRepository; private readonly IIdentityResourceDataSeeder _identityResourceDataSeeder; private readonly IGuidGenerator _guidGenerator; @@ -26,6 +31,7 @@ namespace MyCompanyName.MyProjectName.IdentityServer public IdentityServerDataSeedContributor( IClientRepository clientRepository, IApiResourceRepository apiResourceRepository, + IApiScopeRepository apiScopeRepository, IIdentityResourceDataSeeder identityResourceDataSeeder, IGuidGenerator guidGenerator, IPermissionDataSeeder permissionDataSeeder, @@ -33,6 +39,7 @@ namespace MyCompanyName.MyProjectName.IdentityServer { _clientRepository = clientRepository; _apiResourceRepository = apiResourceRepository; + _apiScopeRepository = apiScopeRepository; _identityResourceDataSeeder = identityResourceDataSeeder; _guidGenerator = guidGenerator; _permissionDataSeeder = permissionDataSeeder; @@ -44,6 +51,7 @@ namespace MyCompanyName.MyProjectName.IdentityServer { await _identityResourceDataSeeder.CreateStandardResourcesAsync(); await CreateApiResourcesAsync(); + await CreateApiScopeAsync(); await CreateClientsAsync(); } @@ -88,10 +96,17 @@ namespace MyCompanyName.MyProjectName.IdentityServer return await _apiResourceRepository.UpdateAsync(apiResource); } - private async Task CreateClientsAsync() + private async Task CreateApiScopeAsync() { - const string commonSecret = "E5Xd4yMqjP5kjWFKrYgySBju6JVfCzMyFp7n2QmMrME="; + var apiScope = await _apiScopeRepository.GetByNameAsync("MyProjectName"); + if (apiScope == null) + { + await _apiScopeRepository.InsertAsync(new ApiScope(_guidGenerator.Create(), "MyProjectName", "MyProjectName API"), autoSave: true); + } + } + private async Task CreateClientsAsync() + { var commonScopes = new[] { "email", @@ -100,6 +115,7 @@ namespace MyCompanyName.MyProjectName.IdentityServer "role", "phone", "address", + "MyProjectName" }; @@ -110,25 +126,30 @@ namespace MyCompanyName.MyProjectName.IdentityServer if (!webClientId.IsNullOrWhiteSpace()) { var webClientRootUrl = configurationSection["MyProjectName_Web:RootUrl"].EnsureEndsWith('/'); + + /* MyProjectName_Web client is only needed if you created a tiered + * solution. Otherwise, you can delete this client. */ + await CreateClientAsync( - webClientId, - commonScopes, - new[] { "hybrid" }, - commonSecret, + name: webClientId, + scopes: commonScopes, + grantTypes: new[] {"hybrid"}, + secret: (configurationSection["MyProjectName_Web:ClientSecret"] ?? "1q2w3e*").Sha256(), redirectUri: $"{webClientRootUrl}signin-oidc", - postLogoutRedirectUri: $"{webClientRootUrl}signout-callback-oidc" + postLogoutRedirectUri: $"{webClientRootUrl}signout-callback-oidc", + frontChannelLogoutUri: $"{webClientRootUrl}Account/FrontChannelLogout" ); } //Console Test Client - var consoleClientId = configurationSection["MyProjectName_ConsoleTestApp:ClientId"]; + var consoleClientId = configurationSection["MyProjectName_App:ClientId"]; if (!consoleClientId.IsNullOrWhiteSpace()) { await CreateClientAsync( - consoleClientId, - commonScopes, - new[] { "password", "client_credentials" }, - commonSecret + name: consoleClientId, + scopes: commonScopes, + grantTypes: new[] {"password", "client_credentials"}, + secret: (configurationSection["MyProjectName_App:ClientSecret"] ?? "1q2w3e*").Sha256() ); } } @@ -140,6 +161,7 @@ namespace MyCompanyName.MyProjectName.IdentityServer string secret, string redirectUri = null, string postLogoutRedirectUri = null, + string frontChannelLogoutUri = null, IEnumerable permissions = null) { var client = await _clientRepository.FindByCliendIdAsync(name); @@ -160,7 +182,9 @@ namespace MyCompanyName.MyProjectName.IdentityServer AccessTokenLifetime = 31536000, //365 days AuthorizationCodeLifetime = 300, IdentityTokenLifetime = 300, - RequireConsent = false + RequireConsent = false, + RequirePkce = false, + FrontChannelLogoutUri = frontChannelLogoutUri }, autoSave: true ); From cf75e6cdb3f5d92edf911fc5c879a553f9cfd19a Mon Sep 17 00:00:00 2001 From: maliming <6908465+maliming@users.noreply.github.com> Date: Tue, 7 Jul 2020 13:09:56 +0800 Subject: [PATCH 12/76] Update app template migrations. --- ....cs => 20200707050900_Initial.Designer.cs} | 67 +++++++++++++------ ...8_Initial.cs => 20200707050900_Initial.cs} | 56 ++++++++++++---- ...ectNameMigrationsDbContextModelSnapshot.cs | 65 +++++++++++++----- 3 files changed, 138 insertions(+), 50 deletions(-) rename templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/{20200706091528_Initial.Designer.cs => 20200707050900_Initial.Designer.cs} (97%) rename templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/{20200706091528_Initial.cs => 20200707050900_Initial.cs} (96%) diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200706091528_Initial.Designer.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200707050900_Initial.Designer.cs similarity index 97% rename from templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200706091528_Initial.Designer.cs rename to templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200707050900_Initial.Designer.cs index e3441488a9..ee4de4f358 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200706091528_Initial.Designer.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200707050900_Initial.Designer.cs @@ -11,7 +11,7 @@ using Volo.Abp.EntityFrameworkCore; namespace MyCompanyName.MyProjectName.Migrations { [DbContext(typeof(MyProjectNameMigrationsDbContext))] - [Migration("20200706091528_Initial")] + [Migration("20200707050900_Initial")] partial class Initial { protected override void BuildTargetModel(ModelBuilder modelBuilder) @@ -863,6 +863,25 @@ namespace MyCompanyName.MyProjectName.Migrations b.ToTable("AbpOrganizationUnitRoles"); }); + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b => + { + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); + + b.Property("Key") + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); + + b.Property("Value") + .IsRequired() + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); + + b.HasKey("ApiResourceId", "Key"); + + b.ToTable("IdentityServerApiResourceProperties"); + }); + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResource", b => { b.Property("Id") @@ -928,14 +947,14 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("Properties") - .HasColumnType("nvarchar(max)"); - b.Property("ShowInDiscoveryDocument") .HasColumnType("bit"); b.HasKey("Id"); + b.HasIndex("Name") + .IsUnique(); + b.ToTable("IdentityServerApiResources"); }); @@ -981,8 +1000,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasMaxLength(4000); b.Property("Description") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasColumnType("nvarchar(1000)") + .HasMaxLength(1000); b.Property("Expiration") .HasColumnType("datetime2"); @@ -1076,15 +1095,11 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ApiScopeId") .HasColumnType("uniqueidentifier"); - b.Property("Name") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - b.Property("Type") .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.HasKey("ApiScopeId", "Name", "Type"); + b.HasKey("ApiScopeId", "Type"); b.ToTable("IdentityServerApiScopeClaims"); }); @@ -1426,8 +1441,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasMaxLength(4000); b.Property("Description") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasColumnType("nvarchar(1000)") + .HasMaxLength(1000); b.Property("Expiration") .HasColumnType("datetime2"); @@ -1468,7 +1483,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasMaxLength(50000); b.Property("Description") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.Property("DeviceCode") .IsRequired() @@ -1484,7 +1500,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("nvarchar(max)"); b.Property("SessionId") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(100)") + .HasMaxLength(100); b.Property("SubjectId") .HasColumnType("nvarchar(200)") @@ -1502,8 +1519,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("Expiration"); - b.HasIndex("UserCode") - .IsUnique(); + b.HasIndex("UserCode"); b.ToTable("IdentityServerDeviceFlowCodes"); }); @@ -1537,7 +1553,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasMaxLength(50000); b.Property("Description") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.Property("Expiration") .HasColumnType("datetime2"); @@ -1550,7 +1567,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("SessionId") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(100)") + .HasMaxLength(100); b.Property("SubjectId") .HasColumnType("nvarchar(200)") @@ -1567,6 +1585,8 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("SubjectId", "ClientId", "Type"); + b.HasIndex("SubjectId", "SessionId", "Type"); + b.ToTable("IdentityServerPersistedGrants"); }); @@ -1937,6 +1957,15 @@ namespace MyCompanyName.MyProjectName.Migrations .IsRequired(); }); + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b => + { + b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiResource", null) + .WithMany("Properties") + .HasForeignKey("ApiResourceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceClaim", b => { b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiResource", null) diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200706091528_Initial.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200707050900_Initial.cs similarity index 96% rename from templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200706091528_Initial.cs rename to templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200707050900_Initial.cs index 36c8079aa1..48726d777b 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200706091528_Initial.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200707050900_Initial.cs @@ -250,8 +250,7 @@ namespace MyCompanyName.MyProjectName.Migrations Description = table.Column(maxLength: 1000, nullable: true), Enabled = table.Column(nullable: false), AllowedAccessTokenSigningAlgorithms = table.Column(nullable: true), - ShowInDiscoveryDocument = table.Column(nullable: false), - Properties = table.Column(nullable: true) + ShowInDiscoveryDocument = table.Column(nullable: false) }, constraints: table => { @@ -356,9 +355,9 @@ namespace MyCompanyName.MyProjectName.Migrations DeviceCode = table.Column(maxLength: 200, nullable: false), UserCode = table.Column(maxLength: 200, nullable: false), SubjectId = table.Column(maxLength: 200, nullable: true), - SessionId = table.Column(nullable: true), + SessionId = table.Column(maxLength: 100, nullable: true), ClientId = table.Column(maxLength: 200, nullable: false), - Description = table.Column(nullable: true), + Description = table.Column(maxLength: 200, nullable: true), Expiration = table.Column(nullable: false), Data = table.Column(maxLength: 50000, nullable: false) }, @@ -404,9 +403,9 @@ namespace MyCompanyName.MyProjectName.Migrations ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), Type = table.Column(maxLength: 50, nullable: false), SubjectId = table.Column(maxLength: 200, nullable: true), - SessionId = table.Column(nullable: true), + SessionId = table.Column(maxLength: 100, nullable: true), ClientId = table.Column(maxLength: 200, nullable: false), - Description = table.Column(nullable: true), + Description = table.Column(maxLength: 200, nullable: true), CreationTime = table.Column(nullable: false), Expiration = table.Column(nullable: true), ConsumedTime = table.Column(nullable: true), @@ -667,6 +666,25 @@ namespace MyCompanyName.MyProjectName.Migrations onDelete: ReferentialAction.Cascade); }); + migrationBuilder.CreateTable( + name: "IdentityServerApiResourceProperties", + columns: table => new + { + ApiResourceId = table.Column(nullable: false), + Key = table.Column(maxLength: 250, nullable: false), + Value = table.Column(maxLength: 2000, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerApiResourceProperties", x => new { x.ApiResourceId, x.Key }); + table.ForeignKey( + name: "FK_IdentityServerApiResourceProperties_IdentityServerApiResources_ApiResourceId", + column: x => x.ApiResourceId, + principalTable: "IdentityServerApiResources", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + migrationBuilder.CreateTable( name: "IdentityServerApiResourceScopes", columns: table => new @@ -692,7 +710,7 @@ namespace MyCompanyName.MyProjectName.Migrations Type = table.Column(maxLength: 250, nullable: false), Value = table.Column(maxLength: 4000, nullable: false), ApiResourceId = table.Column(nullable: false), - Description = table.Column(maxLength: 2000, nullable: true), + Description = table.Column(maxLength: 1000, nullable: true), Expiration = table.Column(nullable: true) }, constraints: table => @@ -711,12 +729,11 @@ namespace MyCompanyName.MyProjectName.Migrations columns: table => new { Type = table.Column(maxLength: 200, nullable: false), - ApiScopeId = table.Column(nullable: false), - Name = table.Column(maxLength: 200, nullable: false) + ApiScopeId = table.Column(nullable: false) }, constraints: table => { - table.PrimaryKey("PK_IdentityServerApiScopeClaims", x => new { x.ApiScopeId, x.Name, x.Type }); + table.PrimaryKey("PK_IdentityServerApiScopeClaims", x => new { x.ApiScopeId, x.Type }); table.ForeignKey( name: "FK_IdentityServerApiScopeClaims_IdentityServerApiScopes_ApiScopeId", column: x => x.ApiScopeId, @@ -897,7 +914,7 @@ namespace MyCompanyName.MyProjectName.Migrations Type = table.Column(maxLength: 250, nullable: false), Value = table.Column(maxLength: 4000, nullable: false), ClientId = table.Column(nullable: false), - Description = table.Column(maxLength: 2000, nullable: true), + Description = table.Column(maxLength: 1000, nullable: true), Expiration = table.Column(nullable: true) }, constraints: table => @@ -1096,6 +1113,12 @@ namespace MyCompanyName.MyProjectName.Migrations table: "AbpUsers", column: "UserName"); + migrationBuilder.CreateIndex( + name: "IX_IdentityServerApiResources_Name", + table: "IdentityServerApiResources", + column: "Name", + unique: true); + migrationBuilder.CreateIndex( name: "IX_IdentityServerApiScopes_Name", table: "IdentityServerApiScopes", @@ -1121,8 +1144,7 @@ namespace MyCompanyName.MyProjectName.Migrations migrationBuilder.CreateIndex( name: "IX_IdentityServerDeviceFlowCodes_UserCode", table: "IdentityServerDeviceFlowCodes", - column: "UserCode", - unique: true); + column: "UserCode"); migrationBuilder.CreateIndex( name: "IX_IdentityServerIdentityResources_Name", @@ -1139,6 +1161,11 @@ namespace MyCompanyName.MyProjectName.Migrations 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) @@ -1191,6 +1218,9 @@ namespace MyCompanyName.MyProjectName.Migrations migrationBuilder.DropTable( name: "IdentityServerApiResourceClaims"); + migrationBuilder.DropTable( + name: "IdentityServerApiResourceProperties"); + migrationBuilder.DropTable( name: "IdentityServerApiResourceScopes"); diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/MyProjectNameMigrationsDbContextModelSnapshot.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/MyProjectNameMigrationsDbContextModelSnapshot.cs index 3e52c652ed..bfcb19749d 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/MyProjectNameMigrationsDbContextModelSnapshot.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/MyProjectNameMigrationsDbContextModelSnapshot.cs @@ -861,6 +861,25 @@ namespace MyCompanyName.MyProjectName.Migrations b.ToTable("AbpOrganizationUnitRoles"); }); + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b => + { + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); + + b.Property("Key") + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); + + b.Property("Value") + .IsRequired() + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); + + b.HasKey("ApiResourceId", "Key"); + + b.ToTable("IdentityServerApiResourceProperties"); + }); + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResource", b => { b.Property("Id") @@ -926,14 +945,14 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("Properties") - .HasColumnType("nvarchar(max)"); - b.Property("ShowInDiscoveryDocument") .HasColumnType("bit"); b.HasKey("Id"); + b.HasIndex("Name") + .IsUnique(); + b.ToTable("IdentityServerApiResources"); }); @@ -979,8 +998,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasMaxLength(4000); b.Property("Description") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasColumnType("nvarchar(1000)") + .HasMaxLength(1000); b.Property("Expiration") .HasColumnType("datetime2"); @@ -1074,15 +1093,11 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ApiScopeId") .HasColumnType("uniqueidentifier"); - b.Property("Name") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - b.Property("Type") .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.HasKey("ApiScopeId", "Name", "Type"); + b.HasKey("ApiScopeId", "Type"); b.ToTable("IdentityServerApiScopeClaims"); }); @@ -1424,8 +1439,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasMaxLength(4000); b.Property("Description") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasColumnType("nvarchar(1000)") + .HasMaxLength(1000); b.Property("Expiration") .HasColumnType("datetime2"); @@ -1466,7 +1481,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasMaxLength(50000); b.Property("Description") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.Property("DeviceCode") .IsRequired() @@ -1482,7 +1498,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("nvarchar(max)"); b.Property("SessionId") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(100)") + .HasMaxLength(100); b.Property("SubjectId") .HasColumnType("nvarchar(200)") @@ -1500,8 +1517,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("Expiration"); - b.HasIndex("UserCode") - .IsUnique(); + b.HasIndex("UserCode"); b.ToTable("IdentityServerDeviceFlowCodes"); }); @@ -1535,7 +1551,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasMaxLength(50000); b.Property("Description") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.Property("Expiration") .HasColumnType("datetime2"); @@ -1548,7 +1565,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("SessionId") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(100)") + .HasMaxLength(100); b.Property("SubjectId") .HasColumnType("nvarchar(200)") @@ -1565,6 +1583,8 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("SubjectId", "ClientId", "Type"); + b.HasIndex("SubjectId", "SessionId", "Type"); + b.ToTable("IdentityServerPersistedGrants"); }); @@ -1935,6 +1955,15 @@ namespace MyCompanyName.MyProjectName.Migrations .IsRequired(); }); + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b => + { + b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiResource", null) + .WithMany("Properties") + .HasForeignKey("ApiResourceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceClaim", b => { b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiResource", null) From 7a885cfe9abec492bb2483ed01076ace8e1b83dd Mon Sep 17 00:00:00 2001 From: maliming <6908465+maliming@users.noreply.github.com> Date: Tue, 7 Jul 2020 14:31:30 +0800 Subject: [PATCH 13/76] Update Consent page. --- .../ConsentOptions.cs | 17 -- .../Pages/Consent.cshtml | 74 +++--- .../Pages/Consent.cshtml.cs | 243 ++++++++---------- .../Pages/Account/LoggedOut.cshtml | 6 +- 4 files changed, 142 insertions(+), 198 deletions(-) delete mode 100644 modules/account/src/Volo.Abp.Account.Web.IdentityServer/ConsentOptions.cs diff --git a/modules/account/src/Volo.Abp.Account.Web.IdentityServer/ConsentOptions.cs b/modules/account/src/Volo.Abp.Account.Web.IdentityServer/ConsentOptions.cs deleted file mode 100644 index 3aaafd5d11..0000000000 --- a/modules/account/src/Volo.Abp.Account.Web.IdentityServer/ConsentOptions.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace Volo.Abp.Account.Web -{ - public class ConsentOptions - { - public static bool EnableOfflineAccess = true; - - public static string OfflineAccessDisplayName = "Offline Access"; - - public static string OfflineAccessDescription = "Access to your applications and resources, even when you are offline"; - - //TODO: How to handle this - public static readonly string MustChooseOneErrorMessage = "You must pick at least one permission"; - - //TODO: How to handle this - public static readonly string InvalidSelectionErrorMessage = "Invalid selection"; - } -} diff --git a/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Consent.cshtml b/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Consent.cshtml index 5060e55a99..8fb7e918e1 100644 --- a/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Consent.cshtml +++ b/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Consent.cshtml @@ -1,17 +1,18 @@ @page @using Volo.Abp.Account.Web.Pages +@using Volo.Abp.Account.Web.Pages.Account @model ConsentModel

- @if (Model.Consent.ClientLogoUrl != null) + @if (Model.ClientInfo.ClientLogoUrl != null) { - + } - @Model.Consent.ClientName + @Model.ClientInfo.ClientName is requesting your permission

@@ -24,62 +25,59 @@
Uncheck the permissions you do not wish to grant.
- @if (!Model.Consent.IdentityScopes.IsNullOrEmpty()) + @if (!Model.ConsentInput.IdentityScopes.IsNullOrEmpty()) {

Personal Information

    - - @for (var i = 0; i < Model.Consent.IdentityScopes.Count; i++) + @for (var i = 0; i < Model.ConsentInput.IdentityScopes.Count; i++) {
  • -
    - @* TODO: Use attributes on the view model instead of using hidden here *@ - @if (Model.Consent.IdentityScopes[i].Description != null) + @* TODO: Use attributes on the view model instead of using hidden here *@ + @if (Model.ConsentInput.IdentityScopes[i].Description != null) { }
  • } -
} - @if (!Model.Consent.ApiScopes.IsNullOrEmpty()) + @if (!Model.ConsentInput.ApiScopes.IsNullOrEmpty()) {

Application Access

    - - @for (var i = 0; i < Model.Consent.ApiScopes.Count; i++) + @for (var i = 0; i < Model.ConsentInput.ApiScopes.Count; i++) {
  • -
    - @* TODO: Use attributes on the view model instead of using hidden here *@ - @if (Model.Consent.ApiScopes[i].Description != null) + @* TODO: Use attributes on the view model instead of using hidden here *@ + @if (Model.ConsentInput.ApiScopes[i].Description != null) { }
  • @@ -87,35 +85,23 @@
} -
-
-
- - Description -
-
- -
-
-
- - @if (Model.Consent.AllowRememberConsent) + @if (Model.ClientInfo.AllowRememberConsent) {
-
}
diff --git a/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Consent.cshtml.cs b/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Consent.cshtml.cs index d957e3b84a..a1faba16a7 100644 --- a/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Consent.cshtml.cs +++ b/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Consent.cshtml.cs @@ -3,13 +3,13 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Threading.Tasks; -using IdentityServer4.Extensions; using IdentityServer4.Models; using IdentityServer4.Services; using IdentityServer4.Stores; using IdentityServer4.Validation; using Microsoft.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc.UI.RazorPages; +using Volo.Abp.UI; namespace Volo.Abp.Account.Web.Pages { @@ -25,7 +25,9 @@ namespace Volo.Abp.Account.Web.Pages public string ReturnUrlHash { get; set; } [BindProperty] - public ConsentViewModel Consent { get; set; } + public ConsentModel.ConsentInputModel ConsentInput { get; set; } + + public ClientInfoModel ClientInfo { get; set; } private readonly IIdentityServerInteractionService _interaction; private readonly IClientStore _clientStore; @@ -43,7 +45,49 @@ namespace Volo.Abp.Account.Web.Pages public virtual async Task OnGet() { - Consent = await BuildViewModelAsync(ReturnUrl); + var request = await _interaction.GetAuthorizationContextAsync(ReturnUrl); + if (request == null) + { + throw new ApplicationException($"No consent request matching request: {ReturnUrl}"); + } + + var client = await _clientStore.FindEnabledClientByIdAsync(request.Client.ClientId); + if (client == null) + { + throw new ApplicationException($"Invalid client id: {request.Client.ClientId}"); + } + + var resources = await _resourceStore.FindEnabledResourcesByScopeAsync(request.ValidatedResources.RawScopeValues); + if (resources == null || (!resources.IdentityResources.Any() && !resources.ApiResources.Any())) + { + throw new ApplicationException($"No scopes matching: {request.ValidatedResources.RawScopeValues.Aggregate((x, y) => x + ", " + y)}"); + } + + ClientInfo = new ClientInfoModel(client); + ConsentInput = new ConsentInputModel + { + RememberConsent = true, + IdentityScopes = resources.IdentityResources.Select(x => CreateScopeViewModel(x, true)).ToList(), + }; + + var apiScopes = new List(); + foreach(var parsedScope in request.ValidatedResources.ParsedScopes) + { + var apiScope = request.ValidatedResources.Resources.FindApiScope(parsedScope.ParsedName); + if (apiScope != null) + { + var scopeVm = CreateScopeViewModel(parsedScope, apiScope, true); + apiScopes.Add(scopeVm); + } + } + + if (resources.OfflineAccess) + { + apiScopes.Add(GetOfflineAccessScope(true)); + } + + ConsentInput.ApiScopes = apiScopes; + return Page(); } @@ -65,137 +109,56 @@ namespace Volo.Abp.Account.Web.Pages throw new ApplicationException("Unknown Error!"); } - protected virtual async Task ProcessConsentAsync() + protected virtual async Task ProcessConsentAsync() { - var result = new ProcessConsentResult(); + var result = new ConsentModel.ProcessConsentResult(); - // validate return url is still valid - var request = await _interaction.GetAuthorizationContextAsync(ReturnUrl); - if (request == null) - { - return result; - } - - ConsentResponse grantedConsent = null; + ConsentResponse grantedConsent; - // user clicked 'no' - send back the standard 'access_denied' response - if (Consent?.Button == "no") + if (ConsentInput.UserDecision == "no") { - grantedConsent = new ConsentResponse { Error = AuthorizationError.AccessDenied }; - // emit event - //await _events.RaiseAsync(new ConsentDeniedEvent(User.GetSubjectId(), request.Client.ClientId, request.ValidatedResources.RawScopeValues)); + grantedConsent = new ConsentResponse + { + Error = AuthorizationError.AccessDenied + }; } - // user clicked 'yes' - validate the data - else if (Consent?.Button == "yes") + else { - Consent.ScopesConsented = - Consent.ApiScopes.Union(Consent.IdentityScopes).Distinct().Select(x => x.Value).ToList(); - // if the user consented to some scope, build the response model - if (!Consent.ScopesConsented.IsNullOrEmpty()) + if (!ConsentInput.IdentityScopes.IsNullOrEmpty() || !ConsentInput.ApiScopes.IsNullOrEmpty()) { - var scopes = Consent.ScopesConsented; - if (ConsentOptions.EnableOfflineAccess == false) - { - scopes = scopes.Where(x => x != IdentityServer4.IdentityServerConstants.StandardScopes.OfflineAccess).ToList(); - } - grantedConsent = new ConsentResponse { - RememberConsent = Consent.RememberConsent, - ScopesValuesConsented = scopes.ToArray(), - Description = Consent.Description + RememberConsent = ConsentInput.RememberConsent, + ScopesValuesConsented = ConsentInput.GetAllowedScopeNames() }; - - // emit event - //await _events.RaiseAsync(new ConsentGrantedEvent(User.GetSubjectId(), request.Client.ClientId, request.ValidatedResources.RawScopeValues, grantedConsent.ScopesValuesConsented, grantedConsent.RememberConsent)); } else { - //throw new UserFriendlyException("You must pick at least one permission"); //TODO: How to handle this - result.ValidationError = ConsentOptions.MustChooseOneErrorMessage; + throw new UserFriendlyException("You must pick at least one permission"); //TODO: How to handle this } } - else - { - result.ValidationError = ConsentOptions.InvalidSelectionErrorMessage; - } if (grantedConsent != null) { - // communicate outcome of consent back to identityserver - await _interaction.GrantConsentAsync(request, grantedConsent); - - // indicate that's it ok to redirect back to authorization endpoint - result.RedirectUri = ReturnUrl; //TODO: ReturnUrlHash? - result.Client = request.Client; - } - else - { - // we need to redisplay the consent UI - - result.ViewModel = await BuildViewModelAsync(ReturnUrl, Consent); - } - - return result; - } - - private async Task BuildViewModelAsync(string returnUrl, ConsentInputModel model = null) - { - var request = await _interaction.GetAuthorizationContextAsync(returnUrl); - if (request != null) - { - return CreateConsentViewModel(model, returnUrl, request); - } - - throw new ApplicationException($"No consent request matching request: {returnUrl}"); - } - - private ConsentViewModel CreateConsentViewModel(ConsentInputModel model, string returnUrl, AuthorizationRequest request) - { - var consentViewModel = new ConsentViewModel - { - RememberConsent = model?.RememberConsent ?? true, - ScopesConsented = model?.ScopesConsented ?? new List(), - Description = model?.Description, - - ClientName = request.Client.ClientName ?? request.Client.ClientId, - ClientUrl = request.Client.ClientUri, - ClientLogoUrl = request.Client.LogoUri, - AllowRememberConsent = request.Client.AllowRememberConsent - }; - - consentViewModel.IdentityScopes = request.ValidatedResources.Resources.IdentityResources.Select(x => - CreateScopeViewModel(x, consentViewModel.ScopesConsented.Contains(x.Name) || model == null)) - .ToList(); - - var apiScopes = new List(); - foreach(var parsedScope in request.ValidatedResources.ParsedScopes) - { - var apiScope = request.ValidatedResources.Resources.FindApiScope(parsedScope.ParsedName); - if (apiScope != null) + var request = await _interaction.GetAuthorizationContextAsync(ReturnUrl); + if (request == null) { - var scopeVm = CreateScopeViewModel(parsedScope, apiScope, - consentViewModel.ScopesConsented.Contains(parsedScope.RawValue) || model == null); - apiScopes.Add(scopeVm); + return result; } - } - if (ConsentOptions.EnableOfflineAccess && request.ValidatedResources.Resources.OfflineAccess) - { - apiScopes.Add(GetOfflineAccessScope(consentViewModel.ScopesConsented.Contains(IdentityServer4.IdentityServerConstants.StandardScopes.OfflineAccess) || model == null)); - } + await _interaction.GrantConsentAsync(request, grantedConsent); - consentViewModel.ApiScopes = apiScopes; + result.RedirectUri = ReturnUrl; //TODO: ReturnUrlHash? + } - return consentViewModel; + return result; } - - protected virtual ScopeViewModel CreateScopeViewModel(IdentityResource identity, bool check) + protected virtual ConsentModel.ScopeViewModel CreateScopeViewModel(IdentityResource identity, bool check) { - return new ScopeViewModel + return new ConsentModel.ScopeViewModel { - Value = identity.Name, + Name = identity.Name, DisplayName = identity.DisplayName, Description = identity.Description, Emphasize = identity.Emphasize, @@ -204,7 +167,7 @@ namespace Volo.Abp.Account.Web.Pages }; } - protected virtual ScopeViewModel CreateScopeViewModel(ParsedScopeValue parsedScopeValue, ApiScope apiScope, bool check) + protected virtual ConsentModel.ScopeViewModel CreateScopeViewModel(ParsedScopeValue parsedScopeValue, ApiScope apiScope, bool check) { var displayName = apiScope.DisplayName ?? apiScope.Name; if (!string.IsNullOrWhiteSpace(parsedScopeValue.ParsedParameter)) @@ -214,7 +177,7 @@ namespace Volo.Abp.Account.Web.Pages return new ScopeViewModel { - Value = parsedScopeValue.RawValue, + Name = parsedScopeValue.RawValue, DisplayName = displayName, Description = apiScope.Description, Emphasize = apiScope.Emphasize, @@ -223,11 +186,11 @@ namespace Volo.Abp.Account.Web.Pages }; } - protected virtual ScopeViewModel GetOfflineAccessScope(bool check) + protected virtual ConsentModel.ScopeViewModel GetOfflineAccessScope(bool check) { - return new ScopeViewModel + return new ConsentModel.ScopeViewModel { - Value = IdentityServer4.IdentityServerConstants.StandardScopes.OfflineAccess, + Name = IdentityServer4.IdentityServerConstants.StandardScopes.OfflineAccess, DisplayName = "Offline Access", //TODO: Localize Description = "Access to your applications and resources, even when you are offline", Emphasize = true, @@ -237,36 +200,28 @@ namespace Volo.Abp.Account.Web.Pages public class ConsentInputModel { - [Required] - public string Button { get; set; } + public List IdentityScopes { get; set; } - public List ScopesConsented { get; set; } + public List ApiScopes { get; set; } - public bool RememberConsent { get; set; } - - public string Description { get; set; } - } - - - public class ConsentViewModel : ConsentInputModel - { - public string ClientName { get; set; } - public string ClientUrl { get; set; } - - public string ClientLogoUrl { get; set; } - - public bool AllowRememberConsent { get; set; } + [Required] + public string UserDecision { get; set; } - public List IdentityScopes { get; set; } + public bool RememberConsent { get; set; } - public List ApiScopes { get; set; } + public List GetAllowedScopeNames() + { + var identityScopes = IdentityScopes ?? new List(); + var apiScopes = ApiScopes ?? new List(); + return identityScopes.Union(apiScopes).Where(s => s.Checked).Select(s => s.Name).ToList(); + } } public class ScopeViewModel { [Required] [HiddenInput] - public string Value { get; set; } + public string Name { get; set; } public bool Checked { get; set; } @@ -283,13 +238,29 @@ namespace Volo.Abp.Account.Web.Pages { public bool IsRedirect => RedirectUri != null; public string RedirectUri { get; set; } - public Client Client { get; set; } - - public bool ShowView => ViewModel != null; - public ConsentViewModel ViewModel { get; set; } public bool HasValidationError => ValidationError != null; public string ValidationError { get; set; } } + + public class ClientInfoModel + { + public string ClientName { get; set; } + + public string ClientUrl { get; set; } + + public string ClientLogoUrl { get; set; } + + public bool AllowRememberConsent { get; set; } + + public ClientInfoModel(Client client) + { + //TODO: Automap + ClientName = client.ClientId; + ClientUrl = client.ClientUri; + ClientLogoUrl = client.LogoUri; + AllowRememberConsent = client.AllowRememberConsent; + } + } } } diff --git a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/LoggedOut.cshtml b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/LoggedOut.cshtml index 0e7b14236a..fdea548c76 100644 --- a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/LoggedOut.cshtml +++ b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/LoggedOut.cshtml @@ -3,8 +3,12 @@ @using Volo.Abp.Account.Localization @using Microsoft.AspNetCore.Mvc.Localization @using Volo.Abp.Account.Web.Pages.Account +@using Volo.Abp.AspNetCore.Mvc.UI.Theming +@inject IThemeManager ThemeManager @inject IHtmlLocalizer L - +@{ + Layout = ThemeManager.CurrentTheme.GetApplicationLayout(); +} @section scripts { From 1fa69f0c9f69c20b736c28ec2c2e6b9c10e18da0 Mon Sep 17 00:00:00 2001 From: maliming <6908465+maliming@users.noreply.github.com> Date: Tue, 7 Jul 2020 14:47:16 +0800 Subject: [PATCH 14/76] Update IdentityServerDbContext. --- ...piResourceSecretConsts.cs => SecretConsts.cs} | 6 ++---- .../IIdentityServerDbContext.cs | 3 +++ .../IdentityServerDbContext.cs | 3 +++ ...tityServerDbContextModelCreatingExtensions.cs | 16 ++++++++-------- 4 files changed, 16 insertions(+), 12 deletions(-) rename modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/{ApiResources/ApiResourceSecretConsts.cs => SecretConsts.cs} (72%) diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiResourceSecretConsts.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/SecretConsts.cs similarity index 72% rename from modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiResourceSecretConsts.cs rename to modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/SecretConsts.cs index f2692d1653..f3b7f2c5df 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiResourceSecretConsts.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/SecretConsts.cs @@ -1,6 +1,6 @@ -namespace Volo.Abp.IdentityServer.ApiResources +namespace Volo.Abp.IdentityServer { - public class ApiResourceSecretConsts + public class SecretConsts { /// /// Default value: 250 @@ -12,8 +12,6 @@ /// public static int ValueMaxLength { get; set; } = 4000; - public static int ValueMaxLengthValue { get; set; } = ValueMaxLength; - /// /// Default value: 1000 /// diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IIdentityServerDbContext.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IIdentityServerDbContext.cs index 3178fa02f2..75343419a8 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IIdentityServerDbContext.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IIdentityServerDbContext.cs @@ -1,6 +1,7 @@ using Microsoft.EntityFrameworkCore; using Volo.Abp.Data; using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.IdentityServer.ApiResources; using Volo.Abp.IdentityServer.ApiScopes; using Volo.Abp.IdentityServer.Clients; using Volo.Abp.IdentityServer.Devices; @@ -22,6 +23,8 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore DbSet ApiResourceScopes { get; set; } + DbSet ApiResourceProperties { get; set; } + #endregion #region ApiScope diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContext.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContext.cs index c8dc32b183..9bff7f13a1 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContext.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContext.cs @@ -1,6 +1,7 @@ using Microsoft.EntityFrameworkCore; using Volo.Abp.Data; using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.IdentityServer.ApiResources; using Volo.Abp.IdentityServer.ApiScopes; using Volo.Abp.IdentityServer.Clients; using Volo.Abp.IdentityServer.Devices; @@ -22,6 +23,8 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore public DbSet ApiResourceScopes { get; set; } + public DbSet ApiResourceProperties { get; set; } + #endregion #region ApiScope diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs index b2dba48e15..25a0d7605f 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs @@ -128,16 +128,16 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore b.HasKey(x => new {x.ClientId, x.Type, x.Value}); - b.Property(x => x.Type).HasMaxLength(ApiResourceSecretConsts.TypeMaxLength).IsRequired(); + b.Property(x => x.Type).HasMaxLength(SecretConsts.TypeMaxLength).IsRequired(); if (IsDatabaseProvider(builder, options, EfCoreDatabaseProvider.MySql, EfCoreDatabaseProvider.Oracle)) { - ApiResourceSecretConsts.ValueMaxLengthValue = 300; + SecretConsts.ValueMaxLengthValue = 300; } - b.Property(x => x.Value).HasMaxLength(ApiResourceSecretConsts.ValueMaxLengthValue).IsRequired(); + b.Property(x => x.Value).HasMaxLength(SecretConsts.ValueMaxLengthValue).IsRequired(); - b.Property(x => x.Description).HasMaxLength(ApiResourceSecretConsts.DescriptionMaxLength); + b.Property(x => x.Description).HasMaxLength(SecretConsts.DescriptionMaxLength); }); builder.Entity(b => @@ -263,15 +263,15 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore b.HasKey(x => new {x.ApiResourceId, x.Type, x.Value}); - b.Property(x => x.Type).HasMaxLength(ApiResourceSecretConsts.TypeMaxLength).IsRequired(); + b.Property(x => x.Type).HasMaxLength(SecretConsts.TypeMaxLength).IsRequired(); if (IsDatabaseProvider(builder, options, EfCoreDatabaseProvider.MySql, EfCoreDatabaseProvider.Oracle)) { - ApiResourceSecretConsts.ValueMaxLengthValue = 300; + SecretConsts.ValueMaxLengthValue = 300; } - b.Property(x => x.Value).HasMaxLength(ApiResourceSecretConsts.ValueMaxLengthValue).IsRequired(); + b.Property(x => x.Value).HasMaxLength(SecretConsts.ValueMaxLengthValue).IsRequired(); - b.Property(x => x.Description).HasMaxLength(ApiResourceSecretConsts.DescriptionMaxLength); + b.Property(x => x.Description).HasMaxLength(SecretConsts.DescriptionMaxLength); }); builder.Entity(b => From 43181eef5748929b7502642606b725b539793169 Mon Sep 17 00:00:00 2001 From: maliming <6908465+maliming@users.noreply.github.com> Date: Tue, 7 Jul 2020 14:48:10 +0800 Subject: [PATCH 15/76] Update IdentityServerDbContextModelCreatingExtensions. --- .../IdentityServerDbContextModelCreatingExtensions.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs index 25a0d7605f..e78ac0bc95 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs @@ -132,10 +132,10 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore if (IsDatabaseProvider(builder, options, EfCoreDatabaseProvider.MySql, EfCoreDatabaseProvider.Oracle)) { - SecretConsts.ValueMaxLengthValue = 300; + SecretConsts.ValueMaxLength = 300; } - b.Property(x => x.Value).HasMaxLength(SecretConsts.ValueMaxLengthValue).IsRequired(); + b.Property(x => x.Value).HasMaxLength(SecretConsts.ValueMaxLength).IsRequired(); b.Property(x => x.Description).HasMaxLength(SecretConsts.DescriptionMaxLength); }); @@ -267,9 +267,9 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore if (IsDatabaseProvider(builder, options, EfCoreDatabaseProvider.MySql, EfCoreDatabaseProvider.Oracle)) { - SecretConsts.ValueMaxLengthValue = 300; + SecretConsts.ValueMaxLength = 300; } - b.Property(x => x.Value).HasMaxLength(SecretConsts.ValueMaxLengthValue).IsRequired(); + b.Property(x => x.Value).HasMaxLength(SecretConsts.ValueMaxLength).IsRequired(); b.Property(x => x.Description).HasMaxLength(SecretConsts.DescriptionMaxLength); }); From cee969f7bb80f61a3f85b7a51a347ca951635677 Mon Sep 17 00:00:00 2001 From: maliming <6908465+maliming@users.noreply.github.com> Date: Tue, 7 Jul 2020 16:07:20 +0800 Subject: [PATCH 16/76] Recreate Template projects migrations. --- .../ApiResources/ApiResourceConsts.cs | 6 +- .../ApiResourceSecretConsts.cs} | 4 +- .../IdentityServer/Clients/ClientConsts.cs | 2 + .../Clients/ClientSecretConsts.cs | 20 ++ .../IdentityServer/Clients/ClientProperty.cs | 4 +- ...yServerDbContextModelCreatingExtensions.cs | 29 +- ....cs => 20200707075540_Initial.Designer.cs} | 24 +- ...0_Initial.cs => 20200707075540_Initial.cs} | 14 +- ...ectNameMigrationsDbContextModelSnapshot.cs | 22 +- ....cs => 20200707075532_Initial.Designer.cs} | 294 ++++++++++++++---- ...1_Initial.cs => 20200707075532_Initial.cs} | 217 ++++++++++--- ...verHostMigrationsDbContextModelSnapshot.cs | 292 +++++++++++++---- ....cs => 20200707075539_Initial.Designer.cs} | 2 +- ...0_Initial.cs => 20200707075539_Initial.cs} | 0 14 files changed, 706 insertions(+), 224 deletions(-) rename modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/{SecretConsts.cs => ApiResources/ApiResourceSecretConsts.cs} (82%) create mode 100644 modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Clients/ClientSecretConsts.cs rename templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/{20200707050900_Initial.Designer.cs => 20200707075540_Initial.Designer.cs} (99%) rename templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/{20200707050900_Initial.cs => 20200707075540_Initial.cs} (99%) rename templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/{20200624023331_Initial.Designer.cs => 20200707075532_Initial.Designer.cs} (89%) rename templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/{20200624023331_Initial.cs => 20200707075532_Initial.cs} (87%) rename templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/{20200624023340_Initial.Designer.cs => 20200707075539_Initial.Designer.cs} (99%) rename templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/{20200624023340_Initial.cs => 20200707075539_Initial.cs} (100%) diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiResourceConsts.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiResourceConsts.cs index 9a023c435b..05719fbc8f 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiResourceConsts.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiResourceConsts.cs @@ -4,8 +4,10 @@ { public static int NameMaxLength { get; set; } = 200; - public static int DisplayNameMaxLength { get; set; } = 200; + public static int DisplayNameMaxLength { get; set; } = 200; - public static int DescriptionMaxLength { get; set; } = 1000; + public static int DescriptionMaxLength { get; set; } = 1000; + + public static int AllowedAccessTokenSigningAlgorithmsMaxLength { get; set; } = 100; } } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/SecretConsts.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiResourceSecretConsts.cs similarity index 82% rename from modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/SecretConsts.cs rename to modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiResourceSecretConsts.cs index f3b7f2c5df..523bc147b1 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/SecretConsts.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiResourceSecretConsts.cs @@ -1,6 +1,6 @@ -namespace Volo.Abp.IdentityServer +namespace Volo.Abp.IdentityServer.ApiResources { - public class SecretConsts + public class ApiResourceSecretConsts { /// /// Default value: 250 diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Clients/ClientConsts.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Clients/ClientConsts.cs index 4331ab7064..e76411d0ed 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Clients/ClientConsts.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Clients/ClientConsts.cs @@ -23,5 +23,7 @@ public static int PairWiseSubjectSaltMaxLength { get; set; } = 200; public static int UserCodeTypeMaxLength { get; set; } = 100; + + public static int AllowedIdentityTokenSigningAlgorithms { get; set; } = 100; } } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Clients/ClientSecretConsts.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Clients/ClientSecretConsts.cs new file mode 100644 index 0000000000..60eb0807d1 --- /dev/null +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Clients/ClientSecretConsts.cs @@ -0,0 +1,20 @@ +namespace Volo.Abp.IdentityServer.Clients +{ + public class ClientSecretConsts + { + /// + /// Default value: 250 + /// + public static int TypeMaxLength { get; set; } = 250; + + /// + /// Default value: 4000 + /// + public static int ValueMaxLength { get; set; } = 4000; + + /// + /// Default value: 2000 + /// + public static int DescriptionMaxLength { get; set; } = 2000; + } +} diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientProperty.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientProperty.cs index daddd94e83..7347f1cc7c 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientProperty.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientProperty.cs @@ -17,7 +17,7 @@ namespace Volo.Abp.IdentityServer.Clients } - public virtual bool Equals(Guid clientId, [NotNull] string key, string value) + public virtual bool Equals(Guid clientId, [NotNull] string key, [NotNull] string value) { return ClientId == clientId && Key == key && Value == value; } @@ -36,4 +36,4 @@ namespace Volo.Abp.IdentityServer.Clients return new object[] { ClientId, Key }; } } -} \ No newline at end of file +} diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs index e78ac0bc95..20a99c082e 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs @@ -50,6 +50,7 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore b.Property(x => x.ClientClaimsPrefix).HasMaxLength(ClientConsts.ClientClaimsPrefixMaxLength); b.Property(x => x.PairWiseSubjectSalt).HasMaxLength(ClientConsts.PairWiseSubjectSaltMaxLength); b.Property(x => x.UserCodeType).HasMaxLength(ClientConsts.UserCodeTypeMaxLength); + b.Property(x => x.AllowedIdentityTokenSigningAlgorithms).HasMaxLength(ClientConsts.AllowedIdentityTokenSigningAlgorithms); b.HasMany(x => x.AllowedScopes).WithOne().HasForeignKey(x => x.ClientId).IsRequired(); b.HasMany(x => x.ClientSecrets).WithOne().HasForeignKey(x => x.ClientId).IsRequired(); @@ -128,16 +129,13 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore b.HasKey(x => new {x.ClientId, x.Type, x.Value}); - b.Property(x => x.Type).HasMaxLength(SecretConsts.TypeMaxLength).IsRequired(); - + b.Property(x => x.Type).HasMaxLength(ClientSecretConsts.TypeMaxLength).IsRequired(); if (IsDatabaseProvider(builder, options, EfCoreDatabaseProvider.MySql, EfCoreDatabaseProvider.Oracle)) { - SecretConsts.ValueMaxLength = 300; + ClientSecretConsts.ValueMaxLength = 300; } - - b.Property(x => x.Value).HasMaxLength(SecretConsts.ValueMaxLength).IsRequired(); - - b.Property(x => x.Description).HasMaxLength(SecretConsts.DescriptionMaxLength); + b.Property(x => x.Value).HasMaxLength(ClientSecretConsts.ValueMaxLength).IsRequired(); + b.Property(x => x.Description).HasMaxLength(ClientSecretConsts.DescriptionMaxLength); }); builder.Entity(b => @@ -180,7 +178,7 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore b.ConfigureByConvention(); - b.HasKey(x => new {x.ClientId, x.Key}); + b.HasKey(x => new {x.ClientId, x.Key, x.Value}); b.Property(x => x.Key).HasMaxLength(ClientPropertyConsts.KeyMaxLength).IsRequired(); b.Property(x => x.Value).HasMaxLength(ClientPropertyConsts.ValueMaxLength).IsRequired(); @@ -223,7 +221,7 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore b.ConfigureByConvention(); - b.HasKey(x => new {x.IdentityResourceId, x.Key}); + b.HasKey(x => new {x.IdentityResourceId, x.Key, x.Value}); b.Property(x => x.Key).HasMaxLength(IdentityResourcePropertyConsts.KeyMaxLength).IsRequired(); if (IsDatabaseProvider(builder, options, EfCoreDatabaseProvider.MySql, EfCoreDatabaseProvider.Oracle)) @@ -248,6 +246,7 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore b.Property(x => x.Name).HasMaxLength(ApiResourceConsts.NameMaxLength).IsRequired(); b.Property(x => x.DisplayName).HasMaxLength(ApiResourceConsts.DisplayNameMaxLength); b.Property(x => x.Description).HasMaxLength(ApiResourceConsts.DescriptionMaxLength); + b.Property(x => x.AllowedAccessTokenSigningAlgorithms).HasMaxLength(ApiResourceConsts.AllowedAccessTokenSigningAlgorithmsMaxLength); b.HasMany(x => x.Secrets).WithOne().HasForeignKey(x => x.ApiResourceId).IsRequired(); b.HasMany(x => x.Scopes).WithOne().HasForeignKey(x => x.ApiResourceId).IsRequired(); @@ -263,15 +262,15 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore b.HasKey(x => new {x.ApiResourceId, x.Type, x.Value}); - b.Property(x => x.Type).HasMaxLength(SecretConsts.TypeMaxLength).IsRequired(); + b.Property(x => x.Type).HasMaxLength(ApiResourceSecretConsts.TypeMaxLength).IsRequired(); if (IsDatabaseProvider(builder, options, EfCoreDatabaseProvider.MySql, EfCoreDatabaseProvider.Oracle)) { - SecretConsts.ValueMaxLength = 300; + ApiResourceSecretConsts.ValueMaxLength = 300; } - b.Property(x => x.Value).HasMaxLength(SecretConsts.ValueMaxLength).IsRequired(); + b.Property(x => x.Value).HasMaxLength(ApiResourceSecretConsts.ValueMaxLength).IsRequired(); - b.Property(x => x.Description).HasMaxLength(SecretConsts.DescriptionMaxLength); + b.Property(x => x.Description).HasMaxLength(ApiResourceSecretConsts.DescriptionMaxLength); }); builder.Entity(b => @@ -302,7 +301,7 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore b.ConfigureByConvention(); - b.HasKey(x => new {x.ApiResourceId, x.Key}); + b.HasKey(x => new {x.ApiResourceId, x.Key, x.Value}); b.Property(x => x.Key).HasMaxLength(ApiResourcePropertyConsts.KeyMaxLength).IsRequired(); if (IsDatabaseProvider(builder, options, EfCoreDatabaseProvider.MySql, EfCoreDatabaseProvider.Oracle)) @@ -349,7 +348,7 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore b.ConfigureByConvention(); - b.HasKey(x => new {x.ApiScopeId, x.Key}); + b.HasKey(x => new {x.ApiScopeId, x.Key, x.Value}); b.Property(x => x.Key).HasMaxLength(ApiScopePropertyConsts.KeyMaxLength).IsRequired(); if (IsDatabaseProvider(builder, options, EfCoreDatabaseProvider.MySql, EfCoreDatabaseProvider.Oracle)) diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200707050900_Initial.Designer.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200707075540_Initial.Designer.cs similarity index 99% rename from templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200707050900_Initial.Designer.cs rename to templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200707075540_Initial.Designer.cs index ee4de4f358..fadec16eaf 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200707050900_Initial.Designer.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200707075540_Initial.Designer.cs @@ -11,7 +11,7 @@ using Volo.Abp.EntityFrameworkCore; namespace MyCompanyName.MyProjectName.Migrations { [DbContext(typeof(MyProjectNameMigrationsDbContext))] - [Migration("20200707050900_Initial")] + [Migration("20200707075540_Initial")] partial class Initial { protected override void BuildTargetModel(ModelBuilder modelBuilder) @@ -873,11 +873,10 @@ namespace MyCompanyName.MyProjectName.Migrations .HasMaxLength(250); b.Property("Value") - .IsRequired() .HasColumnType("nvarchar(2000)") .HasMaxLength(2000); - b.HasKey("ApiResourceId", "Key"); + b.HasKey("ApiResourceId", "Key", "Value"); b.ToTable("IdentityServerApiResourceProperties"); }); @@ -889,7 +888,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("AllowedAccessTokenSigningAlgorithms") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(100)") + .HasMaxLength(100); b.Property("ConcurrencyStamp") .IsConcurrencyToken() @@ -1114,11 +1114,10 @@ namespace MyCompanyName.MyProjectName.Migrations .HasMaxLength(250); b.Property("Value") - .IsRequired() .HasColumnType("nvarchar(2000)") .HasMaxLength(2000); - b.HasKey("ApiScopeId", "Key"); + b.HasKey("ApiScopeId", "Key", "Value"); b.ToTable("IdentityServerApiScopeProperties"); }); @@ -1151,7 +1150,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("bit"); b.Property("AllowedIdentityTokenSigningAlgorithms") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(100)") + .HasMaxLength(100); b.Property("AlwaysIncludeUserClaimsInIdToken") .HasColumnType("bit"); @@ -1390,11 +1390,10 @@ namespace MyCompanyName.MyProjectName.Migrations .HasMaxLength(250); b.Property("Value") - .IsRequired() .HasColumnType("nvarchar(2000)") .HasMaxLength(2000); - b.HasKey("ClientId", "Key"); + b.HasKey("ClientId", "Key", "Value"); b.ToTable("IdentityServerClientProperties"); }); @@ -1441,8 +1440,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasMaxLength(4000); b.Property("Description") - .HasColumnType("nvarchar(1000)") - .HasMaxLength(1000); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.Property("Expiration") .HasColumnType("datetime2"); @@ -1693,11 +1692,10 @@ namespace MyCompanyName.MyProjectName.Migrations .HasMaxLength(250); b.Property("Value") - .IsRequired() .HasColumnType("nvarchar(2000)") .HasMaxLength(2000); - b.HasKey("IdentityResourceId", "Key"); + b.HasKey("IdentityResourceId", "Key", "Value"); b.ToTable("IdentityServerIdentityResourceProperties"); }); diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200707050900_Initial.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200707075540_Initial.cs similarity index 99% rename from templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200707050900_Initial.cs rename to templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200707075540_Initial.cs index 48726d777b..669982f451 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200707050900_Initial.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200707075540_Initial.cs @@ -249,7 +249,7 @@ namespace MyCompanyName.MyProjectName.Migrations DisplayName = table.Column(maxLength: 200, nullable: true), Description = table.Column(maxLength: 1000, nullable: true), Enabled = table.Column(nullable: false), - AllowedAccessTokenSigningAlgorithms = table.Column(nullable: true), + AllowedAccessTokenSigningAlgorithms = table.Column(maxLength: 100, nullable: true), ShowInDiscoveryDocument = table.Column(nullable: false) }, constraints: table => @@ -319,7 +319,7 @@ namespace MyCompanyName.MyProjectName.Migrations BackChannelLogoutSessionRequired = table.Column(nullable: false), AllowOfflineAccess = table.Column(nullable: false), IdentityTokenLifetime = table.Column(nullable: false), - AllowedIdentityTokenSigningAlgorithms = table.Column(nullable: true), + AllowedIdentityTokenSigningAlgorithms = table.Column(maxLength: 100, nullable: true), AccessTokenLifetime = table.Column(nullable: false), AuthorizationCodeLifetime = table.Column(nullable: false), ConsentLifetime = table.Column(nullable: true), @@ -676,7 +676,7 @@ namespace MyCompanyName.MyProjectName.Migrations }, constraints: table => { - table.PrimaryKey("PK_IdentityServerApiResourceProperties", x => new { x.ApiResourceId, x.Key }); + table.PrimaryKey("PK_IdentityServerApiResourceProperties", x => new { x.ApiResourceId, x.Key, x.Value }); table.ForeignKey( name: "FK_IdentityServerApiResourceProperties_IdentityServerApiResources_ApiResourceId", column: x => x.ApiResourceId, @@ -752,7 +752,7 @@ namespace MyCompanyName.MyProjectName.Migrations }, constraints: table => { - table.PrimaryKey("PK_IdentityServerApiScopeProperties", x => new { x.ApiScopeId, x.Key }); + table.PrimaryKey("PK_IdentityServerApiScopeProperties", x => new { x.ApiScopeId, x.Key, x.Value }); table.ForeignKey( name: "FK_IdentityServerApiScopeProperties_IdentityServerApiScopes_ApiScopeId", column: x => x.ApiScopeId, @@ -862,7 +862,7 @@ namespace MyCompanyName.MyProjectName.Migrations }, constraints: table => { - table.PrimaryKey("PK_IdentityServerClientProperties", x => new { x.ClientId, x.Key }); + table.PrimaryKey("PK_IdentityServerClientProperties", x => new { x.ClientId, x.Key, x.Value }); table.ForeignKey( name: "FK_IdentityServerClientProperties_IdentityServerClients_ClientId", column: x => x.ClientId, @@ -914,7 +914,7 @@ namespace MyCompanyName.MyProjectName.Migrations Type = table.Column(maxLength: 250, nullable: false), Value = table.Column(maxLength: 4000, nullable: false), ClientId = table.Column(nullable: false), - Description = table.Column(maxLength: 1000, nullable: true), + Description = table.Column(maxLength: 2000, nullable: true), Expiration = table.Column(nullable: true) }, constraints: table => @@ -956,7 +956,7 @@ namespace MyCompanyName.MyProjectName.Migrations }, constraints: table => { - table.PrimaryKey("PK_IdentityServerIdentityResourceProperties", x => new { x.IdentityResourceId, x.Key }); + table.PrimaryKey("PK_IdentityServerIdentityResourceProperties", x => new { x.IdentityResourceId, x.Key, x.Value }); table.ForeignKey( name: "FK_IdentityServerIdentityResourceProperties_IdentityServerIdentityResources_IdentityResourceId", column: x => x.IdentityResourceId, diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/MyProjectNameMigrationsDbContextModelSnapshot.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/MyProjectNameMigrationsDbContextModelSnapshot.cs index bfcb19749d..e3bb89da7d 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/MyProjectNameMigrationsDbContextModelSnapshot.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/MyProjectNameMigrationsDbContextModelSnapshot.cs @@ -871,11 +871,10 @@ namespace MyCompanyName.MyProjectName.Migrations .HasMaxLength(250); b.Property("Value") - .IsRequired() .HasColumnType("nvarchar(2000)") .HasMaxLength(2000); - b.HasKey("ApiResourceId", "Key"); + b.HasKey("ApiResourceId", "Key", "Value"); b.ToTable("IdentityServerApiResourceProperties"); }); @@ -887,7 +886,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("AllowedAccessTokenSigningAlgorithms") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(100)") + .HasMaxLength(100); b.Property("ConcurrencyStamp") .IsConcurrencyToken() @@ -1112,11 +1112,10 @@ namespace MyCompanyName.MyProjectName.Migrations .HasMaxLength(250); b.Property("Value") - .IsRequired() .HasColumnType("nvarchar(2000)") .HasMaxLength(2000); - b.HasKey("ApiScopeId", "Key"); + b.HasKey("ApiScopeId", "Key", "Value"); b.ToTable("IdentityServerApiScopeProperties"); }); @@ -1149,7 +1148,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("bit"); b.Property("AllowedIdentityTokenSigningAlgorithms") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(100)") + .HasMaxLength(100); b.Property("AlwaysIncludeUserClaimsInIdToken") .HasColumnType("bit"); @@ -1388,11 +1388,10 @@ namespace MyCompanyName.MyProjectName.Migrations .HasMaxLength(250); b.Property("Value") - .IsRequired() .HasColumnType("nvarchar(2000)") .HasMaxLength(2000); - b.HasKey("ClientId", "Key"); + b.HasKey("ClientId", "Key", "Value"); b.ToTable("IdentityServerClientProperties"); }); @@ -1439,8 +1438,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasMaxLength(4000); b.Property("Description") - .HasColumnType("nvarchar(1000)") - .HasMaxLength(1000); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.Property("Expiration") .HasColumnType("datetime2"); @@ -1691,11 +1690,10 @@ namespace MyCompanyName.MyProjectName.Migrations .HasMaxLength(250); b.Property("Value") - .IsRequired() .HasColumnType("nvarchar(2000)") .HasMaxLength(2000); - b.HasKey("IdentityResourceId", "Key"); + b.HasKey("IdentityResourceId", "Key", "Value"); b.ToTable("IdentityServerIdentityResourceProperties"); }); diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20200624023331_Initial.Designer.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20200707075532_Initial.Designer.cs similarity index 89% rename from templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20200624023331_Initial.Designer.cs rename to templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20200707075532_Initial.Designer.cs index 23c25b58cd..59e4e386ff 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20200624023331_Initial.Designer.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20200707075532_Initial.Designer.cs @@ -11,7 +11,7 @@ using Volo.Abp.EntityFrameworkCore; namespace MyCompanyName.MyProjectName.Migrations { [DbContext(typeof(IdentityServerHostMigrationsDbContext))] - [Migration("20200624023331_Initial")] + [Migration("20200707075532_Initial")] partial class Initial { protected override void BuildTargetModel(ModelBuilder modelBuilder) @@ -774,12 +774,34 @@ namespace MyCompanyName.MyProjectName.Migrations b.ToTable("AbpOrganizationUnitRoles"); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b => + { + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); + + b.Property("Key") + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); + + b.Property("Value") + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); + + b.HasKey("ApiResourceId", "Key", "Value"); + + b.ToTable("IdentityServerApiResourceProperties"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResource", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); + b.Property("AllowedAccessTokenSigningAlgorithms") + .HasColumnType("nvarchar(100)") + .HasMaxLength(100); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasColumnName("ConcurrencyStamp") @@ -836,15 +858,18 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("Properties") - .HasColumnType("nvarchar(max)"); + b.Property("ShowInDiscoveryDocument") + .HasColumnType("bit"); b.HasKey("Id"); + b.HasIndex("Name") + .IsUnique(); + b.ToTable("IdentityServerApiResources"); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceClaim", b => { b.Property("ApiResourceId") .HasColumnType("uniqueidentifier"); @@ -855,18 +880,76 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ApiResourceId", "Type"); - b.ToTable("IdentityServerApiClaims"); + b.ToTable("IdentityServerApiResourceClaims"); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScope", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceScope", b => { b.Property("ApiResourceId") .HasColumnType("uniqueidentifier"); - b.Property("Name") + b.Property("Scope") .HasColumnType("nvarchar(200)") .HasMaxLength(200); + b.HasKey("ApiResourceId", "Scope"); + + b.ToTable("IdentityServerApiResourceScopes"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceSecret", b => + { + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); + + b.Property("Value") + .HasColumnType("nvarchar(4000)") + .HasMaxLength(4000); + + b.Property("Description") + .HasColumnType("nvarchar(1000)") + .HasMaxLength(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") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(40)") + .HasMaxLength(40); + + b.Property("CreationTime") + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleterId") + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletionTime") + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); + b.Property("Description") .HasColumnType("nvarchar(1000)") .HasMaxLength(1000); @@ -878,58 +961,76 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Emphasize") .HasColumnType("bit"); + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnName("IsDeleted") + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("LastModificationTime") + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierId") + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + b.Property("Required") .HasColumnType("bit"); b.Property("ShowInDiscoveryDocument") .HasColumnType("bit"); - b.HasKey("ApiResourceId", "Name"); + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); b.ToTable("IdentityServerApiScopes"); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeClaim", b => { - b.Property("ApiResourceId") + b.Property("ApiScopeId") .HasColumnType("uniqueidentifier"); - b.Property("Name") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - b.Property("Type") .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.HasKey("ApiResourceId", "Name", "Type"); + b.HasKey("ApiScopeId", "Type"); b.ToTable("IdentityServerApiScopeClaims"); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeProperty", b => { - b.Property("ApiResourceId") + b.Property("ApiScopeId") .HasColumnType("uniqueidentifier"); - b.Property("Type") + b.Property("Key") .HasColumnType("nvarchar(250)") .HasMaxLength(250); b.Property("Value") - .HasColumnType("nvarchar(4000)") - .HasMaxLength(4000); - - b.Property("Description") .HasColumnType("nvarchar(2000)") .HasMaxLength(2000); - b.Property("Expiration") - .HasColumnType("datetime2"); + b.HasKey("ApiScopeId", "Key", "Value"); - b.HasKey("ApiResourceId", "Type", "Value"); - - b.ToTable("IdentityServerApiSecrets"); + b.ToTable("IdentityServerApiScopeProperties"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b => @@ -959,6 +1060,10 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("AllowRememberConsent") .HasColumnType("bit"); + b.Property("AllowedIdentityTokenSigningAlgorithms") + .HasColumnType("nvarchar(100)") + .HasMaxLength(100); + b.Property("AlwaysIncludeUserClaimsInIdToken") .HasColumnType("bit"); @@ -1089,6 +1194,9 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("RequirePkce") .HasColumnType("bit"); + b.Property("RequireRequestObject") + .HasColumnType("bit"); + b.Property("SlidingRefreshTokenLifetime") .HasColumnType("int"); @@ -1193,11 +1301,10 @@ namespace MyCompanyName.MyProjectName.Migrations .HasMaxLength(250); b.Property("Value") - .IsRequired() .HasColumnType("nvarchar(2000)") .HasMaxLength(2000); - b.HasKey("ClientId", "Key"); + b.HasKey("ClientId", "Key", "Value"); b.ToTable("IdentityServerClientProperties"); }); @@ -1285,6 +1392,10 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("nvarchar(max)") .HasMaxLength(50000); + b.Property("Description") + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + b.Property("DeviceCode") .IsRequired() .HasColumnType("nvarchar(200)") @@ -1298,6 +1409,10 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnName("ExtraProperties") .HasColumnType("nvarchar(max)"); + b.Property("SessionId") + .HasColumnType("nvarchar(100)") + .HasMaxLength(100); + b.Property("SubjectId") .HasColumnType("nvarchar(200)") .HasMaxLength(200); @@ -1314,8 +1429,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("Expiration"); - b.HasIndex("UserCode") - .IsUnique(); + b.HasIndex("UserCode"); b.ToTable("IdentityServerDeviceFlowCodes"); }); @@ -1337,6 +1451,9 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("nvarchar(40)") .HasMaxLength(40); + b.Property("ConsumedTime") + .HasColumnType("datetime2"); + b.Property("CreationTime") .HasColumnType("datetime2"); @@ -1345,6 +1462,10 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("nvarchar(max)") .HasMaxLength(50000); + b.Property("Description") + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + b.Property("Expiration") .HasColumnType("datetime2"); @@ -1355,6 +1476,10 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Id") .HasColumnType("uniqueidentifier"); + b.Property("SessionId") + .HasColumnType("nvarchar(100)") + .HasMaxLength(100); + b.Property("SubjectId") .HasColumnType("nvarchar(200)") .HasMaxLength(200); @@ -1370,21 +1495,9 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("SubjectId", "ClientId", "Type"); - b.ToTable("IdentityServerPersistedGrants"); - }); + b.HasIndex("SubjectId", "SessionId", "Type"); - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityClaim", b => - { - b.Property("IdentityResourceId") - .HasColumnType("uniqueidentifier"); - - b.Property("Type") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - - b.HasKey("IdentityResourceId", "Type"); - - b.ToTable("IdentityServerIdentityClaims"); + b.ToTable("IdentityServerPersistedGrants"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b => @@ -1452,9 +1565,6 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("Properties") - .HasColumnType("nvarchar(max)"); - b.Property("Required") .HasColumnType("bit"); @@ -1463,9 +1573,44 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("Id"); + b.HasIndex("Name") + .IsUnique(); + b.ToTable("IdentityServerIdentityResources"); }); + modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceClaim", b => + { + b.Property("IdentityResourceId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + + b.HasKey("IdentityResourceId", "Type"); + + b.ToTable("IdentityServerIdentityResourceClaims"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceProperty", b => + { + b.Property("IdentityResourceId") + .HasColumnType("uniqueidentifier"); + + b.Property("Key") + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); + + b.Property("Value") + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); + + b.HasKey("IdentityResourceId", "Key", "Value"); + + b.ToTable("IdentityServerIdentityResourceProperties"); + }); + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => { b.Property("Id") @@ -1721,38 +1866,56 @@ namespace MyCompanyName.MyProjectName.Migrations .IsRequired(); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) + b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiResource", null) + .WithMany("Properties") + .HasForeignKey("ApiResourceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceClaim", b => + { + b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiResource", null) .WithMany("UserClaims") .HasForeignKey("ApiResourceId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScope", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceScope", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) + b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiResource", null) .WithMany("Scopes") .HasForeignKey("ApiResourceId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceSecret", b => + { + b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiResource", null) + .WithMany("Secrets") + .HasForeignKey("ApiResourceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeClaim", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiScope", null) + b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiScope", null) .WithMany("UserClaims") - .HasForeignKey("ApiResourceId", "Name") + .HasForeignKey("ApiScopeId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeProperty", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) - .WithMany("Secrets") - .HasForeignKey("ApiResourceId") + b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiScope", null) + .WithMany("Properties") + .HasForeignKey("ApiScopeId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); @@ -1838,7 +2001,7 @@ namespace MyCompanyName.MyProjectName.Migrations .IsRequired(); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityClaim", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceClaim", b => { b.HasOne("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", null) .WithMany("UserClaims") @@ -1847,6 +2010,15 @@ namespace MyCompanyName.MyProjectName.Migrations .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.TenantManagement.TenantConnectionString", b => { b.HasOne("Volo.Abp.TenantManagement.Tenant", null) diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20200624023331_Initial.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20200707075532_Initial.cs similarity index 87% rename from templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20200624023331_Initial.cs rename to templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20200707075532_Initial.cs index 9287186f86..2ee3b628fb 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20200624023331_Initial.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20200707075532_Initial.cs @@ -213,13 +213,41 @@ namespace MyCompanyName.MyProjectName.Migrations DisplayName = table.Column(maxLength: 200, nullable: true), Description = table.Column(maxLength: 1000, nullable: true), Enabled = table.Column(nullable: false), - Properties = table.Column(nullable: true) + AllowedAccessTokenSigningAlgorithms = table.Column(maxLength: 100, nullable: true), + ShowInDiscoveryDocument = table.Column(nullable: false) }, constraints: table => { table.PrimaryKey("PK_IdentityServerApiResources", x => x.Id); }); + migrationBuilder.CreateTable( + name: "IdentityServerApiScopes", + 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), + Enabled = 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 => x.Id); + }); + migrationBuilder.CreateTable( name: "IdentityServerClients", columns: table => new @@ -247,6 +275,7 @@ namespace MyCompanyName.MyProjectName.Migrations AlwaysIncludeUserClaimsInIdToken = table.Column(nullable: false), RequirePkce = table.Column(nullable: false), AllowPlainTextPkce = table.Column(nullable: false), + RequireRequestObject = table.Column(nullable: false), AllowAccessTokensViaBrowser = table.Column(nullable: false), FrontChannelLogoutUri = table.Column(maxLength: 2000, nullable: true), FrontChannelLogoutSessionRequired = table.Column(nullable: false), @@ -254,6 +283,7 @@ namespace MyCompanyName.MyProjectName.Migrations BackChannelLogoutSessionRequired = table.Column(nullable: false), AllowOfflineAccess = table.Column(nullable: false), IdentityTokenLifetime = table.Column(nullable: false), + AllowedIdentityTokenSigningAlgorithms = table.Column(maxLength: 100, nullable: true), AccessTokenLifetime = table.Column(nullable: false), AuthorizationCodeLifetime = table.Column(nullable: false), ConsentLifetime = table.Column(nullable: true), @@ -289,7 +319,9 @@ namespace MyCompanyName.MyProjectName.Migrations DeviceCode = table.Column(maxLength: 200, nullable: false), UserCode = table.Column(maxLength: 200, nullable: false), SubjectId = table.Column(maxLength: 200, nullable: true), + SessionId = table.Column(maxLength: 100, nullable: true), ClientId = table.Column(maxLength: 200, nullable: false), + Description = table.Column(maxLength: 200, nullable: true), Expiration = table.Column(nullable: false), Data = table.Column(maxLength: 50000, nullable: false) }, @@ -318,8 +350,7 @@ namespace MyCompanyName.MyProjectName.Migrations 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) + ShowInDiscoveryDocument = table.Column(nullable: false) }, constraints: table => { @@ -336,9 +367,12 @@ namespace MyCompanyName.MyProjectName.Migrations ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), Type = table.Column(maxLength: 50, nullable: false), SubjectId = table.Column(maxLength: 200, nullable: true), + SessionId = table.Column(maxLength: 100, nullable: true), ClientId = table.Column(maxLength: 200, nullable: false), + Description = table.Column(maxLength: 200, nullable: true), CreationTime = table.Column(nullable: false), Expiration = table.Column(nullable: true), + ConsumedTime = table.Column(nullable: true), Data = table.Column(maxLength: 50000, nullable: false) }, constraints: table => @@ -579,7 +613,7 @@ namespace MyCompanyName.MyProjectName.Migrations }); migrationBuilder.CreateTable( - name: "IdentityServerApiClaims", + name: "IdentityServerApiResourceClaims", columns: table => new { Type = table.Column(maxLength: 200, nullable: false), @@ -587,9 +621,9 @@ namespace MyCompanyName.MyProjectName.Migrations }, constraints: table => { - table.PrimaryKey("PK_IdentityServerApiClaims", x => new { x.ApiResourceId, x.Type }); + table.PrimaryKey("PK_IdentityServerApiResourceClaims", x => new { x.ApiResourceId, x.Type }); table.ForeignKey( - name: "FK_IdentityServerApiClaims_IdentityServerApiResources_ApiResourceId", + name: "FK_IdentityServerApiResourceClaims_IdentityServerApiResources_ApiResourceId", column: x => x.ApiResourceId, principalTable: "IdentityServerApiResources", principalColumn: "Id", @@ -597,22 +631,36 @@ namespace MyCompanyName.MyProjectName.Migrations }); migrationBuilder.CreateTable( - name: "IdentityServerApiScopes", + name: "IdentityServerApiResourceProperties", 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) + Key = table.Column(maxLength: 250, nullable: false), + Value = table.Column(maxLength: 2000, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerApiResourceProperties", x => new { x.ApiResourceId, x.Key, x.Value }); + table.ForeignKey( + name: "FK_IdentityServerApiResourceProperties_IdentityServerApiResources_ApiResourceId", + column: x => x.ApiResourceId, + principalTable: "IdentityServerApiResources", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerApiResourceScopes", + columns: table => new + { + ApiResourceId = table.Column(nullable: false), + Scope = table.Column(maxLength: 200, nullable: false) }, constraints: table => { - table.PrimaryKey("PK_IdentityServerApiScopes", x => new { x.ApiResourceId, x.Name }); + table.PrimaryKey("PK_IdentityServerApiResourceScopes", x => new { x.ApiResourceId, x.Scope }); table.ForeignKey( - name: "FK_IdentityServerApiScopes_IdentityServerApiResources_ApiResourceId", + name: "FK_IdentityServerApiResourceScopes_IdentityServerApiResources_ApiResourceId", column: x => x.ApiResourceId, principalTable: "IdentityServerApiResources", principalColumn: "Id", @@ -620,26 +668,63 @@ namespace MyCompanyName.MyProjectName.Migrations }); migrationBuilder.CreateTable( - name: "IdentityServerApiSecrets", + name: "IdentityServerApiResourceSecrets", columns: table => new { Type = table.Column(maxLength: 250, nullable: false), Value = table.Column(maxLength: 4000, nullable: false), ApiResourceId = table.Column(nullable: false), - Description = table.Column(maxLength: 2000, nullable: true), + Description = table.Column(maxLength: 1000, nullable: true), Expiration = table.Column(nullable: true) }, constraints: table => { - table.PrimaryKey("PK_IdentityServerApiSecrets", x => new { x.ApiResourceId, x.Type, x.Value }); + table.PrimaryKey("PK_IdentityServerApiResourceSecrets", x => new { x.ApiResourceId, x.Type, x.Value }); table.ForeignKey( - name: "FK_IdentityServerApiSecrets_IdentityServerApiResources_ApiResourceId", + name: "FK_IdentityServerApiResourceSecrets_IdentityServerApiResources_ApiResourceId", column: x => x.ApiResourceId, principalTable: "IdentityServerApiResources", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); + migrationBuilder.CreateTable( + name: "IdentityServerApiScopeClaims", + columns: table => new + { + Type = table.Column(maxLength: 200, nullable: false), + ApiScopeId = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerApiScopeClaims", x => new { x.ApiScopeId, x.Type }); + table.ForeignKey( + name: "FK_IdentityServerApiScopeClaims_IdentityServerApiScopes_ApiScopeId", + column: x => x.ApiScopeId, + principalTable: "IdentityServerApiScopes", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerApiScopeProperties", + columns: table => new + { + ApiScopeId = table.Column(nullable: false), + Key = table.Column(maxLength: 250, nullable: false), + Value = table.Column(maxLength: 2000, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerApiScopeProperties", x => new { x.ApiScopeId, x.Key, x.Value }); + table.ForeignKey( + name: "FK_IdentityServerApiScopeProperties_IdentityServerApiScopes_ApiScopeId", + column: x => x.ApiScopeId, + principalTable: "IdentityServerApiScopes", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + migrationBuilder.CreateTable( name: "IdentityServerClientClaims", columns: table => new @@ -741,7 +826,7 @@ namespace MyCompanyName.MyProjectName.Migrations }, constraints: table => { - table.PrimaryKey("PK_IdentityServerClientProperties", x => new { x.ClientId, x.Key }); + table.PrimaryKey("PK_IdentityServerClientProperties", x => new { x.ClientId, x.Key, x.Value }); table.ForeignKey( name: "FK_IdentityServerClientProperties_IdentityServerClients_ClientId", column: x => x.ClientId, @@ -808,7 +893,7 @@ namespace MyCompanyName.MyProjectName.Migrations }); migrationBuilder.CreateTable( - name: "IdentityServerIdentityClaims", + name: "IdentityServerIdentityResourceClaims", columns: table => new { Type = table.Column(maxLength: 200, nullable: false), @@ -816,9 +901,28 @@ namespace MyCompanyName.MyProjectName.Migrations }, constraints: table => { - table.PrimaryKey("PK_IdentityServerIdentityClaims", x => new { x.IdentityResourceId, x.Type }); + table.PrimaryKey("PK_IdentityServerIdentityResourceClaims", x => new { x.IdentityResourceId, x.Type }); + table.ForeignKey( + name: "FK_IdentityServerIdentityResourceClaims_IdentityServerIdentityResources_IdentityResourceId", + column: x => x.IdentityResourceId, + principalTable: "IdentityServerIdentityResources", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerIdentityResourceProperties", + columns: table => new + { + IdentityResourceId = table.Column(nullable: false), + Key = table.Column(maxLength: 250, nullable: false), + Value = table.Column(maxLength: 2000, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerIdentityResourceProperties", x => new { x.IdentityResourceId, x.Key, x.Value }); table.ForeignKey( - name: "FK_IdentityServerIdentityClaims_IdentityServerIdentityResources_IdentityResourceId", + name: "FK_IdentityServerIdentityResourceProperties_IdentityServerIdentityResources_IdentityResourceId", column: x => x.IdentityResourceId, principalTable: "IdentityServerIdentityResources", principalColumn: "Id", @@ -848,25 +952,6 @@ namespace MyCompanyName.MyProjectName.Migrations 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_ApiResourceId_Name", - columns: x => new { x.ApiResourceId, x.Name }, - principalTable: "IdentityServerApiScopes", - principalColumns: new[] { "ApiResourceId", "Name" }, - onDelete: ReferentialAction.Cascade); - }); - migrationBuilder.CreateIndex( name: "IX_AbpAuditLogActions_AuditLogId", table: "AbpAuditLogActions", @@ -982,6 +1067,18 @@ namespace MyCompanyName.MyProjectName.Migrations table: "AbpUsers", column: "UserName"); + migrationBuilder.CreateIndex( + name: "IX_IdentityServerApiResources_Name", + table: "IdentityServerApiResources", + column: "Name", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_IdentityServerApiScopes_Name", + table: "IdentityServerApiScopes", + column: "Name", + unique: true); + migrationBuilder.CreateIndex( name: "IX_IdentityServerClients_ClientId", table: "IdentityServerClients", @@ -1001,7 +1098,12 @@ namespace MyCompanyName.MyProjectName.Migrations migrationBuilder.CreateIndex( name: "IX_IdentityServerDeviceFlowCodes_UserCode", table: "IdentityServerDeviceFlowCodes", - column: "UserCode", + column: "UserCode"); + + migrationBuilder.CreateIndex( + name: "IX_IdentityServerIdentityResources_Name", + table: "IdentityServerIdentityResources", + column: "Name", unique: true); migrationBuilder.CreateIndex( @@ -1013,6 +1115,11 @@ namespace MyCompanyName.MyProjectName.Migrations 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) @@ -1057,13 +1164,22 @@ namespace MyCompanyName.MyProjectName.Migrations name: "AbpUserTokens"); migrationBuilder.DropTable( - name: "IdentityServerApiClaims"); + name: "IdentityServerApiResourceClaims"); + + migrationBuilder.DropTable( + name: "IdentityServerApiResourceProperties"); + + migrationBuilder.DropTable( + name: "IdentityServerApiResourceScopes"); + + migrationBuilder.DropTable( + name: "IdentityServerApiResourceSecrets"); migrationBuilder.DropTable( name: "IdentityServerApiScopeClaims"); migrationBuilder.DropTable( - name: "IdentityServerApiSecrets"); + name: "IdentityServerApiScopeProperties"); migrationBuilder.DropTable( name: "IdentityServerClientClaims"); @@ -1096,7 +1212,10 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerDeviceFlowCodes"); migrationBuilder.DropTable( - name: "IdentityServerIdentityClaims"); + name: "IdentityServerIdentityResourceClaims"); + + migrationBuilder.DropTable( + name: "IdentityServerIdentityResourceProperties"); migrationBuilder.DropTable( name: "IdentityServerPersistedGrants"); @@ -1116,6 +1235,9 @@ namespace MyCompanyName.MyProjectName.Migrations migrationBuilder.DropTable( name: "AbpUsers"); + migrationBuilder.DropTable( + name: "IdentityServerApiResources"); + migrationBuilder.DropTable( name: "IdentityServerApiScopes"); @@ -1127,9 +1249,6 @@ namespace MyCompanyName.MyProjectName.Migrations migrationBuilder.DropTable( name: "AbpAuditLogs"); - - migrationBuilder.DropTable( - name: "IdentityServerApiResources"); } } } diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/IdentityServerHostMigrationsDbContextModelSnapshot.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/IdentityServerHostMigrationsDbContextModelSnapshot.cs index 44c00e04d4..c2aac52e7c 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/IdentityServerHostMigrationsDbContextModelSnapshot.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/IdentityServerHostMigrationsDbContextModelSnapshot.cs @@ -772,12 +772,34 @@ namespace MyCompanyName.MyProjectName.Migrations b.ToTable("AbpOrganizationUnitRoles"); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b => + { + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); + + b.Property("Key") + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); + + b.Property("Value") + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); + + b.HasKey("ApiResourceId", "Key", "Value"); + + b.ToTable("IdentityServerApiResourceProperties"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResource", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); + b.Property("AllowedAccessTokenSigningAlgorithms") + .HasColumnType("nvarchar(100)") + .HasMaxLength(100); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasColumnName("ConcurrencyStamp") @@ -834,15 +856,18 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("Properties") - .HasColumnType("nvarchar(max)"); + b.Property("ShowInDiscoveryDocument") + .HasColumnType("bit"); b.HasKey("Id"); + b.HasIndex("Name") + .IsUnique(); + b.ToTable("IdentityServerApiResources"); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceClaim", b => { b.Property("ApiResourceId") .HasColumnType("uniqueidentifier"); @@ -853,18 +878,76 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ApiResourceId", "Type"); - b.ToTable("IdentityServerApiClaims"); + b.ToTable("IdentityServerApiResourceClaims"); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScope", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceScope", b => { b.Property("ApiResourceId") .HasColumnType("uniqueidentifier"); - b.Property("Name") + b.Property("Scope") .HasColumnType("nvarchar(200)") .HasMaxLength(200); + b.HasKey("ApiResourceId", "Scope"); + + b.ToTable("IdentityServerApiResourceScopes"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceSecret", b => + { + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); + + b.Property("Value") + .HasColumnType("nvarchar(4000)") + .HasMaxLength(4000); + + b.Property("Description") + .HasColumnType("nvarchar(1000)") + .HasMaxLength(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") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(40)") + .HasMaxLength(40); + + b.Property("CreationTime") + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleterId") + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletionTime") + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); + b.Property("Description") .HasColumnType("nvarchar(1000)") .HasMaxLength(1000); @@ -876,58 +959,76 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Emphasize") .HasColumnType("bit"); + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnName("IsDeleted") + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("LastModificationTime") + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierId") + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + b.Property("Required") .HasColumnType("bit"); b.Property("ShowInDiscoveryDocument") .HasColumnType("bit"); - b.HasKey("ApiResourceId", "Name"); + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); b.ToTable("IdentityServerApiScopes"); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeClaim", b => { - b.Property("ApiResourceId") + b.Property("ApiScopeId") .HasColumnType("uniqueidentifier"); - b.Property("Name") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - b.Property("Type") .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.HasKey("ApiResourceId", "Name", "Type"); + b.HasKey("ApiScopeId", "Type"); b.ToTable("IdentityServerApiScopeClaims"); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeProperty", b => { - b.Property("ApiResourceId") + b.Property("ApiScopeId") .HasColumnType("uniqueidentifier"); - b.Property("Type") + b.Property("Key") .HasColumnType("nvarchar(250)") .HasMaxLength(250); b.Property("Value") - .HasColumnType("nvarchar(4000)") - .HasMaxLength(4000); - - b.Property("Description") .HasColumnType("nvarchar(2000)") .HasMaxLength(2000); - b.Property("Expiration") - .HasColumnType("datetime2"); + b.HasKey("ApiScopeId", "Key", "Value"); - b.HasKey("ApiResourceId", "Type", "Value"); - - b.ToTable("IdentityServerApiSecrets"); + b.ToTable("IdentityServerApiScopeProperties"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b => @@ -957,6 +1058,10 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("AllowRememberConsent") .HasColumnType("bit"); + b.Property("AllowedIdentityTokenSigningAlgorithms") + .HasColumnType("nvarchar(100)") + .HasMaxLength(100); + b.Property("AlwaysIncludeUserClaimsInIdToken") .HasColumnType("bit"); @@ -1087,6 +1192,9 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("RequirePkce") .HasColumnType("bit"); + b.Property("RequireRequestObject") + .HasColumnType("bit"); + b.Property("SlidingRefreshTokenLifetime") .HasColumnType("int"); @@ -1191,11 +1299,10 @@ namespace MyCompanyName.MyProjectName.Migrations .HasMaxLength(250); b.Property("Value") - .IsRequired() .HasColumnType("nvarchar(2000)") .HasMaxLength(2000); - b.HasKey("ClientId", "Key"); + b.HasKey("ClientId", "Key", "Value"); b.ToTable("IdentityServerClientProperties"); }); @@ -1283,6 +1390,10 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("nvarchar(max)") .HasMaxLength(50000); + b.Property("Description") + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + b.Property("DeviceCode") .IsRequired() .HasColumnType("nvarchar(200)") @@ -1296,6 +1407,10 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnName("ExtraProperties") .HasColumnType("nvarchar(max)"); + b.Property("SessionId") + .HasColumnType("nvarchar(100)") + .HasMaxLength(100); + b.Property("SubjectId") .HasColumnType("nvarchar(200)") .HasMaxLength(200); @@ -1312,8 +1427,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("Expiration"); - b.HasIndex("UserCode") - .IsUnique(); + b.HasIndex("UserCode"); b.ToTable("IdentityServerDeviceFlowCodes"); }); @@ -1335,6 +1449,9 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("nvarchar(40)") .HasMaxLength(40); + b.Property("ConsumedTime") + .HasColumnType("datetime2"); + b.Property("CreationTime") .HasColumnType("datetime2"); @@ -1343,6 +1460,10 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("nvarchar(max)") .HasMaxLength(50000); + b.Property("Description") + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + b.Property("Expiration") .HasColumnType("datetime2"); @@ -1353,6 +1474,10 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Id") .HasColumnType("uniqueidentifier"); + b.Property("SessionId") + .HasColumnType("nvarchar(100)") + .HasMaxLength(100); + b.Property("SubjectId") .HasColumnType("nvarchar(200)") .HasMaxLength(200); @@ -1368,21 +1493,9 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("SubjectId", "ClientId", "Type"); - b.ToTable("IdentityServerPersistedGrants"); - }); + b.HasIndex("SubjectId", "SessionId", "Type"); - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityClaim", b => - { - b.Property("IdentityResourceId") - .HasColumnType("uniqueidentifier"); - - b.Property("Type") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - - b.HasKey("IdentityResourceId", "Type"); - - b.ToTable("IdentityServerIdentityClaims"); + b.ToTable("IdentityServerPersistedGrants"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b => @@ -1450,9 +1563,6 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("Properties") - .HasColumnType("nvarchar(max)"); - b.Property("Required") .HasColumnType("bit"); @@ -1461,9 +1571,44 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("Id"); + b.HasIndex("Name") + .IsUnique(); + b.ToTable("IdentityServerIdentityResources"); }); + modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceClaim", b => + { + b.Property("IdentityResourceId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + + b.HasKey("IdentityResourceId", "Type"); + + b.ToTable("IdentityServerIdentityResourceClaims"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceProperty", b => + { + b.Property("IdentityResourceId") + .HasColumnType("uniqueidentifier"); + + b.Property("Key") + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); + + b.Property("Value") + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); + + b.HasKey("IdentityResourceId", "Key", "Value"); + + b.ToTable("IdentityServerIdentityResourceProperties"); + }); + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => { b.Property("Id") @@ -1719,38 +1864,56 @@ namespace MyCompanyName.MyProjectName.Migrations .IsRequired(); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) + b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiResource", null) + .WithMany("Properties") + .HasForeignKey("ApiResourceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceClaim", b => + { + b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiResource", null) .WithMany("UserClaims") .HasForeignKey("ApiResourceId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScope", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceScope", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) + b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiResource", null) .WithMany("Scopes") .HasForeignKey("ApiResourceId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceSecret", b => + { + b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiResource", null) + .WithMany("Secrets") + .HasForeignKey("ApiResourceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeClaim", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiScope", null) + b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiScope", null) .WithMany("UserClaims") - .HasForeignKey("ApiResourceId", "Name") + .HasForeignKey("ApiScopeId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeProperty", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) - .WithMany("Secrets") - .HasForeignKey("ApiResourceId") + b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiScope", null) + .WithMany("Properties") + .HasForeignKey("ApiScopeId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); @@ -1836,7 +1999,7 @@ namespace MyCompanyName.MyProjectName.Migrations .IsRequired(); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityClaim", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceClaim", b => { b.HasOne("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", null) .WithMany("UserClaims") @@ -1845,6 +2008,15 @@ namespace MyCompanyName.MyProjectName.Migrations .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.TenantManagement.TenantConnectionString", b => { b.HasOne("Volo.Abp.TenantManagement.Tenant", null) diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20200624023340_Initial.Designer.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20200707075539_Initial.Designer.cs similarity index 99% rename from templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20200624023340_Initial.Designer.cs rename to templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20200707075539_Initial.Designer.cs index d93e2804a6..ee1b9c6c25 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20200624023340_Initial.Designer.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20200707075539_Initial.Designer.cs @@ -11,7 +11,7 @@ using Volo.Abp.EntityFrameworkCore; namespace MyCompanyName.MyProjectName.Migrations { [DbContext(typeof(UnifiedDbContext))] - [Migration("20200624023340_Initial")] + [Migration("20200707075539_Initial")] partial class Initial { protected override void BuildTargetModel(ModelBuilder modelBuilder) diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20200624023340_Initial.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20200707075539_Initial.cs similarity index 100% rename from templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20200624023340_Initial.cs rename to templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20200707075539_Initial.cs From 87e5dc425980000af692235d1930abe7bb518d0d Mon Sep 17 00:00:00 2001 From: maliming <6908465+maliming@users.noreply.github.com> Date: Tue, 7 Jul 2020 16:58:54 +0800 Subject: [PATCH 17/76] Refactor. --- .../ApiResources/ApiResource.cs | 3 +- .../ApiResources/ApiResourceClaim.cs | 4 +- .../ApiResources/ApiResourceScope.cs | 2 +- .../ApiResources/ApiResourceSecret.cs | 2 +- .../ApiResources/IApiResourceRepository.cs | 2 +- .../Volo/Abp/IdentityServer/ResourceStore.cs | 7 +- ...IdentityServerEfCoreQueryableExtensions.cs | 1 + .../ApiResources/ApiResourceRepository.cs | 5 +- ...IdentityServerEntityFrameworkCoreModule.cs | 1 + ...yServerDbContextModelCreatingExtensions.cs | 5 -- .../AbpIdentityServerMongoDbContext.cs | 1 + ...pIdentityServerMongoDbContextExtensions.cs | 1 + .../MongoDB/AbpIdentityServerMongoDbModule.cs | 1 + .../IAbpIdentityServerMongoDbContext.cs | 2 +- .../MongoDB/MongoApiResourceRepository.cs | 1 + .../Clients/ClientStore_Tests.cs | 2 +- .../AbpIdentityServerTestDataBuilder.cs | 87 +++++++++++-------- .../AbpIdentityServerTestDataBuilder.cs | 1 + .../ApiResourceRepository_Tests.cs | 1 + .../IdentityServerDataSeedContributor.cs | 3 +- .../IdentityServerDataSeedContributor.cs | 7 +- 21 files changed, 79 insertions(+), 60 deletions(-) diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResource.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResource.cs index e6fe3b9318..90725c3f6a 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResource.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResource.cs @@ -4,9 +4,8 @@ using System.Linq; using IdentityServer4; using JetBrains.Annotations; using Volo.Abp.Domain.Entities.Auditing; -using Volo.Abp.IdentityServer.ApiResources; -namespace Volo.Abp.IdentityServer.ApiScopes +namespace Volo.Abp.IdentityServer.ApiResources { public class ApiResource : FullAuditedAggregateRoot { diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResourceClaim.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResourceClaim.cs index e3e92d0721..772f6dcde7 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResourceClaim.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResourceClaim.cs @@ -1,7 +1,7 @@ using System; using JetBrains.Annotations; -namespace Volo.Abp.IdentityServer.ApiScopes +namespace Volo.Abp.IdentityServer.ApiResources { public class ApiResourceClaim : UserClaim { @@ -28,4 +28,4 @@ namespace Volo.Abp.IdentityServer.ApiScopes return new object[] {ApiResourceId, Type}; } } -} \ No newline at end of file +} diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResourceScope.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResourceScope.cs index ecdff780e9..4da2beaa3f 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResourceScope.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResourceScope.cs @@ -2,7 +2,7 @@ using JetBrains.Annotations; using Volo.Abp.Domain.Entities; -namespace Volo.Abp.IdentityServer.ApiScopes +namespace Volo.Abp.IdentityServer.ApiResources { public class ApiResourceScope : Entity { diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResourceSecret.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResourceSecret.cs index ccf63b8a3c..dcc6b04768 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResourceSecret.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResourceSecret.cs @@ -2,7 +2,7 @@ using IdentityServer4; using JetBrains.Annotations; -namespace Volo.Abp.IdentityServer.ApiScopes +namespace Volo.Abp.IdentityServer.ApiResources { public class ApiResourceSecret : Secret { diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/IApiResourceRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/IApiResourceRepository.cs index f2feff8917..5d99666183 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/IApiResourceRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/IApiResourceRepository.cs @@ -4,7 +4,7 @@ using System.Threading; using System.Threading.Tasks; using Volo.Abp.Domain.Repositories; -namespace Volo.Abp.IdentityServer.ApiScopes +namespace Volo.Abp.IdentityServer.ApiResources { public interface IApiResourceRepository : IBasicRepository { diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ResourceStore.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ResourceStore.cs index a2d13c72fd..5afaaf4400 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ResourceStore.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ResourceStore.cs @@ -3,6 +3,7 @@ using System.Linq; using System.Threading.Tasks; using IdentityServer4.Models; using IdentityServer4.Stores; +using Volo.Abp.IdentityServer.ApiResources; using Volo.Abp.IdentityServer.ApiScopes; using Volo.Abp.IdentityServer.IdentityResources; using Volo.Abp.ObjectMapping; @@ -52,7 +53,7 @@ namespace Volo.Abp.IdentityServer public virtual async Task> FindApiResourcesByScopeNameAsync(IEnumerable scopeNames) { var resources = await ApiResourceRepository.GetListByScopesAsync(scopeNames.ToArray(), includeDetails: true); - return ObjectMapper.Map, List>(resources); + return ObjectMapper.Map, List>(resources); } /// @@ -61,7 +62,7 @@ namespace Volo.Abp.IdentityServer public virtual async Task> FindApiResourcesByNameAsync(IEnumerable apiResourceNames) { var resources = await ApiResourceRepository.FindByNameAsync(apiResourceNames.ToArray(), includeDetails: true); - return ObjectMapper.Map, List>(resources); + return ObjectMapper.Map, List>(resources); } /// @@ -75,7 +76,7 @@ namespace Volo.Abp.IdentityServer return new Resources( ObjectMapper.Map, List>(identityResources), - ObjectMapper.Map, List>(apiResources), + ObjectMapper.Map, List>(apiResources), ObjectMapper.Map, List>(apiScopes)); } } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/AbpIdentityServerEfCoreQueryableExtensions.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/AbpIdentityServerEfCoreQueryableExtensions.cs index d830da07e0..58cb6cc7ac 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/AbpIdentityServerEfCoreQueryableExtensions.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/AbpIdentityServerEfCoreQueryableExtensions.cs @@ -1,5 +1,6 @@ using System.Linq; using Microsoft.EntityFrameworkCore; +using Volo.Abp.IdentityServer.ApiResources; using Volo.Abp.IdentityServer.ApiScopes; using Volo.Abp.IdentityServer.Clients; using Volo.Abp.IdentityServer.IdentityResources; diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiResourceRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiResourceRepository.cs index 53644a1e1c..4824696108 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiResourceRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiResourceRepository.cs @@ -1,16 +1,15 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Linq.Dynamic.Core; using System.Threading; using System.Threading.Tasks; using Microsoft.EntityFrameworkCore; using Volo.Abp.Domain.Repositories.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore; using Volo.Abp.IdentityServer.EntityFrameworkCore; -using System.Linq.Dynamic.Core; -using System.Runtime.InteropServices.ComTypes; -namespace Volo.Abp.IdentityServer.ApiScopes +namespace Volo.Abp.IdentityServer.ApiResources { public class ApiResourceRepository : EfCoreRepository, IApiResourceRepository { diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/AbpIdentityServerEntityFrameworkCoreModule.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/AbpIdentityServerEntityFrameworkCoreModule.cs index fd22e97fe4..adc51cd500 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/AbpIdentityServerEntityFrameworkCoreModule.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/AbpIdentityServerEntityFrameworkCoreModule.cs @@ -1,5 +1,6 @@ using Microsoft.Extensions.DependencyInjection; using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.IdentityServer.ApiResources; using Volo.Abp.IdentityServer.ApiScopes; using Volo.Abp.IdentityServer.Clients; using Volo.Abp.IdentityServer.Devices; diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs index 20a99c082e..eb6d424c16 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs @@ -8,11 +8,6 @@ using Volo.Abp.IdentityServer.Clients; using Volo.Abp.IdentityServer.Devices; using Volo.Abp.IdentityServer.Grants; using Volo.Abp.IdentityServer.IdentityResources; -using ApiResource = Volo.Abp.IdentityServer.ApiScopes.ApiResource; -using Client = Volo.Abp.IdentityServer.Clients.Client; -using ClientClaim = Volo.Abp.IdentityServer.Clients.ClientClaim; -using IdentityResource = Volo.Abp.IdentityServer.IdentityResources.IdentityResource; -using PersistedGrant = Volo.Abp.IdentityServer.Grants.PersistedGrant; namespace Volo.Abp.IdentityServer.EntityFrameworkCore { diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/AbpIdentityServerMongoDbContext.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/AbpIdentityServerMongoDbContext.cs index 760505e75f..eddf19cd29 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/AbpIdentityServerMongoDbContext.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/AbpIdentityServerMongoDbContext.cs @@ -1,5 +1,6 @@ using MongoDB.Driver; using Volo.Abp.Data; +using Volo.Abp.IdentityServer.ApiResources; using Volo.Abp.IdentityServer.ApiScopes; using Volo.Abp.IdentityServer.Clients; using Volo.Abp.IdentityServer.Devices; diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/AbpIdentityServerMongoDbContextExtensions.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/AbpIdentityServerMongoDbContextExtensions.cs index 026312312a..6abfc0618d 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/AbpIdentityServerMongoDbContextExtensions.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/AbpIdentityServerMongoDbContextExtensions.cs @@ -1,4 +1,5 @@ using System; +using Volo.Abp.IdentityServer.ApiResources; using Volo.Abp.IdentityServer.ApiScopes; using Volo.Abp.IdentityServer.Clients; using Volo.Abp.IdentityServer.Devices; diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/AbpIdentityServerMongoDbModule.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/AbpIdentityServerMongoDbModule.cs index 1924ad3a68..6cd13aac37 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/AbpIdentityServerMongoDbModule.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/AbpIdentityServerMongoDbModule.cs @@ -1,4 +1,5 @@ using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.IdentityServer.ApiResources; using Volo.Abp.IdentityServer.ApiScopes; using Volo.Abp.IdentityServer.Clients; using Volo.Abp.IdentityServer.Devices; diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/IAbpIdentityServerMongoDbContext.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/IAbpIdentityServerMongoDbContext.cs index ad1cfbfcf5..5b521f2600 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/IAbpIdentityServerMongoDbContext.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/IAbpIdentityServerMongoDbContext.cs @@ -1,12 +1,12 @@ using MongoDB.Driver; using Volo.Abp.Data; +using Volo.Abp.IdentityServer.ApiResources; using Volo.Abp.IdentityServer.ApiScopes; using Volo.Abp.IdentityServer.Clients; using Volo.Abp.IdentityServer.Devices; using Volo.Abp.IdentityServer.Grants; using Volo.Abp.IdentityServer.IdentityResources; using Volo.Abp.MongoDB; -using ApiResource = Volo.Abp.IdentityServer.ApiScopes.ApiResource; namespace Volo.Abp.IdentityServer.MongoDB { diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiResourceRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiResourceRepository.cs index c7a93cdb60..55a0cece76 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiResourceRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiResourceRepository.cs @@ -8,6 +8,7 @@ using MongoDB.Driver.Linq; using Volo.Abp.Domain.Repositories.MongoDB; using Volo.Abp.IdentityServer.ApiScopes; using System.Linq.Dynamic.Core; +using Volo.Abp.IdentityServer.ApiResources; using Volo.Abp.MongoDB; namespace Volo.Abp.IdentityServer.MongoDB diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Clients/ClientStore_Tests.cs b/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Clients/ClientStore_Tests.cs index e89f385b57..326edfd4ac 100644 --- a/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Clients/ClientStore_Tests.cs +++ b/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Clients/ClientStore_Tests.cs @@ -33,7 +33,7 @@ namespace Volo.Abp.IdentityServer.Clients client.ClientId.ShouldBe("42"); client.ProtocolType.ShouldBe("TestProtocol-42"); client.AllowedCorsOrigins.ShouldContain("Origin1"); - client.AllowedScopes.ShouldContain("api1"); + client.AllowedScopes.ShouldContain("Test-ApiScope-Name-1"); } } } diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs b/modules/identityserver/test/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs index 52fbc0513a..4b16d7de65 100644 --- a/modules/identityserver/test/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs +++ b/modules/identityserver/test/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs @@ -2,11 +2,13 @@ using IdentityServer4.Models; using Volo.Abp.DependencyInjection; using Volo.Abp.Guids; +using Volo.Abp.IdentityServer.ApiResources; using Volo.Abp.IdentityServer.ApiScopes; using Volo.Abp.IdentityServer.Clients; using Volo.Abp.IdentityServer.Grants; using Volo.Abp.IdentityServer.IdentityResources; -using ApiResource = Volo.Abp.IdentityServer.ApiScopes.ApiResource; +using ApiResource = Volo.Abp.IdentityServer.ApiResources.ApiResource; +using ApiScope = Volo.Abp.IdentityServer.ApiScopes.ApiScope; using Client = Volo.Abp.IdentityServer.Clients.Client; using IdentityResource = Volo.Abp.IdentityServer.IdentityResources.IdentityResource; using PersistedGrant = Volo.Abp.IdentityServer.Grants.PersistedGrant; @@ -21,6 +23,7 @@ namespace Volo.Abp.IdentityServer private readonly IClientRepository _clientRepository; private readonly IPersistentGrantRepository _persistentGrantRepository; private readonly IApiResourceRepository _apiResourceRepository; + private readonly IApiScopeRepository _apiScopeRepository; private readonly IIdentityResourceRepository _identityResourceRepository; public AbpIdentityServerTestDataBuilder( @@ -28,21 +31,64 @@ namespace Volo.Abp.IdentityServer IGuidGenerator guidGenerator, IPersistentGrantRepository persistentGrantRepository, IApiResourceRepository apiResourceRepository, - IIdentityResourceRepository identityResourceRepository) + IIdentityResourceRepository identityResourceRepository, + IApiScopeRepository apiScopeRepository) { _clientRepository = clientRepository; _guidGenerator = guidGenerator; _persistentGrantRepository = persistentGrantRepository; _apiResourceRepository = apiResourceRepository; _identityResourceRepository = identityResourceRepository; + _apiScopeRepository = apiScopeRepository; } public async Task BuildAsync() { - await AddClients(); - await AddPersistentGrants(); await AddApiResources(); + await AddApiScopes(); await AddIdentityResources(); + await AddClients(); + await AddPersistentGrants(); + } + + private async Task AddApiResources() + { + var apiResource = new ApiResource(_guidGenerator.Create(), "Test-ApiResource-Name-1") + { + Enabled = true, + Description = "Test-ApiResource-Description-1", + DisplayName = "Test-ApiResource-DisplayName-1" + }; + + apiResource.AddSecret("secret".Sha256()); + apiResource.AddScope("Test-ApiResource-ApiScope-Name-1"); + apiResource.AddScope("Test-ApiResource-ApiScope-DisplayName-1"); + apiResource.AddUserClaim("Test-ApiResource-Claim-Type-1"); + + await _apiResourceRepository.InsertAsync(apiResource); + } + + private async Task AddApiScopes() + { + var apiScope = new ApiScope(_guidGenerator.Create(), "Test-ApiScope-Name-1"); + + apiScope.AddUserClaim("Test-ApiScope-Claim-Type-1"); + await _apiScopeRepository.InsertAsync(apiScope); + } + + private async Task AddIdentityResources() + { + var identityResource = new IdentityResource(_guidGenerator.Create(), "Test-Identity-Resource-Name-1") + { + Description = "Test-Identity-Resource-Description-1", + DisplayName = "Test-Identity-Resource-DisplayName-1", + Required = true, + Emphasize = true + }; + + identityResource.AddUserClaim("Test-Identity-Resource-1-IdentityClaim-Type-1"); + + await _identityResourceRepository.InsertAsync(identityResource); } private async Task AddClients() @@ -54,7 +100,7 @@ namespace Volo.Abp.IdentityServer client42.AddCorsOrigin("Origin1"); - client42.AddScope("api1"); + client42.AddScope("Test-ApiScope-Name-1"); await _clientRepository.InsertAsync(client42); } @@ -98,36 +144,5 @@ namespace Volo.Abp.IdentityServer }); } - private async Task AddApiResources() - { - var apiResource = new ApiResource(_guidGenerator.Create(), "Test-ApiResource-Name-1") - { - Enabled = true, - Description = "Test-ApiResource-Description-1", - DisplayName = "Test-ApiResource-DisplayName-1" - }; - - apiResource.AddSecret("secret".Sha256()); - apiResource.AddScope("Test-ApiResource-ApiScope-Name-1"); - apiResource.AddScope("Test-ApiResource-ApiScope-DisplayName-1"); - apiResource.AddUserClaim("Test-ApiResource-Claim-Type-1"); - - await _apiResourceRepository.InsertAsync(apiResource); - } - - private async Task AddIdentityResources() - { - var identityResource = new IdentityResource(_guidGenerator.Create(), "Test-Identity-Resource-Name-1") - { - Description = "Test-Identity-Resource-Description-1", - DisplayName = "Test-Identity-Resource-DisplayName-1", - Required = true, - Emphasize = true - }; - - identityResource.AddUserClaim("Test-Identity-Resource-1-IdentityClaim-Type-1"); - - await _identityResourceRepository.InsertAsync(identityResource); - } } } diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs b/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs index a2cf0f428c..436bef1246 100644 --- a/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs +++ b/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs @@ -4,6 +4,7 @@ using System.Threading.Tasks; using Volo.Abp.DependencyInjection; using Volo.Abp.Guids; using Volo.Abp.Identity; +using Volo.Abp.IdentityServer.ApiResources; using Volo.Abp.IdentityServer.ApiScopes; using Volo.Abp.IdentityServer.Clients; using Volo.Abp.IdentityServer.Devices; diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/ApiResourceRepository_Tests.cs b/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/ApiResourceRepository_Tests.cs index d3350ab59f..08c900947a 100644 --- a/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/ApiResourceRepository_Tests.cs +++ b/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/ApiResourceRepository_Tests.cs @@ -1,6 +1,7 @@ using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; using Shouldly; +using Volo.Abp.IdentityServer.ApiResources; using Volo.Abp.IdentityServer.ApiScopes; using Volo.Abp.Modularity; using Xunit; diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/IdentityServer/IdentityServerDataSeedContributor.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/IdentityServer/IdentityServerDataSeedContributor.cs index 0662482b65..3aa7af4691 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/IdentityServer/IdentityServerDataSeedContributor.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/IdentityServer/IdentityServerDataSeedContributor.cs @@ -8,11 +8,12 @@ using Volo.Abp.Data; using Volo.Abp.DependencyInjection; using Volo.Abp.Guids; using Volo.Abp.IdentityServer.ApiScopes; +using Volo.Abp.IdentityServer.ApiResources; using Volo.Abp.IdentityServer.Clients; using Volo.Abp.IdentityServer.IdentityResources; using Volo.Abp.PermissionManagement; using Volo.Abp.Uow; -using ApiResource = Volo.Abp.IdentityServer.ApiScopes.ApiResource; +using ApiResource = Volo.Abp.IdentityServer.ApiResources.ApiResource; using ApiScope = Volo.Abp.IdentityServer.ApiScopes.ApiScope; using Client = Volo.Abp.IdentityServer.Clients.Client; diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/IdentityServer/IdentityServerDataSeedContributor.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/IdentityServer/IdentityServerDataSeedContributor.cs index 7937265409..c3213311a1 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/IdentityServer/IdentityServerDataSeedContributor.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/IdentityServer/IdentityServerDataSeedContributor.cs @@ -8,11 +8,12 @@ using Volo.Abp.Data; using Volo.Abp.DependencyInjection; using Volo.Abp.Guids; using Volo.Abp.IdentityServer.ApiScopes; +using Volo.Abp.IdentityServer.ApiResources; using Volo.Abp.IdentityServer.Clients; using Volo.Abp.IdentityServer.IdentityResources; using Volo.Abp.PermissionManagement; using Volo.Abp.Uow; -using ApiResource = Volo.Abp.IdentityServer.ApiScopes.ApiResource; +using ApiResource = Volo.Abp.IdentityServer.ApiResources.ApiResource; using ApiScope = Volo.Abp.IdentityServer.ApiScopes.ApiScope; using Client = Volo.Abp.IdentityServer.Clients.Client; @@ -142,14 +143,14 @@ namespace MyCompanyName.MyProjectName.IdentityServer } //Console Test Client - var consoleClientId = configurationSection["MyProjectName_App:ClientId"]; + var consoleClientId = configurationSection["MyProjectName_ConsoleTestApp:ClientId"]; if (!consoleClientId.IsNullOrWhiteSpace()) { await CreateClientAsync( name: consoleClientId, scopes: commonScopes, grantTypes: new[] {"password", "client_credentials"}, - secret: (configurationSection["MyProjectName_App:ClientSecret"] ?? "1q2w3e*").Sha256() + secret: (configurationSection["MyProjectName_ConsoleTestApp:ClientSecret"] ?? "1q2w3e*").Sha256() ); } } From b6676dc54c9c482582faff73a6e5dc2fe5fb85d4 Mon Sep 17 00:00:00 2001 From: maliming <6908465+maliming@users.noreply.github.com> Date: Tue, 14 Jul 2020 15:01:11 +0800 Subject: [PATCH 18/76] Add some methods. --- .../Localization/Resources/en.json | 3 +- .../Localization/Resources/zh-Hans.json | 3 +- .../ApiScopes/IApiScopeeRepository.cs | 20 ++++++++- .../IdentityResources/IdentityResource.cs | 20 +++++++++ .../ApiResources/ApiResourceRepository.cs | 14 +++++- .../ApiScopes/ApiScopeRepository.cs | 45 ++++++++++++++++++- .../MongoDB/MongoApiResourceRepository.cs | 2 +- .../MongoDB/MongoApiScopeRepository.cs | 22 ++++++++- 8 files changed, 120 insertions(+), 9 deletions(-) diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Localization/Resources/en.json b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Localization/Resources/en.json index f974297b06..22b5f13474 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Localization/Resources/en.json +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Localization/Resources/en.json @@ -3,10 +3,11 @@ "texts": { "Volo.IdentityServer:DuplicateIdentityResourceName": "Identity Resource name already exist: {Name}", "Volo.IdentityServer:DuplicateApiResourceName": "Api Resource name already exist: {Name}", + "Volo.IdentityServer:DuplicateApiScopeName": "Api Scope name already exist: {Name}", "Volo.IdentityServer:DuplicateClientId": "ClientId already exist: {ClientId}", "UserLockedOut": "The user account has been locked out due to invalid login attempts. Please wait a while and try again.", "InvalidUserNameOrPassword": "Invalid username or password!", "LoginIsNotAllowed": "You are not allowed to login! You need to confirm your email/phone number.", "InvalidUsername": "Invalid username or password!" } -} \ No newline at end of file +} diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Localization/Resources/zh-Hans.json b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Localization/Resources/zh-Hans.json index ac175e574d..1d40aa16b3 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Localization/Resources/zh-Hans.json +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Localization/Resources/zh-Hans.json @@ -3,10 +3,11 @@ "texts": { "Volo.IdentityServer:DuplicateIdentityResourceName": "Identity资源名称已存在: {Name}", "Volo.IdentityServer:DuplicateApiResourceName": "Api资源名称已存在: {Name}", + "Volo.IdentityServer:DuplicateApiScopeName": "Api Scope已存在: {Name}", "Volo.IdentityServer:DuplicateClientId": "ClientId已经存在: {ClientId}", "UserLockedOut": "登录失败,用户账户已被锁定.请稍后再试.", "InvalidUserNameOrPassword": "用户名或密码错误!", "LoginIsNotAllowed": "无法登录!你需要验证邮箱地址/手机号.", "InvalidUsername": "用户名或密码错误!" } -} \ No newline at end of file +} diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiScopes/IApiScopeeRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiScopes/IApiScopeeRepository.cs index c6ebcc26e5..a0aba8fe2a 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiScopes/IApiScopeeRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiScopes/IApiScopeeRepository.cs @@ -1,11 +1,12 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using Volo.Abp.Domain.Repositories; namespace Volo.Abp.IdentityServer.ApiScopes { - public interface IApiScopeRepository : IBasicRepository + public interface IApiScopeRepository : IBasicRepository { Task GetByNameAsync( string scopeName, @@ -18,5 +19,20 @@ namespace Volo.Abp.IdentityServer.ApiScopes bool includeDetails = false, CancellationToken cancellationToken = default ); + + Task> GetListAsync( + string sorting, + int skipCount, + int maxResultCount, + string filter = null, + bool includeDetails = false, + CancellationToken cancellationToken = default + ); + + Task CheckNameExistAsync( + string name, + Guid? expectedId = null, + CancellationToken cancellationToken = default + ); } } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityResources/IdentityResource.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityResources/IdentityResource.cs index 246e1ddf98..b5812da7e2 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityResources/IdentityResource.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityResources/IdentityResource.cs @@ -89,5 +89,25 @@ namespace Volo.Abp.IdentityServer.IdentityResources { return UserClaims.FirstOrDefault(c => c.Type == type); } + + public virtual void AddProperty([NotNull] string key, string value) + { + Properties.Add(new IdentityResourceProperty(Id, key, value)); + } + + public virtual void RemoveAllProperties() + { + Properties.Clear(); + } + + public virtual void RemoveProperty(string key) + { + Properties.RemoveAll(r => r.Key == key); + } + + public virtual IdentityResourceProperty FindProperty(string key) + { + return Properties.FirstOrDefault(r => r.Key == key); + } } } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiResourceRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiResourceRepository.cs index 4824696108..6718b20fb8 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiResourceRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiResourceRepository.cs @@ -68,7 +68,7 @@ namespace Volo.Abp.IdentityServer.ApiResources public virtual async Task CheckNameExistAsync(string name, Guid? expectedId = null, CancellationToken cancellationToken = default) { - return await DbSet.AnyAsync(ar => ar.Id != expectedId && ar.Name == name, cancellationToken: cancellationToken); + return await DbSet.AnyAsync(ar => ar.Id != expectedId && ar.Name == name, GetCancellationToken(cancellationToken)); } public override async Task DeleteAsync(Guid id, bool autoSave = false, CancellationToken cancellationToken = default) @@ -85,6 +85,18 @@ namespace Volo.Abp.IdentityServer.ApiResources DbContext.Set().Remove(scope); } + var resourceSecrets = DbContext.Set().Where(s => s.ApiResourceId == id); + foreach (var secret in resourceSecrets) + { + DbContext.Set().Remove(secret); + } + + var apiResourceProperties = DbContext.Set().Where(s => s.ApiResourceId == id); + foreach (var property in apiResourceProperties) + { + DbContext.Set().Remove(property); + } + await base.DeleteAsync(id, autoSave, cancellationToken); } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiScopes/ApiScopeRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiScopes/ApiScopeRepository.cs index b4674aad37..88772bfab7 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiScopes/ApiScopeRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiScopes/ApiScopeRepository.cs @@ -1,5 +1,7 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using System.Linq; +using System.Linq.Dynamic.Core; using System.Threading; using System.Threading.Tasks; using Microsoft.EntityFrameworkCore; @@ -9,7 +11,7 @@ using Volo.Abp.IdentityServer.EntityFrameworkCore; namespace Volo.Abp.IdentityServer.ApiScopes { - public class ApiScopeRepository : EfCoreRepository, IApiScopeRepository + public class ApiScopeRepository : EfCoreRepository, IApiScopeRepository { public ApiScopeRepository(IDbContextProvider dbContextProvider) : base( dbContextProvider) @@ -30,5 +32,44 @@ namespace Volo.Abp.IdentityServer.ApiScopes return await query.ToListAsync(GetCancellationToken(cancellationToken)); } + + public async Task> GetListAsync(string sorting, int skipCount, int maxResultCount, string filter = null, bool includeDetails = false, CancellationToken cancellationToken = default) + { + return await DbSet + .IncludeDetails(includeDetails) + .WhereIf(!filter.IsNullOrWhiteSpace(), x => x.Name.Contains(filter) || + x.Description.Contains(filter) || + x.DisplayName.Contains(filter)) + .OrderBy(sorting ?? "name desc") + .PageBy(skipCount, maxResultCount) + .ToListAsync(GetCancellationToken(cancellationToken)); + } + + public async Task CheckNameExistAsync(string name, Guid? expectedId = null, CancellationToken cancellationToken = default) + { + return await DbSet.AnyAsync(x => x.Id != expectedId && x.Name == name, GetCancellationToken(cancellationToken)); + } + + public override async Task DeleteAsync(Guid id, bool autoSave = false, CancellationToken cancellationToken = new CancellationToken()) + { + var scopeClaims = DbContext.Set().Where(sc => sc.ApiScopeId == id); + foreach (var claim in scopeClaims) + { + DbContext.Set().Remove(claim); + } + + var scopeProperties = DbContext.Set().Where(s => s.ApiScopeId == id); + foreach (var property in scopeProperties) + { + DbContext.Set().Remove(property); + } + + await base.DeleteAsync(id, autoSave, cancellationToken); + } + + public override IQueryable WithDetails() + { + return GetQueryable().IncludeDetails(); + } } } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiResourceRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiResourceRepository.cs index 55a0cece76..0f4337b895 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiResourceRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiResourceRepository.cs @@ -63,7 +63,7 @@ namespace Volo.Abp.IdentityServer.MongoDB public virtual async Task CheckNameExistAsync(string name, Guid? expectedId = null, CancellationToken cancellationToken = default) { - return await GetMongoQueryable().AnyAsync(ar => ar.Id != expectedId && ar.Name == name, cancellationToken: cancellationToken); + return await GetMongoQueryable().AnyAsync(ar => ar.Id != expectedId && ar.Name == name, GetCancellationToken(cancellationToken)); } } } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiScopeRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiScopeRepository.cs index 8a20b8ae2b..a446e772e8 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiScopeRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiScopeRepository.cs @@ -1,12 +1,13 @@ using System; using System.Collections.Generic; +using System.Linq; using System.Threading; using System.Threading.Tasks; -using System.Linq; using MongoDB.Driver; using MongoDB.Driver.Linq; using Volo.Abp.Domain.Repositories.MongoDB; using Volo.Abp.IdentityServer.ApiScopes; +using System.Linq.Dynamic.Core; using Volo.Abp.MongoDB; namespace Volo.Abp.IdentityServer.MongoDB @@ -33,5 +34,24 @@ namespace Volo.Abp.IdentityServer.MongoDB return await query.ToListAsync(GetCancellationToken(cancellationToken)); } + + public async Task> GetListAsync(string sorting, int skipCount, int maxResultCount, string filter = null, bool includeDetails = false, + CancellationToken cancellationToken = default) + { + return await GetMongoQueryable() + .WhereIf(!filter.IsNullOrWhiteSpace(), + x => x.Name.Contains(filter) || + x.Description.Contains(filter) || + x.DisplayName.Contains(filter)) + .OrderBy(sorting ?? nameof(ApiScope.Name)) + .As>() + .PageBy>(skipCount, maxResultCount) + .ToListAsync(GetCancellationToken(cancellationToken)); + } + + public async Task CheckNameExistAsync(string name, Guid? expectedId = null, CancellationToken cancellationToken = default) + { + return await GetMongoQueryable().AnyAsync(x => x.Id != expectedId && x.Name == name, GetCancellationToken(cancellationToken)); + } } } From 2fd086ea0cd60022e1cf857136d8d135b7685533 Mon Sep 17 00:00:00 2001 From: "lyon.han" Date: Thu, 30 Jul 2020 17:14:46 +0800 Subject: [PATCH 19/76] Update ClientRepository.cs --- .../Volo/Abp/IdentityServer/Clients/ClientRepository.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Clients/ClientRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Clients/ClientRepository.cs index 5b350d0365..6151d3fe03 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Clients/ClientRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Clients/ClientRepository.cs @@ -18,7 +18,7 @@ namespace Volo.Abp.IdentityServer.Clients } - public virtual async Task FindByCliendIdAsync( + public virtual async Task FindByClientIdAsync( string clientId, bool includeDetails = true, CancellationToken cancellationToken = default) From 9a3f363d3b6bb2f40bdb1f254f4afcf3d51b234e Mon Sep 17 00:00:00 2001 From: "lyon.han" Date: Thu, 30 Jul 2020 17:16:30 +0800 Subject: [PATCH 20/76] Update MongoClientRepository.cs --- .../Volo/Abp/IdentityServer/MongoDB/MongoClientRepository.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoClientRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoClientRepository.cs index 5855c42513..3f747e963d 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoClientRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoClientRepository.cs @@ -21,7 +21,7 @@ namespace Volo.Abp.IdentityServer.MongoDB { } - public virtual async Task FindByCliendIdAsync( + public virtual async Task FindByClientIdAsync( string clientId, bool includeDetails = true, CancellationToken cancellationToken = default) From 2423481c93182c6015c91f36e3b2a9409435ccb5 Mon Sep 17 00:00:00 2001 From: "lyon.han" Date: Thu, 30 Jul 2020 17:18:54 +0800 Subject: [PATCH 21/76] Update CorsPolicyService_Tests.cs --- .../Volo/Abp/IdentityServer/CorsPolicyService_Tests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/CorsPolicyService_Tests.cs b/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/CorsPolicyService_Tests.cs index af701cfc69..9f15cf56c1 100644 --- a/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/CorsPolicyService_Tests.cs +++ b/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/CorsPolicyService_Tests.cs @@ -35,7 +35,7 @@ namespace Volo.Abp.IdentityServer using (var uow = _unitOfWorkManager.Begin()) { - var client1 = await _clientRepository.FindByCliendIdAsync("ClientId1"); + var client1 = await _clientRepository.FindByClientIdAsync("ClientId1"); client1.AddCorsOrigin("https://new-origin.com"); await _clientRepository.UpdateAsync(client1); From 08368c91d5b619f40b10dd9b99ca891c3f75bd11 Mon Sep 17 00:00:00 2001 From: "lyon.han" Date: Thu, 30 Jul 2020 17:20:42 +0800 Subject: [PATCH 22/76] Update ClientRepository_Tests.cs --- .../Volo/Abp/IdentityServer/ClientRepository_Tests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/ClientRepository_Tests.cs b/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/ClientRepository_Tests.cs index 86f69610f5..8705a142ab 100644 --- a/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/ClientRepository_Tests.cs +++ b/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/ClientRepository_Tests.cs @@ -19,9 +19,9 @@ namespace Volo.Abp.IdentityServer } [Fact] - public async Task FindByCliendIdAsync() + public async Task FindByClientIdAsync() { - (await clientRepository.FindByCliendIdAsync("ClientId2")).ShouldNotBeNull(); + (await clientRepository.FindByClientIdAsync("ClientId2")).ShouldNotBeNull(); } [Fact] From 3be92953c8c42b7d54437b7bed44cc155958fd18 Mon Sep 17 00:00:00 2001 From: "lyon.han" Date: Thu, 30 Jul 2020 17:28:39 +0800 Subject: [PATCH 23/76] Update ClientStore.cs --- .../Volo/Abp/IdentityServer/Clients/ClientStore.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientStore.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientStore.cs index 2486bb0413..100d0e4184 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientStore.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientStore.cs @@ -17,7 +17,7 @@ namespace Volo.Abp.IdentityServer.Clients public virtual async Task FindClientByIdAsync(string clientId) { - var client = await ClientRepository.FindByCliendIdAsync(clientId); + var client = await ClientRepository.FindByClientIdAsync(clientId); return ObjectMapper.Map(client); } } From 3b43b8d17ca8484c879a60339f8c33c04433b029 Mon Sep 17 00:00:00 2001 From: "lyon.han" Date: Thu, 30 Jul 2020 17:30:45 +0800 Subject: [PATCH 24/76] Update IClientRepository.cs Spelling mistakes --- .../Volo/Abp/IdentityServer/Clients/IClientRepository.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/IClientRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/IClientRepository.cs index 606b0086bd..059882eb47 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/IClientRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/IClientRepository.cs @@ -9,7 +9,7 @@ namespace Volo.Abp.IdentityServer.Clients { public interface IClientRepository : IBasicRepository { - Task FindByCliendIdAsync( + Task FindByClientIdAsync( [NotNull] string clientId, bool includeDetails = true, CancellationToken cancellationToken = default @@ -32,4 +32,4 @@ namespace Volo.Abp.IdentityServer.Clients CancellationToken cancellationToken = default ); } -} \ No newline at end of file +} From 31f7ea37ef44281945a601547b232f33a7466298 Mon Sep 17 00:00:00 2001 From: maliming <6908465+maliming@users.noreply.github.com> Date: Thu, 30 Jul 2020 18:28:28 +0800 Subject: [PATCH 25/76] Update template projects migration. --- .../20200710064926_Initial.Designer.cs | 2025 ----------------- .../Migrations/20200710064926_Initial.cs | 1235 ---------- .../20200730102617_Initial.Designer.cs} | 232 +- .../Migrations/20200730102617_Initial.cs} | 100 + ...ectNameMigrationsDbContextModelSnapshot.cs | 64 +- .../20200710065039_Initial.Designer.cs | 1936 ---------------- .../Migrations/20200710065039_Initial.cs | 1183 ---------- .../20200730102718_Initial.Designer.cs} | 232 +- .../Migrations/20200730102718_Initial.cs} | 100 +- ...verHostMigrationsDbContextModelSnapshot.cs | 64 +- .../20200707075539_Initial.Designer.cs | 1043 --------- ....cs => 20200730102724_Initial.Designer.cs} | 2 +- ...2_Initial.cs => 20200730102724_Initial.cs} | 0 13 files changed, 520 insertions(+), 7696 deletions(-) delete mode 100644 templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200710064926_Initial.Designer.cs delete mode 100644 templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200710064926_Initial.cs rename templates/{module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20200707075532_Initial.Designer.cs => app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200730102617_Initial.Designer.cs} (91%) rename templates/{module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20200707075532_Initial.cs => app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200730102617_Initial.cs} (92%) delete mode 100644 templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20200710065039_Initial.Designer.cs delete mode 100644 templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20200710065039_Initial.cs rename templates/{app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200707075540_Initial.Designer.cs => module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20200730102718_Initial.Designer.cs} (95%) rename templates/{app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200707075540_Initial.cs => module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20200730102718_Initial.cs} (97%) delete mode 100644 templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20200707075539_Initial.Designer.cs rename templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/{20200710065052_Initial.Designer.cs => 20200730102724_Initial.Designer.cs} (99%) rename templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/{20200710065052_Initial.cs => 20200730102724_Initial.cs} (100%) diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200710064926_Initial.Designer.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200710064926_Initial.Designer.cs deleted file mode 100644 index e2ca97db45..0000000000 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200710064926_Initial.Designer.cs +++ /dev/null @@ -1,2025 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using MyCompanyName.MyProjectName.EntityFrameworkCore; -using Volo.Abp.EntityFrameworkCore; - -namespace MyCompanyName.MyProjectName.Migrations -{ - [DbContext(typeof(MyProjectNameMigrationsDbContext))] - [Migration("20200710064926_Initial")] - partial class Initial - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) - .HasAnnotation("ProductVersion", "3.1.5") - .HasAnnotation("Relational:MaxIdentifierLength", 128) - .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); - - modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ApplicationName") - .HasColumnName("ApplicationName") - .HasColumnType("nvarchar(96)") - .HasMaxLength(96); - - b.Property("BrowserInfo") - .HasColumnName("BrowserInfo") - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); - - b.Property("ClientId") - .HasColumnName("ClientId") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("ClientIpAddress") - .HasColumnName("ClientIpAddress") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("ClientName") - .HasColumnName("ClientName") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("Comments") - .HasColumnName("Comments") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("CorrelationId") - .HasColumnName("CorrelationId") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("Exceptions") - .HasColumnName("Exceptions") - .HasColumnType("nvarchar(4000)") - .HasMaxLength(4000); - - b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration") - .HasColumnType("int"); - - b.Property("ExecutionTime") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("HttpMethod") - .HasColumnName("HttpMethod") - .HasColumnType("nvarchar(16)") - .HasMaxLength(16); - - b.Property("HttpStatusCode") - .HasColumnName("HttpStatusCode") - .HasColumnType("int"); - - b.Property("ImpersonatorTenantId") - .HasColumnName("ImpersonatorTenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("ImpersonatorUserId") - .HasColumnName("ImpersonatorUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantName") - .HasColumnType("nvarchar(max)"); - - b.Property("Url") - .HasColumnName("Url") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("UserId") - .HasColumnName("UserId") - .HasColumnType("uniqueidentifier"); - - b.Property("UserName") - .HasColumnName("UserName") - .HasColumnType("nvarchar(256)") - .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("uniqueidentifier"); - - b.Property("AuditLogId") - .HasColumnName("AuditLogId") - .HasColumnType("uniqueidentifier"); - - b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration") - .HasColumnType("int"); - - b.Property("ExecutionTime") - .HasColumnName("ExecutionTime") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("MethodName") - .HasColumnName("MethodName") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("Parameters") - .HasColumnName("Parameters") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); - - b.Property("ServiceName") - .HasColumnName("ServiceName") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - 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("uniqueidentifier"); - - b.Property("AuditLogId") - .HasColumnName("AuditLogId") - .HasColumnType("uniqueidentifier"); - - b.Property("ChangeTime") - .HasColumnName("ChangeTime") - .HasColumnType("datetime2"); - - b.Property("ChangeType") - .HasColumnName("ChangeType") - .HasColumnType("tinyint"); - - b.Property("EntityId") - .IsRequired() - .HasColumnName("EntityId") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("EntityTenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("EntityTypeFullName") - .IsRequired() - .HasColumnName("EntityTypeFullName") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - 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("uniqueidentifier"); - - b.Property("EntityChangeId") - .HasColumnType("uniqueidentifier"); - - b.Property("NewValue") - .HasColumnName("NewValue") - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); - - b.Property("OriginalValue") - .HasColumnName("OriginalValue") - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); - - b.Property("PropertyName") - .IsRequired() - .HasColumnName("PropertyName") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("PropertyTypeFullName") - .IsRequired() - .HasColumnName("PropertyTypeFullName") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("EntityChangeId"); - - b.ToTable("AbpEntityPropertyChanges"); - }); - - modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("IsAbandoned") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("JobArgs") - .IsRequired() - .HasColumnType("nvarchar(max)") - .HasMaxLength(1048576); - - b.Property("JobName") - .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("LastTryTime") - .HasColumnType("datetime2"); - - b.Property("NextTryTime") - .HasColumnType("datetime2"); - - b.Property("Priority") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint") - .HasDefaultValue((byte)15); - - b.Property("TryCount") - .ValueGeneratedOnAdd() - .HasColumnType("smallint") - .HasDefaultValue((short)0); - - b.HasKey("Id"); - - b.HasIndex("IsAbandoned", "NextTryTime"); - - b.ToTable("AbpBackgroundJobs"); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("Name") - .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("ProviderKey") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("ProviderName") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("Value") - .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey"); - - b.ToTable("AbpFeatureValues"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("Description") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("IsStatic") - .HasColumnType("bit"); - - b.Property("Name") - .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("Regex") - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); - - b.Property("RegexDescription") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("Required") - .HasColumnType("bit"); - - b.Property("ValueType") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("AbpClaimTypes"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("IsDefault") - .HasColumnName("IsDefault") - .HasColumnType("bit"); - - b.Property("IsPublic") - .HasColumnName("IsPublic") - .HasColumnType("bit"); - - b.Property("IsStatic") - .HasColumnName("IsStatic") - .HasColumnType("bit"); - - b.Property("Name") - .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("NormalizedName") - .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - 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() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("ClaimValue") - .HasColumnType("nvarchar(1024)") - .HasMaxLength(1024); - - b.Property("RoleId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AbpRoleClaims"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("Action") - .HasColumnType("nvarchar(96)") - .HasMaxLength(96); - - b.Property("ApplicationName") - .HasColumnType("nvarchar(96)") - .HasMaxLength(96); - - b.Property("BrowserInfo") - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); - - b.Property("ClientId") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("ClientIpAddress") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("CorrelationId") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("CreationTime") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("Identity") - .HasColumnType("nvarchar(96)") - .HasMaxLength(96); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantName") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.Property("UserName") - .HasColumnType("nvarchar(256)") - .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("uniqueidentifier"); - - b.Property("AccessFailedCount") - .ValueGeneratedOnAdd() - .HasColumnName("AccessFailedCount") - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); - - b.Property("Email") - .IsRequired() - .HasColumnName("Email") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("EmailConfirmed") - .ValueGeneratedOnAdd() - .HasColumnName("EmailConfirmed") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); - - b.Property("LockoutEnabled") - .ValueGeneratedOnAdd() - .HasColumnName("LockoutEnabled") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("LockoutEnd") - .HasColumnType("datetimeoffset"); - - b.Property("Name") - .HasColumnName("Name") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("NormalizedEmail") - .IsRequired() - .HasColumnName("NormalizedEmail") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("NormalizedUserName") - .IsRequired() - .HasColumnName("NormalizedUserName") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("PasswordHash") - .HasColumnName("PasswordHash") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("PhoneNumber") - .HasColumnName("PhoneNumber") - .HasColumnType("nvarchar(16)") - .HasMaxLength(16); - - b.Property("PhoneNumberConfirmed") - .ValueGeneratedOnAdd() - .HasColumnName("PhoneNumberConfirmed") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("SecurityStamp") - .IsRequired() - .HasColumnName("SecurityStamp") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("Surname") - .HasColumnName("Surname") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("TwoFactorEnabled") - .ValueGeneratedOnAdd() - .HasColumnName("TwoFactorEnabled") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("UserName") - .IsRequired() - .HasColumnName("UserName") - .HasColumnType("nvarchar(256)") - .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("uniqueidentifier"); - - b.Property("ClaimType") - .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("ClaimValue") - .HasColumnType("nvarchar(1024)") - .HasMaxLength(1024); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - 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") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("ProviderDisplayName") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("ProviderKey") - .IsRequired() - .HasColumnType("nvarchar(196)") - .HasMaxLength(196); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - 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") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - 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") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - 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") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("Name") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("Value") - .HasColumnType("nvarchar(max)"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AbpUserTokens"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("Code") - .IsRequired() - .HasColumnName("Code") - .HasColumnType("nvarchar(95)") - .HasMaxLength(95); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); - - b.Property("DisplayName") - .IsRequired() - .HasColumnName("DisplayName") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); - - b.Property("ParentId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - 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") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("OrganizationUnitId", "RoleId"); - - b.HasIndex("RoleId", "OrganizationUnitId"); - - b.ToTable("AbpOrganizationUnitRoles"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); - - b.Property("Description") - .HasColumnType("nvarchar(1000)") - .HasMaxLength(1000); - - b.Property("DisplayName") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - - b.Property("Enabled") - .HasColumnType("bit"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); - - b.Property("Name") - .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - - b.Property("Properties") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.ToTable("IdentityServerApiResources"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => - { - b.Property("ApiResourceId") - .HasColumnType("uniqueidentifier"); - - b.Property("Type") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - - b.HasKey("ApiResourceId", "Type"); - - b.ToTable("IdentityServerApiClaims"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScope", b => - { - b.Property("ApiResourceId") - .HasColumnType("uniqueidentifier"); - - b.Property("Name") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - - b.Property("Description") - .HasColumnType("nvarchar(1000)") - .HasMaxLength(1000); - - b.Property("DisplayName") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - - b.Property("Emphasize") - .HasColumnType("bit"); - - b.Property("Required") - .HasColumnType("bit"); - - b.Property("ShowInDiscoveryDocument") - .HasColumnType("bit"); - - b.HasKey("ApiResourceId", "Name"); - - b.ToTable("IdentityServerApiScopes"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b => - { - b.Property("ApiResourceId") - .HasColumnType("uniqueidentifier"); - - b.Property("Name") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - - b.Property("Type") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - - b.HasKey("ApiResourceId", "Name", "Type"); - - b.ToTable("IdentityServerApiScopeClaims"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b => - { - b.Property("ApiResourceId") - .HasColumnType("uniqueidentifier"); - - b.Property("Type") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); - - b.Property("Value") - .HasColumnType("nvarchar(4000)") - .HasMaxLength(4000); - - b.Property("Description") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); - - b.Property("Expiration") - .HasColumnType("datetime2"); - - b.HasKey("ApiResourceId", "Type", "Value"); - - b.ToTable("IdentityServerApiSecrets"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .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("AlwaysIncludeUserClaimsInIdToken") - .HasColumnType("bit"); - - b.Property("AlwaysSendClientClaims") - .HasColumnType("bit"); - - b.Property("AuthorizationCodeLifetime") - .HasColumnType("int"); - - b.Property("BackChannelLogoutSessionRequired") - .HasColumnType("bit"); - - b.Property("BackChannelLogoutUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); - - b.Property("ClientClaimsPrefix") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - - b.Property("ClientId") - .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - - b.Property("ClientName") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - - b.Property("ClientUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("ConsentLifetime") - .HasColumnType("int"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); - - b.Property("Description") - .HasColumnType("nvarchar(1000)") - .HasMaxLength(1000); - - b.Property("DeviceCodeLifetime") - .HasColumnType("int"); - - b.Property("EnableLocalLogin") - .HasColumnType("bit"); - - b.Property("Enabled") - .HasColumnType("bit"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("FrontChannelLogoutSessionRequired") - .HasColumnType("bit"); - - b.Property("FrontChannelLogoutUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); - - b.Property("IdentityTokenLifetime") - .HasColumnType("int"); - - b.Property("IncludeJwtId") - .HasColumnType("bit"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); - - b.Property("LogoUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); - - b.Property("PairWiseSubjectSalt") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - - b.Property("ProtocolType") - .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - - b.Property("RefreshTokenExpiration") - .HasColumnType("int"); - - b.Property("RefreshTokenUsage") - .HasColumnType("int"); - - b.Property("RequireClientSecret") - .HasColumnType("bit"); - - b.Property("RequireConsent") - .HasColumnType("bit"); - - b.Property("RequirePkce") - .HasColumnType("bit"); - - b.Property("SlidingRefreshTokenLifetime") - .HasColumnType("int"); - - b.Property("UpdateAccessTokenClaimsOnRefresh") - .HasColumnType("bit"); - - b.Property("UserCodeType") - .HasColumnType("nvarchar(100)") - .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("uniqueidentifier"); - - b.Property("Type") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); - - b.Property("Value") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); - - b.HasKey("ClientId", "Type", "Value"); - - b.ToTable("IdentityServerClientClaims"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b => - { - b.Property("ClientId") - .HasColumnType("uniqueidentifier"); - - b.Property("Origin") - .HasColumnType("nvarchar(150)") - .HasMaxLength(150); - - b.HasKey("ClientId", "Origin"); - - b.ToTable("IdentityServerClientCorsOrigins"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b => - { - b.Property("ClientId") - .HasColumnType("uniqueidentifier"); - - b.Property("GrantType") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); - - b.HasKey("ClientId", "GrantType"); - - b.ToTable("IdentityServerClientGrantTypes"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b => - { - b.Property("ClientId") - .HasColumnType("uniqueidentifier"); - - b.Property("Provider") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - - b.HasKey("ClientId", "Provider"); - - b.ToTable("IdentityServerClientIdPRestrictions"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b => - { - b.Property("ClientId") - .HasColumnType("uniqueidentifier"); - - b.Property("PostLogoutRedirectUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); - - b.HasKey("ClientId", "PostLogoutRedirectUri"); - - b.ToTable("IdentityServerClientPostLogoutRedirectUris"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b => - { - b.Property("ClientId") - .HasColumnType("uniqueidentifier"); - - b.Property("Key") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); - - b.Property("Value") - .IsRequired() - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); - - b.HasKey("ClientId", "Key"); - - b.ToTable("IdentityServerClientProperties"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b => - { - b.Property("ClientId") - .HasColumnType("uniqueidentifier"); - - b.Property("RedirectUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); - - b.HasKey("ClientId", "RedirectUri"); - - b.ToTable("IdentityServerClientRedirectUris"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b => - { - b.Property("ClientId") - .HasColumnType("uniqueidentifier"); - - b.Property("Scope") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - - b.HasKey("ClientId", "Scope"); - - b.ToTable("IdentityServerClientScopes"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b => - { - b.Property("ClientId") - .HasColumnType("uniqueidentifier"); - - b.Property("Type") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); - - b.Property("Value") - .HasColumnType("nvarchar(4000)") - .HasMaxLength(4000); - - b.Property("Description") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); - - b.Property("Expiration") - .HasColumnType("datetime2"); - - b.HasKey("ClientId", "Type", "Value"); - - b.ToTable("IdentityServerClientSecrets"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Devices.DeviceFlowCodes", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ClientId") - .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); - - b.Property("Data") - .IsRequired() - .HasColumnType("nvarchar(max)") - .HasMaxLength(50000); - - b.Property("DeviceCode") - .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - - b.Property("Expiration") - .IsRequired() - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("SubjectId") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - - b.Property("UserCode") - .IsRequired() - .HasColumnType("nvarchar(200)") - .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("nvarchar(200)") - .HasMaxLength(200); - - b.Property("ClientId") - .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnType("datetime2"); - - b.Property("Data") - .IsRequired() - .HasColumnType("nvarchar(max)") - .HasMaxLength(50000); - - b.Property("Expiration") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("SubjectId") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - - b.Property("Type") - .IsRequired() - .HasColumnType("nvarchar(50)") - .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("uniqueidentifier"); - - b.Property("Type") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - - b.HasKey("IdentityResourceId", "Type"); - - b.ToTable("IdentityServerIdentityClaims"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); - - b.Property("Description") - .HasColumnType("nvarchar(1000)") - .HasMaxLength(1000); - - b.Property("DisplayName") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - - b.Property("Emphasize") - .HasColumnType("bit"); - - b.Property("Enabled") - .HasColumnType("bit"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); - - b.Property("Name") - .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - - b.Property("Properties") - .HasColumnType("nvarchar(max)"); - - b.Property("Required") - .HasColumnType("bit"); - - b.Property("ShowInDiscoveryDocument") - .HasColumnType("bit"); - - b.HasKey("Id"); - - b.ToTable("IdentityServerIdentityResources"); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("Name") - .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("ProviderKey") - .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("ProviderName") - .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey"); - - b.ToTable("AbpPermissionGrants"); - }); - - modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("Name") - .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("ProviderKey") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("ProviderName") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("Value") - .IsRequired() - .HasColumnType("nvarchar(2048)") - .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("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); - - b.Property("Name") - .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("AbpTenants"); - }); - - modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => - { - b.Property("TenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("Name") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("Value") - .IsRequired() - .HasColumnType("nvarchar(1024)") - .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.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(); - }); - - 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/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200710064926_Initial.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200710064926_Initial.cs deleted file mode 100644 index 2c82babc5b..0000000000 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200710064926_Initial.cs +++ /dev/null @@ -1,1235 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace MyCompanyName.MyProjectName.Migrations -{ - public partial class Initial : 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: "AbpBackgroundJobs", - columns: table => new - { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - JobName = table.Column(maxLength: 128, nullable: false), - JobArgs = table.Column(maxLength: 1048576, nullable: false), - TryCount = table.Column(nullable: false, defaultValue: (short)0), - CreationTime = table.Column(nullable: false), - NextTryTime = table.Column(nullable: false), - LastTryTime = table.Column(nullable: true), - IsAbandoned = table.Column(nullable: false, defaultValue: false), - Priority = table.Column(nullable: false, defaultValue: (byte)15) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpBackgroundJobs", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AbpClaimTypes", - columns: table => new - { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - 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: "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.CreateTable( - name: "AbpOrganizationUnits", - 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), - 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: "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: "AbpRoles", - 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), - 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: "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.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: "AbpUsers", - 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), - 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(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: 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(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), - 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(maxLength: 40, 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(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: 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(maxLength: 40, 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: 50000, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerPersistedGrants", x => x.Key); - }); - - 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: "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_OrganizationUnitId", - column: x => x.OrganizationUnitId, - principalTable: "AbpOrganizationUnits", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_AbpOrganizationUnitRoles_AbpRoles_RoleId", - column: x => x.RoleId, - principalTable: "AbpRoles", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AbpRoleClaims", - columns: table => new - { - Id = table.Column(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: "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.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: "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_OrganizationUnitId", - column: x => x.OrganizationUnitId, - principalTable: "AbpOrganizationUnits", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_AbpUserOrganizationUnits_AbpUsers_UserId", - column: x => x.UserId, - principalTable: "AbpUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AbpUserRoles", - columns: table => new - { - UserId = table.Column(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_ApiResourceId", - 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_ApiResourceId", - 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: 4000, 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_ApiResourceId", - 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_ClientId", - 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_ClientId", - 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: 2000, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerClientPostLogoutRedirectUris", x => new { x.ClientId, x.PostLogoutRedirectUri }); - table.ForeignKey( - name: "FK_IdentityServerClientPostLogoutRedirectUris_IdentityServerClients_ClientId", - 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: 2000, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerClientRedirectUris", x => new { x.ClientId, x.RedirectUri }); - table.ForeignKey( - name: "FK_IdentityServerClientRedirectUris_IdentityServerClients_ClientId", - 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: 4000, 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_IdentityResourceId", - column: x => x.IdentityResourceId, - principalTable: "IdentityServerIdentityResources", - 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.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_ApiResourceId_Name", - columns: x => new { x.ApiResourceId, x.Name }, - principalTable: "IdentityServerApiScopes", - principalColumns: new[] { "ApiResourceId", "Name" }, - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateIndex( - name: "IX_AbpAuditLogActions_AuditLogId", - table: "AbpAuditLogActions", - column: "AuditLogId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpAuditLogActions_TenantId_ServiceName_MethodName_ExecutionTime", - table: "AbpAuditLogActions", - columns: new[] { "TenantId", "ServiceName", "MethodName", "ExecutionTime" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpAuditLogs_TenantId_ExecutionTime", - table: "AbpAuditLogs", - columns: new[] { "TenantId", "ExecutionTime" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpAuditLogs_TenantId_UserId_ExecutionTime", - table: "AbpAuditLogs", - columns: new[] { "TenantId", "UserId", "ExecutionTime" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpBackgroundJobs_IsAbandoned_NextTryTime", - table: "AbpBackgroundJobs", - columns: new[] { "IsAbandoned", "NextTryTime" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpEntityChanges_AuditLogId", - table: "AbpEntityChanges", - column: "AuditLogId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpEntityChanges_TenantId_EntityTypeFullName_EntityId", - table: "AbpEntityChanges", - columns: new[] { "TenantId", "EntityTypeFullName", "EntityId" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpEntityPropertyChanges_EntityChangeId", - table: "AbpEntityPropertyChanges", - column: "EntityChangeId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpFeatureValues_Name_ProviderName_ProviderKey", - table: "AbpFeatureValues", - columns: new[] { "Name", "ProviderName", "ProviderKey" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpOrganizationUnitRoles_RoleId_OrganizationUnitId", - table: "AbpOrganizationUnitRoles", - columns: new[] { "RoleId", "OrganizationUnitId" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpOrganizationUnits_Code", - table: "AbpOrganizationUnits", - column: "Code"); - - migrationBuilder.CreateIndex( - name: "IX_AbpOrganizationUnits_ParentId", - table: "AbpOrganizationUnits", - column: "ParentId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpPermissionGrants_Name_ProviderName_ProviderKey", - table: "AbpPermissionGrants", - columns: new[] { "Name", "ProviderName", "ProviderKey" }); - - 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_AbpSettings_Name_ProviderName_ProviderKey", - table: "AbpSettings", - columns: new[] { "Name", "ProviderName", "ProviderKey" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpTenants_Name", - table: "AbpTenants", - column: "Name"); - - 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", - 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: "AbpAuditLogActions"); - - migrationBuilder.DropTable( - name: "AbpBackgroundJobs"); - - migrationBuilder.DropTable( - name: "AbpClaimTypes"); - - migrationBuilder.DropTable( - name: "AbpEntityPropertyChanges"); - - migrationBuilder.DropTable( - name: "AbpFeatureValues"); - - migrationBuilder.DropTable( - name: "AbpOrganizationUnitRoles"); - - migrationBuilder.DropTable( - name: "AbpPermissionGrants"); - - migrationBuilder.DropTable( - name: "AbpRoleClaims"); - - migrationBuilder.DropTable( - name: "AbpSecurityLogs"); - - migrationBuilder.DropTable( - name: "AbpSettings"); - - migrationBuilder.DropTable( - name: "AbpTenantConnectionStrings"); - - migrationBuilder.DropTable( - name: "AbpUserClaims"); - - migrationBuilder.DropTable( - name: "AbpUserLogins"); - - migrationBuilder.DropTable( - name: "AbpUserOrganizationUnits"); - - 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: "AbpEntityChanges"); - - migrationBuilder.DropTable( - name: "AbpTenants"); - - migrationBuilder.DropTable( - name: "AbpOrganizationUnits"); - - migrationBuilder.DropTable( - name: "AbpRoles"); - - migrationBuilder.DropTable( - name: "AbpUsers"); - - migrationBuilder.DropTable( - name: "IdentityServerApiScopes"); - - migrationBuilder.DropTable( - name: "IdentityServerClients"); - - migrationBuilder.DropTable( - name: "IdentityServerIdentityResources"); - - migrationBuilder.DropTable( - name: "AbpAuditLogs"); - - migrationBuilder.DropTable( - name: "IdentityServerApiResources"); - } - } -} diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20200707075532_Initial.Designer.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200730102617_Initial.Designer.cs similarity index 91% rename from templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20200707075532_Initial.Designer.cs rename to templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200730102617_Initial.Designer.cs index 59e4e386ff..780d19f859 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20200707075532_Initial.Designer.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200730102617_Initial.Designer.cs @@ -10,8 +10,8 @@ using Volo.Abp.EntityFrameworkCore; namespace MyCompanyName.MyProjectName.Migrations { - [DbContext(typeof(IdentityServerHostMigrationsDbContext))] - [Migration("20200707075532_Initial")] + [DbContext(typeof(MyProjectNameMigrationsDbContext))] + [Migration("20200730102617_Initial")] partial class Initial { protected override void BuildTargetModel(ModelBuilder modelBuilder) @@ -275,6 +275,95 @@ namespace MyCompanyName.MyProjectName.Migrations b.ToTable("AbpEntityPropertyChanges"); }); + modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(40)") + .HasMaxLength(40); + + b.Property("CreationTime") + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("IsAbandoned") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobArgs") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasMaxLength(1048576); + + b.Property("JobName") + .IsRequired() + .HasColumnType("nvarchar(128)") + .HasMaxLength(128); + + b.Property("LastTryTime") + .HasColumnType("datetime2"); + + b.Property("NextTryTime") + .HasColumnType("datetime2"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint") + .HasDefaultValue((byte)15); + + b.Property("TryCount") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasDefaultValue((short)0); + + b.HasKey("Id"); + + b.HasIndex("IsAbandoned", "NextTryTime"); + + b.ToTable("AbpBackgroundJobs"); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasColumnType("nvarchar(128)") + .HasMaxLength(128); + + b.Property("ProviderKey") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("ProviderName") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("Value") + .IsRequired() + .HasColumnType("nvarchar(128)") + .HasMaxLength(128); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey"); + + b.ToTable("AbpFeatureValues"); + }); + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => { b.Property("Id") @@ -399,6 +488,81 @@ namespace MyCompanyName.MyProjectName.Migrations b.ToTable("AbpRoleClaims"); }); + modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Action") + .HasColumnType("nvarchar(96)") + .HasMaxLength(96); + + b.Property("ApplicationName") + .HasColumnType("nvarchar(96)") + .HasMaxLength(96); + + b.Property("BrowserInfo") + .HasColumnType("nvarchar(512)") + .HasMaxLength(512); + + b.Property("ClientId") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("ClientIpAddress") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(40)") + .HasMaxLength(40); + + b.Property("CorrelationId") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("Identity") + .HasColumnType("nvarchar(96)") + .HasMaxLength(96); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantName") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserName") + .HasColumnType("nvarchar(256)") + .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") @@ -774,25 +938,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.ToTable("AbpOrganizationUnitRoles"); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b => - { - b.Property("ApiResourceId") - .HasColumnType("uniqueidentifier"); - - b.Property("Key") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); - - b.Property("Value") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); - - b.HasKey("ApiResourceId", "Key", "Value"); - - b.ToTable("IdentityServerApiResourceProperties"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResource", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -869,7 +1015,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.ToTable("IdentityServerApiResources"); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceClaim", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => { b.Property("ApiResourceId") .HasColumnType("uniqueidentifier"); @@ -883,7 +1029,25 @@ namespace MyCompanyName.MyProjectName.Migrations b.ToTable("IdentityServerApiResourceClaims"); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceScope", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b => + { + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); + + b.Property("Key") + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); + + b.Property("Value") + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); + + b.HasKey("ApiResourceId", "Key", "Value"); + + b.ToTable("IdentityServerApiResourceProperties"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceScope", b => { b.Property("ApiResourceId") .HasColumnType("uniqueidentifier"); @@ -897,7 +1061,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.ToTable("IdentityServerApiResourceScopes"); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceSecret", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceSecret", b => { b.Property("ApiResourceId") .HasColumnType("uniqueidentifier"); @@ -1866,36 +2030,36 @@ namespace MyCompanyName.MyProjectName.Migrations .IsRequired(); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiResource", null) - .WithMany("Properties") + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) + .WithMany("UserClaims") .HasForeignKey("ApiResourceId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceClaim", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiResource", null) - .WithMany("UserClaims") + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) + .WithMany("Properties") .HasForeignKey("ApiResourceId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceScope", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceScope", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiResource", null) + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) .WithMany("Scopes") .HasForeignKey("ApiResourceId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceSecret", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceSecret", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiResource", null) + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) .WithMany("Secrets") .HasForeignKey("ApiResourceId") .OnDelete(DeleteBehavior.Cascade) diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20200707075532_Initial.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200730102617_Initial.cs similarity index 92% rename from templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20200707075532_Initial.cs rename to templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200730102617_Initial.cs index 2ee3b628fb..690275f181 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20200707075532_Initial.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200730102617_Initial.cs @@ -39,6 +39,27 @@ namespace MyCompanyName.MyProjectName.Migrations table.PrimaryKey("PK_AbpAuditLogs", x => x.Id); }); + migrationBuilder.CreateTable( + name: "AbpBackgroundJobs", + columns: table => new + { + Id = table.Column(nullable: false), + ExtraProperties = table.Column(nullable: true), + ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), + JobName = table.Column(maxLength: 128, nullable: false), + JobArgs = table.Column(maxLength: 1048576, nullable: false), + TryCount = table.Column(nullable: false, defaultValue: (short)0), + CreationTime = table.Column(nullable: false), + NextTryTime = table.Column(nullable: false), + LastTryTime = table.Column(nullable: true), + IsAbandoned = table.Column(nullable: false, defaultValue: false), + Priority = table.Column(nullable: false, defaultValue: (byte)15) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpBackgroundJobs", x => x.Id); + }); + migrationBuilder.CreateTable( name: "AbpClaimTypes", columns: table => new @@ -59,6 +80,21 @@ namespace MyCompanyName.MyProjectName.Migrations table.PrimaryKey("PK_AbpClaimTypes", x => x.Id); }); + 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.CreateTable( name: "AbpOrganizationUnits", columns: table => new @@ -123,6 +159,31 @@ namespace MyCompanyName.MyProjectName.Migrations table.PrimaryKey("PK_AbpRoles", x => x.Id); }); + 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.CreateTable( name: "AbpSettings", columns: table => new @@ -972,6 +1033,11 @@ namespace MyCompanyName.MyProjectName.Migrations table: "AbpAuditLogs", columns: new[] { "TenantId", "UserId", "ExecutionTime" }); + migrationBuilder.CreateIndex( + name: "IX_AbpBackgroundJobs_IsAbandoned_NextTryTime", + table: "AbpBackgroundJobs", + columns: new[] { "IsAbandoned", "NextTryTime" }); + migrationBuilder.CreateIndex( name: "IX_AbpEntityChanges_AuditLogId", table: "AbpEntityChanges", @@ -987,6 +1053,11 @@ namespace MyCompanyName.MyProjectName.Migrations table: "AbpEntityPropertyChanges", column: "EntityChangeId"); + migrationBuilder.CreateIndex( + name: "IX_AbpFeatureValues_Name_ProviderName_ProviderKey", + table: "AbpFeatureValues", + columns: new[] { "Name", "ProviderName", "ProviderKey" }); + migrationBuilder.CreateIndex( name: "IX_AbpOrganizationUnitRoles_RoleId_OrganizationUnitId", table: "AbpOrganizationUnitRoles", @@ -1017,6 +1088,26 @@ namespace MyCompanyName.MyProjectName.Migrations 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_AbpSettings_Name_ProviderName_ProviderKey", table: "AbpSettings", @@ -1127,12 +1218,18 @@ namespace MyCompanyName.MyProjectName.Migrations migrationBuilder.DropTable( name: "AbpAuditLogActions"); + migrationBuilder.DropTable( + name: "AbpBackgroundJobs"); + migrationBuilder.DropTable( name: "AbpClaimTypes"); migrationBuilder.DropTable( name: "AbpEntityPropertyChanges"); + migrationBuilder.DropTable( + name: "AbpFeatureValues"); + migrationBuilder.DropTable( name: "AbpOrganizationUnitRoles"); @@ -1142,6 +1239,9 @@ namespace MyCompanyName.MyProjectName.Migrations migrationBuilder.DropTable( name: "AbpRoleClaims"); + migrationBuilder.DropTable( + name: "AbpSecurityLogs"); + migrationBuilder.DropTable( name: "AbpSettings"); diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/MyProjectNameMigrationsDbContextModelSnapshot.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/MyProjectNameMigrationsDbContextModelSnapshot.cs index 26286c9be6..34c4149b92 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/MyProjectNameMigrationsDbContextModelSnapshot.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/MyProjectNameMigrationsDbContextModelSnapshot.cs @@ -936,25 +936,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.ToTable("AbpOrganizationUnitRoles"); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b => - { - b.Property("ApiResourceId") - .HasColumnType("uniqueidentifier"); - - b.Property("Key") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); - - b.Property("Value") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); - - b.HasKey("ApiResourceId", "Key", "Value"); - - b.ToTable("IdentityServerApiResourceProperties"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResource", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -1031,7 +1013,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.ToTable("IdentityServerApiResources"); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceClaim", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => { b.Property("ApiResourceId") .HasColumnType("uniqueidentifier"); @@ -1045,7 +1027,25 @@ namespace MyCompanyName.MyProjectName.Migrations b.ToTable("IdentityServerApiResourceClaims"); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceScope", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b => + { + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); + + b.Property("Key") + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); + + b.Property("Value") + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); + + b.HasKey("ApiResourceId", "Key", "Value"); + + b.ToTable("IdentityServerApiResourceProperties"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceScope", b => { b.Property("ApiResourceId") .HasColumnType("uniqueidentifier"); @@ -1059,7 +1059,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.ToTable("IdentityServerApiResourceScopes"); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceSecret", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceSecret", b => { b.Property("ApiResourceId") .HasColumnType("uniqueidentifier"); @@ -2028,36 +2028,36 @@ namespace MyCompanyName.MyProjectName.Migrations .IsRequired(); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiResource", null) - .WithMany("Properties") + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) + .WithMany("UserClaims") .HasForeignKey("ApiResourceId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceClaim", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiResource", null) - .WithMany("UserClaims") + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) + .WithMany("Properties") .HasForeignKey("ApiResourceId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceScope", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceScope", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiResource", null) + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) .WithMany("Scopes") .HasForeignKey("ApiResourceId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceSecret", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceSecret", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiResource", null) + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) .WithMany("Secrets") .HasForeignKey("ApiResourceId") .OnDelete(DeleteBehavior.Cascade) diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20200710065039_Initial.Designer.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20200710065039_Initial.Designer.cs deleted file mode 100644 index 00033c31b9..0000000000 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20200710065039_Initial.Designer.cs +++ /dev/null @@ -1,1936 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using MyCompanyName.MyProjectName.EntityFrameworkCore; -using Volo.Abp.EntityFrameworkCore; - -namespace MyCompanyName.MyProjectName.Migrations -{ - [DbContext(typeof(IdentityServerHostMigrationsDbContext))] - [Migration("20200710065039_Initial")] - partial class Initial - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) - .HasAnnotation("ProductVersion", "3.1.5") - .HasAnnotation("Relational:MaxIdentifierLength", 128) - .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); - - modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ApplicationName") - .HasColumnName("ApplicationName") - .HasColumnType("nvarchar(96)") - .HasMaxLength(96); - - b.Property("BrowserInfo") - .HasColumnName("BrowserInfo") - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); - - b.Property("ClientId") - .HasColumnName("ClientId") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("ClientIpAddress") - .HasColumnName("ClientIpAddress") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("ClientName") - .HasColumnName("ClientName") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("Comments") - .HasColumnName("Comments") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("CorrelationId") - .HasColumnName("CorrelationId") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("Exceptions") - .HasColumnName("Exceptions") - .HasColumnType("nvarchar(4000)") - .HasMaxLength(4000); - - b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration") - .HasColumnType("int"); - - b.Property("ExecutionTime") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("HttpMethod") - .HasColumnName("HttpMethod") - .HasColumnType("nvarchar(16)") - .HasMaxLength(16); - - b.Property("HttpStatusCode") - .HasColumnName("HttpStatusCode") - .HasColumnType("int"); - - b.Property("ImpersonatorTenantId") - .HasColumnName("ImpersonatorTenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("ImpersonatorUserId") - .HasColumnName("ImpersonatorUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantName") - .HasColumnType("nvarchar(max)"); - - b.Property("Url") - .HasColumnName("Url") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("UserId") - .HasColumnName("UserId") - .HasColumnType("uniqueidentifier"); - - b.Property("UserName") - .HasColumnName("UserName") - .HasColumnType("nvarchar(256)") - .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("uniqueidentifier"); - - b.Property("AuditLogId") - .HasColumnName("AuditLogId") - .HasColumnType("uniqueidentifier"); - - b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration") - .HasColumnType("int"); - - b.Property("ExecutionTime") - .HasColumnName("ExecutionTime") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("MethodName") - .HasColumnName("MethodName") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("Parameters") - .HasColumnName("Parameters") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); - - b.Property("ServiceName") - .HasColumnName("ServiceName") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - 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("uniqueidentifier"); - - b.Property("AuditLogId") - .HasColumnName("AuditLogId") - .HasColumnType("uniqueidentifier"); - - b.Property("ChangeTime") - .HasColumnName("ChangeTime") - .HasColumnType("datetime2"); - - b.Property("ChangeType") - .HasColumnName("ChangeType") - .HasColumnType("tinyint"); - - b.Property("EntityId") - .IsRequired() - .HasColumnName("EntityId") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("EntityTenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("EntityTypeFullName") - .IsRequired() - .HasColumnName("EntityTypeFullName") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - 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("uniqueidentifier"); - - b.Property("EntityChangeId") - .HasColumnType("uniqueidentifier"); - - b.Property("NewValue") - .HasColumnName("NewValue") - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); - - b.Property("OriginalValue") - .HasColumnName("OriginalValue") - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); - - b.Property("PropertyName") - .IsRequired() - .HasColumnName("PropertyName") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("PropertyTypeFullName") - .IsRequired() - .HasColumnName("PropertyTypeFullName") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("EntityChangeId"); - - b.ToTable("AbpEntityPropertyChanges"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("Description") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("IsStatic") - .HasColumnType("bit"); - - b.Property("Name") - .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("Regex") - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); - - b.Property("RegexDescription") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("Required") - .HasColumnType("bit"); - - b.Property("ValueType") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("AbpClaimTypes"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("IsDefault") - .HasColumnName("IsDefault") - .HasColumnType("bit"); - - b.Property("IsPublic") - .HasColumnName("IsPublic") - .HasColumnType("bit"); - - b.Property("IsStatic") - .HasColumnName("IsStatic") - .HasColumnType("bit"); - - b.Property("Name") - .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("NormalizedName") - .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - 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() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("ClaimValue") - .HasColumnType("nvarchar(1024)") - .HasMaxLength(1024); - - b.Property("RoleId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AbpRoleClaims"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("Action") - .HasColumnType("nvarchar(96)") - .HasMaxLength(96); - - b.Property("ApplicationName") - .HasColumnType("nvarchar(96)") - .HasMaxLength(96); - - b.Property("BrowserInfo") - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); - - b.Property("ClientId") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("ClientIpAddress") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("CorrelationId") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("CreationTime") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("Identity") - .HasColumnType("nvarchar(96)") - .HasMaxLength(96); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantName") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.Property("UserName") - .HasColumnType("nvarchar(256)") - .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("uniqueidentifier"); - - b.Property("AccessFailedCount") - .ValueGeneratedOnAdd() - .HasColumnName("AccessFailedCount") - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); - - b.Property("Email") - .IsRequired() - .HasColumnName("Email") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("EmailConfirmed") - .ValueGeneratedOnAdd() - .HasColumnName("EmailConfirmed") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); - - b.Property("LockoutEnabled") - .ValueGeneratedOnAdd() - .HasColumnName("LockoutEnabled") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("LockoutEnd") - .HasColumnType("datetimeoffset"); - - b.Property("Name") - .HasColumnName("Name") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("NormalizedEmail") - .IsRequired() - .HasColumnName("NormalizedEmail") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("NormalizedUserName") - .IsRequired() - .HasColumnName("NormalizedUserName") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("PasswordHash") - .HasColumnName("PasswordHash") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("PhoneNumber") - .HasColumnName("PhoneNumber") - .HasColumnType("nvarchar(16)") - .HasMaxLength(16); - - b.Property("PhoneNumberConfirmed") - .ValueGeneratedOnAdd() - .HasColumnName("PhoneNumberConfirmed") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("SecurityStamp") - .IsRequired() - .HasColumnName("SecurityStamp") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("Surname") - .HasColumnName("Surname") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("TwoFactorEnabled") - .ValueGeneratedOnAdd() - .HasColumnName("TwoFactorEnabled") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("UserName") - .IsRequired() - .HasColumnName("UserName") - .HasColumnType("nvarchar(256)") - .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("uniqueidentifier"); - - b.Property("ClaimType") - .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("ClaimValue") - .HasColumnType("nvarchar(1024)") - .HasMaxLength(1024); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - 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") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("ProviderDisplayName") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("ProviderKey") - .IsRequired() - .HasColumnType("nvarchar(196)") - .HasMaxLength(196); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - 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") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - 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") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - 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") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("Name") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("Value") - .HasColumnType("nvarchar(max)"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AbpUserTokens"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("Code") - .IsRequired() - .HasColumnName("Code") - .HasColumnType("nvarchar(95)") - .HasMaxLength(95); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); - - b.Property("DisplayName") - .IsRequired() - .HasColumnName("DisplayName") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); - - b.Property("ParentId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - 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") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("OrganizationUnitId", "RoleId"); - - b.HasIndex("RoleId", "OrganizationUnitId"); - - b.ToTable("AbpOrganizationUnitRoles"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); - - b.Property("Description") - .HasColumnType("nvarchar(1000)") - .HasMaxLength(1000); - - b.Property("DisplayName") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - - b.Property("Enabled") - .HasColumnType("bit"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); - - b.Property("Name") - .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - - b.Property("Properties") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.ToTable("IdentityServerApiResources"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => - { - b.Property("ApiResourceId") - .HasColumnType("uniqueidentifier"); - - b.Property("Type") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - - b.HasKey("ApiResourceId", "Type"); - - b.ToTable("IdentityServerApiClaims"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScope", b => - { - b.Property("ApiResourceId") - .HasColumnType("uniqueidentifier"); - - b.Property("Name") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - - b.Property("Description") - .HasColumnType("nvarchar(1000)") - .HasMaxLength(1000); - - b.Property("DisplayName") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - - b.Property("Emphasize") - .HasColumnType("bit"); - - b.Property("Required") - .HasColumnType("bit"); - - b.Property("ShowInDiscoveryDocument") - .HasColumnType("bit"); - - b.HasKey("ApiResourceId", "Name"); - - b.ToTable("IdentityServerApiScopes"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b => - { - b.Property("ApiResourceId") - .HasColumnType("uniqueidentifier"); - - b.Property("Name") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - - b.Property("Type") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - - b.HasKey("ApiResourceId", "Name", "Type"); - - b.ToTable("IdentityServerApiScopeClaims"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b => - { - b.Property("ApiResourceId") - .HasColumnType("uniqueidentifier"); - - b.Property("Type") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); - - b.Property("Value") - .HasColumnType("nvarchar(4000)") - .HasMaxLength(4000); - - b.Property("Description") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); - - b.Property("Expiration") - .HasColumnType("datetime2"); - - b.HasKey("ApiResourceId", "Type", "Value"); - - b.ToTable("IdentityServerApiSecrets"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .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("AlwaysIncludeUserClaimsInIdToken") - .HasColumnType("bit"); - - b.Property("AlwaysSendClientClaims") - .HasColumnType("bit"); - - b.Property("AuthorizationCodeLifetime") - .HasColumnType("int"); - - b.Property("BackChannelLogoutSessionRequired") - .HasColumnType("bit"); - - b.Property("BackChannelLogoutUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); - - b.Property("ClientClaimsPrefix") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - - b.Property("ClientId") - .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - - b.Property("ClientName") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - - b.Property("ClientUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("ConsentLifetime") - .HasColumnType("int"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); - - b.Property("Description") - .HasColumnType("nvarchar(1000)") - .HasMaxLength(1000); - - b.Property("DeviceCodeLifetime") - .HasColumnType("int"); - - b.Property("EnableLocalLogin") - .HasColumnType("bit"); - - b.Property("Enabled") - .HasColumnType("bit"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("FrontChannelLogoutSessionRequired") - .HasColumnType("bit"); - - b.Property("FrontChannelLogoutUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); - - b.Property("IdentityTokenLifetime") - .HasColumnType("int"); - - b.Property("IncludeJwtId") - .HasColumnType("bit"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); - - b.Property("LogoUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); - - b.Property("PairWiseSubjectSalt") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - - b.Property("ProtocolType") - .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - - b.Property("RefreshTokenExpiration") - .HasColumnType("int"); - - b.Property("RefreshTokenUsage") - .HasColumnType("int"); - - b.Property("RequireClientSecret") - .HasColumnType("bit"); - - b.Property("RequireConsent") - .HasColumnType("bit"); - - b.Property("RequirePkce") - .HasColumnType("bit"); - - b.Property("SlidingRefreshTokenLifetime") - .HasColumnType("int"); - - b.Property("UpdateAccessTokenClaimsOnRefresh") - .HasColumnType("bit"); - - b.Property("UserCodeType") - .HasColumnType("nvarchar(100)") - .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("uniqueidentifier"); - - b.Property("Type") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); - - b.Property("Value") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); - - b.HasKey("ClientId", "Type", "Value"); - - b.ToTable("IdentityServerClientClaims"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b => - { - b.Property("ClientId") - .HasColumnType("uniqueidentifier"); - - b.Property("Origin") - .HasColumnType("nvarchar(150)") - .HasMaxLength(150); - - b.HasKey("ClientId", "Origin"); - - b.ToTable("IdentityServerClientCorsOrigins"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b => - { - b.Property("ClientId") - .HasColumnType("uniqueidentifier"); - - b.Property("GrantType") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); - - b.HasKey("ClientId", "GrantType"); - - b.ToTable("IdentityServerClientGrantTypes"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b => - { - b.Property("ClientId") - .HasColumnType("uniqueidentifier"); - - b.Property("Provider") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - - b.HasKey("ClientId", "Provider"); - - b.ToTable("IdentityServerClientIdPRestrictions"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b => - { - b.Property("ClientId") - .HasColumnType("uniqueidentifier"); - - b.Property("PostLogoutRedirectUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); - - b.HasKey("ClientId", "PostLogoutRedirectUri"); - - b.ToTable("IdentityServerClientPostLogoutRedirectUris"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b => - { - b.Property("ClientId") - .HasColumnType("uniqueidentifier"); - - b.Property("Key") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); - - b.Property("Value") - .IsRequired() - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); - - b.HasKey("ClientId", "Key"); - - b.ToTable("IdentityServerClientProperties"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b => - { - b.Property("ClientId") - .HasColumnType("uniqueidentifier"); - - b.Property("RedirectUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); - - b.HasKey("ClientId", "RedirectUri"); - - b.ToTable("IdentityServerClientRedirectUris"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b => - { - b.Property("ClientId") - .HasColumnType("uniqueidentifier"); - - b.Property("Scope") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - - b.HasKey("ClientId", "Scope"); - - b.ToTable("IdentityServerClientScopes"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b => - { - b.Property("ClientId") - .HasColumnType("uniqueidentifier"); - - b.Property("Type") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); - - b.Property("Value") - .HasColumnType("nvarchar(4000)") - .HasMaxLength(4000); - - b.Property("Description") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); - - b.Property("Expiration") - .HasColumnType("datetime2"); - - b.HasKey("ClientId", "Type", "Value"); - - b.ToTable("IdentityServerClientSecrets"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Devices.DeviceFlowCodes", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ClientId") - .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); - - b.Property("Data") - .IsRequired() - .HasColumnType("nvarchar(max)") - .HasMaxLength(50000); - - b.Property("DeviceCode") - .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - - b.Property("Expiration") - .IsRequired() - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("SubjectId") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - - b.Property("UserCode") - .IsRequired() - .HasColumnType("nvarchar(200)") - .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("nvarchar(200)") - .HasMaxLength(200); - - b.Property("ClientId") - .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnType("datetime2"); - - b.Property("Data") - .IsRequired() - .HasColumnType("nvarchar(max)") - .HasMaxLength(50000); - - b.Property("Expiration") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("SubjectId") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - - b.Property("Type") - .IsRequired() - .HasColumnType("nvarchar(50)") - .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("uniqueidentifier"); - - b.Property("Type") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - - b.HasKey("IdentityResourceId", "Type"); - - b.ToTable("IdentityServerIdentityClaims"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); - - b.Property("Description") - .HasColumnType("nvarchar(1000)") - .HasMaxLength(1000); - - b.Property("DisplayName") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - - b.Property("Emphasize") - .HasColumnType("bit"); - - b.Property("Enabled") - .HasColumnType("bit"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); - - b.Property("Name") - .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - - b.Property("Properties") - .HasColumnType("nvarchar(max)"); - - b.Property("Required") - .HasColumnType("bit"); - - b.Property("ShowInDiscoveryDocument") - .HasColumnType("bit"); - - b.HasKey("Id"); - - b.ToTable("IdentityServerIdentityResources"); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("Name") - .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("ProviderKey") - .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("ProviderName") - .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey"); - - b.ToTable("AbpPermissionGrants"); - }); - - modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("Name") - .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("ProviderKey") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("ProviderName") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("Value") - .IsRequired() - .HasColumnType("nvarchar(2048)") - .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("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); - - b.Property("Name") - .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("AbpTenants"); - }); - - modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => - { - b.Property("TenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("Name") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("Value") - .IsRequired() - .HasColumnType("nvarchar(1024)") - .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.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(); - }); - - 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/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20200710065039_Initial.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20200710065039_Initial.cs deleted file mode 100644 index f80a5d9936..0000000000 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20200710065039_Initial.cs +++ /dev/null @@ -1,1183 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace MyCompanyName.MyProjectName.Migrations -{ - public partial class Initial : 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: "AbpClaimTypes", - columns: table => new - { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - 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: "AbpOrganizationUnits", - 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), - 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: "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: "AbpRoles", - 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), - 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: "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.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: "AbpUsers", - 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), - 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(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: 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(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), - 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(maxLength: 40, 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(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: 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(maxLength: 40, 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: 50000, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerPersistedGrants", x => x.Key); - }); - - 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: "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_OrganizationUnitId", - column: x => x.OrganizationUnitId, - principalTable: "AbpOrganizationUnits", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_AbpOrganizationUnitRoles_AbpRoles_RoleId", - column: x => x.RoleId, - principalTable: "AbpRoles", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AbpRoleClaims", - columns: table => new - { - Id = table.Column(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: "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.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: "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_OrganizationUnitId", - column: x => x.OrganizationUnitId, - principalTable: "AbpOrganizationUnits", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_AbpUserOrganizationUnits_AbpUsers_UserId", - column: x => x.UserId, - principalTable: "AbpUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AbpUserRoles", - columns: table => new - { - UserId = table.Column(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_ApiResourceId", - 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_ApiResourceId", - 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: 4000, 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_ApiResourceId", - 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_ClientId", - 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_ClientId", - 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: 2000, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerClientPostLogoutRedirectUris", x => new { x.ClientId, x.PostLogoutRedirectUri }); - table.ForeignKey( - name: "FK_IdentityServerClientPostLogoutRedirectUris_IdentityServerClients_ClientId", - 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: 2000, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerClientRedirectUris", x => new { x.ClientId, x.RedirectUri }); - table.ForeignKey( - name: "FK_IdentityServerClientRedirectUris_IdentityServerClients_ClientId", - 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: 4000, 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_IdentityResourceId", - column: x => x.IdentityResourceId, - principalTable: "IdentityServerIdentityResources", - 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.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_ApiResourceId_Name", - columns: x => new { x.ApiResourceId, x.Name }, - principalTable: "IdentityServerApiScopes", - principalColumns: new[] { "ApiResourceId", "Name" }, - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateIndex( - name: "IX_AbpAuditLogActions_AuditLogId", - table: "AbpAuditLogActions", - column: "AuditLogId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpAuditLogActions_TenantId_ServiceName_MethodName_ExecutionTime", - 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"); - - migrationBuilder.CreateIndex( - name: "IX_AbpOrganizationUnitRoles_RoleId_OrganizationUnitId", - table: "AbpOrganizationUnitRoles", - columns: new[] { "RoleId", "OrganizationUnitId" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpOrganizationUnits_Code", - table: "AbpOrganizationUnits", - column: "Code"); - - migrationBuilder.CreateIndex( - name: "IX_AbpOrganizationUnits_ParentId", - table: "AbpOrganizationUnits", - column: "ParentId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpPermissionGrants_Name_ProviderName_ProviderKey", - table: "AbpPermissionGrants", - columns: new[] { "Name", "ProviderName", "ProviderKey" }); - - 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_AbpSettings_Name_ProviderName_ProviderKey", - table: "AbpSettings", - columns: new[] { "Name", "ProviderName", "ProviderKey" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpTenants_Name", - table: "AbpTenants", - column: "Name"); - - 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", - 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: "AbpAuditLogActions"); - - migrationBuilder.DropTable( - name: "AbpClaimTypes"); - - migrationBuilder.DropTable( - name: "AbpEntityPropertyChanges"); - - migrationBuilder.DropTable( - name: "AbpOrganizationUnitRoles"); - - migrationBuilder.DropTable( - name: "AbpPermissionGrants"); - - migrationBuilder.DropTable( - name: "AbpRoleClaims"); - - migrationBuilder.DropTable( - name: "AbpSecurityLogs"); - - migrationBuilder.DropTable( - name: "AbpSettings"); - - migrationBuilder.DropTable( - name: "AbpTenantConnectionStrings"); - - migrationBuilder.DropTable( - name: "AbpUserClaims"); - - migrationBuilder.DropTable( - name: "AbpUserLogins"); - - migrationBuilder.DropTable( - name: "AbpUserOrganizationUnits"); - - 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: "AbpEntityChanges"); - - migrationBuilder.DropTable( - name: "AbpTenants"); - - migrationBuilder.DropTable( - name: "AbpOrganizationUnits"); - - migrationBuilder.DropTable( - name: "AbpRoles"); - - migrationBuilder.DropTable( - name: "AbpUsers"); - - migrationBuilder.DropTable( - name: "IdentityServerApiScopes"); - - migrationBuilder.DropTable( - name: "IdentityServerClients"); - - migrationBuilder.DropTable( - name: "IdentityServerIdentityResources"); - - migrationBuilder.DropTable( - name: "AbpAuditLogs"); - - migrationBuilder.DropTable( - name: "IdentityServerApiResources"); - } - } -} diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200707075540_Initial.Designer.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20200730102718_Initial.Designer.cs similarity index 95% rename from templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200707075540_Initial.Designer.cs rename to templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20200730102718_Initial.Designer.cs index fadec16eaf..c43c17df8b 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200707075540_Initial.Designer.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20200730102718_Initial.Designer.cs @@ -10,8 +10,8 @@ using Volo.Abp.EntityFrameworkCore; namespace MyCompanyName.MyProjectName.Migrations { - [DbContext(typeof(MyProjectNameMigrationsDbContext))] - [Migration("20200707075540_Initial")] + [DbContext(typeof(IdentityServerHostMigrationsDbContext))] + [Migration("20200730102718_Initial")] partial class Initial { protected override void BuildTargetModel(ModelBuilder modelBuilder) @@ -275,95 +275,6 @@ namespace MyCompanyName.MyProjectName.Migrations b.ToTable("AbpEntityPropertyChanges"); }); - modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("IsAbandoned") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("JobArgs") - .IsRequired() - .HasColumnType("nvarchar(max)") - .HasMaxLength(1048576); - - b.Property("JobName") - .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("LastTryTime") - .HasColumnType("datetime2"); - - b.Property("NextTryTime") - .HasColumnType("datetime2"); - - b.Property("Priority") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint") - .HasDefaultValue((byte)15); - - b.Property("TryCount") - .ValueGeneratedOnAdd() - .HasColumnType("smallint") - .HasDefaultValue((short)0); - - b.HasKey("Id"); - - b.HasIndex("IsAbandoned", "NextTryTime"); - - b.ToTable("AbpBackgroundJobs"); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("Name") - .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("ProviderKey") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("ProviderName") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("Value") - .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey"); - - b.ToTable("AbpFeatureValues"); - }); - modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => { b.Property("Id") @@ -488,6 +399,81 @@ namespace MyCompanyName.MyProjectName.Migrations b.ToTable("AbpRoleClaims"); }); + modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Action") + .HasColumnType("nvarchar(96)") + .HasMaxLength(96); + + b.Property("ApplicationName") + .HasColumnType("nvarchar(96)") + .HasMaxLength(96); + + b.Property("BrowserInfo") + .HasColumnType("nvarchar(512)") + .HasMaxLength(512); + + b.Property("ClientId") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("ClientIpAddress") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(40)") + .HasMaxLength(40); + + b.Property("CorrelationId") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("Identity") + .HasColumnType("nvarchar(96)") + .HasMaxLength(96); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantName") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserName") + .HasColumnType("nvarchar(256)") + .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") @@ -863,25 +849,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.ToTable("AbpOrganizationUnitRoles"); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b => - { - b.Property("ApiResourceId") - .HasColumnType("uniqueidentifier"); - - b.Property("Key") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); - - b.Property("Value") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); - - b.HasKey("ApiResourceId", "Key", "Value"); - - b.ToTable("IdentityServerApiResourceProperties"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResource", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -958,7 +926,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.ToTable("IdentityServerApiResources"); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceClaim", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => { b.Property("ApiResourceId") .HasColumnType("uniqueidentifier"); @@ -972,7 +940,25 @@ namespace MyCompanyName.MyProjectName.Migrations b.ToTable("IdentityServerApiResourceClaims"); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceScope", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b => + { + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); + + b.Property("Key") + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); + + b.Property("Value") + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); + + b.HasKey("ApiResourceId", "Key", "Value"); + + b.ToTable("IdentityServerApiResourceProperties"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceScope", b => { b.Property("ApiResourceId") .HasColumnType("uniqueidentifier"); @@ -986,7 +972,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.ToTable("IdentityServerApiResourceScopes"); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceSecret", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceSecret", b => { b.Property("ApiResourceId") .HasColumnType("uniqueidentifier"); @@ -1955,36 +1941,36 @@ namespace MyCompanyName.MyProjectName.Migrations .IsRequired(); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiResource", null) - .WithMany("Properties") + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) + .WithMany("UserClaims") .HasForeignKey("ApiResourceId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceClaim", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiResource", null) - .WithMany("UserClaims") + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) + .WithMany("Properties") .HasForeignKey("ApiResourceId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceScope", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceScope", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiResource", null) + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) .WithMany("Scopes") .HasForeignKey("ApiResourceId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceSecret", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceSecret", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiResource", null) + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) .WithMany("Secrets") .HasForeignKey("ApiResourceId") .OnDelete(DeleteBehavior.Cascade) diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200707075540_Initial.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20200730102718_Initial.cs similarity index 97% rename from templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200707075540_Initial.cs rename to templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20200730102718_Initial.cs index 669982f451..a7a3b9786b 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200707075540_Initial.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20200730102718_Initial.cs @@ -39,27 +39,6 @@ namespace MyCompanyName.MyProjectName.Migrations table.PrimaryKey("PK_AbpAuditLogs", x => x.Id); }); - migrationBuilder.CreateTable( - name: "AbpBackgroundJobs", - columns: table => new - { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - JobName = table.Column(maxLength: 128, nullable: false), - JobArgs = table.Column(maxLength: 1048576, nullable: false), - TryCount = table.Column(nullable: false, defaultValue: (short)0), - CreationTime = table.Column(nullable: false), - NextTryTime = table.Column(nullable: false), - LastTryTime = table.Column(nullable: true), - IsAbandoned = table.Column(nullable: false, defaultValue: false), - Priority = table.Column(nullable: false, defaultValue: (byte)15) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpBackgroundJobs", x => x.Id); - }); - migrationBuilder.CreateTable( name: "AbpClaimTypes", columns: table => new @@ -80,21 +59,6 @@ namespace MyCompanyName.MyProjectName.Migrations table.PrimaryKey("PK_AbpClaimTypes", x => x.Id); }); - 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.CreateTable( name: "AbpOrganizationUnits", columns: table => new @@ -159,6 +123,31 @@ namespace MyCompanyName.MyProjectName.Migrations table.PrimaryKey("PK_AbpRoles", x => x.Id); }); + 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.CreateTable( name: "AbpSettings", columns: table => new @@ -1008,11 +997,6 @@ namespace MyCompanyName.MyProjectName.Migrations table: "AbpAuditLogs", columns: new[] { "TenantId", "UserId", "ExecutionTime" }); - migrationBuilder.CreateIndex( - name: "IX_AbpBackgroundJobs_IsAbandoned_NextTryTime", - table: "AbpBackgroundJobs", - columns: new[] { "IsAbandoned", "NextTryTime" }); - migrationBuilder.CreateIndex( name: "IX_AbpEntityChanges_AuditLogId", table: "AbpEntityChanges", @@ -1028,11 +1012,6 @@ namespace MyCompanyName.MyProjectName.Migrations table: "AbpEntityPropertyChanges", column: "EntityChangeId"); - migrationBuilder.CreateIndex( - name: "IX_AbpFeatureValues_Name_ProviderName_ProviderKey", - table: "AbpFeatureValues", - columns: new[] { "Name", "ProviderName", "ProviderKey" }); - migrationBuilder.CreateIndex( name: "IX_AbpOrganizationUnitRoles_RoleId_OrganizationUnitId", table: "AbpOrganizationUnitRoles", @@ -1063,6 +1042,26 @@ namespace MyCompanyName.MyProjectName.Migrations 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_AbpSettings_Name_ProviderName_ProviderKey", table: "AbpSettings", @@ -1173,18 +1172,12 @@ namespace MyCompanyName.MyProjectName.Migrations migrationBuilder.DropTable( name: "AbpAuditLogActions"); - migrationBuilder.DropTable( - name: "AbpBackgroundJobs"); - migrationBuilder.DropTable( name: "AbpClaimTypes"); migrationBuilder.DropTable( name: "AbpEntityPropertyChanges"); - migrationBuilder.DropTable( - name: "AbpFeatureValues"); - migrationBuilder.DropTable( name: "AbpOrganizationUnitRoles"); @@ -1194,6 +1187,9 @@ namespace MyCompanyName.MyProjectName.Migrations migrationBuilder.DropTable( name: "AbpRoleClaims"); + migrationBuilder.DropTable( + name: "AbpSecurityLogs"); + migrationBuilder.DropTable( name: "AbpSettings"); diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/IdentityServerHostMigrationsDbContextModelSnapshot.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/IdentityServerHostMigrationsDbContextModelSnapshot.cs index 57cd4990f3..0f9ae2508f 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/IdentityServerHostMigrationsDbContextModelSnapshot.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/IdentityServerHostMigrationsDbContextModelSnapshot.cs @@ -847,25 +847,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.ToTable("AbpOrganizationUnitRoles"); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b => - { - b.Property("ApiResourceId") - .HasColumnType("uniqueidentifier"); - - b.Property("Key") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); - - b.Property("Value") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); - - b.HasKey("ApiResourceId", "Key", "Value"); - - b.ToTable("IdentityServerApiResourceProperties"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResource", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -942,7 +924,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.ToTable("IdentityServerApiResources"); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceClaim", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => { b.Property("ApiResourceId") .HasColumnType("uniqueidentifier"); @@ -956,7 +938,25 @@ namespace MyCompanyName.MyProjectName.Migrations b.ToTable("IdentityServerApiResourceClaims"); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceScope", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b => + { + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); + + b.Property("Key") + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); + + b.Property("Value") + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); + + b.HasKey("ApiResourceId", "Key", "Value"); + + b.ToTable("IdentityServerApiResourceProperties"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceScope", b => { b.Property("ApiResourceId") .HasColumnType("uniqueidentifier"); @@ -970,7 +970,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.ToTable("IdentityServerApiResourceScopes"); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceSecret", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceSecret", b => { b.Property("ApiResourceId") .HasColumnType("uniqueidentifier"); @@ -1939,36 +1939,36 @@ namespace MyCompanyName.MyProjectName.Migrations .IsRequired(); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiResource", null) - .WithMany("Properties") + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) + .WithMany("UserClaims") .HasForeignKey("ApiResourceId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceClaim", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiResource", null) - .WithMany("UserClaims") + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) + .WithMany("Properties") .HasForeignKey("ApiResourceId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceScope", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceScope", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiResource", null) + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) .WithMany("Scopes") .HasForeignKey("ApiResourceId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceSecret", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceSecret", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiResource", null) + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) .WithMany("Secrets") .HasForeignKey("ApiResourceId") .OnDelete(DeleteBehavior.Cascade) diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20200707075539_Initial.Designer.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20200707075539_Initial.Designer.cs deleted file mode 100644 index ee1b9c6c25..0000000000 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20200707075539_Initial.Designer.cs +++ /dev/null @@ -1,1043 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using MyCompanyName.MyProjectName.EntityFrameworkCore; -using Volo.Abp.EntityFrameworkCore; - -namespace MyCompanyName.MyProjectName.Migrations -{ - [DbContext(typeof(UnifiedDbContext))] - [Migration("20200707075539_Initial")] - partial class Initial - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) - .HasAnnotation("ProductVersion", "3.1.5") - .HasAnnotation("Relational:MaxIdentifierLength", 128) - .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); - - modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ApplicationName") - .HasColumnName("ApplicationName") - .HasColumnType("nvarchar(96)") - .HasMaxLength(96); - - b.Property("BrowserInfo") - .HasColumnName("BrowserInfo") - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); - - b.Property("ClientId") - .HasColumnName("ClientId") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("ClientIpAddress") - .HasColumnName("ClientIpAddress") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("ClientName") - .HasColumnName("ClientName") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("Comments") - .HasColumnName("Comments") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("CorrelationId") - .HasColumnName("CorrelationId") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("Exceptions") - .HasColumnName("Exceptions") - .HasColumnType("nvarchar(4000)") - .HasMaxLength(4000); - - b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration") - .HasColumnType("int"); - - b.Property("ExecutionTime") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("HttpMethod") - .HasColumnName("HttpMethod") - .HasColumnType("nvarchar(16)") - .HasMaxLength(16); - - b.Property("HttpStatusCode") - .HasColumnName("HttpStatusCode") - .HasColumnType("int"); - - b.Property("ImpersonatorTenantId") - .HasColumnName("ImpersonatorTenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("ImpersonatorUserId") - .HasColumnName("ImpersonatorUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantName") - .HasColumnType("nvarchar(max)"); - - b.Property("Url") - .HasColumnName("Url") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("UserId") - .HasColumnName("UserId") - .HasColumnType("uniqueidentifier"); - - b.Property("UserName") - .HasColumnName("UserName") - .HasColumnType("nvarchar(256)") - .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("uniqueidentifier"); - - b.Property("AuditLogId") - .HasColumnName("AuditLogId") - .HasColumnType("uniqueidentifier"); - - b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration") - .HasColumnType("int"); - - b.Property("ExecutionTime") - .HasColumnName("ExecutionTime") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("MethodName") - .HasColumnName("MethodName") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("Parameters") - .HasColumnName("Parameters") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); - - b.Property("ServiceName") - .HasColumnName("ServiceName") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - 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("uniqueidentifier"); - - b.Property("AuditLogId") - .HasColumnName("AuditLogId") - .HasColumnType("uniqueidentifier"); - - b.Property("ChangeTime") - .HasColumnName("ChangeTime") - .HasColumnType("datetime2"); - - b.Property("ChangeType") - .HasColumnName("ChangeType") - .HasColumnType("tinyint"); - - b.Property("EntityId") - .IsRequired() - .HasColumnName("EntityId") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("EntityTenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("EntityTypeFullName") - .IsRequired() - .HasColumnName("EntityTypeFullName") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - 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("uniqueidentifier"); - - b.Property("EntityChangeId") - .HasColumnType("uniqueidentifier"); - - b.Property("NewValue") - .HasColumnName("NewValue") - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); - - b.Property("OriginalValue") - .HasColumnName("OriginalValue") - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); - - b.Property("PropertyName") - .IsRequired() - .HasColumnName("PropertyName") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("PropertyTypeFullName") - .IsRequired() - .HasColumnName("PropertyTypeFullName") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("EntityChangeId"); - - b.ToTable("AbpEntityPropertyChanges"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("Description") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("IsStatic") - .HasColumnType("bit"); - - b.Property("Name") - .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("Regex") - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); - - b.Property("RegexDescription") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("Required") - .HasColumnType("bit"); - - b.Property("ValueType") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("AbpClaimTypes"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("IsDefault") - .HasColumnName("IsDefault") - .HasColumnType("bit"); - - b.Property("IsPublic") - .HasColumnName("IsPublic") - .HasColumnType("bit"); - - b.Property("IsStatic") - .HasColumnName("IsStatic") - .HasColumnType("bit"); - - b.Property("Name") - .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("NormalizedName") - .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - 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() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("ClaimValue") - .HasColumnType("nvarchar(1024)") - .HasMaxLength(1024); - - b.Property("RoleId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AbpRoleClaims"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("AccessFailedCount") - .ValueGeneratedOnAdd() - .HasColumnName("AccessFailedCount") - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); - - b.Property("Email") - .IsRequired() - .HasColumnName("Email") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("EmailConfirmed") - .ValueGeneratedOnAdd() - .HasColumnName("EmailConfirmed") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); - - b.Property("LockoutEnabled") - .ValueGeneratedOnAdd() - .HasColumnName("LockoutEnabled") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("LockoutEnd") - .HasColumnType("datetimeoffset"); - - b.Property("Name") - .HasColumnName("Name") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("NormalizedEmail") - .IsRequired() - .HasColumnName("NormalizedEmail") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("NormalizedUserName") - .IsRequired() - .HasColumnName("NormalizedUserName") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("PasswordHash") - .HasColumnName("PasswordHash") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("PhoneNumber") - .HasColumnName("PhoneNumber") - .HasColumnType("nvarchar(16)") - .HasMaxLength(16); - - b.Property("PhoneNumberConfirmed") - .ValueGeneratedOnAdd() - .HasColumnName("PhoneNumberConfirmed") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("SecurityStamp") - .IsRequired() - .HasColumnName("SecurityStamp") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("Surname") - .HasColumnName("Surname") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("TwoFactorEnabled") - .ValueGeneratedOnAdd() - .HasColumnName("TwoFactorEnabled") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("UserName") - .IsRequired() - .HasColumnName("UserName") - .HasColumnType("nvarchar(256)") - .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("uniqueidentifier"); - - b.Property("ClaimType") - .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("ClaimValue") - .HasColumnType("nvarchar(1024)") - .HasMaxLength(1024); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - 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") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("ProviderDisplayName") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("ProviderKey") - .IsRequired() - .HasColumnType("nvarchar(196)") - .HasMaxLength(196); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - 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") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - 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") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - 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") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("Name") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("Value") - .HasColumnType("nvarchar(max)"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AbpUserTokens"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("Code") - .IsRequired() - .HasColumnName("Code") - .HasColumnType("nvarchar(95)") - .HasMaxLength(95); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); - - b.Property("DisplayName") - .IsRequired() - .HasColumnName("DisplayName") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); - - b.Property("ParentId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - 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") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("OrganizationUnitId", "RoleId"); - - b.HasIndex("RoleId", "OrganizationUnitId"); - - b.ToTable("AbpOrganizationUnitRoles"); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("Name") - .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("ProviderKey") - .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("ProviderName") - .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey"); - - b.ToTable("AbpPermissionGrants"); - }); - - modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("Name") - .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("ProviderKey") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("ProviderName") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("Value") - .IsRequired() - .HasColumnType("nvarchar(2048)") - .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("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); - - b.Property("Name") - .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("AbpTenants"); - }); - - modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => - { - b.Property("TenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("Name") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("Value") - .IsRequired() - .HasColumnType("nvarchar(1024)") - .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.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.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/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20200710065052_Initial.Designer.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20200730102724_Initial.Designer.cs similarity index 99% rename from templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20200710065052_Initial.Designer.cs rename to templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20200730102724_Initial.Designer.cs index 4afc02af46..063f61a32d 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20200710065052_Initial.Designer.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20200730102724_Initial.Designer.cs @@ -11,7 +11,7 @@ using Volo.Abp.EntityFrameworkCore; namespace MyCompanyName.MyProjectName.Migrations { [DbContext(typeof(UnifiedDbContext))] - [Migration("20200710065052_Initial")] + [Migration("20200730102724_Initial")] partial class Initial { protected override void BuildTargetModel(ModelBuilder modelBuilder) diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20200710065052_Initial.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20200730102724_Initial.cs similarity index 100% rename from templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20200710065052_Initial.cs rename to templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20200730102724_Initial.cs From 19c704bccaed21c70a86ce7527ddc6fafb36da92 Mon Sep 17 00:00:00 2001 From: maliming <6908465+maliming@users.noreply.github.com> Date: Thu, 30 Jul 2020 20:12:27 +0800 Subject: [PATCH 26/76] Rename FindByCliendIdAsync to FindByClientIdAsync. --- .../IdentityServer/IdentityServerDataSeedContributor.cs | 2 +- .../IdentityServer/IdentityServerDataSeedContributor.cs | 2 +- .../IdentityServer/IdentityServerDataSeedContributor.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/cms-kit/host/Volo.CmsKit.IdentityServer/IdentityServer/IdentityServerDataSeedContributor.cs b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/IdentityServer/IdentityServerDataSeedContributor.cs index c245c663f8..da6f57f337 100644 --- a/modules/cms-kit/host/Volo.CmsKit.IdentityServer/IdentityServer/IdentityServerDataSeedContributor.cs +++ b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/IdentityServer/IdentityServerDataSeedContributor.cs @@ -142,7 +142,7 @@ namespace Volo.CmsKit.IdentityServer string postLogoutRedirectUri = null, IEnumerable permissions = null) { - var client = await _clientRepository.FindByCliendIdAsync(name); + var client = await _clientRepository.FindByClientIdAsync(name); if (client == null) { client = await _clientRepository.InsertAsync( diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/IdentityServer/IdentityServerDataSeedContributor.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/IdentityServer/IdentityServerDataSeedContributor.cs index 3aa7af4691..6071635fe5 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/IdentityServer/IdentityServerDataSeedContributor.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/IdentityServer/IdentityServerDataSeedContributor.cs @@ -165,7 +165,7 @@ namespace MyCompanyName.MyProjectName.IdentityServer string frontChannelLogoutUri = null, IEnumerable permissions = null) { - var client = await _clientRepository.FindByCliendIdAsync(name); + var client = await _clientRepository.FindByClientIdAsync(name); if (client == null) { client = await _clientRepository.InsertAsync( diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/IdentityServer/IdentityServerDataSeedContributor.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/IdentityServer/IdentityServerDataSeedContributor.cs index c3213311a1..d150a1454c 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/IdentityServer/IdentityServerDataSeedContributor.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/IdentityServer/IdentityServerDataSeedContributor.cs @@ -165,7 +165,7 @@ namespace MyCompanyName.MyProjectName.IdentityServer string frontChannelLogoutUri = null, IEnumerable permissions = null) { - var client = await _clientRepository.FindByCliendIdAsync(name); + var client = await _clientRepository.FindByClientIdAsync(name); if (client == null) { client = await _clientRepository.InsertAsync( From 47858b21bc59c94f19e58b60d7919d39679b2fd0 Mon Sep 17 00:00:00 2001 From: maliming <6908465+maliming@users.noreply.github.com> Date: Thu, 13 Aug 2020 14:31:35 +0800 Subject: [PATCH 27/76] Use AddDeveloperSigningCredential. --- .../Abp/IdentityServer/AbpIdentityServerBuilderExtensions.cs | 4 +++- .../Volo/Abp/IdentityServer/AbpIdentityServerDomainModule.cs | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AbpIdentityServerBuilderExtensions.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AbpIdentityServerBuilderExtensions.cs index 81f4b8b629..9763ad35f0 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AbpIdentityServerBuilderExtensions.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AbpIdentityServerBuilderExtensions.cs @@ -55,7 +55,9 @@ namespace Volo.Abp.IdentityServer return builder; } - public static IIdentityServerBuilder AddAbpDeveloperSigningCredential( + //TODO: Use the latest Identity server code to optimize performance. + // https://github.com/IdentityServer/IdentityServer4/blob/main/src/IdentityServer4/src/Configuration/DependencyInjection/BuilderExtensions/Crypto.cs + private static IIdentityServerBuilder AddAbpDeveloperSigningCredential( this IIdentityServerBuilder builder, bool persistKey = true, string filename = null, diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AbpIdentityServerDomainModule.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AbpIdentityServerDomainModule.cs index d07132e094..65d1dd2b42 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AbpIdentityServerDomainModule.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AbpIdentityServerDomainModule.cs @@ -68,7 +68,7 @@ namespace Volo.Abp.IdentityServer if (builderOptions.AddDeveloperSigningCredential) { - identityServerBuilder = identityServerBuilder.AddAbpDeveloperSigningCredential(); + identityServerBuilder = identityServerBuilder.AddDeveloperSigningCredential(); } identityServerBuilder.AddAbpIdentityServer(builderOptions); From c17aa8a1e655d0838610ab505f6b3f81fc8e9028 Mon Sep 17 00:00:00 2001 From: maliming <6908465+maliming@users.noreply.github.com> Date: Wed, 9 Sep 2020 11:08:28 +0800 Subject: [PATCH 28/76] Add MongoTestCollection to OrganizationUnitRepository_Tests class. --- .../Abp/Identity/MongoDB/OrganizationUnitRepository_Tests.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/identity/test/Volo.Abp.Identity.MongoDB.Tests/Volo/Abp/Identity/MongoDB/OrganizationUnitRepository_Tests.cs b/modules/identity/test/Volo.Abp.Identity.MongoDB.Tests/Volo/Abp/Identity/MongoDB/OrganizationUnitRepository_Tests.cs index d60611b2b6..e60b6f21d4 100644 --- a/modules/identity/test/Volo.Abp.Identity.MongoDB.Tests/Volo/Abp/Identity/MongoDB/OrganizationUnitRepository_Tests.cs +++ b/modules/identity/test/Volo.Abp.Identity.MongoDB.Tests/Volo/Abp/Identity/MongoDB/OrganizationUnitRepository_Tests.cs @@ -4,6 +4,7 @@ using System.Text; namespace Volo.Abp.Identity.MongoDB { + [Collection(MongoTestCollection.Name)] public class OrganizationUnitRepository_Tests : OrganizationUnitRepository_Tests { } From a5010abd140333b377fc751e1d53b9625ee8bd3f Mon Sep 17 00:00:00 2001 From: maliming <6908465+maliming@users.noreply.github.com> Date: Wed, 9 Sep 2020 11:16:17 +0800 Subject: [PATCH 29/76] using Xunit. --- .../Abp/Identity/MongoDB/OrganizationUnitRepository_Tests.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/identity/test/Volo.Abp.Identity.MongoDB.Tests/Volo/Abp/Identity/MongoDB/OrganizationUnitRepository_Tests.cs b/modules/identity/test/Volo.Abp.Identity.MongoDB.Tests/Volo/Abp/Identity/MongoDB/OrganizationUnitRepository_Tests.cs index e60b6f21d4..dc134f9974 100644 --- a/modules/identity/test/Volo.Abp.Identity.MongoDB.Tests/Volo/Abp/Identity/MongoDB/OrganizationUnitRepository_Tests.cs +++ b/modules/identity/test/Volo.Abp.Identity.MongoDB.Tests/Volo/Abp/Identity/MongoDB/OrganizationUnitRepository_Tests.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Text; +using Xunit; namespace Volo.Abp.Identity.MongoDB { From 3dad81499793fd53faa43d457e3120acd8b98916 Mon Sep 17 00:00:00 2001 From: maliming <6908465+maliming@users.noreply.github.com> Date: Tue, 15 Sep 2020 11:54:15 +0800 Subject: [PATCH 30/76] Upgrade IdentityServer4 to 4.1.0 https://github.com/IdentityServer/IdentityServer4/releases/tag/4.1.0 --- .../Volo.Abp.IdentityServer.Domain.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo.Abp.IdentityServer.Domain.csproj b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo.Abp.IdentityServer.Domain.csproj index 33c5c87bff..758a0c0a04 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo.Abp.IdentityServer.Domain.csproj +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo.Abp.IdentityServer.Domain.csproj @@ -25,8 +25,8 @@ - - + + From f12ded4d613abcc82e4b256f936ed623683c9170 Mon Sep 17 00:00:00 2001 From: taujiong Date: Fri, 16 Oct 2020 15:35:23 +0800 Subject: [PATCH 31/76] Add "GetAll" method to ISettingDefinitionContext Its implementation class already has the implementation method for "GetAll" --- .../Volo/Abp/Settings/ISettingDefinitionContext.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/ISettingDefinitionContext.cs b/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/ISettingDefinitionContext.cs index 220e40fe59..0454bb0cae 100644 --- a/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/ISettingDefinitionContext.cs +++ b/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/ISettingDefinitionContext.cs @@ -3,7 +3,9 @@ public interface ISettingDefinitionContext { SettingDefinition GetOrNull(string name); + + IReadOnlyList GetAll(); void Add(params SettingDefinition[] definitions); } -} \ No newline at end of file +} From d75d5baa2c086af73f4afedb405cff5c6ba9f0cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Fri, 16 Oct 2020 10:41:41 +0300 Subject: [PATCH 32/76] Update POST.md --- docs/en/Blog-Posts/2020-10-15 v3_3_Preview/POST.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/en/Blog-Posts/2020-10-15 v3_3_Preview/POST.md b/docs/en/Blog-Posts/2020-10-15 v3_3_Preview/POST.md index 2ae2fe1ce2..4e19a294c1 100644 --- a/docs/en/Blog-Posts/2020-10-15 v3_3_Preview/POST.md +++ b/docs/en/Blog-Posts/2020-10-15 v3_3_Preview/POST.md @@ -208,6 +208,13 @@ There are still missing features and modules. However, we are working on it to h There are some breaking changes with the Blazor UI. If you've built an application and upgrade it, your application might not properly work. See the [ABP Commercial Blazor UI v 3.3 Migration Guide](https://docs.abp.io/en/commercial/3.3/migration-guides/blazor-ui-3_3) for the changes you need to do after upgrading your application. +#### Known Issues + +When you create a new project, profile management doesn't work, you get an exception because it can't find the `/libs/cropperjs/css/cropper.min.css` file. To fix the issue; + +* Add `"@volo/account": "^3.3.0-rc.1"` to the `package.json` in the `.Host` project. +* Run `yarn` (or `npm install`), then `gulp` on a command line terminal in the root folder of the `.Host` project. + ### Multi-Tenant Social Logins [Account module](https://commercial.abp.io/modules/Volo.Account.Pro) now supports to manage the social/external logins in the UI. You can **enable/disable** and **set options** in the settings page. It also supports to use **different credentials for the tenants** and it is also **configured on the runtime**. From 628189633d731982dd605724a04ffb3fa87ffd24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Fri, 16 Oct 2020 11:30:02 +0300 Subject: [PATCH 33/76] Add into to use repository extension methods. --- docs/en/Repositories.md | 49 +++++++++++++++++++++++++++++++++-------- 1 file changed, 40 insertions(+), 9 deletions(-) diff --git a/docs/en/Repositories.md b/docs/en/Repositories.md index a222b9d803..d674aac820 100644 --- a/docs/en/Repositories.md +++ b/docs/en/Repositories.md @@ -142,7 +142,7 @@ var people = _personRepository You normally want to use `.ToListAsync()`, `.CountAsync()`... instead, to be able to write a **truly async code**. -However, you see that you can't use these async extension methods in your application or domain layer when you create a new project using the standard [application startup template](Startup-Templates/Application.md), because; +However, you see that you can't use all the async extension methods in your application or domain layer when you create a new project using the standard [application startup template](Startup-Templates/Application.md), because; * These async methods **are not standard LINQ methods** and they are defined in the [Microsoft.EntityFrameworkCore](https://www.nuget.org/packages/Microsoft.EntityFrameworkCore) NuGet package. * The standard template **doesn't have a reference** to the EF Core package from the domain and application layers, to be independent from the database provider. @@ -151,9 +151,9 @@ Based on your requirements and development model, you have the following options > Using async methods is strongly suggested! Don't use sync LINQ methods while executing database queries to be able to develop a scalable application. -### Option-1: Reference to the EF Core +### Option-1: Reference to the Database Provider Package -The easiest solution is to directly add the EF Core package from the project you want to use these async methods. +**The easiest solution** is to directly add the EF Core package from the project you want to use these async methods. > Add the [Volo.Abp.EntityFrameworkCore](https://www.nuget.org/packages/Volo.Abp.EntityFrameworkCore) NuGet package to your project, which indirectly reference to the EF Core package. This ensures that you use the correct version of the EF Core compatible to the rest of your application. @@ -183,14 +183,34 @@ var people = ((IMongoQueryable)_personRepository .ToListAsync(); ```` -### Option-2: Custom Repository Methods +### Option-2: Use the IRepository Async Extension Methods -You can always create custom repository methods and use the database provider specific APIs, like async extension methods here. See [EF Core](Entity-Framework-Core.md) or [MongoDb](MongoDB.md) document for more info about the custom repositories. +ABP Framework provides async extension methods for the repositories, just similar to async LINQ extension methods. -This method is suggested; +**Example: Use `CountAsync` and `FirstOrDefaultAsync` methods on the repositories** -* If you want to **completely isolate** your domain & application layers from the database provider. -* If you develop a **reusable [application module](Modules/Index.md)** and don't want to force to a specific database provider, which should be done as a [best practice](Best-Practices/Index.md). +````csharp +var countAll = await _personRepository + .CountAsync(); + +var count = await _personRepository + .CountAsync(x => x.Name.StartsWith("A")); + +var book1984 = await _bookRepository + .FirstOrDefaultAsync(x => x.Name == "John"); +```` + +The standard LINQ extension methods are supported: *AllAsync, AnyAsync, AverageAsync, ContainsAsync, CountAsync, FirstAsync, FirstOrDefaultAsync, LastAsync, LastOrDefaultAsync, LongCountAsync, MaxAsync, MinAsync, SingleAsync, SingleOrDefaultAsync, SumAsync, ToArrayAsync, ToListAsync*. + +This approach still **has a limitation**. You need to call the extension method directly on the repository object. For example, the below usage is **not supported**: + +```csharp +var count = await _bookRepository.Where(x => x.Name.Contains("A")).CountAsync(); +``` + +This is because the object returned from the `Where` method is not a repository object, it is a standard `IQueryable` interface. See the other options for such cases. + +This method is suggested **wherever possible**. ### Option-3: IAsyncQueryableExecuter @@ -245,6 +265,17 @@ ABP Framework executes the query asynchronously using the actual database provid This method is suggested; +* If you want to develop your application code **without depending** on the database provider. * If you are building a **reusable library** that doesn't have a database provider integration package, but needs to execute an `IQueryable` object in some case. -For example, ABP Framework uses the `IAsyncQueryableExecuter` in the `CrudAppService` base class (see the [application services](Application-Services.md) document). \ No newline at end of file +For example, ABP Framework uses the `IAsyncQueryableExecuter` in the `CrudAppService` base class (see the [application services](Application-Services.md) document). + +### Option-3: Custom Repository Methods + +You can always create custom repository methods and use the database provider specific APIs, like async extension methods here. See [EF Core](Entity-Framework-Core.md) or [MongoDb](MongoDB.md) document for more info about the custom repositories. + +This method is suggested; + +* If you want to **completely isolate** your domain & application layers from the database provider. +* If you develop a **reusable [application module](Modules/Index.md)** and don't want to force to a specific database provider, which should be done as a [best practice](Best-Practices/Index.md). + From 1a341ad15dc3a4ced97196c911a7744a64bf4c11 Mon Sep 17 00:00:00 2001 From: taujiong Date: Fri, 16 Oct 2020 16:55:20 +0800 Subject: [PATCH 34/76] fix missing namespace --- .../Volo/Abp/Settings/ISettingDefinitionContext.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/ISettingDefinitionContext.cs b/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/ISettingDefinitionContext.cs index 0454bb0cae..59d7acda98 100644 --- a/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/ISettingDefinitionContext.cs +++ b/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/ISettingDefinitionContext.cs @@ -1,4 +1,6 @@ -namespace Volo.Abp.Settings +using System.Collections.Generic; + +namespace Volo.Abp.Settings { public interface ISettingDefinitionContext { From 5ad3fa08dbc63317fbf91ae5e844325091a7886e Mon Sep 17 00:00:00 2001 From: maliming <6908465+maliming@users.noreply.github.com> Date: Fri, 16 Oct 2020 17:06:45 +0800 Subject: [PATCH 35/76] Only store IdentityLinkUser on the Host side. --- .../Abp/Identity/IdentityUserLinkManager.cs | 27 ++++++++++++------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityUserLinkManager.cs b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityUserLinkManager.cs index a067b259f4..6f8c600daa 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityUserLinkManager.cs +++ b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityUserLinkManager.cs @@ -32,16 +32,22 @@ namespace Volo.Abp.Identity return; } - var userLink = new IdentityLinkUser( - GuidGenerator.Create(), - sourceLinkUser, - targetLinkUser); - await IdentityLinkUserRepository.InsertAsync(userLink, true); + using (CurrentTenant.Change(null)) + { + var userLink = new IdentityLinkUser( + GuidGenerator.Create(), + sourceLinkUser, + targetLinkUser); + await IdentityLinkUserRepository.InsertAsync(userLink, true); + } } public virtual async Task IsLinkedAsync(IdentityLinkUserInfo sourceLinkUser, IdentityLinkUserInfo targetLinkUser) { - return await IdentityLinkUserRepository.FindAsync(sourceLinkUser, targetLinkUser) != null; + using (CurrentTenant.Change(null)) + { + return await IdentityLinkUserRepository.FindAsync(sourceLinkUser, targetLinkUser) != null; + } } public virtual async Task UnlinkAsync(IdentityLinkUserInfo sourceLinkUser, IdentityLinkUserInfo targetLinkUser) @@ -51,10 +57,13 @@ namespace Volo.Abp.Identity return; } - var linkedUser = await IdentityLinkUserRepository.FindAsync(sourceLinkUser, targetLinkUser); - if (linkedUser != null) + using (CurrentTenant.Change(null)) { - await IdentityLinkUserRepository.DeleteAsync(linkedUser); + var linkedUser = await IdentityLinkUserRepository.FindAsync(sourceLinkUser, targetLinkUser); + if (linkedUser != null) + { + await IdentityLinkUserRepository.DeleteAsync(linkedUser); + } } } From f77cda9ad40c7e788ac4ba6e20c1a667a1562f65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Fri, 16 Oct 2020 12:17:54 +0300 Subject: [PATCH 36/76] Added "Working with Streams" section to the application services document. --- docs/en/Application-Services.md | 62 +++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/docs/en/Application-Services.md b/docs/en/Application-Services.md index 9cfec614cb..f48ff9cb5b 100644 --- a/docs/en/Application-Services.md +++ b/docs/en/Application-Services.md @@ -445,6 +445,68 @@ These methods are used to convert Entities to DTOs and vice verse. They uses the * `MapToEntityAsync(TCreateInput)` is used to create an entity from `TCreateInput`. * `MapToEntityAsync(TUpdateInput, TEntity)` is used to update an existing entity from `TUpdateInput`. +## Miscellaneous + +### Working with Streams + +`Stream` object itself is not serializable. So, you may have problems if you directly use `Stream` as the parameter or the return value for your application service. ABP Framework provides a special type, `IRemoteStreamContent` to be used to get or return streams in the application services. + +**Example: Application Service Interface that can be used to get and return streams** + +````csharp +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Services; +using Volo.Abp.Content; + +namespace MyProject.Test +{ + public interface ITestAppService : IApplicationService + { + Task Upload(Guid id, IRemoteStreamContent streamContent); + Task Download(Guid id); + } +} +```` + +**Example: Application Service Implementation that can be used to get and return streams** + +````csharp +using System; +using System.IO; +using System.Threading.Tasks; +using Volo.Abp; +using Volo.Abp.Application.Services; +using Volo.Abp.Content; + +namespace MyProject.Test +{ + public class TestAppService : ApplicationService, ITestAppService + { + public Task Download(Guid id) + { + var fs = new FileStream("C:\\Temp\\" + id + ".blob", FileMode.OpenOrCreate); + return Task.FromResult( + (IRemoteStreamContent) new RemoteStreamContent(fs) { + ContentType = "application/octet-stream" + } + ); + } + + public async Task Upload(Guid id, IRemoteStreamContent streamContent) + { + using (var fs = new FileStream("C:\\Temp\\" + id + ".blob", FileMode.Create)) + { + await streamContent.GetStream().CopyToAsync(fs); + await fs.FlushAsync(); + } + } + } +} +```` + +`IRemoteStreamContent` is compatible with the [Auto API Controller](API/Auto-API-Controllers.md) and [Dynamic C# HTTP Proxy](API/Dynamic-CSharp-API-Clients.md) systems. + ## Lifetime Lifetime of application services are [transient](Dependency-Injection.md) and they are automatically registered to the dependency injection system. From c804c0ab36ed708824b023d7d5705a67f5b2d3f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0lkay=20=C4=B0lknur?= Date: Fri, 16 Oct 2020 15:35:49 +0300 Subject: [PATCH 37/76] page header initial implementation. --- .../Components/WebAssembly/BreadcrumbItem.cs | 18 ++++++++++ .../Components/PageHeader.razor | 35 +++++++++++++++++++ .../Components/PageHeader.razor.cs | 34 ++++++++++++++++++ 3 files changed, 87 insertions(+) create mode 100644 framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/BreadcrumbItem.cs create mode 100644 framework/src/Volo.Abp.BlazoriseUI/Components/PageHeader.razor create mode 100644 framework/src/Volo.Abp.BlazoriseUI/Components/PageHeader.razor.cs diff --git a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/BreadcrumbItem.cs b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/BreadcrumbItem.cs new file mode 100644 index 0000000000..03943f47d7 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/BreadcrumbItem.cs @@ -0,0 +1,18 @@ +namespace Volo.Abp.AspNetCore.Components.WebAssembly +{ + public class BreadcrumbItem + { + public string Text { get; set; } + + public string Icon { get; set; } + + public string Url { get; set; } + + public BreadcrumbItem(string text, string url = null, string icon = null) + { + Text = text; + Url = url; + Icon = icon; + } + } +} diff --git a/framework/src/Volo.Abp.BlazoriseUI/Components/PageHeader.razor b/framework/src/Volo.Abp.BlazoriseUI/Components/PageHeader.razor new file mode 100644 index 0000000000..a584038bfd --- /dev/null +++ b/framework/src/Volo.Abp.BlazoriseUI/Components/PageHeader.razor @@ -0,0 +1,35 @@ + + +

@Title

+
+ @if (BreadcrumbItems.Any()) + { + + + @if (BreadcrumbShowHome) + { + + + + } + @foreach (var item in BreadcrumbItems) + { + + + @if (!string.IsNullOrEmpty(item.Icon)) + { + + } + @item.Text + + + } + + + } + +
+ @ChildContent +
+
+
\ No newline at end of file diff --git a/framework/src/Volo.Abp.BlazoriseUI/Components/PageHeader.razor.cs b/framework/src/Volo.Abp.BlazoriseUI/Components/PageHeader.razor.cs new file mode 100644 index 0000000000..c3b75712ef --- /dev/null +++ b/framework/src/Volo.Abp.BlazoriseUI/Components/PageHeader.razor.cs @@ -0,0 +1,34 @@ +using System.Collections.Generic; +using Microsoft.AspNetCore.Components; +using Volo.Abp.AspNetCore.Components.WebAssembly; + +namespace Volo.Abp.BlazoriseUI.Components +{ + public partial class PageHeader : ComponentBase + { + [Parameter] + public string Title { get; set; } + + [Parameter] + public bool BreadcrumbShowHome { get; set; } = true; + + [Parameter] + public bool BreadcrumbShowCurrent { get; set; } = true; + + [Parameter] + public RenderFragment ChildContent { get; set; } + + protected List BreadcrumbItems { get; set; } + + public PageHeader() + { + BreadcrumbItems = new List(); + } + + public void AddBreadcrumbItem(string text, string url = null, string icon = null) + { + BreadcrumbItems.Add(new BreadcrumbItem(text, url, icon)); + StateHasChanged(); + } + } +} From 356978ca59ea32536c7b0edd29248a1cdb8a5797 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Fri, 16 Oct 2020 20:20:21 +0300 Subject: [PATCH 38/76] Completed the JS auth API. --- docs/en/UI/AspNetCore/JavaScript-API/Auth.md | 24 +++++++++++++++++++ docs/en/UI/AspNetCore/JavaScript-API/Index.md | 2 +- docs/en/docs-nav.json | 4 ++++ 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 docs/en/UI/AspNetCore/JavaScript-API/Auth.md diff --git a/docs/en/UI/AspNetCore/JavaScript-API/Auth.md b/docs/en/UI/AspNetCore/JavaScript-API/Auth.md new file mode 100644 index 0000000000..45af8c4b3e --- /dev/null +++ b/docs/en/UI/AspNetCore/JavaScript-API/Auth.md @@ -0,0 +1,24 @@ +# ASP.NET Core MVC / Razor Pages UI: JavaScript Auth API + +Auth API allows you to check permissions (policies) for the current user in the client side. In this way, you can conditionally show/hide UI parts or perform your client side logic based on the current permissions. + +> This document only explains the JavaScript API. See the [authorization document](../../../Authorization.md) to understand the ABP authorization & permission system. + +## Basic Usage + +`abp.auth.isGranted(...)` function is used to check if a permission/policy has granted or not: + +````js +if (abp.auth.isGranted('DeleteUsers')) { + //TODO: Delete the user +} else { + alert("You don't have permission to delete a user!"); +} +```` + +## Other Fields & Functions + +* ` abp.auth.isAnyGranted(...)`: Gets one or more permission/policy names and returns `true` if at least one of them has granted. +* `abp.auth.areAllGranted(...)`: Gets one or more permission/policy names and returns `true` if all of them of them have granted. +* `abp.auth.policies`: This is an object where its keys are the permission/policy names. You can find all permission/policy names here. +* `abp.auth.grantedPolicies`: This is an object where its keys are the permission/policy names. You can find the granted permission/policy names here. \ No newline at end of file diff --git a/docs/en/UI/AspNetCore/JavaScript-API/Index.md b/docs/en/UI/AspNetCore/JavaScript-API/Index.md index dc87739641..38cde6217e 100644 --- a/docs/en/UI/AspNetCore/JavaScript-API/Index.md +++ b/docs/en/UI/AspNetCore/JavaScript-API/Index.md @@ -5,7 +5,7 @@ ABP provides a set of JavaScript APIs for ASP.NET Core MVC / Razor Pages applica ## APIs * [abp.ajax](Ajax.md) -* abp.auth +* [abp.auth](Auth.md) * abp.currentUser * abp.dom * [abp.event](Events.md) diff --git a/docs/en/docs-nav.json b/docs/en/docs-nav.json index c14349b4ac..1ef289851d 100644 --- a/docs/en/docs-nav.json +++ b/docs/en/docs-nav.json @@ -455,6 +455,10 @@ "text": "Localization", "path": "UI/AspNetCore/JavaScript-API/Localization.md" }, + { + "text": "Auth", + "path": "UI/AspNetCore/JavaScript-API/Auth.md" + }, { "text": "Settings", "path": "UI/AspNetCore/JavaScript-API/Settings.md" From bf0d629e55c87beae1d34db9133cfb9e2b724181 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Fri, 16 Oct 2020 20:31:23 +0300 Subject: [PATCH 39/76] Created ASP.NET Core MVC / Razor Pages UI: JavaScript CurrentUser API document --- .../AspNetCore/JavaScript-API/CurrentUser.md | 49 +++++++++++++++++++ docs/en/UI/AspNetCore/JavaScript-API/Index.md | 2 +- docs/en/docs-nav.json | 4 ++ 3 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 docs/en/UI/AspNetCore/JavaScript-API/CurrentUser.md diff --git a/docs/en/UI/AspNetCore/JavaScript-API/CurrentUser.md b/docs/en/UI/AspNetCore/JavaScript-API/CurrentUser.md new file mode 100644 index 0000000000..038bb9dff1 --- /dev/null +++ b/docs/en/UI/AspNetCore/JavaScript-API/CurrentUser.md @@ -0,0 +1,49 @@ +# ASP.NET Core MVC / Razor Pages UI: JavaScript CurrentUser API + +`abp.currentUser` is an object that contains information about the current user of the application. + +> This document only explains the JavaScript API. See the [CurrentUser document](../../../CurrentUser.md) to get information about the current user in the server side. + +## Authenticated User + +If the user was authenticated, this object will be something like below: + +````js +{ + isAuthenticated: true, + id: "34f1f4a7-13cc-4b91-84d1-b91c87afa95f", + tenantId: null, + userName: "john", + name: "John", + surName: "Nash", + email: "john.nash@abp.io", + emailVerified: true, + phoneNumber: null, + phoneNumberVerified: false, + roles: ["moderator","supporter"] +} +```` + +So, `abp.currentUser.userName` returns `john` in this case. + +## Anonymous User + +If the user was not authenticated, this object will be something like below: + +````js +{ + isAuthenticated: false, + id: null, + tenantId: null, + userName: null, + name: null, + surName: null, + email: null, + emailVerified: false, + phoneNumber: null, + phoneNumberVerified: false, + roles: [] +} +```` + +You can check `abp.currentUser.isAuthenticated` to understand if the use was authenticated or not. \ No newline at end of file diff --git a/docs/en/UI/AspNetCore/JavaScript-API/Index.md b/docs/en/UI/AspNetCore/JavaScript-API/Index.md index 38cde6217e..769fe548b6 100644 --- a/docs/en/UI/AspNetCore/JavaScript-API/Index.md +++ b/docs/en/UI/AspNetCore/JavaScript-API/Index.md @@ -6,7 +6,7 @@ ABP provides a set of JavaScript APIs for ASP.NET Core MVC / Razor Pages applica * [abp.ajax](Ajax.md) * [abp.auth](Auth.md) -* abp.currentUser +* [abp.currentUser](CurrentUser.md) * abp.dom * [abp.event](Events.md) * abp.features diff --git a/docs/en/docs-nav.json b/docs/en/docs-nav.json index 1ef289851d..955ab920b3 100644 --- a/docs/en/docs-nav.json +++ b/docs/en/docs-nav.json @@ -459,6 +459,10 @@ "text": "Auth", "path": "UI/AspNetCore/JavaScript-API/Auth.md" }, + { + "text": "Current User", + "path": "UI/AspNetCore/JavaScript-API/CurrentUser.md" + }, { "text": "Settings", "path": "UI/AspNetCore/JavaScript-API/Settings.md" From 6dfd50bf6a3a4d08718f4800f15cf1312616266d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Fri, 16 Oct 2020 21:41:40 +0300 Subject: [PATCH 40/76] Documented ASP.NET Core MVC / Razor Pages UI: JavaScript DOM API --- docs/en/UI/AspNetCore/JavaScript-API/DOM.md | 117 ++++++++++++++++++ docs/en/UI/AspNetCore/JavaScript-API/Index.md | 2 +- docs/en/docs-nav.json | 4 + 3 files changed, 122 insertions(+), 1 deletion(-) create mode 100644 docs/en/UI/AspNetCore/JavaScript-API/DOM.md diff --git a/docs/en/UI/AspNetCore/JavaScript-API/DOM.md b/docs/en/UI/AspNetCore/JavaScript-API/DOM.md new file mode 100644 index 0000000000..cdd4cef9db --- /dev/null +++ b/docs/en/UI/AspNetCore/JavaScript-API/DOM.md @@ -0,0 +1,117 @@ +# ASP.NET Core MVC / Razor Pages UI: JavaScript DOM API + +`abp.dom` (Document Object Model) provides events that you can subscribe to get notified when elements dynamically added to and removed from the page (DOM). + +It is especially helpful if you want to initialize the new loaded elements. This is generally needed when you dynamically add elements to DOM (for example, get some HTML elements via AJAX) after page initialization. + +> ABP uses the [MutationObserver](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver) to observe the changes made on the DOM. + +## Node Events + +### onNodeAdded + +This event is triggered when an element is added to the DOM. Example: + +````js +abp.dom.onNodeAdded(function(args){ + console.log(args.$el); +}); +```` + +`args` object has the following fields; + +* `$el`: The JQuery selection to get the new element inserted to the DOM. + +### onNodeRemoved + +This event is triggered when an element is removed from the DOM. Example: + +````js +abp.dom.onNodeRemoved(function(args){ + console.log(args.$el); +}); +```` + +`args` object has the following fields; + +* `$el`: The JQuery selection to get the element removed from the DOM. + +## Pre-Build Initializers + +ABP Framework is using the DOM events to initialize some kind of HTML elements when they are added to the DOM after than the page was already initialized. + +> Note that the same initializers also work if these elements were already included in the initial DOM. So, whether they are initially or lazy loaded, they work as expected. + +### Form Initializer + +The Form initializer (defined as `abp.dom.initializers.initializeForms`) initializes the lazy loaded forms; + +* Automatically enabled the `unobtrusive` validation on the form. +* Can automatically show a confirmation message when you submit the form. To enable this feature, just add `data-confirm` attribute with a message (like `data-confirm="Are you sure?"`) to the `form` element. +* If the `form` element has `data-ajaxForm="true"` attribute, then automatically calls the `.abpAjaxForm()` on the `form` element, to make the form posted via AJAX. + +See the [Forms & Validation](../Forms-Validation.md) document for more. + +### Script Initializer + +Script initializer (`abp.dom.initializers.initializeScript`) can execute a JavaScript code for a DOM element. + +**Example: Lazy load a component and execute some code when the element has loaded** + +Assume that you've a container to load the element inside: + +````html +
+```` + +And this is the component that will be loaded via AJAX from the server and inserted into the container: + +````html +
+

Sample message

+
+```` + +`data-script-class="MyCustomClass"` indicates the JavaScript class that will be used to perform some logic on this element: + +`MyCustomClass` is a global object defined as shown below: + +````js +MyCustomClass = function(){ + + function initDom($el){ + $el.css('color', 'red'); + } + + return { + initDom: initDom + } +}; +```` + +`initDom` is the function that is called by the ABP Framework. The `$el` argument is the loaded HTML element as a JQuery selection. + +Finally, you can load the component inside the container after an AJAX call: + +````js +$(function () { + setTimeout(function(){ + $.get('/get-my-element').then(function(response){ + $('#LazyComponent').html(response); + }); + }, 2000); +}); +```` + +Script Initialization system is especially helpful if you don't know how and when the component will be loaded into the DOM. This can be possible if you've developed a reusable UI component in a library and you want the application developer shouldn't care how to initialize the component in different use cases. + +> Script initialization doesn't work if the component was loaded in the initial DOM. In this case, you are responsible to initialize it. + +### Other Initializers + +The following Bootstrap components and libraries are automatically initialized when they are added to the DOM: + +* Tooltip +* Popover +* Timeage + diff --git a/docs/en/UI/AspNetCore/JavaScript-API/Index.md b/docs/en/UI/AspNetCore/JavaScript-API/Index.md index 769fe548b6..ac96f09eaf 100644 --- a/docs/en/UI/AspNetCore/JavaScript-API/Index.md +++ b/docs/en/UI/AspNetCore/JavaScript-API/Index.md @@ -7,7 +7,7 @@ ABP provides a set of JavaScript APIs for ASP.NET Core MVC / Razor Pages applica * [abp.ajax](Ajax.md) * [abp.auth](Auth.md) * [abp.currentUser](CurrentUser.md) -* abp.dom +* [abp.dom](DOM.md) * [abp.event](Events.md) * abp.features * [abp.localization](Localization.md) diff --git a/docs/en/docs-nav.json b/docs/en/docs-nav.json index 955ab920b3..944639cf33 100644 --- a/docs/en/docs-nav.json +++ b/docs/en/docs-nav.json @@ -482,6 +482,10 @@ { "text": "Events", "path": "UI/AspNetCore/JavaScript-API/Events.md" + }, + { + "text": "DOM", + "path": "UI/AspNetCore/JavaScript-API/DOM.md" } ] }, From 977db7889f3a4cc0b847161f59a5e28a3ffcbfeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Fri, 16 Oct 2020 22:56:38 +0300 Subject: [PATCH 41/76] documented ASP.NET Core MVC / Razor Pages UI: JavaScript Features API --- docs/en/UI/AspNetCore/JavaScript-API/Features.md | 15 +++++++++++++++ docs/en/UI/AspNetCore/JavaScript-API/Index.md | 2 +- docs/en/docs-nav.json | 4 ++++ 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 docs/en/UI/AspNetCore/JavaScript-API/Features.md diff --git a/docs/en/UI/AspNetCore/JavaScript-API/Features.md b/docs/en/UI/AspNetCore/JavaScript-API/Features.md new file mode 100644 index 0000000000..e3cd2be445 --- /dev/null +++ b/docs/en/UI/AspNetCore/JavaScript-API/Features.md @@ -0,0 +1,15 @@ +# ASP.NET Core MVC / Razor Pages UI: JavaScript Features API + +`abp.features` API allows you to check features or get the values of the features on the client side. You can read the current value of a feature in the client side only if it is allowed by the feature definition (on the server side). + +> This document only explains the JavaScript API. See the [Features](../../../Features.md) document to understand the ABP Features system. + +## Basic Usage + +`abp.features.values` can be used to access to the all feature values. + +````js +var excelExportFeatureValue = abp.features.values["ExportingToExcel"]; +```` + +Then you can check the value of the feature to perform your logic. \ No newline at end of file diff --git a/docs/en/UI/AspNetCore/JavaScript-API/Index.md b/docs/en/UI/AspNetCore/JavaScript-API/Index.md index ac96f09eaf..2ce185c6e3 100644 --- a/docs/en/UI/AspNetCore/JavaScript-API/Index.md +++ b/docs/en/UI/AspNetCore/JavaScript-API/Index.md @@ -9,7 +9,7 @@ ABP provides a set of JavaScript APIs for ASP.NET Core MVC / Razor Pages applica * [abp.currentUser](CurrentUser.md) * [abp.dom](DOM.md) * [abp.event](Events.md) -* abp.features +* [abp.features](Features.md) * [abp.localization](Localization.md) * abp.log * [abp.message](Message.md) diff --git a/docs/en/docs-nav.json b/docs/en/docs-nav.json index 944639cf33..bdb99396e0 100644 --- a/docs/en/docs-nav.json +++ b/docs/en/docs-nav.json @@ -467,6 +467,10 @@ "text": "Settings", "path": "UI/AspNetCore/JavaScript-API/Settings.md" }, + { + "text": "Features", + "path": "UI/AspNetCore/JavaScript-API/Features.md" + }, { "text": "AJAX", "path": "UI/AspNetCore/JavaScript-API/Ajax.md" From 69b53982a83b466ba89bf94d66742dd473c84697 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Fri, 16 Oct 2020 23:27:43 +0300 Subject: [PATCH 42/76] Documented ASP.NET Core MVC / Razor Pages UI: JavaScript Logging API --- docs/en/UI/AspNetCore/JavaScript-API/Index.md | 2 +- .../UI/AspNetCore/JavaScript-API/Logging.md | 49 ++++++++++++++++++- docs/en/docs-nav.json | 4 ++ 3 files changed, 53 insertions(+), 2 deletions(-) diff --git a/docs/en/UI/AspNetCore/JavaScript-API/Index.md b/docs/en/UI/AspNetCore/JavaScript-API/Index.md index 2ce185c6e3..281fa4726c 100644 --- a/docs/en/UI/AspNetCore/JavaScript-API/Index.md +++ b/docs/en/UI/AspNetCore/JavaScript-API/Index.md @@ -11,7 +11,7 @@ ABP provides a set of JavaScript APIs for ASP.NET Core MVC / Razor Pages applica * [abp.event](Events.md) * [abp.features](Features.md) * [abp.localization](Localization.md) -* abp.log +* [abp.log](Logging.md) * [abp.message](Message.md) * [abp.notify](Notify.md) * abp.security diff --git a/docs/en/UI/AspNetCore/JavaScript-API/Logging.md b/docs/en/UI/AspNetCore/JavaScript-API/Logging.md index 9fe48f22da..a46203b019 100644 --- a/docs/en/UI/AspNetCore/JavaScript-API/Logging.md +++ b/docs/en/UI/AspNetCore/JavaScript-API/Logging.md @@ -1,3 +1,50 @@ # ASP.NET Core MVC / Razor Pages UI: JavaScript Logging API -TODO \ No newline at end of file +`abp.log` API is used to write simple logs in the client side. + +> The logs are written to console, using the `console.log`, by default. + +> This document is for simple client side logging. See the [Logging](../../../Logging.md) document for server side logging system. + +## Basic Usage + +Use one of the `abp.log.xxx(...)` methods based on the severity of your log message. + +````js +abp.log.debug("Some debug log here..."); //Logging a simple debug message +abp.log.info({ name: "john", age: 42 }); //Logging an object as an information log +abp.log.warn("A warning message"); //Logging a warning message +abp.log.error('An error happens...'); //Error message +abp.log.fatal('Network connection has gone away!'); //Fatal error +```` + +## Log Levels + +There are 5 levels for a log message: + +* DEBUG = 1 +* INFO = 2 +* WARN = 3 +* ERROR = 4 +* FATAL = 5 + +These are defined in the `abp.log.levels` object (like `abp.log.levels.WARN`). + +### Changing the Current Log Level + +You can control the log level as shown below: + +````js +abp.log.level = abp.log.levels.WARN; +```` + +Default log level is `DEBUG`. + +### Logging with Specifying the Level + +Instead of calling `abp.log.info(...)` function, you can use the `abp.log.log` by specifying the log level as a parameter: + +````js +abp.log.log("log message...", abp.log.levels.INFO); +```` + diff --git a/docs/en/docs-nav.json b/docs/en/docs-nav.json index bdb99396e0..459c6947fd 100644 --- a/docs/en/docs-nav.json +++ b/docs/en/docs-nav.json @@ -490,6 +490,10 @@ { "text": "DOM", "path": "UI/AspNetCore/JavaScript-API/DOM.md" + }, + { + "text": "Logging", + "path": "UI/AspNetCore/JavaScript-API/Logging.md" } ] }, From 3fa6756cd1dff2c4605a61c82a3607b03616c671 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Sat, 17 Oct 2020 14:25:47 +0300 Subject: [PATCH 43/76] Documented ASP.NET Core MVC / Razor Pages UI: JavaScript UI Block/Busy API --- .../AspNetCore/JavaScript-API/Block-Busy.md | 56 ++++++++++++++++++ docs/en/UI/AspNetCore/JavaScript-API/Index.md | 28 ++++----- docs/en/docs-nav.json | 4 ++ docs/en/images/ui-busy.png | Bin 0 -> 138628 bytes 4 files changed, 73 insertions(+), 15 deletions(-) create mode 100644 docs/en/UI/AspNetCore/JavaScript-API/Block-Busy.md create mode 100644 docs/en/images/ui-busy.png diff --git a/docs/en/UI/AspNetCore/JavaScript-API/Block-Busy.md b/docs/en/UI/AspNetCore/JavaScript-API/Block-Busy.md new file mode 100644 index 0000000000..943a651432 --- /dev/null +++ b/docs/en/UI/AspNetCore/JavaScript-API/Block-Busy.md @@ -0,0 +1,56 @@ +# ASP.NET Core MVC / Razor Pages UI: JavaScript UI Block/Busy API + +UI Block API disables (blocks) the page or a part of the page. + +## Basic Usage + +**Example: Block (disable) the complete page** + +````js +abp.ui.block(); +```` + +**Example: Block (disable) an HTML element** + +````js +abp.ui.block('#MyContainer'); +```` + +**Example: Enables the previously blocked element or page:** + +````js +abp.ui.unblock(); +```` + +## Options + +`abp.ui.block()` method can get an options object which may contain the following fields: + +* `elm`: An optional selector to find the element to be blocked (e.g. `#MyContainerId`). If not provided, the entire page is blocked. The selector can also be directly passed to the `block()` method as shown above. +* `busy`: Set to `true` to show a progress indicator on the blocked area. +* `promise`: A promise object with `always` or `finally` callbacks. This can be helpful if you want to automatically unblock the blocked area when a deferred operation completes. + +**Example: Block an element with busy indicator** + +````js +abp.ui.block({ + elm: '#MySection', + busy: true +}); +```` + +The resulting UI will look like below: + +![ui-busy](../../../images/ui-busy.png) + +## setBusy + +`abp.ui.setBusy(...)` and `abp.ui.clearBusy()` are shortcut functions if you want to use the block with `busy` option. + +**Example: Block with busy** + +````js +abp.ui.setBusy('#MySection'); +```` + +Then you can use `abp.ui.clearBusy();` to re-enable the busy area/page. \ No newline at end of file diff --git a/docs/en/UI/AspNetCore/JavaScript-API/Index.md b/docs/en/UI/AspNetCore/JavaScript-API/Index.md index 281fa4726c..a41b57c80e 100644 --- a/docs/en/UI/AspNetCore/JavaScript-API/Index.md +++ b/docs/en/UI/AspNetCore/JavaScript-API/Index.md @@ -4,18 +4,16 @@ ABP provides a set of JavaScript APIs for ASP.NET Core MVC / Razor Pages applica ## APIs -* [abp.ajax](Ajax.md) -* [abp.auth](Auth.md) -* [abp.currentUser](CurrentUser.md) -* [abp.dom](DOM.md) -* [abp.event](Events.md) -* [abp.features](Features.md) -* [abp.localization](Localization.md) -* [abp.log](Logging.md) -* [abp.message](Message.md) -* [abp.notify](Notify.md) -* abp.security -* [abp.setting](Settings.md) -* abp.ui -* abp.utils -* abp.ResourceLoader \ No newline at end of file +* [AJAX](Ajax.md) +* [Auth](Auth.md) +* [CurrentUser](CurrentUser.md) +* [DOM](DOM.md) +* [Events](Events.md) +* [Features](Features.md) +* [Localization](Localization.md) +* [Logging](Logging.md) +* ResourceLoader +* [Settings](Settings.md) +* [UI Block/Busy](Block-Busy.md) +* [UI Message](Message.md) +* [UI Notification](Notify.md) \ No newline at end of file diff --git a/docs/en/docs-nav.json b/docs/en/docs-nav.json index 459c6947fd..14eedc65e7 100644 --- a/docs/en/docs-nav.json +++ b/docs/en/docs-nav.json @@ -483,6 +483,10 @@ "text": "Notify", "path": "UI/AspNetCore/JavaScript-API/Notify.md" }, + { + "text": "Block/Busy", + "path": "UI/AspNetCore/JavaScript-API/Block-Busy.md" + }, { "text": "Events", "path": "UI/AspNetCore/JavaScript-API/Events.md" diff --git a/docs/en/images/ui-busy.png b/docs/en/images/ui-busy.png new file mode 100644 index 0000000000000000000000000000000000000000..63a1d7d74a5a0053d12d329ee4027012ef5da689 GIT binary patch literal 138628 zcmd?QWk6Kx7e30dP!Tz_^pWoFR2ige=$0C!JBJWax_fAWp&N!6N~Bx5L%N%x;lHil zz4zO_pD$n7z7Bi8`(0~2Ypv&56QradiTRZHDH<9YrnD3YjE44901fRS!Q*?tiUi>( z4jS5jXwsn9s%|MebFR8EofPN?Y`l-~gZy6Mt3H1I%9sA%$RGC#-;gc7VhKmKYs0k> z+KA^{MU~^lqrT2+U;nXqNSJYt@;^rY$KgtGi;u-rhv}QeJ|4adDMQ>e7~Evlt*1fv z_T2Z%Pp@WE=ab(s`~y4~?UkAb>e_vgZy^V+r;&YvI@GT^$VEDDkH0Gpq<_g_zLLig zoDRv!(c!gyZ$1U?W$+^O1Q>$?&|6G#IcXIn=q$L z)X~EA@+$qt(R}UnXXmNsues1hGb+#Y z;N=}B(-TCxIB{@rjE{^kS$2a?E>E{F#8`yMiQrO1LLQ?h=C4hAP&*gLxKUBLis{nz zX{>QF0;J)Uuh{KAq+3c7@+KFnjuvW^D%|0F33DD@o;n4A-hhP3ODhAQcemcfI*8HX zr|@|Q%1l{#C`&SeGMudW1xZ3w6hoZMlvOnXp+<*w=I!OdXE`n>TRxa3hIPF*Q&qJc z9J?ri@#y4?iZWl-<5JG){Y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CmdTdAf(9EV?z%V)hAOAz6ph{*C>1TOXWHPF;kuI+H>g_y8ZT57^b`&N-jM?E`3g$;5VRm&RY0J6|+^LJBp25M%P_|7ncg~>LF7pOp0uLu7sAfCf{1yH*d$#g7x)QdyO92!;)x*tSLzFBY~7~Zoj z9$PCAH2&k{Zp*lWYTbHMC*1Z(Y9YS4B;ZwBK1$TKc1_dn3cPt`ZROJb?fx-%zUaM)&%*_1w@nc_KUxMU6j%;5(qg*UM zs;@tr&tg9mE+G9{9og zI*`bdgJqYt+#Sflf#J>w1kSsGT9x_kKt?X#y_1;x#bDbJ*~OiUf;jW*IZko=VK+am zt-CWU?d=Otrw;3fXpanyZ+#kM$eNHSi%j0MqgLxV;GO$qKl-ZweZ;uSwmMEca=NZL z>ziiC0K7ARs=zrIk=;Rm*T4gT-){+#`F;*!qAHSBhize7AV%kX{C?Hv>QQH#xYK|- zHfXe Date: Sat, 17 Oct 2020 14:42:41 +0300 Subject: [PATCH 44/76] Documented ASP.NET Core MVC / Razor Pages UI: JavaScript Resource Loader API --- docs/en/UI/AspNetCore/JavaScript-API/Index.md | 2 +- .../JavaScript-API/ResourceLoader.md | 40 +++++++++++++++++++ docs/en/docs-nav.json | 4 ++ 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 docs/en/UI/AspNetCore/JavaScript-API/ResourceLoader.md diff --git a/docs/en/UI/AspNetCore/JavaScript-API/Index.md b/docs/en/UI/AspNetCore/JavaScript-API/Index.md index a41b57c80e..3473140392 100644 --- a/docs/en/UI/AspNetCore/JavaScript-API/Index.md +++ b/docs/en/UI/AspNetCore/JavaScript-API/Index.md @@ -12,7 +12,7 @@ ABP provides a set of JavaScript APIs for ASP.NET Core MVC / Razor Pages applica * [Features](Features.md) * [Localization](Localization.md) * [Logging](Logging.md) -* ResourceLoader +* [ResourceLoader](ResourceLoader.md) * [Settings](Settings.md) * [UI Block/Busy](Block-Busy.md) * [UI Message](Message.md) diff --git a/docs/en/UI/AspNetCore/JavaScript-API/ResourceLoader.md b/docs/en/UI/AspNetCore/JavaScript-API/ResourceLoader.md new file mode 100644 index 0000000000..1e1c2f9d6d --- /dev/null +++ b/docs/en/UI/AspNetCore/JavaScript-API/ResourceLoader.md @@ -0,0 +1,40 @@ +# ASP.NET Core MVC / Razor Pages UI: JavaScript Resource Loader API + +`abp.ResourceLoader` is a service that can load a JavaScript or CSS file on demand. It guarantees to load the file only once even if you request multiple times. + +## Loading Script Files + +`abp.ResourceLoader.loadScript(...)` function **loads** a JavaScript file from the server and **executes** it. + +**Example: Load a JavaScript file** + +````js +abp.ResourceLoader.loadScript('/Pages/my-script.js'); +```` + +### Parameters + +`loadScript` function can get three parameters; + +* `url` (required, `string`): The URL of the script file to be loaded. +* `loadCallback` (optional, `function`): A callback function that is called once the script is loaded & executed. In this callback you can safely use the code in the script file. This callback is called even if the file was loaded before. +* `failCallback` (optional, `function`): A callback function that is called if loading the script fails. + +**Example: Provide the `loadCallback` argument** + +```` +abp.ResourceLoader.loadScript('/Pages/my-script.js', function() { + console.log('successfully loaded :)'); +}); +```` + +## Loading Style Files + +`abp.ResourceLoader.loadStyle(...)` function adds a `link` element to the `head` of the document for the given URL, so the CSS file is automatically loaded by the browser. + +**Example: Load a CSS file** + +````js +abp.ResourceLoader.loadStyle('/Pages/my-styles.css'); +```` + diff --git a/docs/en/docs-nav.json b/docs/en/docs-nav.json index 14eedc65e7..f51835a5f7 100644 --- a/docs/en/docs-nav.json +++ b/docs/en/docs-nav.json @@ -498,6 +498,10 @@ { "text": "Logging", "path": "UI/AspNetCore/JavaScript-API/Logging.md" + }, + { + "text": "Resource Loader", + "path": "UI/AspNetCore/JavaScript-API/ResourceLoader.md" } ] }, From 18807671d450e1801bc4dfeb6ad150e6d9921dcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Sat, 17 Oct 2020 14:46:13 +0300 Subject: [PATCH 45/76] Update ResourceLoader.md --- docs/en/UI/AspNetCore/JavaScript-API/ResourceLoader.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/UI/AspNetCore/JavaScript-API/ResourceLoader.md b/docs/en/UI/AspNetCore/JavaScript-API/ResourceLoader.md index 1e1c2f9d6d..10b8c36f59 100644 --- a/docs/en/UI/AspNetCore/JavaScript-API/ResourceLoader.md +++ b/docs/en/UI/AspNetCore/JavaScript-API/ResourceLoader.md @@ -22,7 +22,7 @@ abp.ResourceLoader.loadScript('/Pages/my-script.js'); **Example: Provide the `loadCallback` argument** -```` +````js abp.ResourceLoader.loadScript('/Pages/my-script.js', function() { console.log('successfully loaded :)'); }); From ebb36992f120f554b0a417b9644f46f2cbbba379 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Sat, 17 Oct 2020 18:03:10 +0300 Subject: [PATCH 46/76] Completed part 1,2,3. --- docs/en/Tutorials/Part-2.md | 10 +++++----- docs/en/Tutorials/Part-3.md | 20 +++++++++++--------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/docs/en/Tutorials/Part-2.md b/docs/en/Tutorials/Part-2.md index e52fe7a46d..f4fcf61e25 100644 --- a/docs/en/Tutorials/Part-2.md +++ b/docs/en/Tutorials/Part-2.md @@ -583,7 +583,7 @@ When you click to the Books menu item under the Book Store parent, you are being We will use the [Blazorise library](https://blazorise.com/) as the UI component kit. It is a very powerful library that supports major HTML/CSS frameworks, including the Bootstrap. -ABP Framework provides a generic base class, `BlazoriseCrudPageBase<...>`, to create CRUD style pages. This base class is compatible to the `ICrudAppService` that was used to build the `IBookAppService`. So, we can inherit from the `BlazoriseCrudPageBase` to automate the standard CRUD stuff. +ABP Framework provides a generic base class, `AbpCrudPageBase<...>`, to create CRUD style pages. This base class is compatible to the `ICrudAppService` that was used to build the `IBookAppService`. So, we can inherit from the `AbpCrudPageBase` to automate the code behind for the standard CRUD stuff. Open the `Books.razor` and replace the content as the following: @@ -595,7 +595,7 @@ Open the `Books.razor` and replace the content as the following: @using Acme.BookStore.Localization @using Microsoft.Extensions.Localization @inject IStringLocalizer L -@inherits BlazoriseCrudPageBase +@inherits AbpCrudPageBase @@ -645,15 +645,15 @@ Open the `Books.razor` and replace the content as the following: > If you see some syntax errors, you can ignore them if your application properly built and run. Visual Studio still has some bugs with Blazor. -* Inherited from the `BlazoriseCrudPageBase` which implements all the CRUD details for us. +* Inherited from the `AbpCrudPageBase` which implements all the CRUD details for us. * `Entities`, `TotalCount`, `PageSize`, `OnDataGridReadAsync` are defined in the base blass. * Injected `IStringLocalizer` (as `L` object) and used for localization. While the code above pretty easy to understand, you can check the Blazorise [Card](https://blazorise.com/docs/components/card/) and [DataGrid](https://blazorise.com/docs/extensions/datagrid/) documents to understand them better. -#### About the BlazoriseCrudPageBase +#### About the AbpCrudPageBase -We will continue to benefit from the `BlazoriseCrudPageBase` for the books page. You could just inject the `IBookAppService` and perform all the server side calls yourself (thanks to the [Dynamic C# HTTP API Client Proxy](../API/Dynamic-CSharp-API-Clients.md) system of the ABP Framework). We will do it manually for the authors page to demonstrate how to call server side HTTP APIs in your Blazor applications. +We will continue to benefit from the `AbpCrudPageBase` for the books page. You could just inject the `IBookAppService` and perform all the server side calls yourself (thanks to the [Dynamic C# HTTP API Client Proxy](../API/Dynamic-CSharp-API-Clients.md) system of the ABP Framework). We will do it manually for the authors page to demonstrate how to call server side HTTP APIs in your Blazor applications. ## Run the Final Application diff --git a/docs/en/Tutorials/Part-3.md b/docs/en/Tutorials/Part-3.md index 079b9e7cf8..dae7e4bfdb 100644 --- a/docs/en/Tutorials/Part-3.md +++ b/docs/en/Tutorials/Part-3.md @@ -1163,7 +1163,7 @@ Clicking the "Delete" action calls the `delete` method which then shows a confir ## Creating a New Book -In this section, you will learn how to create a new modal dialog form to create a new book. Since we've inherited from the `BlazoriseCrudPage`, we only need to develop the view part. +In this section, you will learn how to create a new modal dialog form to create a new book. Since we've inherited from the `AbpCrudPageBase`, we only need to develop the view part. ### Add "New Button" Button @@ -1328,7 +1328,7 @@ We can now define a modal to edit the book. Add the following code to the end of ### AutoMapper Configuration -The base `BlazoriseCrudPage` uses the [object to object mapping](../Object-To-Object-Mapping.md) system to convert an incoming `BookDto` object to a `CreateUpdateBookDto` object. So, we need to define the mapping. +The base `AbpCrudPageBase` uses the [object to object mapping](../Object-To-Object-Mapping.md) system to convert an incoming `BookDto` object to a `CreateUpdateBookDto` object. So, we need to define the mapping. Open the `BookStoreBlazorAutoMapperProfile` inside the `Acme.BookStore.Blazor` project and change the content as the following: @@ -1382,7 +1382,7 @@ Here the complete code to create the book management CRUD page, that has been de @using Acme.BookStore.Localization @using Microsoft.Extensions.Localization @inject IStringLocalizer L -@inherits BlazoriseCrudPageBase +@inherits AbpCrudPageBase @@ -1392,8 +1392,10 @@ Here the complete code to create the book management CRUD page, that has been de - + @@ -1406,10 +1408,10 @@ Here the complete code to create the book management CRUD page, that has been de ShowPager="true" PageSize="PageSize"> - @@ -1434,7 +1436,7 @@ Here the complete code to create the book management CRUD page, that has been de Field="@nameof(BookDto.Type)" Caption="@L["Type"]"> - @L[$"Enum:BookType:{(int) context.Type}"] + @L[$"Enum:BookType:{(int)context.Type}"] Date: Sat, 17 Oct 2020 18:06:29 +0300 Subject: [PATCH 47/76] Update Part-4.md --- docs/en/Tutorials/Part-4.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/en/Tutorials/Part-4.md b/docs/en/Tutorials/Part-4.md index 9c31f4fd3c..d9c000be5c 100644 --- a/docs/en/Tutorials/Part-4.md +++ b/docs/en/Tutorials/Part-4.md @@ -75,9 +75,12 @@ If you had created a data seed contributor as described in the [first part](Part Add a new test class, named `BookAppService_Tests` in the `Books` namespace (folder) of the `Acme.BookStore.Application.Tests` project: ````csharp +using System; +using System.Linq; using System.Threading.Tasks; using Shouldly; using Volo.Abp.Application.Dtos; +using Volo.Abp.Validation; using Xunit; namespace Acme.BookStore.Books From 21dda26350458d49fcd3108d20869bd9bbce94d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Sat, 17 Oct 2020 18:18:25 +0300 Subject: [PATCH 48/76] Update Part-5.md --- docs/en/Tutorials/Part-5.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/en/Tutorials/Part-5.md b/docs/en/Tutorials/Part-5.md index 815addd224..d083d18a2e 100644 --- a/docs/en/Tutorials/Part-5.md +++ b/docs/en/Tutorials/Part-5.md @@ -460,7 +460,7 @@ Open the `/src/app/book/book.component.html` file and replace the edit and delet ### Authorize the Razor Component -Open the `/Pages/Books.razor` file in the `Acme.BookStore.Blazor` project and add an `Authorize` attribute just after the `@page` directive, as shown below: +Open the `/Pages/Books.razor` file in the `Acme.BookStore.Blazor` project and add an `Authorize` attribute just after the `@page` directive and the following namespace imports (`@using` lines), as shown below: ````html @page "/books" @@ -518,7 +518,9 @@ Wrap the *New Book* button by an `if` block as shown below: @if (canCreateBook) { + Clicked="OpenCreateModalAsync"> + @L["NewBook"] + } ```` @@ -545,7 +547,7 @@ As similar to the *New Book* button, we can use `if` blocks to conditionally sho You can run and test the permissions. Remove a book related permission from the admin role to see the related button/action disappears from the UI. -However, ABP Framework caches the permissions of the current user in the client side. So, when you change a permission for yourself, you need to manually **refresh the page** to take the effect. If you don't refresh and try to use the prohibited action you get an HTTP 403 (forbidden) response from the server. +**ABP Framework caches the permissions** of the current user in the client side. So, when you change a permission for yourself, you need to manually **refresh the page** to take the effect. If you don't refresh and try to use the prohibited action you get an HTTP 403 (forbidden) response from the server. > Changing a permission for a role or user immediately available on the server side. So, this cache system doesn't cause any security problem. From 28a35433ff6554fa717ba52fccd2d25e53c53659 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Sat, 17 Oct 2020 19:12:11 +0300 Subject: [PATCH 49/76] Update Part-7.md --- docs/en/Tutorials/Part-7.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/en/Tutorials/Part-7.md b/docs/en/Tutorials/Part-7.md index 32c9f6b9a4..5cae52a4b1 100644 --- a/docs/en/Tutorials/Part-7.md +++ b/docs/en/Tutorials/Part-7.md @@ -74,6 +74,10 @@ Open the **Package Manager Console** on Visual Studio and ensure that the **Defa Run the following command to create a new database migration: +````bash +Add-Migration "Added_Authors" +```` + ![bookstore-add-migration-authors](images/bookstore-add-migration-authors.png) This will create a new migration class. Then run the `Update-Database` command to create the table on the database. From 12a7be8162c7830677c7d7763ab6197200e87f75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Sat, 17 Oct 2020 20:16:50 +0300 Subject: [PATCH 50/76] Added Run the Application section --- docs/en/Tutorials/Part-9.md | 14 ++++++++++++++ .../images/bookstore-authors-blazor-ui.png | Bin 0 -> 51931 bytes 2 files changed, 14 insertions(+) create mode 100644 docs/en/Tutorials/images/bookstore-authors-blazor-ui.png diff --git a/docs/en/Tutorials/Part-9.md b/docs/en/Tutorials/Part-9.md index 841d2fb3cb..374efff2b4 100644 --- a/docs/en/Tutorials/Part-9.md +++ b/docs/en/Tutorials/Part-9.md @@ -1177,6 +1177,20 @@ We should complete the localizations we've used above. Open the `en.json` file u "NewAuthor": "New author" ```` +### Run the Application + +Run and login to the application. **If you don't see the Authors menu item under the Book Store menu, that means you don't have the permission yet.** Go to the `identity/roles` page, click to the *Actions* button and select the *Permissions* action for the **admin role**: + +![bookstore-author-permissions](images/bookstore-author-permissions.png) + +As you see, the admin role has no *Author Management* permissions yet. Click to the checkboxes and save the modal to grant the necessary permissions. You will see the *Authors* menu item under the *Book Store* in the main menu, after **refreshing the page**: + +![bookstore-authors-page](images/bookstore-authors-blazor-ui.png) + +That's all! This is a fully working CRUD page, you can create, edit and delete the authors. + +> **Tip**: If you run the `.DbMigrator` console application after defining a new permission, it automatically grants these new permissions to the admin role and you don't need to manually grant the permissions yourself. + {{end}} ## The Next Part diff --git a/docs/en/Tutorials/images/bookstore-authors-blazor-ui.png b/docs/en/Tutorials/images/bookstore-authors-blazor-ui.png new file mode 100644 index 0000000000000000000000000000000000000000..5b9480957d6346982e4eac6518d1a3a36db0e502 GIT binary patch literal 51931 zcmeFZXH=72_cw^Qw|ZLuxs~2jic%xJ6BQ|;2+}($z4uOtih@!#2uSZW^iDz%5JK-H z^bVng&_ZY-Z`9|RnGgT9W@fEf^Xa`l9j@!-l-JQ&8Na06l-I>zA@U3pUlYZX@lL<%!5WF1fV!16TKiIb%!V zesMubqLI7{oZDs-E-|;GS`Fo1D~i|P2DrB~As7y>!Y}h>2`m9eUU;GJH$#r;h z(uGmYurAX>DPo>oXKj|1K=g{Ldegq;#QvE zpC-l7{%zQQUdwanU;gtpNU8YhpVo1tA?2UeE@K7LpVorN8?isFAGSXo{ej5MN zqDZIt-vg3K@juegDET+x`?dXIj%h+TLi)Z2=jQXrbCd}N^0gF3{4H9Tu@j<16-6l$ z_TdUc5V*8N66n~wsTVk49{rxoCQ;g7q%XR`UVBgM^{WDlj?nVbO>8;|WjUQxuJt5# z^K0V+f2-T1 z3IEOym(0$syC)BqVmGewvDJ&5tS^pqt3jxui)7ZNXb@OvfG z#P?C15?xAVso%%Sj5Q!c*N8Cu#gr{d-gbXjUB%RQ+UY#>P)g;bYQ%xZ++^dv!`6gr zvuEG2`{h9I=tF`C{Jgnxa{CB+zRbRDeArf-mB+{WmM$B!Qp1xCmkQQMI^`6YnZSQU z+B&)Geqa2WNh=n4|HphwVb4GLX(AT8Uka@UG|f}SpL6|{G3n73#8#zOXpoUcYVm#fW49odiSrTf!af>lNEnhusb?9>wnMOr& zE-Zm2l|p>AtQU5;MYG;cQEw1M#-zKr+6V^jw3P~NCS^B;)d?O|Ohu|q*ARA<14Rs~ ztGS=w6!LAKYiGyGHNLi4W=~T3mJ@L6uNqo2YwIrg4Te%wwR9VfiZ;~|*nmNOvlX-N`C(z2(_U9pZ)6y4 zk*Sn#3uJKF-~D2NyoM>I6w?Ivnd7o$WN1u0)0j=wK8hSf#as;oU6I)V+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cmQ?B)2>DY8D?ONBxBbUZ`bpjUJ6{UZtMW`2P^PLl z6;IK#*CvMN1%pe6$EE%%$(1C^|Fx%N1(knf)({3ZlVto`)*GhS_D1bZ9tPQC8GGe$ z#6-oz60!J)Kf!WZTlR3q#Fvj2O+P6*`~pGfYp45tho*l9bH_=$*qLe#--hM;ml{Tu zpj+RPe!9StOw!b_8yq_cr&d8+&DK@`RP4{wE4)Zo7j0qVG&Nk<_V~)@B2_cqz|x!L zo%nWAw?+>tKC{Xkswt&n!j5i8l--k_8v+0Qi=1Fg#wapzW2{5pre^AAf9rpt7Z!42 zNB2Iowg3P2rA|*dOWYUY9@KK)?l6z7iau<6=}4jHg7p4g^~Q<80qqvUOG25LZvbfV zIk4GP?pnI-Uedizxj$%GGCK>Em6r!#AK<{_vJ9uQlRQ1Q-(?@JHPkvPnzDkar5=3=luIz$I2>#5!Wo>FBX0E}wbdPy$& zNx4W?mf@weg3Sjz@FaK&foJt2rkP;FIl3QowIC4P=#$*sko6>YazMCW}(3+V|H^B0^EcH@J(J% z%KFSqeux*nL98@O+zM?HaV@Ta6~Xnam@^9np73z54A&ZK3vyKa{#nn2LVz81%ts}& zGZb&Hc_a3_5sM7-x?rKKK-fHGEKC`w8VrwA& z-crOtEfbPypR_OWb-`5;e+VSHWpzO310c9r{9Z0kgalMLjRg_e?a(PXuLpZSeKt|f zl*KVoM Date: Sat, 17 Oct 2020 20:28:09 +0300 Subject: [PATCH 51/76] Update Part-10.md --- docs/en/Tutorials/Part-10.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/Tutorials/Part-10.md b/docs/en/Tutorials/Part-10.md index 2e0b1c4939..53f19d93dd 100644 --- a/docs/en/Tutorials/Part-10.md +++ b/docs/en/Tutorials/Part-10.md @@ -38,7 +38,7 @@ This tutorial has multiple versions based on your **UI** and **Database** prefer We have created `Book` and `Author` functionalities for the book store application. However, currently there is no relation between these entities. -In this tutorial, we will establish a **1 to N** relation between the `Book` and the `Author`. +In this tutorial, we will establish a **1 to N** relation between the `Author` and the `Book` entities. ## Add Relation to The Book Entity From ec5745bdc563a238b0df51ef6291edccba18cf59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Sat, 17 Oct 2020 20:39:23 +0300 Subject: [PATCH 52/76] Update Repositories.md --- docs/en/Repositories.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/Repositories.md b/docs/en/Repositories.md index d674aac820..0fc80984e7 100644 --- a/docs/en/Repositories.md +++ b/docs/en/Repositories.md @@ -270,7 +270,7 @@ This method is suggested; For example, ABP Framework uses the `IAsyncQueryableExecuter` in the `CrudAppService` base class (see the [application services](Application-Services.md) document). -### Option-3: Custom Repository Methods +### Option-4: Custom Repository Methods You can always create custom repository methods and use the database provider specific APIs, like async extension methods here. See [EF Core](Entity-Framework-Core.md) or [MongoDb](MongoDB.md) document for more info about the custom repositories. From 011cf70c68fe2e3078dd245ed30363972dcf990b Mon Sep 17 00:00:00 2001 From: taujiong Date: Mon, 19 Oct 2020 00:44:01 +0800 Subject: [PATCH 53/76] correct exception message in PermissionAppService.CheckProviderPolicy change 'policyName' to 'providerName' in the exception message --- .../Volo/Abp/PermissionManagement/PermissionAppService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Application/Volo/Abp/PermissionManagement/PermissionAppService.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.Application/Volo/Abp/PermissionManagement/PermissionAppService.cs index c358edf4a8..c0fbee97df 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Application/Volo/Abp/PermissionManagement/PermissionAppService.cs +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Application/Volo/Abp/PermissionManagement/PermissionAppService.cs @@ -116,7 +116,7 @@ namespace Volo.Abp.PermissionManagement var policyName = Options.ProviderPolicies.GetOrDefault(providerName); if (policyName.IsNullOrEmpty()) { - throw new AbpException($"No policy defined to get/set permissions for the provider '{policyName}'. Use {nameof(PermissionManagementOptions)} to map the policy."); + throw new AbpException($"No policy defined to get/set permissions for the provider '{providerName}'. Use {nameof(PermissionManagementOptions)} to map the policy."); } await AuthorizationService.CheckAsync(policyName); From 19c6d2f95ad1cd9e7aa5db240978ec56b2f0c991 Mon Sep 17 00:00:00 2001 From: maliming Date: Mon, 19 Oct 2020 09:10:56 +0800 Subject: [PATCH 54/76] Use providerName instead of policyName for exception message. https://github.com/abpframework/abp/pull/5847 --- .../Volo/Abp/FeatureManagement/FeatureAppService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Application/Volo/Abp/FeatureManagement/FeatureAppService.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.Application/Volo/Abp/FeatureManagement/FeatureAppService.cs index bfb6e65ea8..ef5b059b0d 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Application/Volo/Abp/FeatureManagement/FeatureAppService.cs +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Application/Volo/Abp/FeatureManagement/FeatureAppService.cs @@ -114,7 +114,7 @@ namespace Volo.Abp.FeatureManagement policyName = Options.ProviderPolicies.GetOrDefault(providerName); if (policyName.IsNullOrEmpty()) { - throw new AbpException($"No policy defined to get/set permissions for the provider '{policyName}'. Use {nameof(FeatureManagementOptions)} to map the policy."); + throw new AbpException($"No policy defined to get/set permissions for the provider '{providerName}'. Use {nameof(FeatureManagementOptions)} to map the policy."); } } From 8f9d0bfdfb25275914aaad7291cda4d264105544 Mon Sep 17 00:00:00 2001 From: maliming <6908465+maliming@users.noreply.github.com> Date: Mon, 19 Oct 2020 10:12:17 +0800 Subject: [PATCH 55/76] Update template projects migrations. --- ....cs => 20201019020935_Initial.Designer.cs} | 1139 ++++++++------ .../Migrations/20201019020935_Initial.cs | 1380 +++++++++++++++++ ...ectNameMigrationsDbContextModelSnapshot.cs | 1110 +++++++------ ....cs => 20201019021119_Initial.Designer.cs} | 206 +-- ...1_Initial.cs => 20201019021119_Initial.cs} | 114 +- ...ApiHostMigrationsDbContextModelSnapshot.cs | 204 +-- .../Migrations/20201013055209_Initial.cs | 1232 --------------- ....cs => 20201019021120_Initial.Designer.cs} | 1276 +++++++++------ .../Migrations/20201019021120_Initial.cs} | 754 +++++---- ...verHostMigrationsDbContextModelSnapshot.cs | 1090 +++++++------ .../20201019021101_Initial.Designer.cs | 1222 +++++++++++++++ .../Migrations/20201019021101_Initial.cs | 726 +++++++++ .../UnifiedDbContextModelSnapshot.cs | 628 ++++---- 13 files changed, 6890 insertions(+), 4191 deletions(-) rename templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/{20200909022225_Initial.Designer.cs => 20201019020935_Initial.Designer.cs} (66%) create mode 100644 templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20201019020935_Initial.cs rename templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/Migrations/{20200928072851_Initial.Designer.cs => 20201019021119_Initial.Designer.cs} (63%) rename templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/Migrations/{20200928072851_Initial.cs => 20201019021119_Initial.cs} (50%) delete mode 100644 templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20201013055209_Initial.cs rename templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/{20201013055209_Initial.Designer.cs => 20201019021120_Initial.Designer.cs} (61%) rename templates/{app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200909022225_Initial.cs => module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20201019021120_Initial.cs} (53%) create mode 100644 templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20201019021101_Initial.Designer.cs create mode 100644 templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20201019021101_Initial.cs diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200909022225_Initial.Designer.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20201019020935_Initial.Designer.cs similarity index 66% rename from templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200909022225_Initial.Designer.cs rename to templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20201019020935_Initial.Designer.cs index cebb89fe4c..7e948c753c 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200909022225_Initial.Designer.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20201019020935_Initial.Designer.cs @@ -11,17 +11,17 @@ using Volo.Abp.EntityFrameworkCore; namespace MyCompanyName.MyProjectName.Migrations { [DbContext(typeof(MyProjectNameMigrationsDbContext))] - [Migration("20200909022225_Initial")] + [Migration("20201019020935_Initial")] partial class Initial { protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder + .UseIdentityColumns() .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) - .HasAnnotation("ProductVersion", "3.1.6") .HasAnnotation("Relational:MaxIdentifierLength", 128) - .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + .HasAnnotation("ProductVersion", "5.0.0-rc.2.20475.6"); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => { @@ -30,99 +30,99 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("ApplicationName") - .HasColumnName("ApplicationName") + .HasMaxLength(96) .HasColumnType("nvarchar(96)") - .HasMaxLength(96); + .HasColumnName("ApplicationName"); b.Property("BrowserInfo") - .HasColumnName("BrowserInfo") + .HasMaxLength(512) .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasColumnName("BrowserInfo"); b.Property("ClientId") - .HasColumnName("ClientId") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("ClientId"); b.Property("ClientIpAddress") - .HasColumnName("ClientIpAddress") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("ClientIpAddress"); b.Property("ClientName") - .HasColumnName("ClientName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("ClientName"); b.Property("Comments") - .HasColumnName("Comments") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("Comments"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CorrelationId") - .HasColumnName("CorrelationId") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("CorrelationId"); b.Property("Exceptions") - .HasColumnName("Exceptions") + .HasMaxLength(4000) .HasColumnType("nvarchar(4000)") - .HasMaxLength(4000); + .HasColumnName("Exceptions"); b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration") - .HasColumnType("int"); + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); b.Property("ExecutionTime") .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("HttpMethod") - .HasColumnName("HttpMethod") + .HasMaxLength(16) .HasColumnType("nvarchar(16)") - .HasMaxLength(16); + .HasColumnName("HttpMethod"); b.Property("HttpStatusCode") - .HasColumnName("HttpStatusCode") - .HasColumnType("int"); + .HasColumnType("int") + .HasColumnName("HttpStatusCode"); b.Property("ImpersonatorTenantId") - .HasColumnName("ImpersonatorTenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("ImpersonatorTenantId"); b.Property("ImpersonatorUserId") - .HasColumnName("ImpersonatorUserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("ImpersonatorUserId"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("TenantName") .HasColumnType("nvarchar(max)"); b.Property("Url") - .HasColumnName("Url") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("Url"); b.Property("UserId") - .HasColumnName("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("UserId"); b.Property("UserName") - .HasColumnName("UserName") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("UserName"); b.HasKey("Id"); @@ -140,39 +140,39 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("AuditLogId") - .HasColumnName("AuditLogId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("AuditLogId"); b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration") - .HasColumnType("int"); + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); b.Property("ExecutionTime") - .HasColumnName("ExecutionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("ExecutionTime"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("MethodName") - .HasColumnName("MethodName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("MethodName"); b.Property("Parameters") - .HasColumnName("Parameters") + .HasMaxLength(2000) .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasColumnName("Parameters"); b.Property("ServiceName") - .HasColumnName("ServiceName") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("ServiceName"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -190,39 +190,39 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("AuditLogId") - .HasColumnName("AuditLogId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("AuditLogId"); b.Property("ChangeTime") - .HasColumnName("ChangeTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("ChangeTime"); b.Property("ChangeType") - .HasColumnName("ChangeType") - .HasColumnType("tinyint"); + .HasColumnType("tinyint") + .HasColumnName("ChangeType"); b.Property("EntityId") .IsRequired() - .HasColumnName("EntityId") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("EntityId"); b.Property("EntityTenantId") .HasColumnType("uniqueidentifier"); b.Property("EntityTypeFullName") .IsRequired() - .HasColumnName("EntityTypeFullName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("EntityTypeFullName"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -243,30 +243,30 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("NewValue") - .HasColumnName("NewValue") + .HasMaxLength(512) .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasColumnName("NewValue"); b.Property("OriginalValue") - .HasColumnName("OriginalValue") + .HasMaxLength(512) .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasColumnName("OriginalValue"); b.Property("PropertyName") .IsRequired() - .HasColumnName("PropertyName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("PropertyName"); b.Property("PropertyTypeFullName") .IsRequired() - .HasColumnName("PropertyTypeFullName") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("PropertyTypeFullName"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -283,17 +283,17 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsAbandoned") .ValueGeneratedOnAdd() @@ -302,13 +302,13 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("JobArgs") .IsRequired() - .HasColumnType("nvarchar(max)") - .HasMaxLength(1048576); + .HasMaxLength(1048576) + .HasColumnType("nvarchar(max)"); b.Property("JobName") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("LastTryTime") .HasColumnType("datetime2"); @@ -341,21 +341,21 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("ProviderKey") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ProviderName") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Value") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.HasKey("Id"); @@ -372,33 +372,33 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("Description") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsStatic") .HasColumnType("bit"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("Regex") - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); b.Property("RegexDescription") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("Required") .HasColumnType("bit"); @@ -411,6 +411,33 @@ namespace MyCompanyName.MyProjectName.Migrations b.ToTable("AbpClaimTypes"); }); + modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .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") @@ -419,39 +446,39 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDefault") - .HasColumnName("IsDefault") - .HasColumnType("bit"); + .HasColumnType("bit") + .HasColumnName("IsDefault"); b.Property("IsPublic") - .HasColumnName("IsPublic") - .HasColumnType("bit"); + .HasColumnType("bit") + .HasColumnName("IsPublic"); b.Property("IsStatic") - .HasColumnName("IsStatic") - .HasColumnType("bit"); + .HasColumnType("bit") + .HasColumnName("IsStatic"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("NormalizedName") .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -467,19 +494,19 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ClaimType") .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("ClaimValue") - .HasColumnType("nvarchar(1024)") - .HasMaxLength(1024); + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); b.Property("RoleId") .HasColumnType("uniqueidentifier"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -495,60 +522,60 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Action") - .HasColumnType("nvarchar(96)") - .HasMaxLength(96); + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); b.Property("ApplicationName") - .HasColumnType("nvarchar(96)") - .HasMaxLength(96); + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); b.Property("BrowserInfo") - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); b.Property("ClientId") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ClientIpAddress") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CorrelationId") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("CreationTime") .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("Identity") - .HasColumnType("nvarchar(96)") - .HasMaxLength(96); + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("TenantName") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("UserId") .HasColumnType("uniqueidentifier"); b.Property("UserName") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.HasKey("Id"); @@ -571,136 +598,136 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("AccessFailedCount") .ValueGeneratedOnAdd() - .HasColumnName("AccessFailedCount") .HasColumnType("int") - .HasDefaultValue(0); + .HasDefaultValue(0) + .HasColumnName("AccessFailedCount"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("Email") .IsRequired() - .HasColumnName("Email") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("Email"); b.Property("EmailConfirmed") .ValueGeneratedOnAdd() - .HasColumnName("EmailConfirmed") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("IsExternal") .ValueGeneratedOnAdd() - .HasColumnName("IsExternal") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsExternal"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("LockoutEnabled") .ValueGeneratedOnAdd() - .HasColumnName("LockoutEnabled") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("LockoutEnabled"); b.Property("LockoutEnd") .HasColumnType("datetimeoffset"); b.Property("Name") - .HasColumnName("Name") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("Name"); b.Property("NormalizedEmail") .IsRequired() - .HasColumnName("NormalizedEmail") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("NormalizedEmail"); b.Property("NormalizedUserName") .IsRequired() - .HasColumnName("NormalizedUserName") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("NormalizedUserName"); b.Property("PasswordHash") - .HasColumnName("PasswordHash") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("PasswordHash"); b.Property("PhoneNumber") - .HasColumnName("PhoneNumber") + .HasMaxLength(16) .HasColumnType("nvarchar(16)") - .HasMaxLength(16); + .HasColumnName("PhoneNumber"); b.Property("PhoneNumberConfirmed") .ValueGeneratedOnAdd() - .HasColumnName("PhoneNumberConfirmed") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); b.Property("SecurityStamp") .IsRequired() - .HasColumnName("SecurityStamp") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("SecurityStamp"); b.Property("Surname") - .HasColumnName("Surname") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("Surname"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("TwoFactorEnabled") .ValueGeneratedOnAdd() - .HasColumnName("TwoFactorEnabled") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("TwoFactorEnabled"); b.Property("UserName") .IsRequired() - .HasColumnName("UserName") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("UserName"); b.HasKey("Id"); @@ -722,16 +749,16 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ClaimType") .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("ClaimValue") - .HasColumnType("nvarchar(1024)") - .HasMaxLength(1024); + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("UserId") .HasColumnType("uniqueidentifier"); @@ -749,21 +776,21 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("LoginProvider") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ProviderDisplayName") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("ProviderKey") .IsRequired() - .HasColumnType("nvarchar(196)") - .HasMaxLength(196); + .HasMaxLength(196) + .HasColumnType("nvarchar(196)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("UserId", "LoginProvider"); @@ -781,16 +808,16 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("OrganizationUnitId", "UserId"); @@ -808,8 +835,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("UserId", "RoleId"); @@ -824,16 +851,16 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("LoginProvider") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Name") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("Value") .HasColumnType("nvarchar(max)"); @@ -851,62 +878,62 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Code") .IsRequired() - .HasColumnName("Code") + .HasMaxLength(95) .HasColumnType("nvarchar(95)") - .HasMaxLength(95); + .HasColumnName("Code"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("DisplayName") .IsRequired() - .HasColumnName("DisplayName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("DisplayName"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("ParentId") .HasColumnType("uniqueidentifier"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -926,16 +953,16 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("OrganizationUnitId", "RoleId"); @@ -951,64 +978,64 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("AllowedAccessTokenSigningAlgorithms") - .HasColumnType("nvarchar(100)") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("Description") - .HasColumnType("nvarchar(1000)") - .HasMaxLength(1000); + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); b.Property("DisplayName") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Enabled") .HasColumnType("bit"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ShowInDiscoveryDocument") .HasColumnType("bit"); @@ -1027,8 +1054,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.HasKey("ApiResourceId", "Type"); @@ -1041,12 +1068,12 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Key") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("Value") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.HasKey("ApiResourceId", "Key", "Value"); @@ -1059,8 +1086,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Scope") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.HasKey("ApiResourceId", "Scope"); @@ -1073,16 +1100,16 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("Value") - .HasColumnType("nvarchar(4000)") - .HasMaxLength(4000); + .HasMaxLength(4000) + .HasColumnType("nvarchar(4000)"); b.Property("Description") - .HasColumnType("nvarchar(1000)") - .HasMaxLength(1000); + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); b.Property("Expiration") .HasColumnType("datetime2"); @@ -1100,33 +1127,33 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("Description") - .HasColumnType("nvarchar(1000)") - .HasMaxLength(1000); + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); b.Property("DisplayName") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Emphasize") .HasColumnType("bit"); @@ -1135,27 +1162,27 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("bit"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Required") .HasColumnType("bit"); @@ -1177,8 +1204,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.HasKey("ApiScopeId", "Type"); @@ -1191,12 +1218,12 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Key") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("Value") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.HasKey("ApiScopeId", "Key", "Value"); @@ -1231,8 +1258,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("bit"); b.Property("AllowedIdentityTokenSigningAlgorithms") - .HasColumnType("nvarchar(100)") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("AlwaysIncludeUserClaimsInIdToken") .HasColumnType("bit"); @@ -1247,54 +1274,54 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("bit"); b.Property("BackChannelLogoutUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.Property("ClientClaimsPrefix") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ClientId") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ClientName") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ClientUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("ConsentLifetime") .HasColumnType("int"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("Description") - .HasColumnType("nvarchar(1000)") - .HasMaxLength(1000); + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); b.Property("DeviceCodeLifetime") .HasColumnType("int"); @@ -1306,15 +1333,15 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("bit"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("FrontChannelLogoutSessionRequired") .HasColumnType("bit"); b.Property("FrontChannelLogoutUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.Property("IdentityTokenLifetime") .HasColumnType("int"); @@ -1324,30 +1351,30 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("LogoUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.Property("PairWiseSubjectSalt") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ProtocolType") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("RefreshTokenExpiration") .HasColumnType("int"); @@ -1374,8 +1401,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("bit"); b.Property("UserCodeType") - .HasColumnType("nvarchar(100)") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("UserSsoLifetime") .HasColumnType("int"); @@ -1393,12 +1420,12 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("Value") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.HasKey("ClientId", "Type", "Value"); @@ -1411,8 +1438,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Origin") - .HasColumnType("nvarchar(150)") - .HasMaxLength(150); + .HasMaxLength(150) + .HasColumnType("nvarchar(150)"); b.HasKey("ClientId", "Origin"); @@ -1425,8 +1452,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("GrantType") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.HasKey("ClientId", "GrantType"); @@ -1439,8 +1466,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Provider") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.HasKey("ClientId", "Provider"); @@ -1453,8 +1480,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("PostLogoutRedirectUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.HasKey("ClientId", "PostLogoutRedirectUri"); @@ -1467,12 +1494,12 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Key") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("Value") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.HasKey("ClientId", "Key", "Value"); @@ -1485,8 +1512,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("RedirectUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.HasKey("ClientId", "RedirectUri"); @@ -1499,8 +1526,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Scope") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.HasKey("ClientId", "Scope"); @@ -1513,16 +1540,16 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("Value") - .HasColumnType("nvarchar(4000)") - .HasMaxLength(4000); + .HasMaxLength(4000) + .HasColumnType("nvarchar(4000)"); b.Property("Description") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.Property("Expiration") .HasColumnType("datetime2"); @@ -1540,57 +1567,57 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ClientId") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("Data") .IsRequired() - .HasColumnType("nvarchar(max)") - .HasMaxLength(50000); + .HasMaxLength(50000) + .HasColumnType("nvarchar(max)"); b.Property("Description") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("DeviceCode") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Expiration") .IsRequired() .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("SessionId") - .HasColumnType("nvarchar(100)") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("SubjectId") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("UserCode") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.HasKey("Id"); @@ -1607,19 +1634,19 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Grants.PersistedGrant", b => { b.Property("Key") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ClientId") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("ConsumedTime") .HasColumnType("datetime2"); @@ -1629,35 +1656,35 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Data") .IsRequired() - .HasColumnType("nvarchar(max)") - .HasMaxLength(50000); + .HasMaxLength(50000) + .HasColumnType("nvarchar(max)"); b.Property("Description") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Expiration") .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("Id") .HasColumnType("uniqueidentifier"); b.Property("SessionId") - .HasColumnType("nvarchar(100)") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("SubjectId") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Type") .IsRequired() - .HasColumnType("nvarchar(50)") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.HasKey("Key"); @@ -1678,33 +1705,33 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("Description") - .HasColumnType("nvarchar(1000)") - .HasMaxLength(1000); + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); b.Property("DisplayName") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Emphasize") .HasColumnType("bit"); @@ -1713,27 +1740,27 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("bit"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Required") .HasColumnType("bit"); @@ -1755,8 +1782,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.HasKey("IdentityResourceId", "Type"); @@ -1769,12 +1796,12 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Key") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("Value") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.HasKey("IdentityResourceId", "Key", "Value"); @@ -1789,22 +1816,22 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("ProviderKey") .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ProviderName") .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -1821,21 +1848,21 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("ProviderKey") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ProviderName") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Value") .IsRequired() - .HasColumnType("nvarchar(2048)") - .HasMaxLength(2048); + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); b.HasKey("Id"); @@ -1852,48 +1879,48 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.HasKey("Id"); @@ -1908,13 +1935,13 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Name") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Value") .IsRequired() - .HasColumnType("nvarchar(1024)") - .HasMaxLength(1024); + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); b.HasKey("TenantId", "Name"); @@ -2197,6 +2224,92 @@ namespace MyCompanyName.MyProjectName.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Navigation("Actions"); + + b.Navigation("EntityChanges"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Navigation("PropertyChanges"); + }); + + 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"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Navigation("ConnectionStrings"); + }); #pragma warning restore 612, 618 } } diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20201019020935_Initial.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20201019020935_Initial.cs new file mode 100644 index 0000000000..dfa2b7fbd5 --- /dev/null +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20201019020935_Initial.cs @@ -0,0 +1,1380 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +namespace MyCompanyName.MyProjectName.Migrations +{ + public partial class Initial : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "AbpAuditLogs", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + ApplicationName = table.Column(type: "nvarchar(96)", maxLength: 96, nullable: true), + UserId = table.Column(type: "uniqueidentifier", nullable: true), + UserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + TenantName = table.Column(type: "nvarchar(max)", nullable: true), + ImpersonatorUserId = table.Column(type: "uniqueidentifier", nullable: true), + ImpersonatorTenantId = table.Column(type: "uniqueidentifier", nullable: true), + ExecutionTime = table.Column(type: "datetime2", nullable: false), + ExecutionDuration = table.Column(type: "int", nullable: false), + ClientIpAddress = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ClientName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + ClientId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + CorrelationId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + BrowserInfo = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + HttpMethod = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: true), + Url = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + Exceptions = table.Column(type: "nvarchar(4000)", maxLength: 4000, nullable: true), + Comments = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + HttpStatusCode = table.Column(type: "int", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpAuditLogs", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpBackgroundJobs", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + JobName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + JobArgs = table.Column(type: "nvarchar(max)", maxLength: 1048576, nullable: false), + TryCount = table.Column(type: "smallint", nullable: false, defaultValue: (short)0), + CreationTime = table.Column(type: "datetime2", nullable: false), + NextTryTime = table.Column(type: "datetime2", nullable: false), + LastTryTime = table.Column(type: "datetime2", nullable: true), + IsAbandoned = table.Column(type: "bit", nullable: false, defaultValue: false), + Priority = table.Column(type: "tinyint", nullable: false, defaultValue: (byte)15), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpBackgroundJobs", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpClaimTypes", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Required = table.Column(type: "bit", nullable: false), + IsStatic = table.Column(type: "bit", nullable: false), + Regex = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + RegexDescription = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + Description = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + ValueType = table.Column(type: "int", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpClaimTypes", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpFeatureValues", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + Value = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + ProviderName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ProviderKey = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpFeatureValues", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpLinkUsers", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + SourceUserId = table.Column(type: "uniqueidentifier", nullable: false), + SourceTenantId = table.Column(type: "uniqueidentifier", nullable: true), + TargetUserId = table.Column(type: "uniqueidentifier", nullable: false), + TargetTenantId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpLinkUsers", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpOrganizationUnits", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ParentId = table.Column(type: "uniqueidentifier", nullable: true), + Code = table.Column(type: "nvarchar(95)", maxLength: 95, nullable: false), + DisplayName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", 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); + }); + + migrationBuilder.CreateTable( + name: "AbpPermissionGrants", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + ProviderName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ProviderKey = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpPermissionGrants", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpRoles", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + NormalizedName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + IsDefault = table.Column(type: "bit", nullable: false), + IsStatic = table.Column(type: "bit", nullable: false), + IsPublic = table.Column(type: "bit", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpRoles", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpSecurityLogs", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ApplicationName = table.Column(type: "nvarchar(96)", maxLength: 96, nullable: true), + Identity = table.Column(type: "nvarchar(96)", maxLength: 96, nullable: true), + Action = table.Column(type: "nvarchar(96)", maxLength: 96, nullable: true), + UserId = table.Column(type: "uniqueidentifier", nullable: true), + UserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + TenantName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ClientId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + CorrelationId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ClientIpAddress = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + BrowserInfo = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpSecurityLogs", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpSettings", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + Value = table.Column(type: "nvarchar(2048)", maxLength: 2048, nullable: false), + ProviderName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ProviderKey = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpSettings", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpTenants", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpTenants", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpUsers", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + UserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + NormalizedUserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Surname = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Email = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + NormalizedEmail = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + EmailConfirmed = table.Column(type: "bit", nullable: false, defaultValue: false), + PasswordHash = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + SecurityStamp = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + IsExternal = table.Column(type: "bit", nullable: false, defaultValue: false), + PhoneNumber = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: true), + PhoneNumberConfirmed = table.Column(type: "bit", nullable: false, defaultValue: false), + TwoFactorEnabled = table.Column(type: "bit", nullable: false, defaultValue: false), + LockoutEnd = table.Column(type: "datetimeoffset", nullable: true), + LockoutEnabled = table.Column(type: "bit", nullable: false, defaultValue: false), + AccessFailedCount = table.Column(type: "int", nullable: false, defaultValue: 0), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUsers", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerApiResources", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + DisplayName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), + Enabled = table.Column(type: "bit", nullable: false), + AllowedAccessTokenSigningAlgorithms = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), + ShowInDiscoveryDocument = table.Column(type: "bit", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerApiResources", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerApiScopes", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Enabled = table.Column(type: "bit", nullable: false), + Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + DisplayName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), + Required = table.Column(type: "bit", nullable: false), + Emphasize = table.Column(type: "bit", nullable: false), + ShowInDiscoveryDocument = table.Column(type: "bit", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerApiScopes", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerClients", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + ClientId = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + ClientName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), + ClientUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), + LogoUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), + Enabled = table.Column(type: "bit", nullable: false), + ProtocolType = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + RequireClientSecret = table.Column(type: "bit", nullable: false), + RequireConsent = table.Column(type: "bit", nullable: false), + AllowRememberConsent = table.Column(type: "bit", nullable: false), + AlwaysIncludeUserClaimsInIdToken = table.Column(type: "bit", nullable: false), + RequirePkce = table.Column(type: "bit", nullable: false), + AllowPlainTextPkce = table.Column(type: "bit", nullable: false), + RequireRequestObject = table.Column(type: "bit", nullable: false), + AllowAccessTokensViaBrowser = table.Column(type: "bit", nullable: false), + FrontChannelLogoutUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), + FrontChannelLogoutSessionRequired = table.Column(type: "bit", nullable: false), + BackChannelLogoutUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), + BackChannelLogoutSessionRequired = table.Column(type: "bit", nullable: false), + AllowOfflineAccess = table.Column(type: "bit", nullable: false), + IdentityTokenLifetime = table.Column(type: "int", nullable: false), + AllowedIdentityTokenSigningAlgorithms = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), + 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: "bit", nullable: false), + RefreshTokenExpiration = table.Column(type: "int", nullable: false), + AccessTokenType = table.Column(type: "int", nullable: false), + EnableLocalLogin = table.Column(type: "bit", nullable: false), + IncludeJwtId = table.Column(type: "bit", nullable: false), + AlwaysSendClientClaims = table.Column(type: "bit", nullable: false), + ClientClaimsPrefix = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + PairWiseSubjectSalt = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + UserSsoLifetime = table.Column(type: "int", nullable: true), + UserCodeType = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), + DeviceCodeLifetime = table.Column(type: "int", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerClients", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerDeviceFlowCodes", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + DeviceCode = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + UserCode = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + SubjectId = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + SessionId = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), + ClientId = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + Description = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + Expiration = table.Column(type: "datetime2", nullable: false), + Data = table.Column(type: "nvarchar(max)", maxLength: 50000, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerDeviceFlowCodes", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerIdentityResources", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + DisplayName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), + Enabled = table.Column(type: "bit", nullable: false), + Required = table.Column(type: "bit", nullable: false), + Emphasize = table.Column(type: "bit", nullable: false), + ShowInDiscoveryDocument = table.Column(type: "bit", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerIdentityResources", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerPersistedGrants", + columns: table => new + { + Key = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + Type = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + SubjectId = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + SessionId = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), + ClientId = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + Description = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + Expiration = table.Column(type: "datetime2", nullable: true), + ConsumedTime = table.Column(type: "datetime2", nullable: true), + Data = table.Column(type: "nvarchar(max)", maxLength: 50000, nullable: false), + Id = table.Column(type: "uniqueidentifier", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerPersistedGrants", x => x.Key); + }); + + migrationBuilder.CreateTable( + name: "AbpAuditLogActions", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + AuditLogId = table.Column(type: "uniqueidentifier", nullable: false), + ServiceName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + MethodName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + Parameters = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), + ExecutionTime = table.Column(type: "datetime2", nullable: false), + ExecutionDuration = table.Column(type: "int", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpAuditLogActions", x => x.Id); + table.ForeignKey( + name: "FK_AbpAuditLogActions_AbpAuditLogs_AuditLogId", + column: x => x.AuditLogId, + principalTable: "AbpAuditLogs", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpEntityChanges", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + AuditLogId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ChangeTime = table.Column(type: "datetime2", nullable: false), + ChangeType = table.Column(type: "tinyint", nullable: false), + EntityTenantId = table.Column(type: "uniqueidentifier", nullable: true), + EntityId = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + EntityTypeFullName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", 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: "AbpOrganizationUnitRoles", + columns: table => new + { + RoleId = table.Column(type: "uniqueidentifier", nullable: false), + OrganizationUnitId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpOrganizationUnitRoles", x => new { x.OrganizationUnitId, x.RoleId }); + table.ForeignKey( + name: "FK_AbpOrganizationUnitRoles_AbpOrganizationUnits_OrganizationUnitId", + column: x => x.OrganizationUnitId, + principalTable: "AbpOrganizationUnits", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_AbpOrganizationUnitRoles_AbpRoles_RoleId", + column: x => x.RoleId, + principalTable: "AbpRoles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpRoleClaims", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + RoleId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ClaimType = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + ClaimValue = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpRoleClaims", x => x.Id); + table.ForeignKey( + name: "FK_AbpRoleClaims_AbpRoles_RoleId", + column: x => x.RoleId, + principalTable: "AbpRoles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpTenantConnectionStrings", + columns: table => new + { + TenantId = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Value = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpTenantConnectionStrings", x => new { x.TenantId, x.Name }); + table.ForeignKey( + name: "FK_AbpTenantConnectionStrings_AbpTenants_TenantId", + column: x => x.TenantId, + principalTable: "AbpTenants", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpUserClaims", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + UserId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ClaimType = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + ClaimValue = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUserClaims", x => x.Id); + table.ForeignKey( + name: "FK_AbpUserClaims_AbpUsers_UserId", + column: x => x.UserId, + principalTable: "AbpUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpUserLogins", + columns: table => new + { + UserId = table.Column(type: "uniqueidentifier", nullable: false), + LoginProvider = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ProviderKey = table.Column(type: "nvarchar(196)", maxLength: 196, nullable: false), + ProviderDisplayName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUserLogins", x => new { x.UserId, x.LoginProvider }); + table.ForeignKey( + name: "FK_AbpUserLogins_AbpUsers_UserId", + column: x => x.UserId, + principalTable: "AbpUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpUserOrganizationUnits", + columns: table => new + { + UserId = table.Column(type: "uniqueidentifier", nullable: false), + OrganizationUnitId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUserOrganizationUnits", x => new { x.OrganizationUnitId, x.UserId }); + table.ForeignKey( + name: "FK_AbpUserOrganizationUnits_AbpOrganizationUnits_OrganizationUnitId", + column: x => x.OrganizationUnitId, + principalTable: "AbpOrganizationUnits", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_AbpUserOrganizationUnits_AbpUsers_UserId", + column: x => x.UserId, + principalTable: "AbpUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpUserRoles", + columns: table => new + { + UserId = table.Column(type: "uniqueidentifier", nullable: false), + RoleId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUserRoles", x => new { x.UserId, x.RoleId }); + table.ForeignKey( + name: "FK_AbpUserRoles_AbpRoles_RoleId", + column: x => x.RoleId, + principalTable: "AbpRoles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_AbpUserRoles_AbpUsers_UserId", + column: x => x.UserId, + principalTable: "AbpUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpUserTokens", + columns: table => new + { + UserId = table.Column(type: "uniqueidentifier", nullable: false), + LoginProvider = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Value = table.Column(type: "nvarchar(max)", 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: "IdentityServerApiResourceClaims", + columns: table => new + { + Type = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + ApiResourceId = table.Column(type: "uniqueidentifier", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerApiResourceClaims", x => new { x.ApiResourceId, x.Type }); + table.ForeignKey( + name: "FK_IdentityServerApiResourceClaims_IdentityServerApiResources_ApiResourceId", + column: x => x.ApiResourceId, + principalTable: "IdentityServerApiResources", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerApiResourceProperties", + columns: table => new + { + ApiResourceId = table.Column(type: "uniqueidentifier", nullable: false), + Key = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false), + Value = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerApiResourceProperties", x => new { x.ApiResourceId, x.Key, x.Value }); + table.ForeignKey( + name: "FK_IdentityServerApiResourceProperties_IdentityServerApiResources_ApiResourceId", + column: x => x.ApiResourceId, + principalTable: "IdentityServerApiResources", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerApiResourceScopes", + columns: table => new + { + ApiResourceId = table.Column(type: "uniqueidentifier", nullable: false), + Scope = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerApiResourceScopes", x => new { x.ApiResourceId, x.Scope }); + table.ForeignKey( + name: "FK_IdentityServerApiResourceScopes_IdentityServerApiResources_ApiResourceId", + column: x => x.ApiResourceId, + principalTable: "IdentityServerApiResources", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerApiResourceSecrets", + columns: table => new + { + Type = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false), + Value = table.Column(type: "nvarchar(4000)", maxLength: 4000, nullable: false), + ApiResourceId = table.Column(type: "uniqueidentifier", nullable: false), + Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), + Expiration = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerApiResourceSecrets", x => new { x.ApiResourceId, x.Type, x.Value }); + table.ForeignKey( + name: "FK_IdentityServerApiResourceSecrets_IdentityServerApiResources_ApiResourceId", + column: x => x.ApiResourceId, + principalTable: "IdentityServerApiResources", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerApiScopeClaims", + columns: table => new + { + Type = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + ApiScopeId = table.Column(type: "uniqueidentifier", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerApiScopeClaims", x => new { x.ApiScopeId, x.Type }); + table.ForeignKey( + name: "FK_IdentityServerApiScopeClaims_IdentityServerApiScopes_ApiScopeId", + column: x => x.ApiScopeId, + principalTable: "IdentityServerApiScopes", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerApiScopeProperties", + columns: table => new + { + ApiScopeId = table.Column(type: "uniqueidentifier", nullable: false), + Key = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false), + Value = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerApiScopeProperties", x => new { x.ApiScopeId, x.Key, x.Value }); + table.ForeignKey( + name: "FK_IdentityServerApiScopeProperties_IdentityServerApiScopes_ApiScopeId", + column: x => x.ApiScopeId, + principalTable: "IdentityServerApiScopes", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerClientClaims", + columns: table => new + { + ClientId = table.Column(type: "uniqueidentifier", nullable: false), + Type = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false), + Value = table.Column(type: "nvarchar(250)", 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(type: "uniqueidentifier", nullable: false), + Origin = table.Column(type: "nvarchar(150)", maxLength: 150, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerClientCorsOrigins", x => new { x.ClientId, x.Origin }); + table.ForeignKey( + name: "FK_IdentityServerClientCorsOrigins_IdentityServerClients_ClientId", + column: x => x.ClientId, + principalTable: "IdentityServerClients", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerClientGrantTypes", + columns: table => new + { + ClientId = table.Column(type: "uniqueidentifier", nullable: false), + GrantType = table.Column(type: "nvarchar(250)", 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(type: "uniqueidentifier", nullable: false), + Provider = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerClientIdPRestrictions", x => new { x.ClientId, x.Provider }); + table.ForeignKey( + name: "FK_IdentityServerClientIdPRestrictions_IdentityServerClients_ClientId", + column: x => x.ClientId, + principalTable: "IdentityServerClients", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerClientPostLogoutRedirectUris", + columns: table => new + { + ClientId = table.Column(type: "uniqueidentifier", nullable: false), + PostLogoutRedirectUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerClientPostLogoutRedirectUris", x => new { x.ClientId, x.PostLogoutRedirectUri }); + table.ForeignKey( + name: "FK_IdentityServerClientPostLogoutRedirectUris_IdentityServerClients_ClientId", + column: x => x.ClientId, + principalTable: "IdentityServerClients", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerClientProperties", + columns: table => new + { + ClientId = table.Column(type: "uniqueidentifier", nullable: false), + Key = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false), + Value = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false) + }, + 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); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerClientRedirectUris", + columns: table => new + { + ClientId = table.Column(type: "uniqueidentifier", nullable: false), + RedirectUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerClientRedirectUris", x => new { x.ClientId, x.RedirectUri }); + table.ForeignKey( + name: "FK_IdentityServerClientRedirectUris_IdentityServerClients_ClientId", + column: x => x.ClientId, + principalTable: "IdentityServerClients", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerClientScopes", + columns: table => new + { + ClientId = table.Column(type: "uniqueidentifier", nullable: false), + Scope = table.Column(type: "nvarchar(200)", 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(type: "nvarchar(250)", maxLength: 250, nullable: false), + Value = table.Column(type: "nvarchar(4000)", maxLength: 4000, nullable: false), + ClientId = table.Column(type: "uniqueidentifier", nullable: false), + Description = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), + Expiration = table.Column(type: "datetime2", 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: "IdentityServerIdentityResourceClaims", + columns: table => new + { + Type = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + IdentityResourceId = table.Column(type: "uniqueidentifier", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerIdentityResourceClaims", x => new { x.IdentityResourceId, x.Type }); + table.ForeignKey( + name: "FK_IdentityServerIdentityResourceClaims_IdentityServerIdentityResources_IdentityResourceId", + column: x => x.IdentityResourceId, + principalTable: "IdentityServerIdentityResources", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerIdentityResourceProperties", + columns: table => new + { + IdentityResourceId = table.Column(type: "uniqueidentifier", nullable: false), + Key = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false), + Value = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerIdentityResourceProperties", x => new { x.IdentityResourceId, x.Key, x.Value }); + table.ForeignKey( + name: "FK_IdentityServerIdentityResourceProperties_IdentityServerIdentityResources_IdentityResourceId", + column: x => x.IdentityResourceId, + principalTable: "IdentityServerIdentityResources", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpEntityPropertyChanges", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + EntityChangeId = table.Column(type: "uniqueidentifier", nullable: false), + NewValue = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + OriginalValue = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + PropertyName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + PropertyTypeFullName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpEntityPropertyChanges", x => x.Id); + table.ForeignKey( + name: "FK_AbpEntityPropertyChanges_AbpEntityChanges_EntityChangeId", + column: x => x.EntityChangeId, + principalTable: "AbpEntityChanges", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateIndex( + name: "IX_AbpAuditLogActions_AuditLogId", + table: "AbpAuditLogActions", + column: "AuditLogId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpAuditLogActions_TenantId_ServiceName_MethodName_ExecutionTime", + table: "AbpAuditLogActions", + columns: new[] { "TenantId", "ServiceName", "MethodName", "ExecutionTime" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpAuditLogs_TenantId_ExecutionTime", + table: "AbpAuditLogs", + columns: new[] { "TenantId", "ExecutionTime" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpAuditLogs_TenantId_UserId_ExecutionTime", + table: "AbpAuditLogs", + columns: new[] { "TenantId", "UserId", "ExecutionTime" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpBackgroundJobs_IsAbandoned_NextTryTime", + table: "AbpBackgroundJobs", + columns: new[] { "IsAbandoned", "NextTryTime" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpEntityChanges_AuditLogId", + table: "AbpEntityChanges", + column: "AuditLogId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpEntityChanges_TenantId_EntityTypeFullName_EntityId", + table: "AbpEntityChanges", + columns: new[] { "TenantId", "EntityTypeFullName", "EntityId" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpEntityPropertyChanges_EntityChangeId", + table: "AbpEntityPropertyChanges", + column: "EntityChangeId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpFeatureValues_Name_ProviderName_ProviderKey", + table: "AbpFeatureValues", + columns: new[] { "Name", "ProviderName", "ProviderKey" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpLinkUsers_SourceUserId_SourceTenantId_TargetUserId_TargetTenantId", + table: "AbpLinkUsers", + columns: new[] { "SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId" }, + unique: true, + filter: "[SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL"); + + migrationBuilder.CreateIndex( + name: "IX_AbpOrganizationUnitRoles_RoleId_OrganizationUnitId", + table: "AbpOrganizationUnitRoles", + columns: new[] { "RoleId", "OrganizationUnitId" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpOrganizationUnits_Code", + table: "AbpOrganizationUnits", + column: "Code"); + + migrationBuilder.CreateIndex( + name: "IX_AbpOrganizationUnits_ParentId", + table: "AbpOrganizationUnits", + column: "ParentId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpPermissionGrants_Name_ProviderName_ProviderKey", + table: "AbpPermissionGrants", + columns: new[] { "Name", "ProviderName", "ProviderKey" }); + + 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_AbpSettings_Name_ProviderName_ProviderKey", + table: "AbpSettings", + columns: new[] { "Name", "ProviderName", "ProviderKey" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpTenants_Name", + table: "AbpTenants", + column: "Name"); + + 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_IdentityServerApiResources_Name", + table: "IdentityServerApiResources", + column: "Name", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_IdentityServerApiScopes_Name", + table: "IdentityServerApiScopes", + column: "Name", + unique: true); + + 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_IdentityServerIdentityResources_Name", + table: "IdentityServerIdentityResources", + column: "Name", + 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" }); + + migrationBuilder.CreateIndex( + name: "IX_IdentityServerPersistedGrants_SubjectId_SessionId_Type", + table: "IdentityServerPersistedGrants", + columns: new[] { "SubjectId", "SessionId", "Type" }); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "AbpAuditLogActions"); + + migrationBuilder.DropTable( + name: "AbpBackgroundJobs"); + + migrationBuilder.DropTable( + name: "AbpClaimTypes"); + + migrationBuilder.DropTable( + name: "AbpEntityPropertyChanges"); + + migrationBuilder.DropTable( + name: "AbpFeatureValues"); + + migrationBuilder.DropTable( + name: "AbpLinkUsers"); + + migrationBuilder.DropTable( + name: "AbpOrganizationUnitRoles"); + + migrationBuilder.DropTable( + name: "AbpPermissionGrants"); + + migrationBuilder.DropTable( + name: "AbpRoleClaims"); + + migrationBuilder.DropTable( + name: "AbpSecurityLogs"); + + migrationBuilder.DropTable( + name: "AbpSettings"); + + migrationBuilder.DropTable( + name: "AbpTenantConnectionStrings"); + + 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: "AbpEntityChanges"); + + migrationBuilder.DropTable( + name: "AbpTenants"); + + 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"); + + migrationBuilder.DropTable( + name: "AbpAuditLogs"); + } + } +} diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/MyProjectNameMigrationsDbContextModelSnapshot.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/MyProjectNameMigrationsDbContextModelSnapshot.cs index 44036df56d..657232cff2 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/MyProjectNameMigrationsDbContextModelSnapshot.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/MyProjectNameMigrationsDbContextModelSnapshot.cs @@ -16,10 +16,10 @@ namespace MyCompanyName.MyProjectName.Migrations { #pragma warning disable 612, 618 modelBuilder + .UseIdentityColumns() .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) - .HasAnnotation("ProductVersion", "3.1.8") .HasAnnotation("Relational:MaxIdentifierLength", 128) - .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + .HasAnnotation("ProductVersion", "5.0.0-rc.2.20475.6"); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => { @@ -28,99 +28,99 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("ApplicationName") - .HasColumnName("ApplicationName") + .HasMaxLength(96) .HasColumnType("nvarchar(96)") - .HasMaxLength(96); + .HasColumnName("ApplicationName"); b.Property("BrowserInfo") - .HasColumnName("BrowserInfo") + .HasMaxLength(512) .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasColumnName("BrowserInfo"); b.Property("ClientId") - .HasColumnName("ClientId") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("ClientId"); b.Property("ClientIpAddress") - .HasColumnName("ClientIpAddress") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("ClientIpAddress"); b.Property("ClientName") - .HasColumnName("ClientName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("ClientName"); b.Property("Comments") - .HasColumnName("Comments") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("Comments"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CorrelationId") - .HasColumnName("CorrelationId") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("CorrelationId"); b.Property("Exceptions") - .HasColumnName("Exceptions") + .HasMaxLength(4000) .HasColumnType("nvarchar(4000)") - .HasMaxLength(4000); + .HasColumnName("Exceptions"); b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration") - .HasColumnType("int"); + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); b.Property("ExecutionTime") .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("HttpMethod") - .HasColumnName("HttpMethod") + .HasMaxLength(16) .HasColumnType("nvarchar(16)") - .HasMaxLength(16); + .HasColumnName("HttpMethod"); b.Property("HttpStatusCode") - .HasColumnName("HttpStatusCode") - .HasColumnType("int"); + .HasColumnType("int") + .HasColumnName("HttpStatusCode"); b.Property("ImpersonatorTenantId") - .HasColumnName("ImpersonatorTenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("ImpersonatorTenantId"); b.Property("ImpersonatorUserId") - .HasColumnName("ImpersonatorUserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("ImpersonatorUserId"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("TenantName") .HasColumnType("nvarchar(max)"); b.Property("Url") - .HasColumnName("Url") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("Url"); b.Property("UserId") - .HasColumnName("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("UserId"); b.Property("UserName") - .HasColumnName("UserName") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("UserName"); b.HasKey("Id"); @@ -138,39 +138,39 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("AuditLogId") - .HasColumnName("AuditLogId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("AuditLogId"); b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration") - .HasColumnType("int"); + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); b.Property("ExecutionTime") - .HasColumnName("ExecutionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("ExecutionTime"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("MethodName") - .HasColumnName("MethodName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("MethodName"); b.Property("Parameters") - .HasColumnName("Parameters") + .HasMaxLength(2000) .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasColumnName("Parameters"); b.Property("ServiceName") - .HasColumnName("ServiceName") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("ServiceName"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -188,39 +188,39 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("AuditLogId") - .HasColumnName("AuditLogId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("AuditLogId"); b.Property("ChangeTime") - .HasColumnName("ChangeTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("ChangeTime"); b.Property("ChangeType") - .HasColumnName("ChangeType") - .HasColumnType("tinyint"); + .HasColumnType("tinyint") + .HasColumnName("ChangeType"); b.Property("EntityId") .IsRequired() - .HasColumnName("EntityId") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("EntityId"); b.Property("EntityTenantId") .HasColumnType("uniqueidentifier"); b.Property("EntityTypeFullName") .IsRequired() - .HasColumnName("EntityTypeFullName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("EntityTypeFullName"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -241,30 +241,30 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("NewValue") - .HasColumnName("NewValue") + .HasMaxLength(512) .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasColumnName("NewValue"); b.Property("OriginalValue") - .HasColumnName("OriginalValue") + .HasMaxLength(512) .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasColumnName("OriginalValue"); b.Property("PropertyName") .IsRequired() - .HasColumnName("PropertyName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("PropertyName"); b.Property("PropertyTypeFullName") .IsRequired() - .HasColumnName("PropertyTypeFullName") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("PropertyTypeFullName"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -281,17 +281,17 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsAbandoned") .ValueGeneratedOnAdd() @@ -300,13 +300,13 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("JobArgs") .IsRequired() - .HasColumnType("nvarchar(max)") - .HasMaxLength(1048576); + .HasMaxLength(1048576) + .HasColumnType("nvarchar(max)"); b.Property("JobName") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("LastTryTime") .HasColumnType("datetime2"); @@ -339,21 +339,21 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("ProviderKey") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ProviderName") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Value") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.HasKey("Id"); @@ -370,33 +370,33 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("Description") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsStatic") .HasColumnType("bit"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("Regex") - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); b.Property("RegexDescription") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("Required") .HasColumnType("bit"); @@ -444,39 +444,39 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDefault") - .HasColumnName("IsDefault") - .HasColumnType("bit"); + .HasColumnType("bit") + .HasColumnName("IsDefault"); b.Property("IsPublic") - .HasColumnName("IsPublic") - .HasColumnType("bit"); + .HasColumnType("bit") + .HasColumnName("IsPublic"); b.Property("IsStatic") - .HasColumnName("IsStatic") - .HasColumnType("bit"); + .HasColumnType("bit") + .HasColumnName("IsStatic"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("NormalizedName") .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -492,19 +492,19 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ClaimType") .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("ClaimValue") - .HasColumnType("nvarchar(1024)") - .HasMaxLength(1024); + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); b.Property("RoleId") .HasColumnType("uniqueidentifier"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -520,60 +520,60 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Action") - .HasColumnType("nvarchar(96)") - .HasMaxLength(96); + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); b.Property("ApplicationName") - .HasColumnType("nvarchar(96)") - .HasMaxLength(96); + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); b.Property("BrowserInfo") - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); b.Property("ClientId") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ClientIpAddress") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CorrelationId") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("CreationTime") .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("Identity") - .HasColumnType("nvarchar(96)") - .HasMaxLength(96); + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("TenantName") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("UserId") .HasColumnType("uniqueidentifier"); b.Property("UserName") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.HasKey("Id"); @@ -596,136 +596,136 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("AccessFailedCount") .ValueGeneratedOnAdd() - .HasColumnName("AccessFailedCount") .HasColumnType("int") - .HasDefaultValue(0); + .HasDefaultValue(0) + .HasColumnName("AccessFailedCount"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("Email") .IsRequired() - .HasColumnName("Email") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("Email"); b.Property("EmailConfirmed") .ValueGeneratedOnAdd() - .HasColumnName("EmailConfirmed") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("IsExternal") .ValueGeneratedOnAdd() - .HasColumnName("IsExternal") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsExternal"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("LockoutEnabled") .ValueGeneratedOnAdd() - .HasColumnName("LockoutEnabled") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("LockoutEnabled"); b.Property("LockoutEnd") .HasColumnType("datetimeoffset"); b.Property("Name") - .HasColumnName("Name") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("Name"); b.Property("NormalizedEmail") .IsRequired() - .HasColumnName("NormalizedEmail") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("NormalizedEmail"); b.Property("NormalizedUserName") .IsRequired() - .HasColumnName("NormalizedUserName") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("NormalizedUserName"); b.Property("PasswordHash") - .HasColumnName("PasswordHash") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("PasswordHash"); b.Property("PhoneNumber") - .HasColumnName("PhoneNumber") + .HasMaxLength(16) .HasColumnType("nvarchar(16)") - .HasMaxLength(16); + .HasColumnName("PhoneNumber"); b.Property("PhoneNumberConfirmed") .ValueGeneratedOnAdd() - .HasColumnName("PhoneNumberConfirmed") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); b.Property("SecurityStamp") .IsRequired() - .HasColumnName("SecurityStamp") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("SecurityStamp"); b.Property("Surname") - .HasColumnName("Surname") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("Surname"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("TwoFactorEnabled") .ValueGeneratedOnAdd() - .HasColumnName("TwoFactorEnabled") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("TwoFactorEnabled"); b.Property("UserName") .IsRequired() - .HasColumnName("UserName") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("UserName"); b.HasKey("Id"); @@ -747,16 +747,16 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ClaimType") .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("ClaimValue") - .HasColumnType("nvarchar(1024)") - .HasMaxLength(1024); + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("UserId") .HasColumnType("uniqueidentifier"); @@ -774,21 +774,21 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("LoginProvider") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ProviderDisplayName") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("ProviderKey") .IsRequired() - .HasColumnType("nvarchar(196)") - .HasMaxLength(196); + .HasMaxLength(196) + .HasColumnType("nvarchar(196)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("UserId", "LoginProvider"); @@ -806,16 +806,16 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("OrganizationUnitId", "UserId"); @@ -833,8 +833,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("UserId", "RoleId"); @@ -849,16 +849,16 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("LoginProvider") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Name") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("Value") .HasColumnType("nvarchar(max)"); @@ -876,62 +876,62 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Code") .IsRequired() - .HasColumnName("Code") + .HasMaxLength(95) .HasColumnType("nvarchar(95)") - .HasMaxLength(95); + .HasColumnName("Code"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("DisplayName") .IsRequired() - .HasColumnName("DisplayName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("DisplayName"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("ParentId") .HasColumnType("uniqueidentifier"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -951,16 +951,16 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("OrganizationUnitId", "RoleId"); @@ -976,64 +976,64 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("AllowedAccessTokenSigningAlgorithms") - .HasColumnType("nvarchar(100)") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("Description") - .HasColumnType("nvarchar(1000)") - .HasMaxLength(1000); + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); b.Property("DisplayName") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Enabled") .HasColumnType("bit"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ShowInDiscoveryDocument") .HasColumnType("bit"); @@ -1052,8 +1052,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.HasKey("ApiResourceId", "Type"); @@ -1066,12 +1066,12 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Key") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("Value") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.HasKey("ApiResourceId", "Key", "Value"); @@ -1084,8 +1084,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Scope") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.HasKey("ApiResourceId", "Scope"); @@ -1098,16 +1098,16 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("Value") - .HasColumnType("nvarchar(4000)") - .HasMaxLength(4000); + .HasMaxLength(4000) + .HasColumnType("nvarchar(4000)"); b.Property("Description") - .HasColumnType("nvarchar(1000)") - .HasMaxLength(1000); + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); b.Property("Expiration") .HasColumnType("datetime2"); @@ -1125,33 +1125,33 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("Description") - .HasColumnType("nvarchar(1000)") - .HasMaxLength(1000); + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); b.Property("DisplayName") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Emphasize") .HasColumnType("bit"); @@ -1160,27 +1160,27 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("bit"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Required") .HasColumnType("bit"); @@ -1202,8 +1202,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.HasKey("ApiScopeId", "Type"); @@ -1216,12 +1216,12 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Key") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("Value") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.HasKey("ApiScopeId", "Key", "Value"); @@ -1256,8 +1256,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("bit"); b.Property("AllowedIdentityTokenSigningAlgorithms") - .HasColumnType("nvarchar(100)") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("AlwaysIncludeUserClaimsInIdToken") .HasColumnType("bit"); @@ -1272,54 +1272,54 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("bit"); b.Property("BackChannelLogoutUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.Property("ClientClaimsPrefix") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ClientId") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ClientName") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ClientUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("ConsentLifetime") .HasColumnType("int"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("Description") - .HasColumnType("nvarchar(1000)") - .HasMaxLength(1000); + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); b.Property("DeviceCodeLifetime") .HasColumnType("int"); @@ -1331,15 +1331,15 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("bit"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("FrontChannelLogoutSessionRequired") .HasColumnType("bit"); b.Property("FrontChannelLogoutUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.Property("IdentityTokenLifetime") .HasColumnType("int"); @@ -1349,30 +1349,30 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("LogoUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.Property("PairWiseSubjectSalt") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ProtocolType") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("RefreshTokenExpiration") .HasColumnType("int"); @@ -1399,8 +1399,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("bit"); b.Property("UserCodeType") - .HasColumnType("nvarchar(100)") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("UserSsoLifetime") .HasColumnType("int"); @@ -1418,12 +1418,12 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("Value") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.HasKey("ClientId", "Type", "Value"); @@ -1436,8 +1436,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Origin") - .HasColumnType("nvarchar(150)") - .HasMaxLength(150); + .HasMaxLength(150) + .HasColumnType("nvarchar(150)"); b.HasKey("ClientId", "Origin"); @@ -1450,8 +1450,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("GrantType") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.HasKey("ClientId", "GrantType"); @@ -1464,8 +1464,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Provider") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.HasKey("ClientId", "Provider"); @@ -1478,8 +1478,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("PostLogoutRedirectUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.HasKey("ClientId", "PostLogoutRedirectUri"); @@ -1492,12 +1492,12 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Key") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("Value") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.HasKey("ClientId", "Key", "Value"); @@ -1510,8 +1510,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("RedirectUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.HasKey("ClientId", "RedirectUri"); @@ -1524,8 +1524,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Scope") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.HasKey("ClientId", "Scope"); @@ -1538,16 +1538,16 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("Value") - .HasColumnType("nvarchar(4000)") - .HasMaxLength(4000); + .HasMaxLength(4000) + .HasColumnType("nvarchar(4000)"); b.Property("Description") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.Property("Expiration") .HasColumnType("datetime2"); @@ -1565,57 +1565,57 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ClientId") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("Data") .IsRequired() - .HasColumnType("nvarchar(max)") - .HasMaxLength(50000); + .HasMaxLength(50000) + .HasColumnType("nvarchar(max)"); b.Property("Description") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("DeviceCode") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Expiration") .IsRequired() .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("SessionId") - .HasColumnType("nvarchar(100)") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("SubjectId") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("UserCode") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.HasKey("Id"); @@ -1632,19 +1632,19 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Grants.PersistedGrant", b => { b.Property("Key") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ClientId") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("ConsumedTime") .HasColumnType("datetime2"); @@ -1654,35 +1654,35 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Data") .IsRequired() - .HasColumnType("nvarchar(max)") - .HasMaxLength(50000); + .HasMaxLength(50000) + .HasColumnType("nvarchar(max)"); b.Property("Description") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Expiration") .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("Id") .HasColumnType("uniqueidentifier"); b.Property("SessionId") - .HasColumnType("nvarchar(100)") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("SubjectId") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Type") .IsRequired() - .HasColumnType("nvarchar(50)") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.HasKey("Key"); @@ -1703,33 +1703,33 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("Description") - .HasColumnType("nvarchar(1000)") - .HasMaxLength(1000); + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); b.Property("DisplayName") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Emphasize") .HasColumnType("bit"); @@ -1738,27 +1738,27 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("bit"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Required") .HasColumnType("bit"); @@ -1780,8 +1780,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.HasKey("IdentityResourceId", "Type"); @@ -1794,12 +1794,12 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Key") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("Value") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.HasKey("IdentityResourceId", "Key", "Value"); @@ -1814,22 +1814,22 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("ProviderKey") .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ProviderName") .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -1846,21 +1846,21 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("ProviderKey") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ProviderName") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Value") .IsRequired() - .HasColumnType("nvarchar(2048)") - .HasMaxLength(2048); + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); b.HasKey("Id"); @@ -1877,48 +1877,48 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.HasKey("Id"); @@ -1933,13 +1933,13 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Name") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Value") .IsRequired() - .HasColumnType("nvarchar(1024)") - .HasMaxLength(1024); + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); b.HasKey("TenantId", "Name"); @@ -2222,6 +2222,92 @@ namespace MyCompanyName.MyProjectName.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Navigation("Actions"); + + b.Navigation("EntityChanges"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Navigation("PropertyChanges"); + }); + + 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"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Navigation("ConnectionStrings"); + }); #pragma warning restore 612, 618 } } diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/Migrations/20200928072851_Initial.Designer.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/Migrations/20201019021119_Initial.Designer.cs similarity index 63% rename from templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/Migrations/20200928072851_Initial.Designer.cs rename to templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/Migrations/20201019021119_Initial.Designer.cs index 2ad2035056..119214a82e 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/Migrations/20200928072851_Initial.Designer.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/Migrations/20201019021119_Initial.Designer.cs @@ -11,17 +11,17 @@ using Volo.Abp.EntityFrameworkCore; namespace MyCompanyName.MyProjectName.Migrations { [DbContext(typeof(MyProjectNameHttpApiHostMigrationsDbContext))] - [Migration("20200928072851_Initial")] + [Migration("20201019021119_Initial")] partial class Initial { protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder + .UseIdentityColumns() .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) - .HasAnnotation("ProductVersion", "3.1.6") .HasAnnotation("Relational:MaxIdentifierLength", 128) - .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + .HasAnnotation("ProductVersion", "5.0.0-rc.2.20475.6"); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => { @@ -30,99 +30,99 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("ApplicationName") - .HasColumnName("ApplicationName") + .HasMaxLength(96) .HasColumnType("nvarchar(96)") - .HasMaxLength(96); + .HasColumnName("ApplicationName"); b.Property("BrowserInfo") - .HasColumnName("BrowserInfo") + .HasMaxLength(512) .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasColumnName("BrowserInfo"); b.Property("ClientId") - .HasColumnName("ClientId") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("ClientId"); b.Property("ClientIpAddress") - .HasColumnName("ClientIpAddress") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("ClientIpAddress"); b.Property("ClientName") - .HasColumnName("ClientName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("ClientName"); b.Property("Comments") - .HasColumnName("Comments") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("Comments"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CorrelationId") - .HasColumnName("CorrelationId") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("CorrelationId"); b.Property("Exceptions") - .HasColumnName("Exceptions") + .HasMaxLength(4000) .HasColumnType("nvarchar(4000)") - .HasMaxLength(4000); + .HasColumnName("Exceptions"); b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration") - .HasColumnType("int"); + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); b.Property("ExecutionTime") .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("HttpMethod") - .HasColumnName("HttpMethod") + .HasMaxLength(16) .HasColumnType("nvarchar(16)") - .HasMaxLength(16); + .HasColumnName("HttpMethod"); b.Property("HttpStatusCode") - .HasColumnName("HttpStatusCode") - .HasColumnType("int"); + .HasColumnType("int") + .HasColumnName("HttpStatusCode"); b.Property("ImpersonatorTenantId") - .HasColumnName("ImpersonatorTenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("ImpersonatorTenantId"); b.Property("ImpersonatorUserId") - .HasColumnName("ImpersonatorUserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("ImpersonatorUserId"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("TenantName") .HasColumnType("nvarchar(max)"); b.Property("Url") - .HasColumnName("Url") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("Url"); b.Property("UserId") - .HasColumnName("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("UserId"); b.Property("UserName") - .HasColumnName("UserName") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("UserName"); b.HasKey("Id"); @@ -140,39 +140,39 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("AuditLogId") - .HasColumnName("AuditLogId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("AuditLogId"); b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration") - .HasColumnType("int"); + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); b.Property("ExecutionTime") - .HasColumnName("ExecutionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("ExecutionTime"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("MethodName") - .HasColumnName("MethodName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("MethodName"); b.Property("Parameters") - .HasColumnName("Parameters") + .HasMaxLength(2000) .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasColumnName("Parameters"); b.Property("ServiceName") - .HasColumnName("ServiceName") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("ServiceName"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -190,39 +190,39 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("AuditLogId") - .HasColumnName("AuditLogId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("AuditLogId"); b.Property("ChangeTime") - .HasColumnName("ChangeTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("ChangeTime"); b.Property("ChangeType") - .HasColumnName("ChangeType") - .HasColumnType("tinyint"); + .HasColumnType("tinyint") + .HasColumnName("ChangeType"); b.Property("EntityId") .IsRequired() - .HasColumnName("EntityId") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("EntityId"); b.Property("EntityTenantId") .HasColumnType("uniqueidentifier"); b.Property("EntityTypeFullName") .IsRequired() - .HasColumnName("EntityTypeFullName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("EntityTypeFullName"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -243,30 +243,30 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("NewValue") - .HasColumnName("NewValue") + .HasMaxLength(512) .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasColumnName("NewValue"); b.Property("OriginalValue") - .HasColumnName("OriginalValue") + .HasMaxLength(512) .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasColumnName("OriginalValue"); b.Property("PropertyName") .IsRequired() - .HasColumnName("PropertyName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("PropertyName"); b.Property("PropertyTypeFullName") .IsRequired() - .HasColumnName("PropertyTypeFullName") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("PropertyTypeFullName"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -283,22 +283,22 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("ProviderKey") .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ProviderName") .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -315,21 +315,21 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("ProviderKey") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ProviderName") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Value") .IsRequired() - .HasColumnType("nvarchar(2048)") - .HasMaxLength(2048); + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); b.HasKey("Id"); @@ -364,6 +364,18 @@ namespace MyCompanyName.MyProjectName.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Navigation("Actions"); + + b.Navigation("EntityChanges"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Navigation("PropertyChanges"); + }); #pragma warning restore 612, 618 } } diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/Migrations/20200928072851_Initial.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/Migrations/20201019021119_Initial.cs similarity index 50% rename from templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/Migrations/20200928072851_Initial.cs rename to templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/Migrations/20201019021119_Initial.cs index 91345ac0a7..71b8ab569f 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/Migrations/20200928072851_Initial.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/Migrations/20201019021119_Initial.cs @@ -11,28 +11,28 @@ namespace MyCompanyName.MyProjectName.Migrations 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) + Id = table.Column(type: "uniqueidentifier", nullable: false), + ApplicationName = table.Column(type: "nvarchar(96)", maxLength: 96, nullable: true), + UserId = table.Column(type: "uniqueidentifier", nullable: true), + UserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + TenantName = table.Column(type: "nvarchar(max)", nullable: true), + ImpersonatorUserId = table.Column(type: "uniqueidentifier", nullable: true), + ImpersonatorTenantId = table.Column(type: "uniqueidentifier", nullable: true), + ExecutionTime = table.Column(type: "datetime2", nullable: false), + ExecutionDuration = table.Column(type: "int", nullable: false), + ClientIpAddress = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ClientName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + ClientId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + CorrelationId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + BrowserInfo = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + HttpMethod = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: true), + Url = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + Exceptions = table.Column(type: "nvarchar(4000)", maxLength: 4000, nullable: true), + Comments = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + HttpStatusCode = table.Column(type: "int", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) }, constraints: table => { @@ -43,11 +43,11 @@ namespace MyCompanyName.MyProjectName.Migrations 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) + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + ProviderName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ProviderKey = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) }, constraints: table => { @@ -58,11 +58,11 @@ namespace MyCompanyName.MyProjectName.Migrations 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) + Id = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + Value = table.Column(type: "nvarchar(2048)", maxLength: 2048, nullable: false), + ProviderName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ProviderKey = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true) }, constraints: table => { @@ -73,15 +73,15 @@ namespace MyCompanyName.MyProjectName.Migrations 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) + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + AuditLogId = table.Column(type: "uniqueidentifier", nullable: false), + ServiceName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + MethodName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + Parameters = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), + ExecutionTime = table.Column(type: "datetime2", nullable: false), + ExecutionDuration = table.Column(type: "int", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true) }, constraints: table => { @@ -98,15 +98,15 @@ namespace MyCompanyName.MyProjectName.Migrations 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) + Id = table.Column(type: "uniqueidentifier", nullable: false), + AuditLogId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ChangeTime = table.Column(type: "datetime2", nullable: false), + ChangeType = table.Column(type: "tinyint", nullable: false), + EntityTenantId = table.Column(type: "uniqueidentifier", nullable: true), + EntityId = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + EntityTypeFullName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true) }, constraints: table => { @@ -123,13 +123,13 @@ namespace MyCompanyName.MyProjectName.Migrations 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) + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + EntityChangeId = table.Column(type: "uniqueidentifier", nullable: false), + NewValue = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + OriginalValue = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + PropertyName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + PropertyTypeFullName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) }, constraints: table => { diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/Migrations/MyProjectNameHttpApiHostMigrationsDbContextModelSnapshot.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/Migrations/MyProjectNameHttpApiHostMigrationsDbContextModelSnapshot.cs index 8a6bbe1a3c..5ede5096a0 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/Migrations/MyProjectNameHttpApiHostMigrationsDbContextModelSnapshot.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/Migrations/MyProjectNameHttpApiHostMigrationsDbContextModelSnapshot.cs @@ -16,10 +16,10 @@ namespace MyCompanyName.MyProjectName.Migrations { #pragma warning disable 612, 618 modelBuilder + .UseIdentityColumns() .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) - .HasAnnotation("ProductVersion", "3.1.6") .HasAnnotation("Relational:MaxIdentifierLength", 128) - .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + .HasAnnotation("ProductVersion", "5.0.0-rc.2.20475.6"); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => { @@ -28,99 +28,99 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("ApplicationName") - .HasColumnName("ApplicationName") + .HasMaxLength(96) .HasColumnType("nvarchar(96)") - .HasMaxLength(96); + .HasColumnName("ApplicationName"); b.Property("BrowserInfo") - .HasColumnName("BrowserInfo") + .HasMaxLength(512) .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasColumnName("BrowserInfo"); b.Property("ClientId") - .HasColumnName("ClientId") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("ClientId"); b.Property("ClientIpAddress") - .HasColumnName("ClientIpAddress") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("ClientIpAddress"); b.Property("ClientName") - .HasColumnName("ClientName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("ClientName"); b.Property("Comments") - .HasColumnName("Comments") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("Comments"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CorrelationId") - .HasColumnName("CorrelationId") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("CorrelationId"); b.Property("Exceptions") - .HasColumnName("Exceptions") + .HasMaxLength(4000) .HasColumnType("nvarchar(4000)") - .HasMaxLength(4000); + .HasColumnName("Exceptions"); b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration") - .HasColumnType("int"); + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); b.Property("ExecutionTime") .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("HttpMethod") - .HasColumnName("HttpMethod") + .HasMaxLength(16) .HasColumnType("nvarchar(16)") - .HasMaxLength(16); + .HasColumnName("HttpMethod"); b.Property("HttpStatusCode") - .HasColumnName("HttpStatusCode") - .HasColumnType("int"); + .HasColumnType("int") + .HasColumnName("HttpStatusCode"); b.Property("ImpersonatorTenantId") - .HasColumnName("ImpersonatorTenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("ImpersonatorTenantId"); b.Property("ImpersonatorUserId") - .HasColumnName("ImpersonatorUserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("ImpersonatorUserId"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("TenantName") .HasColumnType("nvarchar(max)"); b.Property("Url") - .HasColumnName("Url") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("Url"); b.Property("UserId") - .HasColumnName("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("UserId"); b.Property("UserName") - .HasColumnName("UserName") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("UserName"); b.HasKey("Id"); @@ -138,39 +138,39 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("AuditLogId") - .HasColumnName("AuditLogId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("AuditLogId"); b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration") - .HasColumnType("int"); + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); b.Property("ExecutionTime") - .HasColumnName("ExecutionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("ExecutionTime"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("MethodName") - .HasColumnName("MethodName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("MethodName"); b.Property("Parameters") - .HasColumnName("Parameters") + .HasMaxLength(2000) .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasColumnName("Parameters"); b.Property("ServiceName") - .HasColumnName("ServiceName") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("ServiceName"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -188,39 +188,39 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("AuditLogId") - .HasColumnName("AuditLogId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("AuditLogId"); b.Property("ChangeTime") - .HasColumnName("ChangeTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("ChangeTime"); b.Property("ChangeType") - .HasColumnName("ChangeType") - .HasColumnType("tinyint"); + .HasColumnType("tinyint") + .HasColumnName("ChangeType"); b.Property("EntityId") .IsRequired() - .HasColumnName("EntityId") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("EntityId"); b.Property("EntityTenantId") .HasColumnType("uniqueidentifier"); b.Property("EntityTypeFullName") .IsRequired() - .HasColumnName("EntityTypeFullName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("EntityTypeFullName"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -241,30 +241,30 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("NewValue") - .HasColumnName("NewValue") + .HasMaxLength(512) .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasColumnName("NewValue"); b.Property("OriginalValue") - .HasColumnName("OriginalValue") + .HasMaxLength(512) .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasColumnName("OriginalValue"); b.Property("PropertyName") .IsRequired() - .HasColumnName("PropertyName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("PropertyName"); b.Property("PropertyTypeFullName") .IsRequired() - .HasColumnName("PropertyTypeFullName") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("PropertyTypeFullName"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -281,22 +281,22 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("ProviderKey") .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ProviderName") .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -313,21 +313,21 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("ProviderKey") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ProviderName") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Value") .IsRequired() - .HasColumnType("nvarchar(2048)") - .HasMaxLength(2048); + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); b.HasKey("Id"); @@ -362,6 +362,18 @@ namespace MyCompanyName.MyProjectName.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Navigation("Actions"); + + b.Navigation("EntityChanges"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Navigation("PropertyChanges"); + }); #pragma warning restore 612, 618 } } diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20201013055209_Initial.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20201013055209_Initial.cs deleted file mode 100644 index d18a756fc0..0000000000 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20201013055209_Initial.cs +++ /dev/null @@ -1,1232 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace MyCompanyName.MyProjectName.Migrations -{ - public partial class Initial : 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: "AbpClaimTypes", - columns: table => new - { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - 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: "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.CreateTable( - name: "AbpLinkUsers", - columns: table => new - { - Id = table.Column(nullable: false), - SourceUserId = table.Column(nullable: false), - SourceTenantId = table.Column(nullable: true), - TargetUserId = table.Column(nullable: false), - TargetTenantId = table.Column(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpLinkUsers", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AbpOrganizationUnits", - 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), - 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: "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: "AbpRoles", - 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), - 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: "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.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: "AbpUsers", - 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), - 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), - IsExternal = table.Column(nullable: false, defaultValue: 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(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: 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(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), - 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(maxLength: 40, 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(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: 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(maxLength: 40, 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: 50000, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerPersistedGrants", x => x.Key); - }); - - 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: "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_OrganizationUnitId", - column: x => x.OrganizationUnitId, - principalTable: "AbpOrganizationUnits", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_AbpOrganizationUnitRoles_AbpRoles_RoleId", - column: x => x.RoleId, - principalTable: "AbpRoles", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AbpRoleClaims", - columns: table => new - { - Id = table.Column(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: "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.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: "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_OrganizationUnitId", - column: x => x.OrganizationUnitId, - principalTable: "AbpOrganizationUnits", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_AbpUserOrganizationUnits_AbpUsers_UserId", - column: x => x.UserId, - principalTable: "AbpUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AbpUserRoles", - columns: table => new - { - UserId = table.Column(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_ApiResourceId", - 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_ApiResourceId", - 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: 4000, 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_ApiResourceId", - 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_ClientId", - 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_ClientId", - 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: 2000, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerClientPostLogoutRedirectUris", x => new { x.ClientId, x.PostLogoutRedirectUri }); - table.ForeignKey( - name: "FK_IdentityServerClientPostLogoutRedirectUris_IdentityServerClients_ClientId", - 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: 2000, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerClientRedirectUris", x => new { x.ClientId, x.RedirectUri }); - table.ForeignKey( - name: "FK_IdentityServerClientRedirectUris_IdentityServerClients_ClientId", - 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: 4000, 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_IdentityResourceId", - column: x => x.IdentityResourceId, - principalTable: "IdentityServerIdentityResources", - 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.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_ApiResourceId_Name", - columns: x => new { x.ApiResourceId, x.Name }, - principalTable: "IdentityServerApiScopes", - principalColumns: new[] { "ApiResourceId", "Name" }, - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateIndex( - name: "IX_AbpAuditLogActions_AuditLogId", - table: "AbpAuditLogActions", - column: "AuditLogId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpAuditLogActions_TenantId_ServiceName_MethodName_ExecutionTime", - 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"); - - migrationBuilder.CreateIndex( - name: "IX_AbpFeatureValues_Name_ProviderName_ProviderKey", - table: "AbpFeatureValues", - columns: new[] { "Name", "ProviderName", "ProviderKey" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpLinkUsers_SourceUserId_SourceTenantId_TargetUserId_TargetTenantId", - table: "AbpLinkUsers", - columns: new[] { "SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId" }, - unique: true, - filter: "[SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_AbpOrganizationUnitRoles_RoleId_OrganizationUnitId", - table: "AbpOrganizationUnitRoles", - columns: new[] { "RoleId", "OrganizationUnitId" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpOrganizationUnits_Code", - table: "AbpOrganizationUnits", - column: "Code"); - - migrationBuilder.CreateIndex( - name: "IX_AbpOrganizationUnits_ParentId", - table: "AbpOrganizationUnits", - column: "ParentId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpPermissionGrants_Name_ProviderName_ProviderKey", - table: "AbpPermissionGrants", - columns: new[] { "Name", "ProviderName", "ProviderKey" }); - - 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_AbpSettings_Name_ProviderName_ProviderKey", - table: "AbpSettings", - columns: new[] { "Name", "ProviderName", "ProviderKey" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpTenants_Name", - table: "AbpTenants", - column: "Name"); - - 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", - 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: "AbpAuditLogActions"); - - migrationBuilder.DropTable( - name: "AbpClaimTypes"); - - migrationBuilder.DropTable( - name: "AbpEntityPropertyChanges"); - - migrationBuilder.DropTable( - name: "AbpFeatureValues"); - - migrationBuilder.DropTable( - name: "AbpLinkUsers"); - - migrationBuilder.DropTable( - name: "AbpOrganizationUnitRoles"); - - migrationBuilder.DropTable( - name: "AbpPermissionGrants"); - - migrationBuilder.DropTable( - name: "AbpRoleClaims"); - - migrationBuilder.DropTable( - name: "AbpSecurityLogs"); - - migrationBuilder.DropTable( - name: "AbpSettings"); - - migrationBuilder.DropTable( - name: "AbpTenantConnectionStrings"); - - migrationBuilder.DropTable( - name: "AbpUserClaims"); - - migrationBuilder.DropTable( - name: "AbpUserLogins"); - - migrationBuilder.DropTable( - name: "AbpUserOrganizationUnits"); - - 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: "AbpEntityChanges"); - - migrationBuilder.DropTable( - name: "AbpTenants"); - - migrationBuilder.DropTable( - name: "AbpOrganizationUnits"); - - migrationBuilder.DropTable( - name: "AbpRoles"); - - migrationBuilder.DropTable( - name: "AbpUsers"); - - migrationBuilder.DropTable( - name: "IdentityServerApiScopes"); - - migrationBuilder.DropTable( - name: "IdentityServerClients"); - - migrationBuilder.DropTable( - name: "IdentityServerIdentityResources"); - - migrationBuilder.DropTable( - name: "AbpAuditLogs"); - - migrationBuilder.DropTable( - name: "IdentityServerApiResources"); - } - } -} diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20201013055209_Initial.Designer.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20201019021120_Initial.Designer.cs similarity index 61% rename from templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20201013055209_Initial.Designer.cs rename to templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20201019021120_Initial.Designer.cs index d8f36ad2ce..0f3b3b90b9 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20201013055209_Initial.Designer.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20201019021120_Initial.Designer.cs @@ -11,17 +11,17 @@ using Volo.Abp.EntityFrameworkCore; namespace MyCompanyName.MyProjectName.Migrations { [DbContext(typeof(IdentityServerHostMigrationsDbContext))] - [Migration("20201013055209_Initial")] + [Migration("20201019021120_Initial")] partial class Initial { protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder + .UseIdentityColumns() .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) - .HasAnnotation("ProductVersion", "3.1.8") .HasAnnotation("Relational:MaxIdentifierLength", 128) - .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + .HasAnnotation("ProductVersion", "5.0.0-rc.2.20475.6"); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => { @@ -30,99 +30,99 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("ApplicationName") - .HasColumnName("ApplicationName") + .HasMaxLength(96) .HasColumnType("nvarchar(96)") - .HasMaxLength(96); + .HasColumnName("ApplicationName"); b.Property("BrowserInfo") - .HasColumnName("BrowserInfo") + .HasMaxLength(512) .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasColumnName("BrowserInfo"); b.Property("ClientId") - .HasColumnName("ClientId") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("ClientId"); b.Property("ClientIpAddress") - .HasColumnName("ClientIpAddress") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("ClientIpAddress"); b.Property("ClientName") - .HasColumnName("ClientName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("ClientName"); b.Property("Comments") - .HasColumnName("Comments") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("Comments"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CorrelationId") - .HasColumnName("CorrelationId") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("CorrelationId"); b.Property("Exceptions") - .HasColumnName("Exceptions") + .HasMaxLength(4000) .HasColumnType("nvarchar(4000)") - .HasMaxLength(4000); + .HasColumnName("Exceptions"); b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration") - .HasColumnType("int"); + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); b.Property("ExecutionTime") .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("HttpMethod") - .HasColumnName("HttpMethod") + .HasMaxLength(16) .HasColumnType("nvarchar(16)") - .HasMaxLength(16); + .HasColumnName("HttpMethod"); b.Property("HttpStatusCode") - .HasColumnName("HttpStatusCode") - .HasColumnType("int"); + .HasColumnType("int") + .HasColumnName("HttpStatusCode"); b.Property("ImpersonatorTenantId") - .HasColumnName("ImpersonatorTenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("ImpersonatorTenantId"); b.Property("ImpersonatorUserId") - .HasColumnName("ImpersonatorUserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("ImpersonatorUserId"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("TenantName") .HasColumnType("nvarchar(max)"); b.Property("Url") - .HasColumnName("Url") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("Url"); b.Property("UserId") - .HasColumnName("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("UserId"); b.Property("UserName") - .HasColumnName("UserName") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("UserName"); b.HasKey("Id"); @@ -140,39 +140,39 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("AuditLogId") - .HasColumnName("AuditLogId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("AuditLogId"); b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration") - .HasColumnType("int"); + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); b.Property("ExecutionTime") - .HasColumnName("ExecutionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("ExecutionTime"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("MethodName") - .HasColumnName("MethodName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("MethodName"); b.Property("Parameters") - .HasColumnName("Parameters") + .HasMaxLength(2000) .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasColumnName("Parameters"); b.Property("ServiceName") - .HasColumnName("ServiceName") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("ServiceName"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -190,39 +190,39 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("AuditLogId") - .HasColumnName("AuditLogId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("AuditLogId"); b.Property("ChangeTime") - .HasColumnName("ChangeTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("ChangeTime"); b.Property("ChangeType") - .HasColumnName("ChangeType") - .HasColumnType("tinyint"); + .HasColumnType("tinyint") + .HasColumnName("ChangeType"); b.Property("EntityId") .IsRequired() - .HasColumnName("EntityId") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("EntityId"); b.Property("EntityTenantId") .HasColumnType("uniqueidentifier"); b.Property("EntityTypeFullName") .IsRequired() - .HasColumnName("EntityTypeFullName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("EntityTypeFullName"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -243,30 +243,30 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("NewValue") - .HasColumnName("NewValue") + .HasMaxLength(512) .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasColumnName("NewValue"); b.Property("OriginalValue") - .HasColumnName("OriginalValue") + .HasMaxLength(512) .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasColumnName("OriginalValue"); b.Property("PropertyName") .IsRequired() - .HasColumnName("PropertyName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("PropertyName"); b.Property("PropertyTypeFullName") .IsRequired() - .HasColumnName("PropertyTypeFullName") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("PropertyTypeFullName"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -283,21 +283,21 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("ProviderKey") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ProviderName") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Value") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.HasKey("Id"); @@ -314,33 +314,33 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("Description") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsStatic") .HasColumnType("bit"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("Regex") - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); b.Property("RegexDescription") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("Required") .HasColumnType("bit"); @@ -388,39 +388,39 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDefault") - .HasColumnName("IsDefault") - .HasColumnType("bit"); + .HasColumnType("bit") + .HasColumnName("IsDefault"); b.Property("IsPublic") - .HasColumnName("IsPublic") - .HasColumnType("bit"); + .HasColumnType("bit") + .HasColumnName("IsPublic"); b.Property("IsStatic") - .HasColumnName("IsStatic") - .HasColumnType("bit"); + .HasColumnType("bit") + .HasColumnName("IsStatic"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("NormalizedName") .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -436,19 +436,19 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ClaimType") .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("ClaimValue") - .HasColumnType("nvarchar(1024)") - .HasMaxLength(1024); + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); b.Property("RoleId") .HasColumnType("uniqueidentifier"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -464,60 +464,60 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Action") - .HasColumnType("nvarchar(96)") - .HasMaxLength(96); + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); b.Property("ApplicationName") - .HasColumnType("nvarchar(96)") - .HasMaxLength(96); + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); b.Property("BrowserInfo") - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); b.Property("ClientId") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ClientIpAddress") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CorrelationId") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("CreationTime") .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("Identity") - .HasColumnType("nvarchar(96)") - .HasMaxLength(96); + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("TenantName") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("UserId") .HasColumnType("uniqueidentifier"); b.Property("UserName") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.HasKey("Id"); @@ -540,136 +540,136 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("AccessFailedCount") .ValueGeneratedOnAdd() - .HasColumnName("AccessFailedCount") .HasColumnType("int") - .HasDefaultValue(0); + .HasDefaultValue(0) + .HasColumnName("AccessFailedCount"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("Email") .IsRequired() - .HasColumnName("Email") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("Email"); b.Property("EmailConfirmed") .ValueGeneratedOnAdd() - .HasColumnName("EmailConfirmed") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("IsExternal") .ValueGeneratedOnAdd() - .HasColumnName("IsExternal") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsExternal"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("LockoutEnabled") .ValueGeneratedOnAdd() - .HasColumnName("LockoutEnabled") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("LockoutEnabled"); b.Property("LockoutEnd") .HasColumnType("datetimeoffset"); b.Property("Name") - .HasColumnName("Name") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("Name"); b.Property("NormalizedEmail") .IsRequired() - .HasColumnName("NormalizedEmail") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("NormalizedEmail"); b.Property("NormalizedUserName") .IsRequired() - .HasColumnName("NormalizedUserName") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("NormalizedUserName"); b.Property("PasswordHash") - .HasColumnName("PasswordHash") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("PasswordHash"); b.Property("PhoneNumber") - .HasColumnName("PhoneNumber") + .HasMaxLength(16) .HasColumnType("nvarchar(16)") - .HasMaxLength(16); + .HasColumnName("PhoneNumber"); b.Property("PhoneNumberConfirmed") .ValueGeneratedOnAdd() - .HasColumnName("PhoneNumberConfirmed") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); b.Property("SecurityStamp") .IsRequired() - .HasColumnName("SecurityStamp") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("SecurityStamp"); b.Property("Surname") - .HasColumnName("Surname") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("Surname"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("TwoFactorEnabled") .ValueGeneratedOnAdd() - .HasColumnName("TwoFactorEnabled") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("TwoFactorEnabled"); b.Property("UserName") .IsRequired() - .HasColumnName("UserName") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("UserName"); b.HasKey("Id"); @@ -691,16 +691,16 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ClaimType") .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("ClaimValue") - .HasColumnType("nvarchar(1024)") - .HasMaxLength(1024); + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("UserId") .HasColumnType("uniqueidentifier"); @@ -718,21 +718,21 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("LoginProvider") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ProviderDisplayName") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("ProviderKey") .IsRequired() - .HasColumnType("nvarchar(196)") - .HasMaxLength(196); + .HasMaxLength(196) + .HasColumnType("nvarchar(196)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("UserId", "LoginProvider"); @@ -750,16 +750,16 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("OrganizationUnitId", "UserId"); @@ -777,8 +777,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("UserId", "RoleId"); @@ -793,16 +793,16 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("LoginProvider") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Name") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("Value") .HasColumnType("nvarchar(max)"); @@ -820,62 +820,62 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Code") .IsRequired() - .HasColumnName("Code") + .HasMaxLength(95) .HasColumnType("nvarchar(95)") - .HasMaxLength(95); + .HasColumnName("Code"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("DisplayName") .IsRequired() - .HasColumnName("DisplayName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("DisplayName"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("ParentId") .HasColumnType("uniqueidentifier"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -895,16 +895,16 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("OrganizationUnitId", "RoleId"); @@ -919,67 +919,74 @@ namespace MyCompanyName.MyProjectName.Migrations .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); + b.Property("AllowedAccessTokenSigningAlgorithms") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("Description") - .HasColumnType("nvarchar(1000)") - .HasMaxLength(1000); + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); b.Property("DisplayName") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Enabled") .HasColumnType("bit"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); - b.Property("Properties") - .HasColumnType("nvarchar(max)"); + b.Property("ShowInDiscoveryDocument") + .HasColumnType("bit"); b.HasKey("Id"); + b.HasIndex("Name") + .IsUnique(); + b.ToTable("IdentityServerApiResources"); }); @@ -989,86 +996,180 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.HasKey("ApiResourceId", "Type"); - b.ToTable("IdentityServerApiClaims"); + b.ToTable("IdentityServerApiResourceClaims"); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScope", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b => { b.Property("ApiResourceId") .HasColumnType("uniqueidentifier"); - b.Property("Name") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + 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") - .HasColumnType("nvarchar(1000)") - .HasMaxLength(1000); + .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") + .ValueGeneratedOnAdd() + .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") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .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("ApiResourceId", "Name"); + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); b.ToTable("IdentityServerApiScopes"); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeClaim", b => { - b.Property("ApiResourceId") + b.Property("ApiScopeId") .HasColumnType("uniqueidentifier"); - b.Property("Name") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - b.Property("Type") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); - b.HasKey("ApiResourceId", "Name", "Type"); + b.HasKey("ApiScopeId", "Type"); b.ToTable("IdentityServerApiScopeClaims"); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeProperty", b => { - b.Property("ApiResourceId") + b.Property("ApiScopeId") .HasColumnType("uniqueidentifier"); - b.Property("Type") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + b.Property("Key") + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("Value") - .HasColumnType("nvarchar(4000)") - .HasMaxLength(4000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); - b.Property("Description") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); - - b.Property("Expiration") - .HasColumnType("datetime2"); + b.HasKey("ApiScopeId", "Key", "Value"); - b.HasKey("ApiResourceId", "Type", "Value"); - - b.ToTable("IdentityServerApiSecrets"); + b.ToTable("IdentityServerApiScopeProperties"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b => @@ -1098,6 +1199,10 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("AllowRememberConsent") .HasColumnType("bit"); + b.Property("AllowedIdentityTokenSigningAlgorithms") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + b.Property("AlwaysIncludeUserClaimsInIdToken") .HasColumnType("bit"); @@ -1111,54 +1216,54 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("bit"); b.Property("BackChannelLogoutUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.Property("ClientClaimsPrefix") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ClientId") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ClientName") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ClientUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("ConsentLifetime") .HasColumnType("int"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("Description") - .HasColumnType("nvarchar(1000)") - .HasMaxLength(1000); + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); b.Property("DeviceCodeLifetime") .HasColumnType("int"); @@ -1170,15 +1275,15 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("bit"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("FrontChannelLogoutSessionRequired") .HasColumnType("bit"); b.Property("FrontChannelLogoutUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.Property("IdentityTokenLifetime") .HasColumnType("int"); @@ -1188,30 +1293,30 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("LogoUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.Property("PairWiseSubjectSalt") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ProtocolType") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("RefreshTokenExpiration") .HasColumnType("int"); @@ -1228,6 +1333,9 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("RequirePkce") .HasColumnType("bit"); + b.Property("RequireRequestObject") + .HasColumnType("bit"); + b.Property("SlidingRefreshTokenLifetime") .HasColumnType("int"); @@ -1235,8 +1343,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("bit"); b.Property("UserCodeType") - .HasColumnType("nvarchar(100)") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("UserSsoLifetime") .HasColumnType("int"); @@ -1254,12 +1362,12 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("Value") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.HasKey("ClientId", "Type", "Value"); @@ -1272,8 +1380,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Origin") - .HasColumnType("nvarchar(150)") - .HasMaxLength(150); + .HasMaxLength(150) + .HasColumnType("nvarchar(150)"); b.HasKey("ClientId", "Origin"); @@ -1286,8 +1394,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("GrantType") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.HasKey("ClientId", "GrantType"); @@ -1300,8 +1408,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Provider") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.HasKey("ClientId", "Provider"); @@ -1314,8 +1422,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("PostLogoutRedirectUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.HasKey("ClientId", "PostLogoutRedirectUri"); @@ -1328,15 +1436,14 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Key") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("Value") - .IsRequired() - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); - b.HasKey("ClientId", "Key"); + b.HasKey("ClientId", "Key", "Value"); b.ToTable("IdentityServerClientProperties"); }); @@ -1347,8 +1454,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("RedirectUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.HasKey("ClientId", "RedirectUri"); @@ -1361,8 +1468,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Scope") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.HasKey("ClientId", "Scope"); @@ -1375,16 +1482,16 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("Value") - .HasColumnType("nvarchar(4000)") - .HasMaxLength(4000); + .HasMaxLength(4000) + .HasColumnType("nvarchar(4000)"); b.Property("Description") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.Property("Expiration") .HasColumnType("datetime2"); @@ -1402,49 +1509,57 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ClientId") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("Data") .IsRequired() - .HasColumnType("nvarchar(max)") - .HasMaxLength(50000); + .HasMaxLength(50000) + .HasColumnType("nvarchar(max)"); + + b.Property("Description") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("DeviceCode") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Expiration") .IsRequired() .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("SessionId") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("SubjectId") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("UserCode") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.HasKey("Id"); @@ -1453,8 +1568,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("Expiration"); - b.HasIndex("UserCode") - .IsUnique(); + b.HasIndex("UserCode"); b.ToTable("IdentityServerDeviceFlowCodes"); }); @@ -1462,46 +1576,57 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Grants.PersistedGrant", b => { b.Property("Key") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ClientId") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConsumedTime") + .HasColumnType("datetime2"); b.Property("CreationTime") .HasColumnType("datetime2"); b.Property("Data") .IsRequired() - .HasColumnType("nvarchar(max)") - .HasMaxLength(50000); + .HasMaxLength(50000) + .HasColumnType("nvarchar(max)"); + + b.Property("Description") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Expiration") .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("Id") .HasColumnType("uniqueidentifier"); + b.Property("SessionId") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + b.Property("SubjectId") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Type") .IsRequired() - .HasColumnType("nvarchar(50)") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.HasKey("Key"); @@ -1509,21 +1634,9 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("SubjectId", "ClientId", "Type"); - b.ToTable("IdentityServerPersistedGrants"); - }); + b.HasIndex("SubjectId", "SessionId", "Type"); - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityClaim", b => - { - b.Property("IdentityResourceId") - .HasColumnType("uniqueidentifier"); - - b.Property("Type") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - - b.HasKey("IdentityResourceId", "Type"); - - b.ToTable("IdentityServerIdentityClaims"); + b.ToTable("IdentityServerPersistedGrants"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b => @@ -1534,33 +1647,33 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("Description") - .HasColumnType("nvarchar(1000)") - .HasMaxLength(1000); + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); b.Property("DisplayName") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Emphasize") .HasColumnType("bit"); @@ -1569,30 +1682,27 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("bit"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - - b.Property("Properties") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Required") .HasColumnType("bit"); @@ -1602,9 +1712,44 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("Id"); + b.HasIndex("Name") + .IsUnique(); + b.ToTable("IdentityServerIdentityResources"); }); + modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceClaim", b => + { + b.Property("IdentityResourceId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.HasKey("IdentityResourceId", "Type"); + + b.ToTable("IdentityServerIdentityResourceClaims"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceProperty", b => + { + b.Property("IdentityResourceId") + .HasColumnType("uniqueidentifier"); + + b.Property("Key") + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); + + b.Property("Value") + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); + + b.HasKey("IdentityResourceId", "Key", "Value"); + + b.ToTable("IdentityServerIdentityResourceProperties"); + }); + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => { b.Property("Id") @@ -1613,22 +1758,22 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("ProviderKey") .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ProviderName") .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -1645,21 +1790,21 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("ProviderKey") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ProviderName") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Value") .IsRequired() - .HasColumnType("nvarchar(2048)") - .HasMaxLength(2048); + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); b.HasKey("Id"); @@ -1676,48 +1821,48 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.HasKey("Id"); @@ -1732,13 +1877,13 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Name") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Value") .IsRequired() - .HasColumnType("nvarchar(1024)") - .HasMaxLength(1024); + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); b.HasKey("TenantId", "Name"); @@ -1869,25 +2014,25 @@ namespace MyCompanyName.MyProjectName.Migrations .IsRequired(); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScope", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b => { b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) - .WithMany("Scopes") + .WithMany("Properties") .HasForeignKey("ApiResourceId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceScope", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiScope", null) - .WithMany("UserClaims") - .HasForeignKey("ApiResourceId", "Name") + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) + .WithMany("Scopes") + .HasForeignKey("ApiResourceId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceSecret", b => { b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) .WithMany("Secrets") @@ -1896,6 +2041,24 @@ namespace MyCompanyName.MyProjectName.Migrations .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) @@ -1977,7 +2140,7 @@ namespace MyCompanyName.MyProjectName.Migrations .IsRequired(); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityClaim", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceClaim", b => { b.HasOne("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", null) .WithMany("UserClaims") @@ -1986,6 +2149,15 @@ namespace MyCompanyName.MyProjectName.Migrations .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.TenantManagement.TenantConnectionString", b => { b.HasOne("Volo.Abp.TenantManagement.Tenant", null) @@ -1994,6 +2166,92 @@ namespace MyCompanyName.MyProjectName.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Navigation("Actions"); + + b.Navigation("EntityChanges"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Navigation("PropertyChanges"); + }); + + 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"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Navigation("ConnectionStrings"); + }); #pragma warning restore 612, 618 } } diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200909022225_Initial.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20201019021120_Initial.cs similarity index 53% rename from templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200909022225_Initial.cs rename to templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20201019021120_Initial.cs index 5677db545a..2296a18f25 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200909022225_Initial.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20201019021120_Initial.cs @@ -11,28 +11,28 @@ namespace MyCompanyName.MyProjectName.Migrations 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) + Id = table.Column(type: "uniqueidentifier", nullable: false), + ApplicationName = table.Column(type: "nvarchar(96)", maxLength: 96, nullable: true), + UserId = table.Column(type: "uniqueidentifier", nullable: true), + UserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + TenantName = table.Column(type: "nvarchar(max)", nullable: true), + ImpersonatorUserId = table.Column(type: "uniqueidentifier", nullable: true), + ImpersonatorTenantId = table.Column(type: "uniqueidentifier", nullable: true), + ExecutionTime = table.Column(type: "datetime2", nullable: false), + ExecutionDuration = table.Column(type: "int", nullable: false), + ClientIpAddress = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ClientName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + ClientId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + CorrelationId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + BrowserInfo = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + HttpMethod = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: true), + Url = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + Exceptions = table.Column(type: "nvarchar(4000)", maxLength: 4000, nullable: true), + Comments = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + HttpStatusCode = table.Column(type: "int", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) }, constraints: table => { @@ -40,79 +40,73 @@ namespace MyCompanyName.MyProjectName.Migrations }); migrationBuilder.CreateTable( - name: "AbpBackgroundJobs", + name: "AbpClaimTypes", columns: table => new { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - JobName = table.Column(maxLength: 128, nullable: false), - JobArgs = table.Column(maxLength: 1048576, nullable: false), - TryCount = table.Column(nullable: false, defaultValue: (short)0), - CreationTime = table.Column(nullable: false), - NextTryTime = table.Column(nullable: false), - LastTryTime = table.Column(nullable: true), - IsAbandoned = table.Column(nullable: false, defaultValue: false), - Priority = table.Column(nullable: false, defaultValue: (byte)15) + Id = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Required = table.Column(type: "bit", nullable: false), + IsStatic = table.Column(type: "bit", nullable: false), + Regex = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + RegexDescription = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + Description = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + ValueType = table.Column(type: "int", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) }, constraints: table => { - table.PrimaryKey("PK_AbpBackgroundJobs", x => x.Id); + table.PrimaryKey("PK_AbpClaimTypes", x => x.Id); }); migrationBuilder.CreateTable( - name: "AbpClaimTypes", + name: "AbpFeatureValues", columns: table => new { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - 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) + Id = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + Value = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + ProviderName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ProviderKey = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true) }, constraints: table => { - table.PrimaryKey("PK_AbpClaimTypes", x => x.Id); + table.PrimaryKey("PK_AbpFeatureValues", x => x.Id); }); migrationBuilder.CreateTable( - name: "AbpFeatureValues", + name: "AbpLinkUsers", 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) + Id = table.Column(type: "uniqueidentifier", nullable: false), + SourceUserId = table.Column(type: "uniqueidentifier", nullable: false), + SourceTenantId = table.Column(type: "uniqueidentifier", nullable: true), + TargetUserId = table.Column(type: "uniqueidentifier", nullable: false), + TargetTenantId = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { - table.PrimaryKey("PK_AbpFeatureValues", x => x.Id); + table.PrimaryKey("PK_AbpLinkUsers", x => x.Id); }); migrationBuilder.CreateTable( name: "AbpOrganizationUnits", 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), - ParentId = table.Column(nullable: true), - Code = table.Column(maxLength: 95, nullable: false), - DisplayName = table.Column(maxLength: 128, nullable: false) + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ParentId = table.Column(type: "uniqueidentifier", nullable: true), + Code = table.Column(type: "nvarchar(95)", maxLength: 95, nullable: false), + DisplayName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) }, constraints: table => { @@ -129,11 +123,11 @@ namespace MyCompanyName.MyProjectName.Migrations 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) + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + ProviderName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ProviderKey = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) }, constraints: table => { @@ -144,15 +138,15 @@ namespace MyCompanyName.MyProjectName.Migrations name: "AbpRoles", 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), - 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) + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + NormalizedName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + IsDefault = table.Column(type: "bit", nullable: false), + IsStatic = table.Column(type: "bit", nullable: false), + IsPublic = table.Column(type: "bit", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) }, constraints: table => { @@ -163,21 +157,21 @@ namespace MyCompanyName.MyProjectName.Migrations 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) + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ApplicationName = table.Column(type: "nvarchar(96)", maxLength: 96, nullable: true), + Identity = table.Column(type: "nvarchar(96)", maxLength: 96, nullable: true), + Action = table.Column(type: "nvarchar(96)", maxLength: 96, nullable: true), + UserId = table.Column(type: "uniqueidentifier", nullable: true), + UserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + TenantName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ClientId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + CorrelationId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ClientIpAddress = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + BrowserInfo = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) }, constraints: table => { @@ -188,11 +182,11 @@ namespace MyCompanyName.MyProjectName.Migrations 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) + Id = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + Value = table.Column(type: "nvarchar(2048)", maxLength: 2048, nullable: false), + ProviderName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ProviderKey = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true) }, constraints: table => { @@ -203,17 +197,17 @@ namespace MyCompanyName.MyProjectName.Migrations 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) + Id = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) }, constraints: table => { @@ -224,33 +218,33 @@ namespace MyCompanyName.MyProjectName.Migrations name: "AbpUsers", 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), - 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), - IsExternal = table.Column(nullable: false, defaultValue: 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) + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + UserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + NormalizedUserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Surname = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Email = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + NormalizedEmail = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + EmailConfirmed = table.Column(type: "bit", nullable: false, defaultValue: false), + PasswordHash = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + SecurityStamp = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + IsExternal = table.Column(type: "bit", nullable: false, defaultValue: false), + PhoneNumber = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: true), + PhoneNumberConfirmed = table.Column(type: "bit", nullable: false, defaultValue: false), + TwoFactorEnabled = table.Column(type: "bit", nullable: false, defaultValue: false), + LockoutEnd = table.Column(type: "datetimeoffset", nullable: true), + LockoutEnabled = table.Column(type: "bit", nullable: false, defaultValue: false), + AccessFailedCount = table.Column(type: "int", nullable: false, defaultValue: 0), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) }, constraints: table => { @@ -261,22 +255,22 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerApiResources", 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: 200, nullable: false), - DisplayName = table.Column(maxLength: 200, nullable: true), - Description = table.Column(maxLength: 1000, nullable: true), - Enabled = table.Column(nullable: false), - AllowedAccessTokenSigningAlgorithms = table.Column(maxLength: 100, nullable: true), - ShowInDiscoveryDocument = table.Column(nullable: false) + Id = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + DisplayName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), + Enabled = table.Column(type: "bit", nullable: false), + AllowedAccessTokenSigningAlgorithms = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), + ShowInDiscoveryDocument = table.Column(type: "bit", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) }, constraints: table => { @@ -287,23 +281,23 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerApiScopes", 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), - Enabled = 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) + Id = table.Column(type: "uniqueidentifier", nullable: false), + Enabled = table.Column(type: "bit", nullable: false), + Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + DisplayName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), + Required = table.Column(type: "bit", nullable: false), + Emphasize = table.Column(type: "bit", nullable: false), + ShowInDiscoveryDocument = table.Column(type: "bit", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) }, constraints: table => { @@ -314,55 +308,55 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerClients", 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), - 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), - RequireRequestObject = 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), - AllowedIdentityTokenSigningAlgorithms = table.Column(maxLength: 100, nullable: true), - 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) + Id = table.Column(type: "uniqueidentifier", nullable: false), + ClientId = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + ClientName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), + ClientUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), + LogoUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), + Enabled = table.Column(type: "bit", nullable: false), + ProtocolType = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + RequireClientSecret = table.Column(type: "bit", nullable: false), + RequireConsent = table.Column(type: "bit", nullable: false), + AllowRememberConsent = table.Column(type: "bit", nullable: false), + AlwaysIncludeUserClaimsInIdToken = table.Column(type: "bit", nullable: false), + RequirePkce = table.Column(type: "bit", nullable: false), + AllowPlainTextPkce = table.Column(type: "bit", nullable: false), + RequireRequestObject = table.Column(type: "bit", nullable: false), + AllowAccessTokensViaBrowser = table.Column(type: "bit", nullable: false), + FrontChannelLogoutUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), + FrontChannelLogoutSessionRequired = table.Column(type: "bit", nullable: false), + BackChannelLogoutUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), + BackChannelLogoutSessionRequired = table.Column(type: "bit", nullable: false), + AllowOfflineAccess = table.Column(type: "bit", nullable: false), + IdentityTokenLifetime = table.Column(type: "int", nullable: false), + AllowedIdentityTokenSigningAlgorithms = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), + 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: "bit", nullable: false), + RefreshTokenExpiration = table.Column(type: "int", nullable: false), + AccessTokenType = table.Column(type: "int", nullable: false), + EnableLocalLogin = table.Column(type: "bit", nullable: false), + IncludeJwtId = table.Column(type: "bit", nullable: false), + AlwaysSendClientClaims = table.Column(type: "bit", nullable: false), + ClientClaimsPrefix = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + PairWiseSubjectSalt = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + UserSsoLifetime = table.Column(type: "int", nullable: true), + UserCodeType = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), + DeviceCodeLifetime = table.Column(type: "int", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) }, constraints: table => { @@ -373,19 +367,19 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerDeviceFlowCodes", 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), - DeviceCode = table.Column(maxLength: 200, nullable: false), - UserCode = table.Column(maxLength: 200, nullable: false), - SubjectId = table.Column(maxLength: 200, nullable: true), - SessionId = table.Column(maxLength: 100, nullable: true), - ClientId = table.Column(maxLength: 200, nullable: false), - Description = table.Column(maxLength: 200, nullable: true), - Expiration = table.Column(nullable: false), - Data = table.Column(maxLength: 50000, nullable: false) + Id = table.Column(type: "uniqueidentifier", nullable: false), + DeviceCode = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + UserCode = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + SubjectId = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + SessionId = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), + ClientId = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + Description = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + Expiration = table.Column(type: "datetime2", nullable: false), + Data = table.Column(type: "nvarchar(max)", maxLength: 50000, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { @@ -396,23 +390,23 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerIdentityResources", 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: 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) + Id = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + DisplayName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), + Enabled = table.Column(type: "bit", nullable: false), + Required = table.Column(type: "bit", nullable: false), + Emphasize = table.Column(type: "bit", nullable: false), + ShowInDiscoveryDocument = table.Column(type: "bit", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) }, constraints: table => { @@ -423,19 +417,19 @@ namespace MyCompanyName.MyProjectName.Migrations 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(maxLength: 40, nullable: true), - Type = table.Column(maxLength: 50, nullable: false), - SubjectId = table.Column(maxLength: 200, nullable: true), - SessionId = table.Column(maxLength: 100, nullable: true), - ClientId = table.Column(maxLength: 200, nullable: false), - Description = table.Column(maxLength: 200, nullable: true), - CreationTime = table.Column(nullable: false), - Expiration = table.Column(nullable: true), - ConsumedTime = table.Column(nullable: true), - Data = table.Column(maxLength: 50000, nullable: false) + Key = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + Type = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + SubjectId = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + SessionId = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), + ClientId = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + Description = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + Expiration = table.Column(type: "datetime2", nullable: true), + ConsumedTime = table.Column(type: "datetime2", nullable: true), + Data = table.Column(type: "nvarchar(max)", maxLength: 50000, nullable: false), + Id = table.Column(type: "uniqueidentifier", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) }, constraints: table => { @@ -446,15 +440,15 @@ namespace MyCompanyName.MyProjectName.Migrations 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) + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + AuditLogId = table.Column(type: "uniqueidentifier", nullable: false), + ServiceName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + MethodName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + Parameters = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), + ExecutionTime = table.Column(type: "datetime2", nullable: false), + ExecutionDuration = table.Column(type: "int", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true) }, constraints: table => { @@ -471,15 +465,15 @@ namespace MyCompanyName.MyProjectName.Migrations 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) + Id = table.Column(type: "uniqueidentifier", nullable: false), + AuditLogId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ChangeTime = table.Column(type: "datetime2", nullable: false), + ChangeType = table.Column(type: "tinyint", nullable: false), + EntityTenantId = table.Column(type: "uniqueidentifier", nullable: true), + EntityId = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + EntityTypeFullName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true) }, constraints: table => { @@ -496,11 +490,11 @@ namespace MyCompanyName.MyProjectName.Migrations 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) + RoleId = table.Column(type: "uniqueidentifier", nullable: false), + OrganizationUnitId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { @@ -523,11 +517,11 @@ namespace MyCompanyName.MyProjectName.Migrations 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) + Id = table.Column(type: "uniqueidentifier", nullable: false), + RoleId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ClaimType = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + ClaimValue = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true) }, constraints: table => { @@ -544,9 +538,9 @@ namespace MyCompanyName.MyProjectName.Migrations name: "AbpTenantConnectionStrings", columns: table => new { - TenantId = table.Column(nullable: false), - Name = table.Column(maxLength: 64, nullable: false), - Value = table.Column(maxLength: 1024, nullable: false) + TenantId = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Value = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: false) }, constraints: table => { @@ -563,11 +557,11 @@ namespace MyCompanyName.MyProjectName.Migrations 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) + Id = table.Column(type: "uniqueidentifier", nullable: false), + UserId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ClaimType = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + ClaimValue = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true) }, constraints: table => { @@ -584,11 +578,11 @@ namespace MyCompanyName.MyProjectName.Migrations 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) + UserId = table.Column(type: "uniqueidentifier", nullable: false), + LoginProvider = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ProviderKey = table.Column(type: "nvarchar(196)", maxLength: 196, nullable: false), + ProviderDisplayName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true) }, constraints: table => { @@ -605,11 +599,11 @@ namespace MyCompanyName.MyProjectName.Migrations 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) + UserId = table.Column(type: "uniqueidentifier", nullable: false), + OrganizationUnitId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { @@ -632,9 +626,9 @@ namespace MyCompanyName.MyProjectName.Migrations name: "AbpUserRoles", columns: table => new { - UserId = table.Column(nullable: false), - RoleId = table.Column(nullable: false), - TenantId = table.Column(nullable: true) + UserId = table.Column(type: "uniqueidentifier", nullable: false), + RoleId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { @@ -657,11 +651,11 @@ namespace MyCompanyName.MyProjectName.Migrations 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) + UserId = table.Column(type: "uniqueidentifier", nullable: false), + LoginProvider = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Value = table.Column(type: "nvarchar(max)", nullable: true) }, constraints: table => { @@ -678,8 +672,8 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerApiResourceClaims", columns: table => new { - Type = table.Column(maxLength: 200, nullable: false), - ApiResourceId = table.Column(nullable: false) + Type = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + ApiResourceId = table.Column(type: "uniqueidentifier", nullable: false) }, constraints: table => { @@ -696,9 +690,9 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerApiResourceProperties", columns: table => new { - ApiResourceId = table.Column(nullable: false), - Key = table.Column(maxLength: 250, nullable: false), - Value = table.Column(maxLength: 2000, nullable: false) + ApiResourceId = table.Column(type: "uniqueidentifier", nullable: false), + Key = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false), + Value = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false) }, constraints: table => { @@ -715,8 +709,8 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerApiResourceScopes", columns: table => new { - ApiResourceId = table.Column(nullable: false), - Scope = table.Column(maxLength: 200, nullable: false) + ApiResourceId = table.Column(type: "uniqueidentifier", nullable: false), + Scope = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false) }, constraints: table => { @@ -733,11 +727,11 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerApiResourceSecrets", columns: table => new { - Type = table.Column(maxLength: 250, nullable: false), - Value = table.Column(maxLength: 4000, nullable: false), - ApiResourceId = table.Column(nullable: false), - Description = table.Column(maxLength: 1000, nullable: true), - Expiration = table.Column(nullable: true) + Type = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false), + Value = table.Column(type: "nvarchar(4000)", maxLength: 4000, nullable: false), + ApiResourceId = table.Column(type: "uniqueidentifier", nullable: false), + Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), + Expiration = table.Column(type: "datetime2", nullable: true) }, constraints: table => { @@ -754,8 +748,8 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerApiScopeClaims", columns: table => new { - Type = table.Column(maxLength: 200, nullable: false), - ApiScopeId = table.Column(nullable: false) + Type = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + ApiScopeId = table.Column(type: "uniqueidentifier", nullable: false) }, constraints: table => { @@ -772,9 +766,9 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerApiScopeProperties", columns: table => new { - ApiScopeId = table.Column(nullable: false), - Key = table.Column(maxLength: 250, nullable: false), - Value = table.Column(maxLength: 2000, nullable: false) + ApiScopeId = table.Column(type: "uniqueidentifier", nullable: false), + Key = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false), + Value = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false) }, constraints: table => { @@ -791,9 +785,9 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerClientClaims", columns: table => new { - ClientId = table.Column(nullable: false), - Type = table.Column(maxLength: 250, nullable: false), - Value = table.Column(maxLength: 250, nullable: false) + ClientId = table.Column(type: "uniqueidentifier", nullable: false), + Type = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false), + Value = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false) }, constraints: table => { @@ -810,8 +804,8 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerClientCorsOrigins", columns: table => new { - ClientId = table.Column(nullable: false), - Origin = table.Column(maxLength: 150, nullable: false) + ClientId = table.Column(type: "uniqueidentifier", nullable: false), + Origin = table.Column(type: "nvarchar(150)", maxLength: 150, nullable: false) }, constraints: table => { @@ -828,8 +822,8 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerClientGrantTypes", columns: table => new { - ClientId = table.Column(nullable: false), - GrantType = table.Column(maxLength: 250, nullable: false) + ClientId = table.Column(type: "uniqueidentifier", nullable: false), + GrantType = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false) }, constraints: table => { @@ -846,8 +840,8 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerClientIdPRestrictions", columns: table => new { - ClientId = table.Column(nullable: false), - Provider = table.Column(maxLength: 200, nullable: false) + ClientId = table.Column(type: "uniqueidentifier", nullable: false), + Provider = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false) }, constraints: table => { @@ -864,8 +858,8 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerClientPostLogoutRedirectUris", columns: table => new { - ClientId = table.Column(nullable: false), - PostLogoutRedirectUri = table.Column(maxLength: 2000, nullable: false) + ClientId = table.Column(type: "uniqueidentifier", nullable: false), + PostLogoutRedirectUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false) }, constraints: table => { @@ -882,9 +876,9 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerClientProperties", columns: table => new { - ClientId = table.Column(nullable: false), - Key = table.Column(maxLength: 250, nullable: false), - Value = table.Column(maxLength: 2000, nullable: false) + ClientId = table.Column(type: "uniqueidentifier", nullable: false), + Key = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false), + Value = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false) }, constraints: table => { @@ -901,8 +895,8 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerClientRedirectUris", columns: table => new { - ClientId = table.Column(nullable: false), - RedirectUri = table.Column(maxLength: 2000, nullable: false) + ClientId = table.Column(type: "uniqueidentifier", nullable: false), + RedirectUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false) }, constraints: table => { @@ -919,8 +913,8 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerClientScopes", columns: table => new { - ClientId = table.Column(nullable: false), - Scope = table.Column(maxLength: 200, nullable: false) + ClientId = table.Column(type: "uniqueidentifier", nullable: false), + Scope = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false) }, constraints: table => { @@ -937,11 +931,11 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerClientSecrets", columns: table => new { - Type = table.Column(maxLength: 250, nullable: false), - Value = table.Column(maxLength: 4000, nullable: false), - ClientId = table.Column(nullable: false), - Description = table.Column(maxLength: 2000, nullable: true), - Expiration = table.Column(nullable: true) + Type = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false), + Value = table.Column(type: "nvarchar(4000)", maxLength: 4000, nullable: false), + ClientId = table.Column(type: "uniqueidentifier", nullable: false), + Description = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), + Expiration = table.Column(type: "datetime2", nullable: true) }, constraints: table => { @@ -958,8 +952,8 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerIdentityResourceClaims", columns: table => new { - Type = table.Column(maxLength: 200, nullable: false), - IdentityResourceId = table.Column(nullable: false) + Type = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + IdentityResourceId = table.Column(type: "uniqueidentifier", nullable: false) }, constraints: table => { @@ -976,9 +970,9 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerIdentityResourceProperties", columns: table => new { - IdentityResourceId = table.Column(nullable: false), - Key = table.Column(maxLength: 250, nullable: false), - Value = table.Column(maxLength: 2000, nullable: false) + IdentityResourceId = table.Column(type: "uniqueidentifier", nullable: false), + Key = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false), + Value = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false) }, constraints: table => { @@ -995,13 +989,13 @@ namespace MyCompanyName.MyProjectName.Migrations 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) + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + EntityChangeId = table.Column(type: "uniqueidentifier", nullable: false), + NewValue = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + OriginalValue = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + PropertyName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + PropertyTypeFullName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) }, constraints: table => { @@ -1034,11 +1028,6 @@ namespace MyCompanyName.MyProjectName.Migrations table: "AbpAuditLogs", columns: new[] { "TenantId", "UserId", "ExecutionTime" }); - migrationBuilder.CreateIndex( - name: "IX_AbpBackgroundJobs_IsAbandoned_NextTryTime", - table: "AbpBackgroundJobs", - columns: new[] { "IsAbandoned", "NextTryTime" }); - migrationBuilder.CreateIndex( name: "IX_AbpEntityChanges_AuditLogId", table: "AbpEntityChanges", @@ -1059,6 +1048,13 @@ namespace MyCompanyName.MyProjectName.Migrations table: "AbpFeatureValues", columns: new[] { "Name", "ProviderName", "ProviderKey" }); + migrationBuilder.CreateIndex( + name: "IX_AbpLinkUsers_SourceUserId_SourceTenantId_TargetUserId_TargetTenantId", + table: "AbpLinkUsers", + columns: new[] { "SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId" }, + unique: true, + filter: "[SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL"); + migrationBuilder.CreateIndex( name: "IX_AbpOrganizationUnitRoles_RoleId_OrganizationUnitId", table: "AbpOrganizationUnitRoles", @@ -1219,9 +1215,6 @@ namespace MyCompanyName.MyProjectName.Migrations migrationBuilder.DropTable( name: "AbpAuditLogActions"); - migrationBuilder.DropTable( - name: "AbpBackgroundJobs"); - migrationBuilder.DropTable( name: "AbpClaimTypes"); @@ -1231,6 +1224,9 @@ namespace MyCompanyName.MyProjectName.Migrations migrationBuilder.DropTable( name: "AbpFeatureValues"); + migrationBuilder.DropTable( + name: "AbpLinkUsers"); + migrationBuilder.DropTable( name: "AbpOrganizationUnitRoles"); diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/IdentityServerHostMigrationsDbContextModelSnapshot.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/IdentityServerHostMigrationsDbContextModelSnapshot.cs index 3fcfd093ef..beb40e7827 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/IdentityServerHostMigrationsDbContextModelSnapshot.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/IdentityServerHostMigrationsDbContextModelSnapshot.cs @@ -16,10 +16,10 @@ namespace MyCompanyName.MyProjectName.Migrations { #pragma warning disable 612, 618 modelBuilder + .UseIdentityColumns() .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) - .HasAnnotation("ProductVersion", "3.1.8") .HasAnnotation("Relational:MaxIdentifierLength", 128) - .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + .HasAnnotation("ProductVersion", "5.0.0-rc.2.20475.6"); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => { @@ -28,99 +28,99 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("ApplicationName") - .HasColumnName("ApplicationName") + .HasMaxLength(96) .HasColumnType("nvarchar(96)") - .HasMaxLength(96); + .HasColumnName("ApplicationName"); b.Property("BrowserInfo") - .HasColumnName("BrowserInfo") + .HasMaxLength(512) .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasColumnName("BrowserInfo"); b.Property("ClientId") - .HasColumnName("ClientId") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("ClientId"); b.Property("ClientIpAddress") - .HasColumnName("ClientIpAddress") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("ClientIpAddress"); b.Property("ClientName") - .HasColumnName("ClientName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("ClientName"); b.Property("Comments") - .HasColumnName("Comments") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("Comments"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CorrelationId") - .HasColumnName("CorrelationId") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("CorrelationId"); b.Property("Exceptions") - .HasColumnName("Exceptions") + .HasMaxLength(4000) .HasColumnType("nvarchar(4000)") - .HasMaxLength(4000); + .HasColumnName("Exceptions"); b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration") - .HasColumnType("int"); + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); b.Property("ExecutionTime") .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("HttpMethod") - .HasColumnName("HttpMethod") + .HasMaxLength(16) .HasColumnType("nvarchar(16)") - .HasMaxLength(16); + .HasColumnName("HttpMethod"); b.Property("HttpStatusCode") - .HasColumnName("HttpStatusCode") - .HasColumnType("int"); + .HasColumnType("int") + .HasColumnName("HttpStatusCode"); b.Property("ImpersonatorTenantId") - .HasColumnName("ImpersonatorTenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("ImpersonatorTenantId"); b.Property("ImpersonatorUserId") - .HasColumnName("ImpersonatorUserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("ImpersonatorUserId"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("TenantName") .HasColumnType("nvarchar(max)"); b.Property("Url") - .HasColumnName("Url") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("Url"); b.Property("UserId") - .HasColumnName("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("UserId"); b.Property("UserName") - .HasColumnName("UserName") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("UserName"); b.HasKey("Id"); @@ -138,39 +138,39 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("AuditLogId") - .HasColumnName("AuditLogId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("AuditLogId"); b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration") - .HasColumnType("int"); + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); b.Property("ExecutionTime") - .HasColumnName("ExecutionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("ExecutionTime"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("MethodName") - .HasColumnName("MethodName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("MethodName"); b.Property("Parameters") - .HasColumnName("Parameters") + .HasMaxLength(2000) .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasColumnName("Parameters"); b.Property("ServiceName") - .HasColumnName("ServiceName") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("ServiceName"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -188,39 +188,39 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("AuditLogId") - .HasColumnName("AuditLogId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("AuditLogId"); b.Property("ChangeTime") - .HasColumnName("ChangeTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("ChangeTime"); b.Property("ChangeType") - .HasColumnName("ChangeType") - .HasColumnType("tinyint"); + .HasColumnType("tinyint") + .HasColumnName("ChangeType"); b.Property("EntityId") .IsRequired() - .HasColumnName("EntityId") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("EntityId"); b.Property("EntityTenantId") .HasColumnType("uniqueidentifier"); b.Property("EntityTypeFullName") .IsRequired() - .HasColumnName("EntityTypeFullName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("EntityTypeFullName"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -241,30 +241,30 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("NewValue") - .HasColumnName("NewValue") + .HasMaxLength(512) .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasColumnName("NewValue"); b.Property("OriginalValue") - .HasColumnName("OriginalValue") + .HasMaxLength(512) .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasColumnName("OriginalValue"); b.Property("PropertyName") .IsRequired() - .HasColumnName("PropertyName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("PropertyName"); b.Property("PropertyTypeFullName") .IsRequired() - .HasColumnName("PropertyTypeFullName") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("PropertyTypeFullName"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -281,21 +281,21 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("ProviderKey") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ProviderName") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Value") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.HasKey("Id"); @@ -312,33 +312,33 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("Description") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsStatic") .HasColumnType("bit"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("Regex") - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); b.Property("RegexDescription") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("Required") .HasColumnType("bit"); @@ -386,39 +386,39 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDefault") - .HasColumnName("IsDefault") - .HasColumnType("bit"); + .HasColumnType("bit") + .HasColumnName("IsDefault"); b.Property("IsPublic") - .HasColumnName("IsPublic") - .HasColumnType("bit"); + .HasColumnType("bit") + .HasColumnName("IsPublic"); b.Property("IsStatic") - .HasColumnName("IsStatic") - .HasColumnType("bit"); + .HasColumnType("bit") + .HasColumnName("IsStatic"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("NormalizedName") .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -434,19 +434,19 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ClaimType") .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("ClaimValue") - .HasColumnType("nvarchar(1024)") - .HasMaxLength(1024); + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); b.Property("RoleId") .HasColumnType("uniqueidentifier"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -462,60 +462,60 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Action") - .HasColumnType("nvarchar(96)") - .HasMaxLength(96); + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); b.Property("ApplicationName") - .HasColumnType("nvarchar(96)") - .HasMaxLength(96); + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); b.Property("BrowserInfo") - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); b.Property("ClientId") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ClientIpAddress") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CorrelationId") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("CreationTime") .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("Identity") - .HasColumnType("nvarchar(96)") - .HasMaxLength(96); + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("TenantName") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("UserId") .HasColumnType("uniqueidentifier"); b.Property("UserName") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.HasKey("Id"); @@ -538,136 +538,136 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("AccessFailedCount") .ValueGeneratedOnAdd() - .HasColumnName("AccessFailedCount") .HasColumnType("int") - .HasDefaultValue(0); + .HasDefaultValue(0) + .HasColumnName("AccessFailedCount"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("Email") .IsRequired() - .HasColumnName("Email") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("Email"); b.Property("EmailConfirmed") .ValueGeneratedOnAdd() - .HasColumnName("EmailConfirmed") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("IsExternal") .ValueGeneratedOnAdd() - .HasColumnName("IsExternal") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsExternal"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("LockoutEnabled") .ValueGeneratedOnAdd() - .HasColumnName("LockoutEnabled") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("LockoutEnabled"); b.Property("LockoutEnd") .HasColumnType("datetimeoffset"); b.Property("Name") - .HasColumnName("Name") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("Name"); b.Property("NormalizedEmail") .IsRequired() - .HasColumnName("NormalizedEmail") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("NormalizedEmail"); b.Property("NormalizedUserName") .IsRequired() - .HasColumnName("NormalizedUserName") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("NormalizedUserName"); b.Property("PasswordHash") - .HasColumnName("PasswordHash") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("PasswordHash"); b.Property("PhoneNumber") - .HasColumnName("PhoneNumber") + .HasMaxLength(16) .HasColumnType("nvarchar(16)") - .HasMaxLength(16); + .HasColumnName("PhoneNumber"); b.Property("PhoneNumberConfirmed") .ValueGeneratedOnAdd() - .HasColumnName("PhoneNumberConfirmed") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); b.Property("SecurityStamp") .IsRequired() - .HasColumnName("SecurityStamp") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("SecurityStamp"); b.Property("Surname") - .HasColumnName("Surname") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("Surname"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("TwoFactorEnabled") .ValueGeneratedOnAdd() - .HasColumnName("TwoFactorEnabled") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("TwoFactorEnabled"); b.Property("UserName") .IsRequired() - .HasColumnName("UserName") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("UserName"); b.HasKey("Id"); @@ -689,16 +689,16 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ClaimType") .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("ClaimValue") - .HasColumnType("nvarchar(1024)") - .HasMaxLength(1024); + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("UserId") .HasColumnType("uniqueidentifier"); @@ -716,21 +716,21 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("LoginProvider") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ProviderDisplayName") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("ProviderKey") .IsRequired() - .HasColumnType("nvarchar(196)") - .HasMaxLength(196); + .HasMaxLength(196) + .HasColumnType("nvarchar(196)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("UserId", "LoginProvider"); @@ -748,16 +748,16 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("OrganizationUnitId", "UserId"); @@ -775,8 +775,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("UserId", "RoleId"); @@ -791,16 +791,16 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("LoginProvider") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Name") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("Value") .HasColumnType("nvarchar(max)"); @@ -818,62 +818,62 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Code") .IsRequired() - .HasColumnName("Code") + .HasMaxLength(95) .HasColumnType("nvarchar(95)") - .HasMaxLength(95); + .HasColumnName("Code"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("DisplayName") .IsRequired() - .HasColumnName("DisplayName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("DisplayName"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("ParentId") .HasColumnType("uniqueidentifier"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -893,16 +893,16 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("OrganizationUnitId", "RoleId"); @@ -918,64 +918,64 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("AllowedAccessTokenSigningAlgorithms") - .HasColumnType("nvarchar(100)") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("Description") - .HasColumnType("nvarchar(1000)") - .HasMaxLength(1000); + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); b.Property("DisplayName") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Enabled") .HasColumnType("bit"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ShowInDiscoveryDocument") .HasColumnType("bit"); @@ -994,8 +994,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.HasKey("ApiResourceId", "Type"); @@ -1008,12 +1008,12 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Key") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("Value") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.HasKey("ApiResourceId", "Key", "Value"); @@ -1026,8 +1026,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Scope") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.HasKey("ApiResourceId", "Scope"); @@ -1040,16 +1040,16 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("Value") - .HasColumnType("nvarchar(4000)") - .HasMaxLength(4000); + .HasMaxLength(4000) + .HasColumnType("nvarchar(4000)"); b.Property("Description") - .HasColumnType("nvarchar(1000)") - .HasMaxLength(1000); + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); b.Property("Expiration") .HasColumnType("datetime2"); @@ -1067,33 +1067,33 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("Description") - .HasColumnType("nvarchar(1000)") - .HasMaxLength(1000); + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); b.Property("DisplayName") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Emphasize") .HasColumnType("bit"); @@ -1102,27 +1102,27 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("bit"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Required") .HasColumnType("bit"); @@ -1144,8 +1144,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.HasKey("ApiScopeId", "Type"); @@ -1158,12 +1158,12 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Key") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("Value") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.HasKey("ApiScopeId", "Key", "Value"); @@ -1198,8 +1198,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("bit"); b.Property("AllowedIdentityTokenSigningAlgorithms") - .HasColumnType("nvarchar(100)") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("AlwaysIncludeUserClaimsInIdToken") .HasColumnType("bit"); @@ -1214,54 +1214,54 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("bit"); b.Property("BackChannelLogoutUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.Property("ClientClaimsPrefix") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ClientId") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ClientName") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ClientUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("ConsentLifetime") .HasColumnType("int"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("Description") - .HasColumnType("nvarchar(1000)") - .HasMaxLength(1000); + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); b.Property("DeviceCodeLifetime") .HasColumnType("int"); @@ -1273,15 +1273,15 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("bit"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("FrontChannelLogoutSessionRequired") .HasColumnType("bit"); b.Property("FrontChannelLogoutUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.Property("IdentityTokenLifetime") .HasColumnType("int"); @@ -1291,30 +1291,30 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("LogoUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.Property("PairWiseSubjectSalt") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ProtocolType") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("RefreshTokenExpiration") .HasColumnType("int"); @@ -1341,8 +1341,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("bit"); b.Property("UserCodeType") - .HasColumnType("nvarchar(100)") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("UserSsoLifetime") .HasColumnType("int"); @@ -1360,12 +1360,12 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("Value") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.HasKey("ClientId", "Type", "Value"); @@ -1378,8 +1378,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Origin") - .HasColumnType("nvarchar(150)") - .HasMaxLength(150); + .HasMaxLength(150) + .HasColumnType("nvarchar(150)"); b.HasKey("ClientId", "Origin"); @@ -1392,8 +1392,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("GrantType") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.HasKey("ClientId", "GrantType"); @@ -1406,8 +1406,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Provider") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.HasKey("ClientId", "Provider"); @@ -1420,8 +1420,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("PostLogoutRedirectUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.HasKey("ClientId", "PostLogoutRedirectUri"); @@ -1434,12 +1434,12 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Key") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("Value") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.HasKey("ClientId", "Key", "Value"); @@ -1452,8 +1452,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("RedirectUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.HasKey("ClientId", "RedirectUri"); @@ -1466,8 +1466,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Scope") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.HasKey("ClientId", "Scope"); @@ -1480,16 +1480,16 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("Value") - .HasColumnType("nvarchar(4000)") - .HasMaxLength(4000); + .HasMaxLength(4000) + .HasColumnType("nvarchar(4000)"); b.Property("Description") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.Property("Expiration") .HasColumnType("datetime2"); @@ -1507,57 +1507,57 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ClientId") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("Data") .IsRequired() - .HasColumnType("nvarchar(max)") - .HasMaxLength(50000); + .HasMaxLength(50000) + .HasColumnType("nvarchar(max)"); b.Property("Description") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("DeviceCode") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Expiration") .IsRequired() .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("SessionId") - .HasColumnType("nvarchar(100)") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("SubjectId") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("UserCode") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.HasKey("Id"); @@ -1574,19 +1574,19 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Grants.PersistedGrant", b => { b.Property("Key") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ClientId") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("ConsumedTime") .HasColumnType("datetime2"); @@ -1596,35 +1596,35 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Data") .IsRequired() - .HasColumnType("nvarchar(max)") - .HasMaxLength(50000); + .HasMaxLength(50000) + .HasColumnType("nvarchar(max)"); b.Property("Description") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Expiration") .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("Id") .HasColumnType("uniqueidentifier"); b.Property("SessionId") - .HasColumnType("nvarchar(100)") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("SubjectId") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Type") .IsRequired() - .HasColumnType("nvarchar(50)") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.HasKey("Key"); @@ -1645,33 +1645,33 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("Description") - .HasColumnType("nvarchar(1000)") - .HasMaxLength(1000); + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); b.Property("DisplayName") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Emphasize") .HasColumnType("bit"); @@ -1680,27 +1680,27 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("bit"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Required") .HasColumnType("bit"); @@ -1722,8 +1722,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.HasKey("IdentityResourceId", "Type"); @@ -1736,12 +1736,12 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Key") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("Value") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.HasKey("IdentityResourceId", "Key", "Value"); @@ -1756,22 +1756,22 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("ProviderKey") .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ProviderName") .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -1788,21 +1788,21 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("ProviderKey") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ProviderName") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Value") .IsRequired() - .HasColumnType("nvarchar(2048)") - .HasMaxLength(2048); + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); b.HasKey("Id"); @@ -1819,48 +1819,48 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.HasKey("Id"); @@ -1875,13 +1875,13 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Name") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Value") .IsRequired() - .HasColumnType("nvarchar(1024)") - .HasMaxLength(1024); + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); b.HasKey("TenantId", "Name"); @@ -2164,6 +2164,92 @@ namespace MyCompanyName.MyProjectName.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Navigation("Actions"); + + b.Navigation("EntityChanges"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Navigation("PropertyChanges"); + }); + + 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"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Navigation("ConnectionStrings"); + }); #pragma warning restore 612, 618 } } diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20201019021101_Initial.Designer.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20201019021101_Initial.Designer.cs new file mode 100644 index 0000000000..cd2f885a7d --- /dev/null +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20201019021101_Initial.Designer.cs @@ -0,0 +1,1222 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using MyCompanyName.MyProjectName.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore; + +namespace MyCompanyName.MyProjectName.Migrations +{ + [DbContext(typeof(UnifiedDbContext))] + [Migration("20201019021101_Initial")] + partial class Initial + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .UseIdentityColumns() + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("Relational:MaxIdentifierLength", 128) + .HasAnnotation("ProductVersion", "5.0.0-rc.2.20475.6"); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("nvarchar(96)") + .HasColumnName("ApplicationName"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)") + .HasColumnName("BrowserInfo"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ClientId"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ClientIpAddress"); + + b.Property("ClientName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("ClientName"); + + b.Property("Comments") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("Comments"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("CorrelationId"); + + b.Property("Exceptions") + .HasMaxLength(4000) + .HasColumnType("nvarchar(4000)") + .HasColumnName("Exceptions"); + + b.Property("ExecutionDuration") + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HttpMethod") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)") + .HasColumnName("HttpMethod"); + + b.Property("HttpStatusCode") + .HasColumnType("int") + .HasColumnName("HttpStatusCode"); + + b.Property("ImpersonatorTenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("ImpersonatorTenantId"); + + b.Property("ImpersonatorUserId") + .HasColumnType("uniqueidentifier") + .HasColumnName("ImpersonatorUserId"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasColumnType("nvarchar(max)"); + + b.Property("Url") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("Url"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier") + .HasColumnName("UserId"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("UserName"); + + 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("uniqueidentifier"); + + b.Property("AuditLogId") + .HasColumnType("uniqueidentifier") + .HasColumnName("AuditLogId"); + + b.Property("ExecutionDuration") + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime") + .HasColumnType("datetime2") + .HasColumnName("ExecutionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("MethodName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("MethodName"); + + b.Property("Parameters") + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasColumnName("Parameters"); + + b.Property("ServiceName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("ServiceName"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + 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("uniqueidentifier"); + + b.Property("AuditLogId") + .HasColumnType("uniqueidentifier") + .HasColumnName("AuditLogId"); + + b.Property("ChangeTime") + .HasColumnType("datetime2") + .HasColumnName("ChangeTime"); + + b.Property("ChangeType") + .HasColumnType("tinyint") + .HasColumnName("ChangeType"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("EntityId"); + + b.Property("EntityTenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("EntityTypeFullName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("EntityTypeFullName"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + 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("uniqueidentifier"); + + b.Property("EntityChangeId") + .HasColumnType("uniqueidentifier"); + + b.Property("NewValue") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)") + .HasColumnName("NewValue"); + + b.Property("OriginalValue") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)") + .HasColumnName("OriginalValue"); + + b.Property("PropertyName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("PropertyName"); + + b.Property("PropertyTypeFullName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PropertyTypeFullName"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("EntityChangeId"); + + b.ToTable("AbpEntityPropertyChanges"); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey"); + + b.ToTable("AbpFeatureValues"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .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") + .ValueGeneratedOnAdd() + .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") + .ValueGeneratedOnAdd() + .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") + .ValueGeneratedOnAdd() + .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") + .ValueGeneratedOnAdd() + .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") + .ValueGeneratedOnAdd() + .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.PermissionManagement.PermissionGrant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProviderName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .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("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey"); + + b.ToTable("AbpSettings"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .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("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(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("AbpTenants"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + { + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("nvarchar(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.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.TenantManagement.TenantConnectionString", b => + { + b.HasOne("Volo.Abp.TenantManagement.Tenant", null) + .WithMany("ConnectionStrings") + .HasForeignKey("TenantId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Navigation("Actions"); + + b.Navigation("EntityChanges"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Navigation("PropertyChanges"); + }); + + 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.TenantManagement.Tenant", b => + { + b.Navigation("ConnectionStrings"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20201019021101_Initial.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20201019021101_Initial.cs new file mode 100644 index 0000000000..392499da58 --- /dev/null +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20201019021101_Initial.cs @@ -0,0 +1,726 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +namespace MyCompanyName.MyProjectName.Migrations +{ + public partial class Initial : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "AbpAuditLogs", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + ApplicationName = table.Column(type: "nvarchar(96)", maxLength: 96, nullable: true), + UserId = table.Column(type: "uniqueidentifier", nullable: true), + UserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + TenantName = table.Column(type: "nvarchar(max)", nullable: true), + ImpersonatorUserId = table.Column(type: "uniqueidentifier", nullable: true), + ImpersonatorTenantId = table.Column(type: "uniqueidentifier", nullable: true), + ExecutionTime = table.Column(type: "datetime2", nullable: false), + ExecutionDuration = table.Column(type: "int", nullable: false), + ClientIpAddress = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ClientName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + ClientId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + CorrelationId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + BrowserInfo = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + HttpMethod = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: true), + Url = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + Exceptions = table.Column(type: "nvarchar(4000)", maxLength: 4000, nullable: true), + Comments = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + HttpStatusCode = table.Column(type: "int", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpAuditLogs", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpClaimTypes", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Required = table.Column(type: "bit", nullable: false), + IsStatic = table.Column(type: "bit", nullable: false), + Regex = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + RegexDescription = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + Description = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + ValueType = table.Column(type: "int", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpClaimTypes", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpFeatureValues", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + Value = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + ProviderName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ProviderKey = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpFeatureValues", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpLinkUsers", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + SourceUserId = table.Column(type: "uniqueidentifier", nullable: false), + SourceTenantId = table.Column(type: "uniqueidentifier", nullable: true), + TargetUserId = table.Column(type: "uniqueidentifier", nullable: false), + TargetTenantId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpLinkUsers", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpOrganizationUnits", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ParentId = table.Column(type: "uniqueidentifier", nullable: true), + Code = table.Column(type: "nvarchar(95)", maxLength: 95, nullable: false), + DisplayName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", 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); + }); + + migrationBuilder.CreateTable( + name: "AbpPermissionGrants", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + ProviderName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ProviderKey = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpPermissionGrants", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpRoles", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + NormalizedName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + IsDefault = table.Column(type: "bit", nullable: false), + IsStatic = table.Column(type: "bit", nullable: false), + IsPublic = table.Column(type: "bit", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpRoles", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpSecurityLogs", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ApplicationName = table.Column(type: "nvarchar(96)", maxLength: 96, nullable: true), + Identity = table.Column(type: "nvarchar(96)", maxLength: 96, nullable: true), + Action = table.Column(type: "nvarchar(96)", maxLength: 96, nullable: true), + UserId = table.Column(type: "uniqueidentifier", nullable: true), + UserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + TenantName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ClientId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + CorrelationId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ClientIpAddress = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + BrowserInfo = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpSecurityLogs", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpSettings", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + Value = table.Column(type: "nvarchar(2048)", maxLength: 2048, nullable: false), + ProviderName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ProviderKey = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpSettings", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpTenants", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpTenants", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpUsers", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + UserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + NormalizedUserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Surname = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Email = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + NormalizedEmail = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + EmailConfirmed = table.Column(type: "bit", nullable: false, defaultValue: false), + PasswordHash = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + SecurityStamp = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + IsExternal = table.Column(type: "bit", nullable: false, defaultValue: false), + PhoneNumber = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: true), + PhoneNumberConfirmed = table.Column(type: "bit", nullable: false, defaultValue: false), + TwoFactorEnabled = table.Column(type: "bit", nullable: false, defaultValue: false), + LockoutEnd = table.Column(type: "datetimeoffset", nullable: true), + LockoutEnabled = table.Column(type: "bit", nullable: false, defaultValue: false), + AccessFailedCount = table.Column(type: "int", nullable: false, defaultValue: 0), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUsers", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpAuditLogActions", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + AuditLogId = table.Column(type: "uniqueidentifier", nullable: false), + ServiceName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + MethodName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + Parameters = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), + ExecutionTime = table.Column(type: "datetime2", nullable: false), + ExecutionDuration = table.Column(type: "int", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpAuditLogActions", x => x.Id); + table.ForeignKey( + name: "FK_AbpAuditLogActions_AbpAuditLogs_AuditLogId", + column: x => x.AuditLogId, + principalTable: "AbpAuditLogs", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpEntityChanges", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + AuditLogId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ChangeTime = table.Column(type: "datetime2", nullable: false), + ChangeType = table.Column(type: "tinyint", nullable: false), + EntityTenantId = table.Column(type: "uniqueidentifier", nullable: true), + EntityId = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + EntityTypeFullName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", 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: "AbpOrganizationUnitRoles", + columns: table => new + { + RoleId = table.Column(type: "uniqueidentifier", nullable: false), + OrganizationUnitId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpOrganizationUnitRoles", x => new { x.OrganizationUnitId, x.RoleId }); + table.ForeignKey( + name: "FK_AbpOrganizationUnitRoles_AbpOrganizationUnits_OrganizationUnitId", + column: x => x.OrganizationUnitId, + principalTable: "AbpOrganizationUnits", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_AbpOrganizationUnitRoles_AbpRoles_RoleId", + column: x => x.RoleId, + principalTable: "AbpRoles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpRoleClaims", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + RoleId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ClaimType = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + ClaimValue = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpRoleClaims", x => x.Id); + table.ForeignKey( + name: "FK_AbpRoleClaims_AbpRoles_RoleId", + column: x => x.RoleId, + principalTable: "AbpRoles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpTenantConnectionStrings", + columns: table => new + { + TenantId = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Value = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpTenantConnectionStrings", x => new { x.TenantId, x.Name }); + table.ForeignKey( + name: "FK_AbpTenantConnectionStrings_AbpTenants_TenantId", + column: x => x.TenantId, + principalTable: "AbpTenants", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpUserClaims", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + UserId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ClaimType = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + ClaimValue = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUserClaims", x => x.Id); + table.ForeignKey( + name: "FK_AbpUserClaims_AbpUsers_UserId", + column: x => x.UserId, + principalTable: "AbpUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpUserLogins", + columns: table => new + { + UserId = table.Column(type: "uniqueidentifier", nullable: false), + LoginProvider = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ProviderKey = table.Column(type: "nvarchar(196)", maxLength: 196, nullable: false), + ProviderDisplayName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUserLogins", x => new { x.UserId, x.LoginProvider }); + table.ForeignKey( + name: "FK_AbpUserLogins_AbpUsers_UserId", + column: x => x.UserId, + principalTable: "AbpUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpUserOrganizationUnits", + columns: table => new + { + UserId = table.Column(type: "uniqueidentifier", nullable: false), + OrganizationUnitId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUserOrganizationUnits", x => new { x.OrganizationUnitId, x.UserId }); + table.ForeignKey( + name: "FK_AbpUserOrganizationUnits_AbpOrganizationUnits_OrganizationUnitId", + column: x => x.OrganizationUnitId, + principalTable: "AbpOrganizationUnits", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_AbpUserOrganizationUnits_AbpUsers_UserId", + column: x => x.UserId, + principalTable: "AbpUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpUserRoles", + columns: table => new + { + UserId = table.Column(type: "uniqueidentifier", nullable: false), + RoleId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUserRoles", x => new { x.UserId, x.RoleId }); + table.ForeignKey( + name: "FK_AbpUserRoles_AbpRoles_RoleId", + column: x => x.RoleId, + principalTable: "AbpRoles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_AbpUserRoles_AbpUsers_UserId", + column: x => x.UserId, + principalTable: "AbpUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpUserTokens", + columns: table => new + { + UserId = table.Column(type: "uniqueidentifier", nullable: false), + LoginProvider = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Value = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUserTokens", x => new { x.UserId, x.LoginProvider, x.Name }); + table.ForeignKey( + name: "FK_AbpUserTokens_AbpUsers_UserId", + column: x => x.UserId, + principalTable: "AbpUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpEntityPropertyChanges", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + EntityChangeId = table.Column(type: "uniqueidentifier", nullable: false), + NewValue = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + OriginalValue = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + PropertyName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + PropertyTypeFullName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpEntityPropertyChanges", x => x.Id); + table.ForeignKey( + name: "FK_AbpEntityPropertyChanges_AbpEntityChanges_EntityChangeId", + column: x => x.EntityChangeId, + principalTable: "AbpEntityChanges", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateIndex( + name: "IX_AbpAuditLogActions_AuditLogId", + table: "AbpAuditLogActions", + column: "AuditLogId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpAuditLogActions_TenantId_ServiceName_MethodName_ExecutionTime", + 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"); + + migrationBuilder.CreateIndex( + name: "IX_AbpFeatureValues_Name_ProviderName_ProviderKey", + table: "AbpFeatureValues", + columns: new[] { "Name", "ProviderName", "ProviderKey" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpLinkUsers_SourceUserId_SourceTenantId_TargetUserId_TargetTenantId", + table: "AbpLinkUsers", + columns: new[] { "SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId" }, + unique: true, + filter: "[SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL"); + + migrationBuilder.CreateIndex( + name: "IX_AbpOrganizationUnitRoles_RoleId_OrganizationUnitId", + table: "AbpOrganizationUnitRoles", + columns: new[] { "RoleId", "OrganizationUnitId" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpOrganizationUnits_Code", + table: "AbpOrganizationUnits", + column: "Code"); + + migrationBuilder.CreateIndex( + name: "IX_AbpOrganizationUnits_ParentId", + table: "AbpOrganizationUnits", + column: "ParentId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpPermissionGrants_Name_ProviderName_ProviderKey", + table: "AbpPermissionGrants", + columns: new[] { "Name", "ProviderName", "ProviderKey" }); + + 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_AbpSettings_Name_ProviderName_ProviderKey", + table: "AbpSettings", + columns: new[] { "Name", "ProviderName", "ProviderKey" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpTenants_Name", + table: "AbpTenants", + column: "Name"); + + 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"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "AbpAuditLogActions"); + + migrationBuilder.DropTable( + name: "AbpClaimTypes"); + + migrationBuilder.DropTable( + name: "AbpEntityPropertyChanges"); + + migrationBuilder.DropTable( + name: "AbpFeatureValues"); + + migrationBuilder.DropTable( + name: "AbpLinkUsers"); + + migrationBuilder.DropTable( + name: "AbpOrganizationUnitRoles"); + + migrationBuilder.DropTable( + name: "AbpPermissionGrants"); + + migrationBuilder.DropTable( + name: "AbpRoleClaims"); + + migrationBuilder.DropTable( + name: "AbpSecurityLogs"); + + migrationBuilder.DropTable( + name: "AbpSettings"); + + migrationBuilder.DropTable( + name: "AbpTenantConnectionStrings"); + + migrationBuilder.DropTable( + name: "AbpUserClaims"); + + migrationBuilder.DropTable( + name: "AbpUserLogins"); + + migrationBuilder.DropTable( + name: "AbpUserOrganizationUnits"); + + migrationBuilder.DropTable( + name: "AbpUserRoles"); + + migrationBuilder.DropTable( + name: "AbpUserTokens"); + + migrationBuilder.DropTable( + name: "AbpEntityChanges"); + + migrationBuilder.DropTable( + name: "AbpTenants"); + + migrationBuilder.DropTable( + name: "AbpOrganizationUnits"); + + migrationBuilder.DropTable( + name: "AbpRoles"); + + migrationBuilder.DropTable( + name: "AbpUsers"); + + migrationBuilder.DropTable( + name: "AbpAuditLogs"); + } + } +} diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/UnifiedDbContextModelSnapshot.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/UnifiedDbContextModelSnapshot.cs index 21d510c82c..7b90b1954f 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/UnifiedDbContextModelSnapshot.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/UnifiedDbContextModelSnapshot.cs @@ -16,10 +16,10 @@ namespace MyCompanyName.MyProjectName.Migrations { #pragma warning disable 612, 618 modelBuilder + .UseIdentityColumns() .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) - .HasAnnotation("ProductVersion", "3.1.8") .HasAnnotation("Relational:MaxIdentifierLength", 128) - .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + .HasAnnotation("ProductVersion", "5.0.0-rc.2.20475.6"); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => { @@ -28,99 +28,99 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("ApplicationName") - .HasColumnName("ApplicationName") + .HasMaxLength(96) .HasColumnType("nvarchar(96)") - .HasMaxLength(96); + .HasColumnName("ApplicationName"); b.Property("BrowserInfo") - .HasColumnName("BrowserInfo") + .HasMaxLength(512) .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasColumnName("BrowserInfo"); b.Property("ClientId") - .HasColumnName("ClientId") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("ClientId"); b.Property("ClientIpAddress") - .HasColumnName("ClientIpAddress") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("ClientIpAddress"); b.Property("ClientName") - .HasColumnName("ClientName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("ClientName"); b.Property("Comments") - .HasColumnName("Comments") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("Comments"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CorrelationId") - .HasColumnName("CorrelationId") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("CorrelationId"); b.Property("Exceptions") - .HasColumnName("Exceptions") + .HasMaxLength(4000) .HasColumnType("nvarchar(4000)") - .HasMaxLength(4000); + .HasColumnName("Exceptions"); b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration") - .HasColumnType("int"); + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); b.Property("ExecutionTime") .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("HttpMethod") - .HasColumnName("HttpMethod") + .HasMaxLength(16) .HasColumnType("nvarchar(16)") - .HasMaxLength(16); + .HasColumnName("HttpMethod"); b.Property("HttpStatusCode") - .HasColumnName("HttpStatusCode") - .HasColumnType("int"); + .HasColumnType("int") + .HasColumnName("HttpStatusCode"); b.Property("ImpersonatorTenantId") - .HasColumnName("ImpersonatorTenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("ImpersonatorTenantId"); b.Property("ImpersonatorUserId") - .HasColumnName("ImpersonatorUserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("ImpersonatorUserId"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("TenantName") .HasColumnType("nvarchar(max)"); b.Property("Url") - .HasColumnName("Url") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("Url"); b.Property("UserId") - .HasColumnName("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("UserId"); b.Property("UserName") - .HasColumnName("UserName") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("UserName"); b.HasKey("Id"); @@ -138,39 +138,39 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("AuditLogId") - .HasColumnName("AuditLogId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("AuditLogId"); b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration") - .HasColumnType("int"); + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); b.Property("ExecutionTime") - .HasColumnName("ExecutionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("ExecutionTime"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("MethodName") - .HasColumnName("MethodName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("MethodName"); b.Property("Parameters") - .HasColumnName("Parameters") + .HasMaxLength(2000) .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasColumnName("Parameters"); b.Property("ServiceName") - .HasColumnName("ServiceName") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("ServiceName"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -188,39 +188,39 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("AuditLogId") - .HasColumnName("AuditLogId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("AuditLogId"); b.Property("ChangeTime") - .HasColumnName("ChangeTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("ChangeTime"); b.Property("ChangeType") - .HasColumnName("ChangeType") - .HasColumnType("tinyint"); + .HasColumnType("tinyint") + .HasColumnName("ChangeType"); b.Property("EntityId") .IsRequired() - .HasColumnName("EntityId") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("EntityId"); b.Property("EntityTenantId") .HasColumnType("uniqueidentifier"); b.Property("EntityTypeFullName") .IsRequired() - .HasColumnName("EntityTypeFullName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("EntityTypeFullName"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -241,30 +241,30 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("NewValue") - .HasColumnName("NewValue") + .HasMaxLength(512) .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasColumnName("NewValue"); b.Property("OriginalValue") - .HasColumnName("OriginalValue") + .HasMaxLength(512) .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasColumnName("OriginalValue"); b.Property("PropertyName") .IsRequired() - .HasColumnName("PropertyName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("PropertyName"); b.Property("PropertyTypeFullName") .IsRequired() - .HasColumnName("PropertyTypeFullName") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("PropertyTypeFullName"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -281,21 +281,21 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("ProviderKey") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ProviderName") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Value") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.HasKey("Id"); @@ -312,33 +312,33 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("Description") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsStatic") .HasColumnType("bit"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("Regex") - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); b.Property("RegexDescription") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("Required") .HasColumnType("bit"); @@ -386,39 +386,39 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDefault") - .HasColumnName("IsDefault") - .HasColumnType("bit"); + .HasColumnType("bit") + .HasColumnName("IsDefault"); b.Property("IsPublic") - .HasColumnName("IsPublic") - .HasColumnType("bit"); + .HasColumnType("bit") + .HasColumnName("IsPublic"); b.Property("IsStatic") - .HasColumnName("IsStatic") - .HasColumnType("bit"); + .HasColumnType("bit") + .HasColumnName("IsStatic"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("NormalizedName") .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -434,19 +434,19 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ClaimType") .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("ClaimValue") - .HasColumnType("nvarchar(1024)") - .HasMaxLength(1024); + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); b.Property("RoleId") .HasColumnType("uniqueidentifier"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -462,60 +462,60 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Action") - .HasColumnType("nvarchar(96)") - .HasMaxLength(96); + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); b.Property("ApplicationName") - .HasColumnType("nvarchar(96)") - .HasMaxLength(96); + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); b.Property("BrowserInfo") - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); b.Property("ClientId") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ClientIpAddress") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CorrelationId") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("CreationTime") .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("Identity") - .HasColumnType("nvarchar(96)") - .HasMaxLength(96); + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("TenantName") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("UserId") .HasColumnType("uniqueidentifier"); b.Property("UserName") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.HasKey("Id"); @@ -538,136 +538,136 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("AccessFailedCount") .ValueGeneratedOnAdd() - .HasColumnName("AccessFailedCount") .HasColumnType("int") - .HasDefaultValue(0); + .HasDefaultValue(0) + .HasColumnName("AccessFailedCount"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("Email") .IsRequired() - .HasColumnName("Email") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("Email"); b.Property("EmailConfirmed") .ValueGeneratedOnAdd() - .HasColumnName("EmailConfirmed") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("IsExternal") .ValueGeneratedOnAdd() - .HasColumnName("IsExternal") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsExternal"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("LockoutEnabled") .ValueGeneratedOnAdd() - .HasColumnName("LockoutEnabled") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("LockoutEnabled"); b.Property("LockoutEnd") .HasColumnType("datetimeoffset"); b.Property("Name") - .HasColumnName("Name") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("Name"); b.Property("NormalizedEmail") .IsRequired() - .HasColumnName("NormalizedEmail") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("NormalizedEmail"); b.Property("NormalizedUserName") .IsRequired() - .HasColumnName("NormalizedUserName") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("NormalizedUserName"); b.Property("PasswordHash") - .HasColumnName("PasswordHash") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("PasswordHash"); b.Property("PhoneNumber") - .HasColumnName("PhoneNumber") + .HasMaxLength(16) .HasColumnType("nvarchar(16)") - .HasMaxLength(16); + .HasColumnName("PhoneNumber"); b.Property("PhoneNumberConfirmed") .ValueGeneratedOnAdd() - .HasColumnName("PhoneNumberConfirmed") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); b.Property("SecurityStamp") .IsRequired() - .HasColumnName("SecurityStamp") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("SecurityStamp"); b.Property("Surname") - .HasColumnName("Surname") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("Surname"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("TwoFactorEnabled") .ValueGeneratedOnAdd() - .HasColumnName("TwoFactorEnabled") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("TwoFactorEnabled"); b.Property("UserName") .IsRequired() - .HasColumnName("UserName") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("UserName"); b.HasKey("Id"); @@ -689,16 +689,16 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ClaimType") .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("ClaimValue") - .HasColumnType("nvarchar(1024)") - .HasMaxLength(1024); + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("UserId") .HasColumnType("uniqueidentifier"); @@ -716,21 +716,21 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("LoginProvider") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ProviderDisplayName") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("ProviderKey") .IsRequired() - .HasColumnType("nvarchar(196)") - .HasMaxLength(196); + .HasMaxLength(196) + .HasColumnType("nvarchar(196)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("UserId", "LoginProvider"); @@ -748,16 +748,16 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("OrganizationUnitId", "UserId"); @@ -775,8 +775,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("UserId", "RoleId"); @@ -791,16 +791,16 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("LoginProvider") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Name") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("Value") .HasColumnType("nvarchar(max)"); @@ -818,62 +818,62 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Code") .IsRequired() - .HasColumnName("Code") + .HasMaxLength(95) .HasColumnType("nvarchar(95)") - .HasMaxLength(95); + .HasColumnName("Code"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("DisplayName") .IsRequired() - .HasColumnName("DisplayName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("DisplayName"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("ParentId") .HasColumnType("uniqueidentifier"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -893,16 +893,16 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("OrganizationUnitId", "RoleId"); @@ -919,22 +919,22 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("ProviderKey") .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ProviderName") .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -951,21 +951,21 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("ProviderKey") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ProviderName") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Value") .IsRequired() - .HasColumnType("nvarchar(2048)") - .HasMaxLength(2048); + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); b.HasKey("Id"); @@ -982,48 +982,48 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.HasKey("Id"); @@ -1038,13 +1038,13 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Name") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Value") .IsRequired() - .HasColumnType("nvarchar(1024)") - .HasMaxLength(1024); + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); b.HasKey("TenantId", "Name"); @@ -1174,6 +1174,46 @@ namespace MyCompanyName.MyProjectName.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Navigation("Actions"); + + b.Navigation("EntityChanges"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Navigation("PropertyChanges"); + }); + + 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.TenantManagement.Tenant", b => + { + b.Navigation("ConnectionStrings"); + }); #pragma warning restore 612, 618 } } From 36a788420bd6edf68a18032516b1d48afb106a56 Mon Sep 17 00:00:00 2001 From: maliming Date: Mon, 19 Oct 2020 10:53:22 +0800 Subject: [PATCH 56/76] Upgrade IdentityServer4 to 4.1.1 https://github.com/IdentityServer/IdentityServer4/releases/tag/4.1.1 --- .../Volo.Abp.IdentityServer.Domain.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo.Abp.IdentityServer.Domain.csproj b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo.Abp.IdentityServer.Domain.csproj index 88bf5dfa91..7de8992da6 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo.Abp.IdentityServer.Domain.csproj +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo.Abp.IdentityServer.Domain.csproj @@ -25,8 +25,8 @@ - - + + From e505ef2931e0f85813530db702c99f767431e913 Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Mon, 19 Oct 2020 16:11:59 +0800 Subject: [PATCH 57/76] Improve abp_io Localization --- .../Localization/Resources/zh-Hans.json | 3 +- .../Admin/Localization/Resources/zh-Hans.json | 116 +++++++++++++- .../Base/Localization/Resources/en.json | 3 +- .../Base/Localization/Resources/zh-Hans.json | 4 +- .../Localization/Resources/zh-Hans.json | 7 +- .../Localization/Resources/zh-Hans.json | 149 ++++++++++-------- .../Www/Localization/Resources/en.json | 30 +++- .../Www/Localization/Resources/zh-Hans.json | 36 ++++- .../Abp/Emailing/Localization/zh-Hans.json | 4 +- .../Localization/Resources/AbpUi/zh-Hans.json | 13 +- .../Abp/Emailing/Localization/zh-Hans.json | 6 + .../Volo/Abp/Http/Localization/zh-Hans.json | 6 + .../TestResources/SourceExt/zh-Hans.json | 6 + .../TextTemplating/Localization/zh-Hans.json | 7 + .../Localization/Resources/zh-Hans.json | 7 +- .../Localization/Resources/zh-Hans.json | 110 ++++++------- .../Localization/Resources/zh-Hans.json | 22 +++ .../Docs/ApplicationContracts/zh-Hans.json | 24 ++- .../Docs/Localization/Domain/zh-Hans.json | 11 +- .../Abp/Identity/Localization/zh-Hans.json | 5 +- .../Localization/Resources/zh-Hans.json | 6 +- .../Localization/MyProjectName/zh-Hans.json | 3 +- 22 files changed, 439 insertions(+), 139 deletions(-) create mode 100644 framework/test/Volo.Abp.Emailing.Tests/Volo/Abp/Emailing/Localization/zh-Hans.json create mode 100644 framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/Localization/zh-Hans.json create mode 100644 framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/SourceExt/zh-Hans.json create mode 100644 framework/test/Volo.Abp.TextTemplating.Tests/Volo/Abp/TextTemplating/Localization/zh-Hans.json create mode 100644 modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/zh-Hans.json diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Account/Localization/Resources/zh-Hans.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Account/Localization/Resources/zh-Hans.json index adc808ed7e..0d66f1288d 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Account/Localization/Resources/zh-Hans.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Account/Localization/Resources/zh-Hans.json @@ -8,6 +8,7 @@ "FrameworkDocumentation": "框架文档", "OfficialBlog": "官方博客", "CommercialHomePage": "商业版首页", - "CommercialSupportWebSite": "商业版支持网站" + "CommercialSupportWebSite": "商业版支持网站", + "CommunityWebSite": "ABP社区网站" } } \ No newline at end of file diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/zh-Hans.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/zh-Hans.json index bc78a54119..f5cbeb0213 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/zh-Hans.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/zh-Hans.json @@ -3,6 +3,12 @@ "texts": { "Permission:Organizations": "组织", "Permission:Manage": "管理组织", + "Permission:DiscountRequests": "折扣请求", + "Permission:DiscountManage": "管理折扣请求", + "Permission:Disable": "禁用", + "Permission:Enable": "启动", + "Permission:EnableSendEmail": "启用发送邮件", + "Permission:SendEmail": "发送邮件", "Permission:NpmPackages": "NPM包", "Permission:NugetPackages": "Nuget包", "Permission:Maintenance": "维护", @@ -13,8 +19,13 @@ "Permission:Edit": "编辑", "Permission:Delete": "删除", "Permission:Create": "创建", + "Permission:Accounting": "账单", + "Permission:Accounting:Quotation": "报价", + "Permission:Accounting:Invoice": "发票", "Menu:Organizations": "组织", + "Menu:Accounting": "账单", "Menu:Packages": "包", + "Menu:DiscountRequests": "折扣请求", "NpmPackageDeletionWarningMessage": "该NPM包将会被删除. 你确定吗?", "NugetPackageDeletionWarningMessage": "该Nuget包将会被删除. 你确定吗?", "ModuleDeletionWarningMessage": "该模块将会被删除. 你确定吗?", @@ -24,6 +35,7 @@ "NameFilter": "名称", "CreationTime": "创建时间", "IsPro": "是否为专业版", + "ShowOnModuleList": "展示模块列表", "EfCoreConfigureMethodName": "配置方法法", "IsProFilter": "是否为专业版", "ApplicationType": "应用程序类型", @@ -53,6 +65,7 @@ "CreateANugetPackage": "创建Nuget包", "AddNew": "新建", "PackageAlreadyExist{0}": "\"{0}\"已经被添加.", + "ModuleAlreadyExist{0}": "\"{0}\" 模块已经添加.", "ClearCache": "清除缓存", "SuccessfullyCleared": "清除成功", "Menu:NpmPackages": "NPM包", @@ -63,6 +76,7 @@ "Organizations": "组织", "LongName": "完整名称", "LicenseType": "授权类型", + "MissingLicenseTypeField": "许可证类型字段是必需的!", "LicenseStartTime": "授权开始时间", "LicenseEndTime": "授权结束时间", "AllowedDeveloperCount": "允许的开发人员数量", @@ -74,14 +88,112 @@ "AddDeveloper": "添加开发者", "Create": "创建", "UserNotFound": "用户不存在", - "{0}WillBeRemovedFromMembers": "{0} 将从成员中删除", + "{0}WillBeRemovedFromDevelopers": "{0} 将从开发者中移除, 你确定吗?", + "{0}WillBeRemovedFromOwners": "{0} 将从所有者中移除, 你确定吗?", "Computers": "计算机", "UniqueComputerId": "计算机唯一ID", "LastSeenDate": "上次查看日期", "{0}Computer{1}WillBeRemovedFromRecords": "计算机 {0} ({1}) 将从记录中删除", "OrganizationDeletionWarningMessage": "组织将被删除", + "DeletingLastOwnerWarningMessage": "一个组织必须至少有一个所有者!因此你不能删除此所有者", "This{0}AlreadyExistInThisOrganization": "该组织中已经存在此 {0}", "AreYouSureYouWantToDeleteAllComputers": "您确定要删除所有计算机吗?", - "DeleteAll": "删除所有" + "DeleteAll": "删除所有", + "DoYouWantToCreateNewUser": "你想要创建一个新用户吗", + "MasterModules": "主模块", + "OrganizationName": "组织名称", + "CreationDate": "创建时间", + "LicenseStartDate": "许可开始时间", + "LicenseEndDate": "许可结束时间", + "OrganizationNamePlaceholder": "组织名称...", + "TotalQuestionCountPlaceholder": "问题总数...", + "RemainingQuestionCountPlaceholder": "剩下的问题数...", + "LicenseTypePlaceholder": "许可类型...", + "CreationDatePlaceholder": "创建时间...", + "LicenseStartDatePlaceholder": "许可开始时间...", + "LicenseEndDatePlaceholder": "许可结束时间...", + "UsernameOrEmail": "用户名或邮箱", + "UsernameOrEmailPlaceholder": "用户名或邮箱...", + "Member": "成员", + "PurchaseOrderNo": "订单编号", + "QuotationDate": "报价日期", + "CompanyName": "公司名称", + "CompanyAddress": "公司地址", + "Price": "价格", + "DiscountText": "折扣文字", + "DiscountQuantity": "折扣数量", + "DiscountPrice": "折扣价格", + "Quotation": "报价单", + "ExtraText": "额外文字", + "ExtraAmount": "额外金额", + "DownloadQuotation": "下载报价单", + "Invoice": "发票", + "TaxNumber": "税号", + "InvoiceNumber": "发票数字", + "InvoiceDate": "发票日期", + "InvoiceNote": "发票说明", + "Quantity": "数量", + "AddProduct": "添加产品", + "AddProductWarning": "你需要添加产品", + "TotalPrice": "总价", + "Generate": "生成", + "MissingQuantityField": "数量字段为必填项!", + "MissingPriceField": "价格字段为必填项!", + "CodeUsageStatus": "状态", + "Country": "国家", + "DeveloperCount": "开发者数量", + "RequestCode": "请求码", + "WebSite": "网站", + "GithubUsername": "Github用户名", + "PhoneNumber": "手机号", + "ProjectDescription": "产品描述", + "Referrer": "推荐人", + "DiscountRequests": "折扣请求", + "Copylink": "拷贝链接", + "Disable": "禁用", + "Enable": "启用", + "EnableSendEmail": "启用发送邮件", + "SendEmail": "发送邮件", + "SuccessfullyDisabled": "禁用成功", + "SuccessfullyEnabled": "启用成功", + "EmailSent": "邮件发送", + "SuccessfullySent": "发送成功", + "SuccessfullyDeleted": "删除成功", + "DiscountRequestDeletionWarningMessage": "折扣成功将被删除", + "BusinessType": "商业类型", + "TotalQuestionCount": "问题总数", + "RemainingQuestionCount": "剩余问题数", + "TotalQuestionMustBeGreaterWarningMessage": "TotalQuestionCount必须大于RemainingQuestionCount!", + "QuestionCountsMustBeGreaterThanZero": "TotalQuestionCount和RemainingQuestionCount必须为0或大于0", + "UnlimitedQuestionCount": "无限的问题计数", + "Notes": "笔记", + "Menu:Community": "社区", + "Menu:Articles": "文章", + "Wait": "等待", + "Approve": "批准", + "Reject": "拒绝", + "Details": "详情", + "Url": "Url", + "Title": "标题", + "ContentSource": "内容源", + "Status": "状态", + "ReadArticle": "阅读文章", + "ArticleHasBeenWaiting": "文章还在等待", + "ArticleHasBeenApproved": "文章已被批准", + "ArticleHasBeenRejected": "文章已被拒绝", + "Permission:Community": "社区", + "Permission:CommunityArticle": "文字", + "Link": "链接", + "Enum:ContentSource:0": "Github", + "Enum:ContentSource:1": "外部", + "Enum:Status:0": "等待中", + "Enum:Status:1": "已拒绝", + "Enum:Status:2": "已批准", + "Summary": "概要", + "AuthorName": "作者名称", + "CoverImage": "封面图片", + "RemoveCacheConfirmationMessage": "你确定要删除\"{0}\" 文章缓存?", + "SuccessfullyRemoved": "清除成功", + "RemoveCache": "删除缓存" } } \ No newline at end of file diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/en.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/en.json index d6f334f7cd..a916cd82d9 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/en.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/en.json @@ -27,6 +27,7 @@ "Blog": "Blog", "Commercial": "Commercial", "MyAccount": "My account", - "SeeDocuments": "See Documents" + "SeeDocuments": "See Documents", + "Samples": "Samples" } } \ No newline at end of file diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/zh-Hans.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/zh-Hans.json index 986d1fdc2c..79493b537e 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/zh-Hans.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/zh-Hans.json @@ -26,6 +26,8 @@ "ContributionGuide": "贡献指南", "Blog": "博客", "Commercial": "商业版", - "SeeDocuments": "查看文档" + "MyAccount": "我的账户", + "SeeDocuments": "查看文档", + "Samples": "示例" } } \ No newline at end of file diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/zh-Hans.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/zh-Hans.json index e80457377f..0147e71a05 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/zh-Hans.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/zh-Hans.json @@ -6,6 +6,8 @@ "Volo.AbpIo.Commercial:010003": "你不是该组织的所有者!", "OrganizationNotFoundMessage": "找不到任何组织!", "DeveloperCount": "开发者数量", + "QuestionCount": "剩余 / 问题总数", + "Unlimited": "无限制", "Owners": "所有者", "AddMember": "添加成员", "AddOwner": "添加所有者", @@ -25,6 +27,9 @@ "Volo.AbpIo.Commercial:010004": "不能找到指定的用户! 用户必须已经注册.", "MyOrganizations": "我的组织", "ApiKey": "API key", - "UserNameNotFound": "没有用户名为{0}的用户" + "UserNameNotFound": "没有用户名为{0}的用户", + "SuccessfullyAddedToNewsletter": "感谢你订阅我们的新闻通讯!", + "MyProfile": "我的资料", + "EmailNotValid": "请输入有效的电子邮件地址" } } \ No newline at end of file diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Community/Localization/Resources/zh-Hans.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Community/Localization/Resources/zh-Hans.json index 307ff066a7..fa793c91a0 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Community/Localization/Resources/zh-Hans.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Community/Localization/Resources/zh-Hans.json @@ -1,64 +1,89 @@ { - "culture": "zh-Hans", - "texts": { - "Permission:CommunityArticle": "社区文章", - "Permission:Edit": "修改", - "Waiting": "等待中", - "Approved": "已批准", - "Rejected": "已拒绝", - "Wait": "等待", - "Approve": "批准", - "Reject": "拒绝", - "ReadArticle": "阅读文章", - "Status": "状态", - "ContentSource": "内容来源", - "Details": "详情", - "Url": "url", - "Title": "标题", - "CreationTime": "创建时间", - "Save": "保存", - "SameUrlAlreadyExist": "url已存在,如果你想要添加这篇文章,你需要更改url!", - "UrlIsNotValid": "Url无效.", - "UrlNotFound" : "Url未找到.", - "UrlContentNotFound": "Url内容未找到.", - "Summary": "摘要", - "MostRead": "阅读最多", - "Latest": "最新", - "ContributeAbpCommunity": "为ABP社区做贡献", - "SubmitYourArticle": "提交你的文章", - "ContributionGuide": "贡献指南", - "BugReport": "Bug报告", - "SeeAllArticles": "查看所有的文章", - "WelcomeToABPCommunity!": "欢迎来到ABP社区!", - "MyProfile": "我的资料", - "MyOrganizations": "我的组织", - "EmailNotValid": "请输入有效的电子邮箱地址.", - "FeatureRequest": "功能请求", - "CreateArticleTitleInfo": "文章标题显示在文章列表中.", - "CreateArticleUrlInfo": "文章的原始GitHub/外部URL.", - "CreateArticleSummaryInfo": "文章的简短摘要将显示在文章列表中.", - "CreateArticleCoverInfo": "为了创建有效的文章,请添加封面图. 仅支持16:9的图片!", - "ThisExtensionIsNotAllowed": "不允许此扩展名.", - "TheFileIsTooLarge": "文件过大.", - "GoToTheArticle": "转到文章", - "Contribute": "贡献", - "OverallProgress": "总体流程", - "Done": "完成", - "Open": "打开", - "Closed": "关闭", - "LatestQuestionOnThe": "有关的最新问题", - "Stackoverflow": "Stackoverflow", - "Votes": "票数", - "Answer": "回答", - "Views": "观看次数", - "Answered": "已回答", - "WaitingForYourAnswer": "等待你的回答", - "Asked": "提问", - "AllQuestions": "所有的问题", - "NextVersion": "下一个版本", - "MilestoneErrorMessage": "无法从Github获取当前的里程碑详细信息.", - "QuestionItemErrorMessage": "无法从Stackoverflow获取最新的问题详细信息.", - "Oops": "哎呀!" - } + "culture": "zh-Hans", + "texts": { + "Permission:CommunityArticle": "社区文章", + "Permission:Edit": "修改", + "Waiting": "等待中", + "Approved": "已批准", + "Rejected": "已拒绝", + "Wait": "等待", + "Approve": "批准", + "Reject": "拒绝", + "ReadArticle": "阅读文章", + "Status": "状态", + "ContentSource": "内容来源", + "Details": "详情", + "Url": "url", + "Title": "标题", + "CreationTime": "创建时间", + "Save": "保存", + "SameUrlAlreadyExist": "url已存在,如果你想要添加这篇文章,你需要更改url!", + "UrlIsNotValid": "Url无效.", + "UrlNotFound": "Url未找到.", + "UrlContentNotFound": "Url内容未找到.", + "Summary": "摘要", + "MostRead": "阅读最多", + "Latest": "最新", + "ContributeAbpCommunity": "为ABP社区做贡献", + "SubmitYourArticle": "提交你的文章", + "ContributionGuide": "贡献指南", + "BugReport": "Bug报告", + "SeeAllArticles": "查看所有的文章", + "WelcomeToABPCommunity!": "欢迎来到ABP社区!", + "MyProfile": "我的资料", + "MyOrganizations": "我的组织", + "EmailNotValid": "请输入有效的电子邮箱地址.", + "FeatureRequest": "功能请求", + "CreateArticleTitleInfo": "文章标题显示在文章列表中.", + "CreateArticleUrlInfo": "文章的原始GitHub/外部URL.", + "CreateArticleSummaryInfo": "文章的简短摘要将显示在文章列表中.", + "CreateArticleCoverInfo": "为了创建有效的文章,请添加封面图. 仅支持16:9的图片!", + "ThisExtensionIsNotAllowed": "不允许此扩展名.", + "TheFileIsTooLarge": "文件过大.", + "GoToTheArticle": "转到文章", + "Contribute": "贡献", + "OverallProgress": "总体流程", + "Done": "完成", + "Open": "打开", + "Closed": "关闭", + "LatestQuestionOnThe": "有关的最新问题", + "Stackoverflow": "Stackoverflow", + "Votes": "票数", + "Answer": "回答", + "Views": "观看次数", + "Answered": "已回答", + "WaitingForYourAnswer": "等待你的回答", + "Asked": "提问", + "AllQuestions": "所有的问题", + "NextVersion": "下一个版本", + "MilestoneErrorMessage": "无法从Github获取当前的里程碑详细信息.", + "QuestionItemErrorMessage": "无法从Stackoverflow获取最新的问题详细信息.", + "Oops": "哎呀!", + "CreateArticleSuccessMessage": "文章提交成功. 网站管理员审核通过后将被发布.", + "ChooseCoverImage": "选项一张封面图片", + "CoverImage": "封面图片", + "ShareYourExperiencesWithTheABPFramework": "分享你的ABP Framework经验!", + "Optional": "可选的", + "UpdateUserWebSiteInfo": "示例: https://johndoe.com", + "UpdateUserTwitterInfo": "示例: johndoe", + "UpdateUserGithubInfo": "示例: johndoe", + "UpdateUserLinkedinInfo": "示例: https://www.linkedin.com/...", + "UpdateUserCompanyInfo": "示例v: Volosoft", + "UpdateUserJobTitleInfo": "示例: Software Developer", + "UserName": "用户名", + "Company": "公司", + "PersonalWebsite": "个人网站", + "RegistrationDate": "注册时间", + "Social": "社交", + "Biography": "传记", + "HasNoPublishedArticlesYet": "尚未发表文章", + "Author": "作者", + "LatestGithubAnnouncements": "最新的Github公告", + "SeeAllAnnouncements": "查看所有公告", + "LatestBlogPost": "最新博客文章", + "Edit": "修改", + "ProfileImageChange": "更改资料图片", + "BlogItemErrorMessage": "无法从ABP获取最新的博客文章详细信息.", + "PlannedReleaseDate": "计划发布日期" } - \ No newline at end of file +} \ No newline at end of file diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/en.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/en.json index fa7b216bd0..cb4a8d076c 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/en.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/en.json @@ -93,6 +93,7 @@ "DynamicForms": "Dynamic Forms", "BundlingMinification": "Bundling & Minification", "BackgroundJobs": "Background Jobs", + "BackgroundJobsExplanation": "Define simple classes to execute jobs in background as queued. Use built-in job manager or integrate your own. Hangfire & RabbitMQ integrations are already available.", "DDDInfrastructure": "DDD Infrastructure", "DomainDrivenDesignInfrastructure": "Domain Driven Design Infrastructure", "AutoRESTAPIs": "Auto REST APIs", @@ -102,6 +103,7 @@ "TestInfrastructure": "Test Infrastructure", "AuditLoggingEntityHistories": "Audit Logging & Entity Histories", "ObjectToObjectMapping": "Object to Object Mapping", + "ObjectToObjectMappingExplanation": "Object to object mapping abstraction with AutoMapper integration.", "EmailSMSAbstractions": "Email & SMS Abstractions", "EmailSMSAbstractionsWithTemplatingSupport": "Email & SMS Abstractions with Templating Support", "Localization": "Localization", @@ -156,6 +158,32 @@ "UiFramework": "UI Framework", "EmailAddress": "Email address", "Mobile": "Mobile", - "ReactNative": "React Native" + "ReactNative": "React Native", + "Strong": "Strong", + "Complete": "Complete", + "BasedLayeringModel": "Based Layering Model", + "Microservice": "Microservice", + "Compatible": "Compatible", + "MeeTTheABPCommunityInfo": "Our mission is to create an environment where developers can help each other with articles, tutorials, case studies, etc. and meet like-minded people.", + "JoinTheABPCommunityInfo": "Get involved with a vibrant community and become a contributor to the ABP Framework!", + "AllArticles": "All Articles", + "SubmitYourArticle": "Submit Your Article", + "DynamicClientProxyDocument": "See the dynamic client proxy documentations for JavaScript & C#.", + "EmailSMSAbstractionsDocument": "See the emailing and SMS sending documents for more information.", + "CreateProjectWizard": "This wizard creates a new project from the startup template which is properly configured to jump start to your project.", + "TieredOption": "Creates a tiered solution where Web and Http API layers are physically separated. If not checked, creates a layered solution which is less complex and suitable for most scenarios.", + "SeparateIdentityServerOption": "Separates server side into two applications: First one is for the identity server and the second one is for your server side HTTP API.", + "UseslatestPreVersion": "Uses latest pre-release version", + "ReadTheDocumentation": "ReadThe Documentation", + "Documentation": "Documentation", + "GettingStartedTutorial": "Getting Started Tutorial", + "ApplicationDevelopmentTutorial": "Application Development Tutorial", + "TheStartupTemplate": "The Startup Template", + "InstallABPCLIInfo": "ABP CLI is the fastest way to start a new solution with the ABP framework. Install the ABP CLI using a command line window:", + "DifferentLevelOfNamespaces": "You can use different level of namespaces; e.g. BookStore, Acme.BookStore or Acme.Retail.BookStore.", + "ABPCLIExamplesInfo": "new command creates a layered MVC application with Entity Framework Core as the database provider. However, it has additional options. Examples:", + "SeeCliDocumentForMoreInformation": "See the ABP CLI document for more options or select the \"Direct Download\" tab above.", + "Optional": "Optional", + "LocalFrameworkRef": "Keep local project reference for the framework packages." } } diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/zh-Hans.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/zh-Hans.json index 7bd02b44ac..4dcb0cad51 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/zh-Hans.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/zh-Hans.json @@ -89,10 +89,11 @@ "Features": "功能", "ABPCLI": "ABP CLI", "Modularity": "模块化", - "BootstrapTagHelpers": "Bootstrap Tag Helpers", + "BootstrapTagHelpers": "Bootstrap 标签助手", "DynamicForms": "动态表单", "BundlingMinification": "Bundling & Minification", "BackgroundJobs": "后台作业", + "BackgroundJobsExplanation": "定义简单的类以在队列中在后台执行作业. 使用内置的作业管理器或集成你自己的作业管理器. Hangfire & RabbitMQ集成已经可用.", "DDDInfrastructure": "DDD基础设施", "DomainDrivenDesignInfrastructure": "Domain Driven Design基础设施", "AutoRESTAPIs": "自动REST APIs", @@ -102,6 +103,7 @@ "TestInfrastructure": "测试基础设施", "AuditLoggingEntityHistories": "审计日志和实体历史", "ObjectToObjectMapping": "对象映射", + "ObjectToObjectMappingExplanation": "对象到对象映射 抽象AutoMapper集成.", "EmailSMSAbstractions": "电子邮件和短信抽象", "EmailSMSAbstractionsWithTemplatingSupport": "具有模板支持的电子邮件和短信抽象", "Localization": "本土化", @@ -112,7 +114,7 @@ "DependencyInjection": "依赖注入", "DependencyInjectionByConventions": "依据约定的依赖注入", "ABPCLIExplanation": "ABP CLI(命令行界面)是用于对ABP解决方案执行常见操作的命令行工具.", - "ModularityExplanation": "ABP提供了一个完整的基础设施来构建你自己的应用程序模块,这些模块可能具有实体,服务,数据库集成,API,UI组件等.", //TODO: strong "your own application modules",- + "ModularityExplanation": "ABP提供了一个完整的基础设施来构建你自己的应用程序模块,这些模块可能具有实体,服务,数据库集成,API,UI组件等.", "MultiTenancyExplanation": "ABP框架不仅支持开发多租户应用程序,而且使你的代码几乎无需知道多租户.", "MultiTenancyExplanation2": "可以自动确定当前租户,将不同租户的数据相互隔离.", "MultiTenancyExplanation3": "支持单一数据库,或每个租户单独数据库或者混合方式.", @@ -154,6 +156,34 @@ "SeeTheDocumentForMoreInformation": "查看{0} 文档获得更多信息", "IndexPageHeroSection": "asp.net core的开源Web应用程序
框架
", "UiFramework": "UI框架", - "EmailAddress": "电子邮件地址" + "EmailAddress": "电子邮件地址", + "Mobile": "移动", + "ReactNative": "React Native", + "Strong": "强大的", + "Complete": "完整的", + "BasedLayeringModel": "基于分层模型", + "Microservice": "微服务", + "Compatible": "兼容", + "MeeTTheABPCommunityInfo": "我们的使命是创建一个环境使开发人员可以在文章,教程,案例研究等方面互相帮助并结识志趣相投的人.", + "JoinTheABPCommunityInfo": "参与充满活力的社区并成为ABP框架的贡献者", + "AllArticles": "所有的文章", + "SubmitYourArticle": "提交你的文章", + "DynamicClientProxyDocument": "参阅JavaScript & C#的动态客户端代理文档.", + "EmailSMSAbstractionsDocument": "参阅emailingSMS sending 文档获得更多信息.", + "CreateProjectWizard": "此向导让你从启动模板创建一个新项目,该启动模板已正确配置为可以快速启动你的项目.", + "TieredOption": "创建一个分层解决方案,其中Web和Http API层在物理上是分离的. 如果没有选中则创建一个不那么复杂且适合大多数场景的分层解决方案.", + "SeparateIdentityServerOption": "将服务器端分离为两个应用程序:第一个应用程序用于身份服务器,第二个应用程序用于服务器端HTTP API.", + "UseslatestPreVersion": "使用最新的预发布版本", + "ReadTheDocumentation": "阅读文档", + "Documentation": "文档", + "GettingStartedTutorial": "入门教程", + "ApplicationDevelopmentTutorial": "应用程序开发教程", + "TheStartupTemplate": "启动模板", + "InstallABPCLIInfo": "ABP CLI是使用ABP框架启动新解决方案的最快方式. 使用命令行窗口安装ABP CLI:", + "DifferentLevelOfNamespaces": "你可以使用不同级别的名称空间. 例如 BookStore, Acme.BookStore 或 Acme.Retail.BookStore", + "ABPCLIExamplesInfo": "new命令创建一个 分层的MVC应用程序 使用 Entity Framework Core 做为数据库提供程序. 它还有其他选项. 示例:", + "SeeCliDocumentForMoreInformation": "参阅 ABP CLI 文档 获得更多选项或选择上方的 \"直接下载\" 标签.", + "Optional": "可选的", + "LocalFrameworkRef": "保留框架包的本地项目引用." } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Localization/zh-Hans.json b/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Localization/zh-Hans.json index 0e2d25bff1..5f7343e771 100644 --- a/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Localization/zh-Hans.json +++ b/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Localization/zh-Hans.json @@ -18,6 +18,8 @@ "Description:Abp.Mailing.Smtp.Password": "凭据关联的用户名的密码.", "Description:Abp.Mailing.Smtp.Domain": "验证凭据的域名或计算机名.", "Description:Abp.Mailing.Smtp.EnableSsl": "指定 SmtpClient 是否使用安全套接字层 (SSL) 加密连接.", - "Description:Abp.Mailing.Smtp.UseDefaultCredentials": "控制默认凭据是否随请求一起发送." + "Description:Abp.Mailing.Smtp.UseDefaultCredentials": "控制默认凭据是否随请求一起发送.", + "TextTemplate:StandardEmailTemplates.Layout": "默认电子邮件模板", + "TextTemplate:StandardEmailTemplates.Message": "电子邮件的简单消息模板" } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/zh-Hans.json b/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/zh-Hans.json index ec85d90ac9..59a680bb81 100644 --- a/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/zh-Hans.json +++ b/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/zh-Hans.json @@ -4,8 +4,10 @@ "Languages": "语言", "AreYouSure": "你确定吗?", "Cancel": "取消", + "Clear": "清楚", "Yes": "是", "No": "否", + "Ok": "Ok", "Close": "关闭", "Save": "保存", "SavingWithThreeDot": "保存中...", @@ -13,6 +15,8 @@ "Delete": "删除", "Edit": "编辑", "Refresh": "刷新", + "Language": "语言", + "LoadMore": "加载更多", "ProcessingWithThreeDot": "处理中...", "LoadingWithThreeDot": "加载中...", "Welcome": "欢迎", @@ -31,6 +35,8 @@ "PagerInfoEmpty": "显示0个条目中的0到0", "PagerInfoFiltered": "(从 _MAX_ 总条目中过滤掉)", "NoDataAvailableInDatatable": "表中没有数据", + "Total": "总计", + "Selected": "已选", "PagerShowMenuEntries": "显示 _MENU_ 条数据", "DatatableActionDropdownDefaultText": "操作", "ChangePassword": "修改密码", @@ -38,6 +44,9 @@ "AreYouSureYouWantToCancelEditingWarningMessage": "你有未保存的更改.", "GoHomePage": "返回主页", "GoBack": "返回", - "Search" : "搜索" + "Search": "搜索", + "ItemWillBeDeletedMessageWithFormat": "{0} 将被删除!", + "ItemWillBeDeletedMessage": "此项将被删除!", + "ManageYourAccount": "管理你的账户" } -} +} \ No newline at end of file diff --git a/framework/test/Volo.Abp.Emailing.Tests/Volo/Abp/Emailing/Localization/zh-Hans.json b/framework/test/Volo.Abp.Emailing.Tests/Volo/Abp/Emailing/Localization/zh-Hans.json new file mode 100644 index 0000000000..f2dfc1f43f --- /dev/null +++ b/framework/test/Volo.Abp.Emailing.Tests/Volo/Abp/Emailing/Localization/zh-Hans.json @@ -0,0 +1,6 @@ +{ + "culture": "zh-Hans", + "texts": { + "hello": "你好" + } +} \ No newline at end of file diff --git a/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/Localization/zh-Hans.json b/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/Localization/zh-Hans.json new file mode 100644 index 0000000000..e34ff86e0b --- /dev/null +++ b/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/Localization/zh-Hans.json @@ -0,0 +1,6 @@ +{ + "culture": "zh-Hans", + "texts": { + "Volo.Abp.Http.DynamicProxying:10001": "业务异常: {0}" + } +} \ No newline at end of file diff --git a/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/SourceExt/zh-Hans.json b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/SourceExt/zh-Hans.json new file mode 100644 index 0000000000..653f0bf803 --- /dev/null +++ b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/SourceExt/zh-Hans.json @@ -0,0 +1,6 @@ +{ + "culture": "zh-Hans", + "texts": { + "SeeYou": "再见" + } +} \ No newline at end of file diff --git a/framework/test/Volo.Abp.TextTemplating.Tests/Volo/Abp/TextTemplating/Localization/zh-Hans.json b/framework/test/Volo.Abp.TextTemplating.Tests/Volo/Abp/TextTemplating/Localization/zh-Hans.json new file mode 100644 index 0000000000..e142d8c2c4 --- /dev/null +++ b/framework/test/Volo.Abp.TextTemplating.Tests/Volo/Abp/TextTemplating/Localization/zh-Hans.json @@ -0,0 +1,7 @@ +{ + "culture": "zh-Hans", + "texts": { + "HelloText": "你好 {0}", + "HowAreYou": "你好吗?" + } +} \ No newline at end of file diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hans.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hans.json index 93174b979d..cfe4fbaa27 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hans.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hans.json @@ -44,6 +44,7 @@ "LoggedOutTitle": "注销", "LoggedOutText": "你已成功注销并将马上返回.", "ReturnToText": "点击此处返回到 {0}", + "OrLoginWith": "或登录", "ForgotPassword": "忘记密码?", "SendPasswordResetLink_Information": "密码重置链接将发送到您的电子邮件以重置密码. 如果您在几分钟内没有收到电子邮件,请重试.", "PasswordResetMailSentMessage": "帐户恢复电子邮件已发送到您的电子邮件地址. 如果您在15分钟内未在收件箱中看到此电子邮件,请检查垃圾邮件,并标记为非垃圾邮件.", @@ -56,8 +57,6 @@ "ProfileTab:Password": "更改密码", "ProfileTab:PersonalInfo": "个人信息", "ReturnToApplication": "返回到应用程序", - "Volo.Account:InvalidEmailAddress": "找不到给定的电子邮件地址:{0}", - "Volo.Account:SelfRegistrationDisabled": "自我注册已禁用!", - + "Volo.Account:InvalidEmailAddress": "找不到给定的电子邮件地址:{0}" } -} +} \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/Localization/Resources/zh-Hans.json b/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/Localization/Resources/zh-Hans.json index 4b94db0607..a9c63c8342 100644 --- a/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/Localization/Resources/zh-Hans.json +++ b/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/Localization/Resources/zh-Hans.json @@ -1,56 +1,58 @@ { - "culture": "zh-Hans", - "texts": { - "Menu:Blogs": "博客", - "Menu:BlogManagement": "博客管理", - "Permission:Management": "管理", - "Permission:Edit": "编辑", - "Permission:Create": "创建", - "Permission:Delete": "删除", - "Permission:Blogging": "博客", - "Permission:Blogs": "博客", - "Permission:Posts": "帖子", - "Permission:Tags": "标签", - "Permission:Comments": "评论", - "Title": "标题", - "Delete": "删除", - "Reply": "回复", - "ReplyTo": "回复 {0}", - "ContinueReading": "继续阅读", - "DaysAgo": "{0}天前", - "YearsAgo": "{0}年前", - "MonthsAgo": "{0}月前", - "WeeksAgo": "{0}周前", - "MinutesAgo": "{0}分前", - "SecondsAgo": "{0}秒前", - "HoursAgo": "{0}小时前", - "Now": "刚刚", - "Content": "内容", - "SeeAll": "查看所有", - "PopularTags": "热门标签", - "WiewsWithCount": "{0}人查看", - "LastPosts": "最后的帖子", - "LeaveComment": "发布评论", - "TagsInThisArticle": "文章中的标签", - "Posts": "帖子", - "Edit": "编辑", - "BLOG": "博客", - "CommentDeletionWarningMessage": "评论将被删除.", - "PostDeletionWarningMessage": "帖子将被删除", - "BlogDeletionWarningMessage": "博客将被删除.", - "AreYouSure": "你确定吗?", - "CommentWithCount": "{0}个评论", - "Comment": "评论", - "ShareOnTwitter": "分享到Twitter", - "CoverImage": "封面图", - "CreateANewPost": "创建一个新帖子", - "CreateANewBlog": "创建一个新博客", - "WhatIsNew": "最新消息", - "Name": "名称", - "ShortName": "简称", - "CreationTime": "创建时间", - "Description": "描述", - "Blogs": "博客", - "Tags": "标签" + "culture": "zh-Hans", + "texts": { + "Menu:Blogs": "博客", + "Menu:BlogManagement": "博客管理", + "Permission:Management": "管理", + "Permission:Edit": "编辑", + "Permission:Create": "创建", + "Permission:Delete": "删除", + "Permission:Blogging": "博客", + "Permission:Blogs": "博客", + "Permission:Posts": "帖子", + "Permission:Tags": "标签", + "Permission:Comments": "评论", + "Title": "标题", + "Delete": "删除", + "Reply": "回复", + "ReplyTo": "回复 {0}", + "ContinueReading": "继续阅读", + "DaysAgo": "{0}天前", + "YearsAgo": "{0}年前", + "MonthsAgo": "{0}月前", + "WeeksAgo": "{0}周前", + "MinutesAgo": "{0}分前", + "SecondsAgo": "{0}秒前", + "HoursAgo": "{0}小时前", + "Now": "刚刚", + "Content": "内容", + "SeeAll": "查看所有", + "PopularTags": "热门标签", + "WiewsWithCount": "{0}人查看", + "LastPosts": "最后的帖子", + "LeaveComment": "发布评论", + "TagsInThisArticle": "文章中的标签", + "Posts": "帖子", + "Edit": "编辑", + "BLOG": "博客", + "CommentDeletionWarningMessage": "评论将被删除.", + "PostDeletionWarningMessage": "帖子将被删除", + "BlogDeletionWarningMessage": "博客将被删除.", + "AreYouSure": "你确定吗?", + "CommentWithCount": "{0}个评论", + "Comment": "评论", + "ShareOnTwitter": "分享到Twitter", + "CoverImage": "封面图", + "CreateANewPost": "创建一个新帖子", + "CreateANewBlog": "创建一个新博客", + "WhatIsNew": "最新消息", + "Name": "名称", + "ShortName": "简称", + "CreationTime": "创建时间", + "Description": "描述", + "Blogs": "博客", + "Tags": "标签", + "ShareOn": "分享", + "TitleLengthWarning": "保持标题大小不超过60个字符,实现SEO友好!" } -} +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/zh-Hans.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/zh-Hans.json new file mode 100644 index 0000000000..d65eb1c886 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/zh-Hans.json @@ -0,0 +1,22 @@ +{ + "culture": "zh-Hans", + "texts": { + "PickYourReaction": "选择你的回应", + "YourComment": "你的评论", + "YourReply": "你的回复", + "Comments": "评论", + "Send": "发送", + "Delete": "删除", + "Reply": "回复", + "Update": "更新", + "Edit": "修改", + "LoginToAddComment": "登录添加评论", + "LoginToReply": "登录进行回复", + "MessageDeletionConfirmationMessage": "这条评论将被完全删除", + "CommentAuthorizationExceptionMessage": "这些评论不允许公开显示", + "Undo": "撤消", + "RatingUndoMessage": "您的评分将被撤消", + "LoginToRate": "登录进行评分", + "Star": "星" + } +} \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo/Docs/Admin/Localization/Resources/Docs/ApplicationContracts/zh-Hans.json b/modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo/Docs/Admin/Localization/Resources/Docs/ApplicationContracts/zh-Hans.json index 039be20995..c0985f956a 100644 --- a/modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo/Docs/Admin/Localization/Resources/Docs/ApplicationContracts/zh-Hans.json +++ b/modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo/Docs/Admin/Localization/Resources/Docs/ApplicationContracts/zh-Hans.json @@ -7,6 +7,7 @@ "Permission:Delete": "删除", "Permission:Create": "创建", "Permission:Documents": "文档", + "Menu:Documents": "文档", "Menu:DocumentManagement": "文档", "Menu:ProjectManagement": "项目", "CreateANewProject": "创建新项目", @@ -30,8 +31,29 @@ "DisplayName:GitHubRootUrl": "GitHub根网址", "DisplayName:GitHubAccessToken": "GitHub访问令牌", "DisplayName:GitHubUserAgent": "GitHub用户代理", + "DisplayName:GithubVersionProviderSource": "GitHub版本提供源", + "DisplayName:VersionBranchPrefix": "版本分支前缀", "DisplayName:All": "拉取所有", "DisplayName:LanguageCode": "语言代码", - "DisplayName:Version": "版本" + "DisplayName:Version": "版本", + "Documents": "文档", + "RemoveFromCache": "从缓存中删除", + "Reindex": "重新索引", + "ReindexCompleted": "重新索引完成", + "RemovedFromCache": "已从缓存中删除", + "RemoveFromCacheConfirmation": "你确定要从缓存中删除该项吗?", + "ReIndexDocumentConfirmation": "你确定要为该项重新索引吗", + "DeleteFromDatabase": "从数据库中删除", + "Deleted": "删除", + "Search": "搜索", + "StartDate": "开始时间", + "EndDate": "结束时间", + "CreationTime": "创建时间", + "LastUpdateTime": "最后修改", + "LastSignificantUpdateTime": "上次重大更新", + "Version": "版本", + "LanguageCode": "语言代码", + "FileName": "文件名称", + "LastCachedTime": "缓存项" } } \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/zh-Hans.json b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/zh-Hans.json index 8f3a3e44fb..f12c1f4149 100644 --- a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/zh-Hans.json +++ b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/zh-Hans.json @@ -1,6 +1,6 @@ { "culture": "zh-Hans", - "texts": { + "texts": { "Documents": "文档", "BackToWebsite": "返回主网站", "Contributors": "贡献者", @@ -9,6 +9,14 @@ "Edit": "编辑", "LastEditTime": "上次编辑", "Delete": "删除", + "ClearCache": "清除缓存", + "ClearCacheConfirmationMessage": "你确定清除 \"{0}\" 项目所有的缓存吗", + "ReIndexAllProjects": "重新索引所有的项目", + "ReIndexProject": "重新索引项目", + "ReIndexProjectConfirmationMessage": "你确定重新索引 \"{0}\" 项目", + "SuccessfullyReIndexProject": "成功重新索引 \"{0}\" 项目", + "ReIndexAllProjectConfirmationMessage": "你确定重新索引所有的项目", + "SuccessfullyReIndexAllProject": "成功重新索引所有的项目", "InThisDocument": "在本文中", "GoToTop": "到顶部", "Projects": "项目", @@ -20,6 +28,7 @@ "FilterTopics": "过滤主题", "FullSearch": "搜索文档", "Volo.Docs.Domain:010001": "Elastic search未启用.", + "MultipleVersionDocumentInfo": "本文档有多个版本. 选择最适合你的选项", "New": "新文档", "Upd": "更新", "NewExplanation": "在最近两周内创建.", diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/zh-Hans.json b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/zh-Hans.json index 74859aa0f3..a9bce46cf9 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/zh-Hans.json +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/zh-Hans.json @@ -69,6 +69,7 @@ "Volo.Abp.Identity:010006": "无法删除静态角色.", "Volo.Abp.Identity:010007": "你不能修改你的双因素身份验证设置", "Volo.Abp.Identity:010008": "不允许修改双因素身份验证设置.", + "Identity.OrganizationUnit.MaxUserMembershipCount": "组织单位最大允许的成员资格计数", "Permission:IdentityManagement": "身份标识管理", "Permission:RoleManagement": "角色管理", "Permission:Create": "创建", @@ -93,6 +94,7 @@ "DisplayName:Abp.Identity.Lockout.LockoutDuration": "锁定时间(秒)", "DisplayName:Abp.Identity.Lockout.MaxFailedAccessAttempts": "最大失败访问尝试次数", "DisplayName:Abp.Identity.SignIn.RequireConfirmedEmail": "要求验证的电子邮箱", + "DisplayName:Abp.Identity.SignIn.EnablePhoneNumberConfirmation": "允许用户确认他们的电话号码", "DisplayName:Abp.Identity.SignIn.RequireConfirmedPhoneNumber": "要求验证的手机号码", "DisplayName:Abp.Identity.User.IsUserNameUpdateEnabled": "启用用户名更新", "DisplayName:Abp.Identity.User.IsEmailUpdateEnabled": "启用电子邮箱更新", @@ -106,6 +108,7 @@ "Description:Abp.Identity.Lockout.LockoutDuration": "当锁定发生时用户被的锁定的时间(秒).", "Description:Abp.Identity.Lockout.MaxFailedAccessAttempts": "如果启用锁定, 当用户被锁定前失败的访问尝试次数.", "Description:Abp.Identity.SignIn.RequireConfirmedEmail": "登录时是否需要验证的电子邮箱.", + "Description:Abp.Identity.SignIn.EnablePhoneNumberConfirmation": "用户是否可以确认电话号码", "Description:Abp.Identity.SignIn.RequireConfirmedPhoneNumber": "登录时是否需要验证的手机号码.", "Description:Abp.Identity.User.IsUserNameUpdateEnabled": "是否允许用户更新用户名.", "Description:Abp.Identity.User.IsEmailUpdateEnabled": "是否允许用户更新电子邮箱.", @@ -114,4 +117,4 @@ "DisplayName:Abp.Identity.UsersCanChange": "允许用户更改其因素身份验证.", "Description:Abp.Identity.UsersCanChange": "允许用户更改其因素身份验证." } -} +} \ No newline at end of file diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/zh-Hans.json b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/zh-Hans.json index f85f6cf638..034d4bac81 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/zh-Hans.json +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/zh-Hans.json @@ -16,6 +16,8 @@ "Permission:Edit": "编辑", "Permission:Delete": "删除", "Permission:ManageConnectionStrings": "管理连接字符串", - "Permission:ManageFeatures": "管理功能" + "Permission:ManageFeatures": "管理功能", + "DisplayName:AdminEmailAddress": "管理员电子邮件地址", + "DisplayName:AdminPassword": "管理员密码" } -} +} \ No newline at end of file diff --git a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Domain.Shared/Localization/MyProjectName/zh-Hans.json b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Domain.Shared/Localization/MyProjectName/zh-Hans.json index 99586f01c9..cd345f5800 100644 --- a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Domain.Shared/Localization/MyProjectName/zh-Hans.json +++ b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Domain.Shared/Localization/MyProjectName/zh-Hans.json @@ -1,6 +1,7 @@ { "culture": "zh-Hans", "texts": { - "ManageYourProfile": "管理个人资料" + "ManageYourProfile": "管理个人资料", + "SamplePageMessage": "MyProjectName模块的示例页面" } } \ No newline at end of file From 74991ab1dee71d46c9dc246f180d9e9a4c1cbb97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Mon, 19 Oct 2020 12:22:00 +0300 Subject: [PATCH 58/76] Created tempkeys --- .../src/MyCompanyName.MyProjectName.HttpApi.Host/tempkey.jwk | 1 + .../MyCompanyName.MyProjectName.HttpApi.HostWithIds/tempkey.jwk | 1 + .../src/MyCompanyName.MyProjectName.IdentityServer/tempkey.jwk | 1 + .../aspnet-core/src/MyCompanyName.MyProjectName.Web/tempkey.jwk | 1 + 4 files changed, 4 insertions(+) create mode 100644 templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/tempkey.jwk create mode 100644 templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/tempkey.jwk create mode 100644 templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/tempkey.jwk create mode 100644 templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/tempkey.jwk diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/tempkey.jwk b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/tempkey.jwk new file mode 100644 index 0000000000..75ad83628d --- /dev/null +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/tempkey.jwk @@ -0,0 +1 @@ +{"AdditionalData":{},"Alg":"RS256","Crv":null,"D":"na3PYscB_WLfbYJn9_jqqJ1fV1honqUfmyVfc9Rb9WQ3AQCtjx1C1_icNImY-eax0Ic4nDI7ZOZ4oel_pUIqbqb5lXGKvicm73aFX1yoEH2-wnFBXbc3HHMtiMUtgaC6Ra9cOu1omZ9Tc-wmQL2W-_cFbNC5BSkTj-x8CaAfdFY5o2-5TIBHLrRWMluNWFTd5-3mZVBkQiwyURNPQn46QirAMN9dLYhwxCWwOAi_8C0Y0XQtkcKVo8XMHXP5XO82dmId8eVn_lujlDZc2mirv3FcHND7y--yEDxAHGK3ByYsklmWngksT6Oey7ww0DBgMPWWb3XR4Y_-1mk22kPNQQ","DP":"Q03f6WFD0JFxyFU3rNm8a47iaBEuC2o0NX1AOrSfN8ZLvZLqmflnitOSRxMppfBy3R-Gudj6lw03vqoHFw8JVQEYoAgRSDwvZOA3MOzKSpUOODvFZLLXIXRXJN8V2A3Y1FfbPHyrIFLhcQYRcOUtCaMSwe6hwbfYCOCVIUnv8sM","DQ":"qPkNeMlpDSzTAAlq43OR2bxbb-k3YuhJYan4usF7Bg3HhtMXMq4IwOwbF3zYeJrYNrTOOcknsIOc8WZ4xRgnWa_I7pNIyZOtBRk5cL-Des-KN4DVr1HMfIDX6Nscn5-p8aYutXzBW9ctGNZ4W9mr74lYGjcv31VErFIPoiV6M_k","E":"AQAB","K":null,"KeyId":"35F08C61EC133B263F0D9C98A16E4406","Kid":"35F08C61EC133B263F0D9C98A16E4406","Kty":"RSA","N":"xEBQ-uWnMATOry_xqOHA1_pwHYTwegnK8zBvg8qPBYYWvUuaVIe_2bTMpWfByWQrhMAGZS1POQcRE4j9-LJdvQgNXLMRlB4NBdJcrIse8hqtd8sfa9sS_4Fo6osxbawf7JmQCRH8dLhrwIXsJiJ_YqAYIgXwtFKTS9frankVBkHrHCGGC6HL5JOBhbiOVJVgXPn-UTcuiEn88wjtdwsAzMh5pmVT226gy84vTxZcfNF_J0AzO_JeZnfW5YlAlbQd0EUOH47FwwQXnPkoMc_FXDZjyiOHMfuhRyqTriB0YdaaCtqRhfyOgBIZ2szjpui1eiZH0x8QDQm6I0EbCsnB7Q","Oth":null,"P":"62MMN3ssYikLIYZjBLSC1rg1icTgDeIhk02NN32Id_eh9BilwGuQFuJiNOOboafzLgfI76uwKdsSEoWMy4dLLc_2LeJfcTtMgR8plknJs4PNToL62yiV5XZiPdyZfLXROeR69PJY1vKfUTzCJBMLAix1nFGG1CDBrFGq6lWCdjc","Q":"1W_qxdTdjZkERG2NFGFJbPSZIrMfnkOZLu4IMbT9sEToR6fjIm0ekQHQ2Q9VveZOrTsYXg9w63iEaoOc0qF3FBFNTJP62mKEUPMk-dPFoaLAOiiGSWqneWKQtxbSj4s1RlxUDjASb8oLpP5eJ11AzOOjGVF2T-DqUU61UZhx9vs","QI":"m4bNZ1w6zkfZbDPzAzFJOnDtwRB_93k-3Pi2UUvPvdmlcF6EFELaDt-kQOChlPC0oM4yxfBy6GzimpshI58NIZFGJ1GCkqsHkS97TU5Bcr0sIae1EdcU0jtQO4Yk8bBnuwGMSZPaA5b9PxSErfs1XSDPFNGvEqBnRoOwwZABvFs","Use":null,"X":null,"X5t":null,"X5tS256":null,"X5u":null,"Y":null,"KeySize":2048,"HasPrivateKey":true,"CryptoProviderFactory":{"CryptoProviderCache":{},"CustomCryptoProvider":null,"CacheSignatureProviders":true}} \ No newline at end of file diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/tempkey.jwk b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/tempkey.jwk new file mode 100644 index 0000000000..0bf4222973 --- /dev/null +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/tempkey.jwk @@ -0,0 +1 @@ +{"AdditionalData":{},"Alg":"RS256","Crv":null,"D":"Tk10nJfyDM2az1MXb0dk2v9xJykAvq8Hs7Y9No88NBHGPq1vujBy6R67Bfc9WTlo-oVQsEBr9eWjWlzP1WySZNvSwQDFDaZZcDkC_E8MH_u4v4iWzcM6CfjMB3PoxXos3sxk9Pdkc4eQ4yDw05-oxIcPmvpF_6DLIOdSaQUVJVUdRWXOFCwD85f3Qkc-MeDEVJWcQekORDWjjY2Ezf_LlmM8MAl-Ug0vGucdrCBEi8fB_vIHSqHTVn9uD0WdbSHPYBYaqUHXis3OcUEFU9iPCYiyaJ6HhRgWg8jJVAgrH0t961Mh-PAayty64D8w1OGuTaJa90wmbLoQFCGfZ31wbQ","DP":"MXmQD-0L_mruZeIEVclooX4f9unjijGYfxqwZXmsgCQ8EG9yuiICrYefvZC2mr8mjptepAm0ii4O6YdPUn4J-d4tRGr8JO0yGbqdcsXeLAP38a_9GUwDw7U4BUjJqzsLYhnLbdy-eOOYlOSUn_86-fpadZKx48UpBSbHknIs67E","DQ":"T0ia2epiSg4fNsF11Xh2DHaU895EaPM7gtcSdEm2Y2cEqQZy0b6uP2L4eWdl5PFjuAva59nqeUQ8aK55ZR4rYIOBH4awoUFTIJIr2A3d5SV759GXOI55Ywfq99sVtqrHqs-u3eKyLeCkYIUqQyb4anoIlmaqYi9wVmpk0QQAQzk","E":"AQAB","K":null,"KeyId":"B355AE223C5B3D318547C8F865352EE2","Kid":"B355AE223C5B3D318547C8F865352EE2","Kty":"RSA","N":"w7mccpg-xQ1I74v-HALQNaBVrKgiNa4GpY5qajdZa76auS3ic2RBvvgGN3YqekBnnSwsieqUfiBUrDKtNs8NPns8ftkcY0YMEuNGz57Bc-LpIqpJMZdZNH07YHUDTdFe9qsUs_jJ3jyPUkxfdR90EMDRq618Ja1Jm2-kxPPidV8iuPnXOhwF-u_m4pdnWjBmI_i0v9t2If4Qq5IGLpW_r7ChglokZugamfZWhAj__gsZFHbZaW-GET-Rd2AkIl1V4RPMjNI1q6OOYpa035o6F-Wkdye-RnGCySqzWqrTN9-fFwggVi0CMO-MjfBGSPnIoPVfTrtWdtWiiJldkW5EiQ","Oth":null,"P":"90mYyR6wuMFN9MMgy_GZcB9EWsjBckb2zFzEzl8A-PxVX1ifgPOZN1ZSQjwPN9-Jj-Qk2ZVU43eqPflM4c2jED89vy9WX3XAGJ1FJHUpvYDvtc6ej5AbzAHKeYil9IikQlOrzi2JZ0ioiqTQI1_13v2-Zcg6itY73fIw6YrX0Rs","Q":"yp7yul89BP7ayvAc-sCBG3qks5BGWev_vb1eEmj3Ys3jAqBnGs8VgPNXIky9t6MgUZ2PB_6V7yLWPa7M4j8tJjQByYggqc7EuIkrG7CEH3_pIeBx02ngoQQsPd_Kgmu33CKY6bGnweUb2AEQ5OYewvgqAxtw0IowDlKcPtwxvys","QI":"Z6Co916ku0t5UdGyk_bK-fYKHcjqDBY5u_Hyg45jvz-TuQQEkeSnv2nukK7vIxuyOPlqt6C6-P68P-uNQZPqDWmaibnU4Gjj5dZtQDCl80vJEKpR48AAmnGEt8x-FeB4ZMWqPWQE3GppKAHuA5g4V2gVesziMPZeWmd09kW5Zto","Use":null,"X":null,"X5t":null,"X5tS256":null,"X5u":null,"Y":null,"KeySize":2048,"HasPrivateKey":true,"CryptoProviderFactory":{"CryptoProviderCache":{},"CustomCryptoProvider":null,"CacheSignatureProviders":true}} \ No newline at end of file diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/tempkey.jwk b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/tempkey.jwk new file mode 100644 index 0000000000..796102b2b6 --- /dev/null +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/tempkey.jwk @@ -0,0 +1 @@ +{"alg":"RS256","d":"Qe3Ds-NA2pf25sGU3S3SMI4jLm-IzyiKy9daS87SMv49QGRM-3AehH29EZYG05-xIaQiw5ZDaBDBhJ30kld_yKBiKDS82jz7GwD_o7dYsfaKPQP2ceCgscspgLZCRYz2Bn4uPpJEdTzZX0CG3vQNNzuai96vnrw3OOE2hMKzG1G5jBEuG62UmroA1J_hjROe4xN0NweFsA20CVqd-icQRS7BZ61ckW8mJxc2Mge89YZV3OA7uVA9VkBD8WOquLp0MtxM20JI71OKpvcVdpCviO9dqyg9vKNrvzIVQz5UG-uytplQhDXKSQnMwTyityb8-UnUyJwcK97iXxXej8Q8wQ","dp":"guIUNk31o1boT3hHZ8yjD4DOFYWJhj1Zso3lGxLJX6gdWSYk70gG3Knyce0SvCIoxGzNjNr4pOIoAxACHUxlgedmynznjoGaQIUu9r1WNS-2BVzxfEGO7AZ28yhI_lAOk9z772rR8WO4y5eE5-sdT20vIEtk8Ivm8y5KPqG2nxk","dq":"ST_QInrb0xX92ydtZ8JRPEWZ9E7evtvEcDSDdDXhmsU_ikItF4bxyFj2Askgim1Muj8yKKEPEVQffvdXvkMnrCxYPFtxcTGUCblF-dTwMaQJxP8lxOm6TFEJxtFkcK1PVNkL6atx_klYYSp8ziOzdPz1lRxabSK-aMVCyWJNmn8","e":"AQAB","kid":"4A9175F021891DD4BA07727A448B4078","kty":"RSA","n":"yWDayzP7ZIUTpc3ubBUuwG71daDTgRDrDZRngbtAWxDNZQF-8mlOUzBRIBvH_We3eRhMEj5RTfAUG92OaqriB6NZorslBdgqSODRqsABQalI95QudX1DOfwgNphgKi4lRGSpe4UYVYoyWgh5Bp751bmUCdiezMna1bhnilLBK2Y_oHCnCZ3I4cFHGVldC-edefsvndynFOzWJp_y34Q71nbZEHMRKD8mx1Zj_Tt_nxZ7GtzC7AD4jjeZpSkp65mJCGXIaMMCalW2R5qB3pf6u8ei_ky08kvcHtcgi5CLqX6PsNddICzhedyohjp5oznUL5Ohw5WrlEYEeZ3_5JmdHQ","p":"7iMEhduGj-GbdvpkPW9C-pj8YK7i4zGbiE_-7TU4u4alLe_lUM0SMwG6UgqqWmGLi9LBcLkqnQ9NDODZvovyHV-NuvHUIWIrZa9t9iMsSAX-KObGjeFu8Jn9n58WeiMPEQ3X49jHM3e6g_fQ6wxYxbXnlx2-wX3LDzCQ9th-Op8","q":"2Hv1RFfzI4U5Jalaaz7ZLrr6VKGFKb1JnoGArBM7JnEMMmZwTUGlUjGxGgvKbaACTb1wXGS2A_wtPnomOx5Nu63-C6gBWLVbERbplOxowwNOdQC8dCHW5uf0LT62fyvzO8sig87c0hpUR-60ubAnQmW8rFAdHAJNvDrTaTHfSsM","qi":"XjPcTdtgULO3snpQJepHbyF8yGrKPWBdxD1so4TpB8FsCxF8fMl99QvNXLaAxffewLQkfAd7DqE62G3hbsZVgsX0X7gwQkGS_gWXcwpc7rBdeapLj0dEJOXmvpPkhgrpnOadAlnimErXzHv30XEUfph4EJOgb4crBsyeCtiWd54"} \ No newline at end of file diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/tempkey.jwk b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/tempkey.jwk new file mode 100644 index 0000000000..bea6fe239c --- /dev/null +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/tempkey.jwk @@ -0,0 +1 @@ +{"AdditionalData":{},"Alg":"RS256","Crv":null,"D":"apXp8PxjdO94e6VkAofVTiPFA0iqQVhq0Iua4L_l99OdRf-d1kzFararmGo4zRuoa3koxM39eHKJY2VDL79m0v4Pr-8xRGpuR2yw_Xq5P6SuplULl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lmgw1c_A13a7lNkTv3pCNCSFO-Q_c5E7bL1f8xW682eCF09NFwoIsE7okEh-bufo1_bdZyFch7PV8MRwZMxjKs2hmvQO8mDr357kLk0kwdNubDtbQuSP8PPMeWM","Q":"5AfY-qYuQF7X-gLWJ9aXWOIR6_htzyQhAljKrGrRTLExTpOIG1cp10ucS6m1-XVzH_wbvhMQmGDhdgsxoK-QtXexFS4lYaa1IYmrW7kmFsgm9jMJLwAbTL-j5enoKRZNx1l4Nk-YZyE_7Rsmht7vV69ANOHZ0lpnb1rDrSOBSAM","QI":"n_kUKjaIpJZ2hHQeuX8FM5n9-GUIsQO9Nd2v-zk6Z6bWsiNakrcQe-j32qM9cwwUodxw8VD-nliDLiJc8cLL6drXItltpunkCfS1SSNlchN61wJX152_YGfw4UX80T4QbQxTjwB6xQ0Lr6F_mIeVsMYUHLEFO1d_tZ2ZTCK4j88","Use":null,"X":null,"X5t":null,"X5tS256":null,"X5u":null,"Y":null,"KeySize":2048,"HasPrivateKey":true,"CryptoProviderFactory":{"CryptoProviderCache":{},"CustomCryptoProvider":null,"CacheSignatureProviders":true}} \ No newline at end of file From c9eaabfbb7eeaea2d4213e3a9aca773ced8c7bd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Mon, 19 Oct 2020 14:13:59 +0300 Subject: [PATCH 59/76] Revert "Created tempkeys" This reverts commit 74991ab1dee71d46c9dc246f180d9e9a4c1cbb97. --- .../src/MyCompanyName.MyProjectName.HttpApi.Host/tempkey.jwk | 1 - .../MyCompanyName.MyProjectName.HttpApi.HostWithIds/tempkey.jwk | 1 - .../src/MyCompanyName.MyProjectName.IdentityServer/tempkey.jwk | 1 - .../aspnet-core/src/MyCompanyName.MyProjectName.Web/tempkey.jwk | 1 - 4 files changed, 4 deletions(-) delete mode 100644 templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/tempkey.jwk delete mode 100644 templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/tempkey.jwk delete mode 100644 templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/tempkey.jwk delete mode 100644 templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/tempkey.jwk diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/tempkey.jwk b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/tempkey.jwk deleted file mode 100644 index 75ad83628d..0000000000 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/tempkey.jwk +++ /dev/null @@ -1 +0,0 @@ -{"AdditionalData":{},"Alg":"RS256","Crv":null,"D":"na3PYscB_WLfbYJn9_jqqJ1fV1honqUfmyVfc9Rb9WQ3AQCtjx1C1_icNImY-eax0Ic4nDI7ZOZ4oel_pUIqbqb5lXGKvicm73aFX1yoEH2-wnFBXbc3HHMtiMUtgaC6Ra9cOu1omZ9Tc-wmQL2W-_cFbNC5BSkTj-x8CaAfdFY5o2-5TIBHLrRWMluNWFTd5-3mZVBkQiwyURNPQn46QirAMN9dLYhwxCWwOAi_8C0Y0XQtkcKVo8XMHXP5XO82dmId8eVn_lujlDZc2mirv3FcHND7y--yEDxAHGK3ByYsklmWngksT6Oey7ww0DBgMPWWb3XR4Y_-1mk22kPNQQ","DP":"Q03f6WFD0JFxyFU3rNm8a47iaBEuC2o0NX1AOrSfN8ZLvZLqmflnitOSRxMppfBy3R-Gudj6lw03vqoHFw8JVQEYoAgRSDwvZOA3MOzKSpUOODvFZLLXIXRXJN8V2A3Y1FfbPHyrIFLhcQYRcOUtCaMSwe6hwbfYCOCVIUnv8sM","DQ":"qPkNeMlpDSzTAAlq43OR2bxbb-k3YuhJYan4usF7Bg3HhtMXMq4IwOwbF3zYeJrYNrTOOcknsIOc8WZ4xRgnWa_I7pNIyZOtBRk5cL-Des-KN4DVr1HMfIDX6Nscn5-p8aYutXzBW9ctGNZ4W9mr74lYGjcv31VErFIPoiV6M_k","E":"AQAB","K":null,"KeyId":"35F08C61EC133B263F0D9C98A16E4406","Kid":"35F08C61EC133B263F0D9C98A16E4406","Kty":"RSA","N":"xEBQ-uWnMATOry_xqOHA1_pwHYTwegnK8zBvg8qPBYYWvUuaVIe_2bTMpWfByWQrhMAGZS1POQcRE4j9-LJdvQgNXLMRlB4NBdJcrIse8hqtd8sfa9sS_4Fo6osxbawf7JmQCRH8dLhrwIXsJiJ_YqAYIgXwtFKTS9frankVBkHrHCGGC6HL5JOBhbiOVJVgXPn-UTcuiEn88wjtdwsAzMh5pmVT226gy84vTxZcfNF_J0AzO_JeZnfW5YlAlbQd0EUOH47FwwQXnPkoMc_FXDZjyiOHMfuhRyqTriB0YdaaCtqRhfyOgBIZ2szjpui1eiZH0x8QDQm6I0EbCsnB7Q","Oth":null,"P":"62MMN3ssYikLIYZjBLSC1rg1icTgDeIhk02NN32Id_eh9BilwGuQFuJiNOOboafzLgfI76uwKdsSEoWMy4dLLc_2LeJfcTtMgR8plknJs4PNToL62yiV5XZiPdyZfLXROeR69PJY1vKfUTzCJBMLAix1nFGG1CDBrFGq6lWCdjc","Q":"1W_qxdTdjZkERG2NFGFJbPSZIrMfnkOZLu4IMbT9sEToR6fjIm0ekQHQ2Q9VveZOrTsYXg9w63iEaoOc0qF3FBFNTJP62mKEUPMk-dPFoaLAOiiGSWqneWKQtxbSj4s1RlxUDjASb8oLpP5eJ11AzOOjGVF2T-DqUU61UZhx9vs","QI":"m4bNZ1w6zkfZbDPzAzFJOnDtwRB_93k-3Pi2UUvPvdmlcF6EFELaDt-kQOChlPC0oM4yxfBy6GzimpshI58NIZFGJ1GCkqsHkS97TU5Bcr0sIae1EdcU0jtQO4Yk8bBnuwGMSZPaA5b9PxSErfs1XSDPFNGvEqBnRoOwwZABvFs","Use":null,"X":null,"X5t":null,"X5tS256":null,"X5u":null,"Y":null,"KeySize":2048,"HasPrivateKey":true,"CryptoProviderFactory":{"CryptoProviderCache":{},"CustomCryptoProvider":null,"CacheSignatureProviders":true}} \ No newline at end of file diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/tempkey.jwk b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/tempkey.jwk deleted file mode 100644 index 0bf4222973..0000000000 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/tempkey.jwk +++ /dev/null @@ -1 +0,0 @@ -{"AdditionalData":{},"Alg":"RS256","Crv":null,"D":"Tk10nJfyDM2az1MXb0dk2v9xJykAvq8Hs7Y9No88NBHGPq1vujBy6R67Bfc9WTlo-oVQsEBr9eWjWlzP1WySZNvSwQDFDaZZcDkC_E8MH_u4v4iWzcM6CfjMB3PoxXos3sxk9Pdkc4eQ4yDw05-oxIcPmvpF_6DLIOdSaQUVJVUdRWXOFCwD85f3Qkc-MeDEVJWcQekORDWjjY2Ezf_LlmM8MAl-Ug0vGucdrCBEi8fB_vIHSqHTVn9uD0WdbSHPYBYaqUHXis3OcUEFU9iPCYiyaJ6HhRgWg8jJVAgrH0t961Mh-PAayty64D8w1OGuTaJa90wmbLoQFCGfZ31wbQ","DP":"MXmQD-0L_mruZeIEVclooX4f9unjijGYfxqwZXmsgCQ8EG9yuiICrYefvZC2mr8mjptepAm0ii4O6YdPUn4J-d4tRGr8JO0yGbqdcsXeLAP38a_9GUwDw7U4BUjJqzsLYhnLbdy-eOOYlOSUn_86-fpadZKx48UpBSbHknIs67E","DQ":"T0ia2epiSg4fNsF11Xh2DHaU895EaPM7gtcSdEm2Y2cEqQZy0b6uP2L4eWdl5PFjuAva59nqeUQ8aK55ZR4rYIOBH4awoUFTIJIr2A3d5SV759GXOI55Ywfq99sVtqrHqs-u3eKyLeCkYIUqQyb4anoIlmaqYi9wVmpk0QQAQzk","E":"AQAB","K":null,"KeyId":"B355AE223C5B3D318547C8F865352EE2","Kid":"B355AE223C5B3D318547C8F865352EE2","Kty":"RSA","N":"w7mccpg-xQ1I74v-HALQNaBVrKgiNa4GpY5qajdZa76auS3ic2RBvvgGN3YqekBnnSwsieqUfiBUrDKtNs8NPns8ftkcY0YMEuNGz57Bc-LpIqpJMZdZNH07YHUDTdFe9qsUs_jJ3jyPUkxfdR90EMDRq618Ja1Jm2-kxPPidV8iuPnXOhwF-u_m4pdnWjBmI_i0v9t2If4Qq5IGLpW_r7ChglokZugamfZWhAj__gsZFHbZaW-GET-Rd2AkIl1V4RPMjNI1q6OOYpa035o6F-Wkdye-RnGCySqzWqrTN9-fFwggVi0CMO-MjfBGSPnIoPVfTrtWdtWiiJldkW5EiQ","Oth":null,"P":"90mYyR6wuMFN9MMgy_GZcB9EWsjBckb2zFzEzl8A-PxVX1ifgPOZN1ZSQjwPN9-Jj-Qk2ZVU43eqPflM4c2jED89vy9WX3XAGJ1FJHUpvYDvtc6ej5AbzAHKeYil9IikQlOrzi2JZ0ioiqTQI1_13v2-Zcg6itY73fIw6YrX0Rs","Q":"yp7yul89BP7ayvAc-sCBG3qks5BGWev_vb1eEmj3Ys3jAqBnGs8VgPNXIky9t6MgUZ2PB_6V7yLWPa7M4j8tJjQByYggqc7EuIkrG7CEH3_pIeBx02ngoQQsPd_Kgmu33CKY6bGnweUb2AEQ5OYewvgqAxtw0IowDlKcPtwxvys","QI":"Z6Co916ku0t5UdGyk_bK-fYKHcjqDBY5u_Hyg45jvz-TuQQEkeSnv2nukK7vIxuyOPlqt6C6-P68P-uNQZPqDWmaibnU4Gjj5dZtQDCl80vJEKpR48AAmnGEt8x-FeB4ZMWqPWQE3GppKAHuA5g4V2gVesziMPZeWmd09kW5Zto","Use":null,"X":null,"X5t":null,"X5tS256":null,"X5u":null,"Y":null,"KeySize":2048,"HasPrivateKey":true,"CryptoProviderFactory":{"CryptoProviderCache":{},"CustomCryptoProvider":null,"CacheSignatureProviders":true}} \ No newline at end of file diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/tempkey.jwk b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/tempkey.jwk deleted file mode 100644 index 796102b2b6..0000000000 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/tempkey.jwk +++ /dev/null @@ -1 +0,0 @@ -{"alg":"RS256","d":"Qe3Ds-NA2pf25sGU3S3SMI4jLm-IzyiKy9daS87SMv49QGRM-3AehH29EZYG05-xIaQiw5ZDaBDBhJ30kld_yKBiKDS82jz7GwD_o7dYsfaKPQP2ceCgscspgLZCRYz2Bn4uPpJEdTzZX0CG3vQNNzuai96vnrw3OOE2hMKzG1G5jBEuG62UmroA1J_hjROe4xN0NweFsA20CVqd-icQRS7BZ61ckW8mJxc2Mge89YZV3OA7uVA9VkBD8WOquLp0MtxM20JI71OKpvcVdpCviO9dqyg9vKNrvzIVQz5UG-uytplQhDXKSQnMwTyityb8-UnUyJwcK97iXxXej8Q8wQ","dp":"guIUNk31o1boT3hHZ8yjD4DOFYWJhj1Zso3lGxLJX6gdWSYk70gG3Knyce0SvCIoxGzNjNr4pOIoAxACHUxlgedmynznjoGaQIUu9r1WNS-2BVzxfEGO7AZ28yhI_lAOk9z772rR8WO4y5eE5-sdT20vIEtk8Ivm8y5KPqG2nxk","dq":"ST_QInrb0xX92ydtZ8JRPEWZ9E7evtvEcDSDdDXhmsU_ikItF4bxyFj2Askgim1Muj8yKKEPEVQffvdXvkMnrCxYPFtxcTGUCblF-dTwMaQJxP8lxOm6TFEJxtFkcK1PVNkL6atx_klYYSp8ziOzdPz1lRxabSK-aMVCyWJNmn8","e":"AQAB","kid":"4A9175F021891DD4BA07727A448B4078","kty":"RSA","n":"yWDayzP7ZIUTpc3ubBUuwG71daDTgRDrDZRngbtAWxDNZQF-8mlOUzBRIBvH_We3eRhMEj5RTfAUG92OaqriB6NZorslBdgqSODRqsABQalI95QudX1DOfwgNphgKi4lRGSpe4UYVYoyWgh5Bp751bmUCdiezMna1bhnilLBK2Y_oHCnCZ3I4cFHGVldC-edefsvndynFOzWJp_y34Q71nbZEHMRKD8mx1Zj_Tt_nxZ7GtzC7AD4jjeZpSkp65mJCGXIaMMCalW2R5qB3pf6u8ei_ky08kvcHtcgi5CLqX6PsNddICzhedyohjp5oznUL5Ohw5WrlEYEeZ3_5JmdHQ","p":"7iMEhduGj-GbdvpkPW9C-pj8YK7i4zGbiE_-7TU4u4alLe_lUM0SMwG6UgqqWmGLi9LBcLkqnQ9NDODZvovyHV-NuvHUIWIrZa9t9iMsSAX-KObGjeFu8Jn9n58WeiMPEQ3X49jHM3e6g_fQ6wxYxbXnlx2-wX3LDzCQ9th-Op8","q":"2Hv1RFfzI4U5Jalaaz7ZLrr6VKGFKb1JnoGArBM7JnEMMmZwTUGlUjGxGgvKbaACTb1wXGS2A_wtPnomOx5Nu63-C6gBWLVbERbplOxowwNOdQC8dCHW5uf0LT62fyvzO8sig87c0hpUR-60ubAnQmW8rFAdHAJNvDrTaTHfSsM","qi":"XjPcTdtgULO3snpQJepHbyF8yGrKPWBdxD1so4TpB8FsCxF8fMl99QvNXLaAxffewLQkfAd7DqE62G3hbsZVgsX0X7gwQkGS_gWXcwpc7rBdeapLj0dEJOXmvpPkhgrpnOadAlnimErXzHv30XEUfph4EJOgb4crBsyeCtiWd54"} \ No newline at end of file diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/tempkey.jwk b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/tempkey.jwk deleted file mode 100644 index bea6fe239c..0000000000 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/tempkey.jwk +++ /dev/null @@ -1 +0,0 @@ -{"AdditionalData":{},"Alg":"RS256","Crv":null,"D":"apXp8PxjdO94e6VkAofVTiPFA0iqQVhq0Iua4L_l99OdRf-d1kzFararmGo4zRuoa3koxM39eHKJY2VDL79m0v4Pr-8xRGpuR2yw_Xq5P6SuplULlpVMffmCYbMolY6FrKgJkJFHME8QNfkZdO6jd2eQqpQEEUnQt5zab4Vu59-YsM43UB0ZTA285w2v3q9VXnw2j96-f1dKxK2FzO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357kLk0kwdNubDtbQuSP8PPMeWM","Q":"5AfY-qYuQF7X-gLWJ9aXWOIR6_htzyQhAljKrGrRTLExTpOIG1cp10ucS6m1-XVzH_wbvhMQmGDhdgsxoK-QtXexFS4lYaa1IYmrW7kmFsgm9jMJLwAbTL-j5enoKRZNx1l4Nk-YZyE_7Rsmht7vV69ANOHZ0lpnb1rDrSOBSAM","QI":"n_kUKjaIpJZ2hHQeuX8FM5n9-GUIsQO9Nd2v-zk6Z6bWsiNakrcQe-j32qM9cwwUodxw8VD-nliDLiJc8cLL6drXItltpunkCfS1SSNlchN61wJX152_YGfw4UX80T4QbQxTjwB6xQ0Lr6F_mIeVsMYUHLEFO1d_tZ2ZTCK4j88","Use":null,"X":null,"X5t":null,"X5tS256":null,"X5u":null,"Y":null,"KeySize":2048,"HasPrivateKey":true,"CryptoProviderFactory":{"CryptoProviderCache":{},"CustomCryptoProvider":null,"CacheSignatureProviders":true}} \ No newline at end of file From 59e3a3c3ad994ab01cb3721fd2fa6a9fef4a35d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Mon, 19 Oct 2020 14:15:39 +0300 Subject: [PATCH 60/76] Update .gitignore --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 6e767c8f76..5b8dfe9c11 100644 --- a/.gitignore +++ b/.gitignore @@ -305,3 +305,6 @@ modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/Logs/ /modules/client-simulation/demo/Volo.ClientSimulation.Demo/package-lock.json abp-build-config.json /templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/Pages/Test/ + +# Identity Server temp signature file +tempkey.jwk \ No newline at end of file From 2feb304d570f6a5a04156d0364a46238b33b933c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0lkay=20=C4=B0lknur?= Date: Mon, 19 Oct 2020 14:24:33 +0300 Subject: [PATCH 61/76] use blazorise padding instead of setting class. --- framework/src/Volo.Abp.BlazoriseUI/Components/PageHeader.razor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/src/Volo.Abp.BlazoriseUI/Components/PageHeader.razor b/framework/src/Volo.Abp.BlazoriseUI/Components/PageHeader.razor index a584038bfd..5931ff1c95 100644 --- a/framework/src/Volo.Abp.BlazoriseUI/Components/PageHeader.razor +++ b/framework/src/Volo.Abp.BlazoriseUI/Components/PageHeader.razor @@ -4,7 +4,7 @@ @if (BreadcrumbItems.Any()) { - + @if (BreadcrumbShowHome) { From 3260b0ba37b3aa2d4bc3bd4436c6d572344708d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0lkay=20=C4=B0lknur?= Date: Mon, 19 Oct 2020 14:26:16 +0300 Subject: [PATCH 62/76] add breadcrumbItems parameter and Icon changes. --- .../BreadcrumbItem.cs | 8 +++++--- .../Volo.Abp.BlazoriseUI/Components/PageHeader.razor | 8 +++++--- .../Components/PageHeader.razor.cs | 11 +++-------- 3 files changed, 13 insertions(+), 14 deletions(-) rename framework/src/{Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly => Volo.Abp.BlazoriseUI}/BreadcrumbItem.cs (55%) diff --git a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/BreadcrumbItem.cs b/framework/src/Volo.Abp.BlazoriseUI/BreadcrumbItem.cs similarity index 55% rename from framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/BreadcrumbItem.cs rename to framework/src/Volo.Abp.BlazoriseUI/BreadcrumbItem.cs index 03943f47d7..2f918d6c55 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/BreadcrumbItem.cs +++ b/framework/src/Volo.Abp.BlazoriseUI/BreadcrumbItem.cs @@ -1,14 +1,16 @@ -namespace Volo.Abp.AspNetCore.Components.WebAssembly +using Blazorise; + +namespace Volo.Abp.BlazoriseUI { public class BreadcrumbItem { public string Text { get; set; } - public string Icon { get; set; } + public IconName? Icon { get; set; } public string Url { get; set; } - public BreadcrumbItem(string text, string url = null, string icon = null) + public BreadcrumbItem(string text, string url = null, IconName? icon = null) { Text = text; Url = url; diff --git a/framework/src/Volo.Abp.BlazoriseUI/Components/PageHeader.razor b/framework/src/Volo.Abp.BlazoriseUI/Components/PageHeader.razor index 5931ff1c95..d4870e6f59 100644 --- a/framework/src/Volo.Abp.BlazoriseUI/Components/PageHeader.razor +++ b/framework/src/Volo.Abp.BlazoriseUI/Components/PageHeader.razor @@ -9,16 +9,18 @@ @if (BreadcrumbShowHome) { - + + + } @foreach (var item in BreadcrumbItems) { - @if (!string.IsNullOrEmpty(item.Icon)) + @if (item.Icon != null) { - + } @item.Text diff --git a/framework/src/Volo.Abp.BlazoriseUI/Components/PageHeader.razor.cs b/framework/src/Volo.Abp.BlazoriseUI/Components/PageHeader.razor.cs index c3b75712ef..90e4b0f0c7 100644 --- a/framework/src/Volo.Abp.BlazoriseUI/Components/PageHeader.razor.cs +++ b/framework/src/Volo.Abp.BlazoriseUI/Components/PageHeader.razor.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; +using Blazorise; using Microsoft.AspNetCore.Components; -using Volo.Abp.AspNetCore.Components.WebAssembly; namespace Volo.Abp.BlazoriseUI.Components { @@ -18,17 +18,12 @@ namespace Volo.Abp.BlazoriseUI.Components [Parameter] public RenderFragment ChildContent { get; set; } - protected List BreadcrumbItems { get; set; } + [Parameter] + public List BreadcrumbItems { get; set; } public PageHeader() { BreadcrumbItems = new List(); } - - public void AddBreadcrumbItem(string text, string url = null, string icon = null) - { - BreadcrumbItems.Add(new BreadcrumbItem(text, url, icon)); - StateHasChanged(); - } } } From 346db9bd3629056c9456cc5e01f8acd83cd55a30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Mon, 19 Oct 2020 14:49:46 +0300 Subject: [PATCH 63/76] Update IdentityServerDataSeedContributor.cs --- .../IdentityServerDataSeedContributor.cs | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/IdentityServer/IdentityServerDataSeedContributor.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/IdentityServer/IdentityServerDataSeedContributor.cs index dbb6c639df..0b81a8106e 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/IdentityServer/IdentityServerDataSeedContributor.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/IdentityServer/IdentityServerDataSeedContributor.cs @@ -52,10 +52,15 @@ namespace MyCompanyName.MyProjectName.IdentityServer { await _identityResourceDataSeeder.CreateStandardResourcesAsync(); await CreateApiResourcesAsync(); - await CreateApiScopeAsync(); + await CreateApiScopesAsync(); await CreateClientsAsync(); } + private async Task CreateApiScopesAsync() + { + await CreateApiScopeAsync("MyProjectName"); + } + private async Task CreateApiResourcesAsync() { var commonApiUserClaims = new[] @@ -97,13 +102,22 @@ namespace MyCompanyName.MyProjectName.IdentityServer return await _apiResourceRepository.UpdateAsync(apiResource); } - private async Task CreateApiScopeAsync() + private async Task CreateApiScopeAsync(string name) { - var apiScope = await _apiScopeRepository.GetByNameAsync("MyProjectName"); + var apiScope = await _apiScopeRepository.GetByNameAsync(name); if (apiScope == null) { - await _apiScopeRepository.InsertAsync(new ApiScope(_guidGenerator.Create(), "MyProjectName", "MyProjectName API"), autoSave: true); + apiScope = await _apiScopeRepository.InsertAsync( + new ApiScope( + _guidGenerator.Create(), + name, + name + " API" + ), + autoSave: true + ); } + + return apiScope; } private async Task CreateClientsAsync() From ec721067da1a30dd432d6ff843eb8297dcacf78c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Mon, 19 Oct 2020 14:51:23 +0300 Subject: [PATCH 64/76] Update IdentityServerDataSeedContributor.cs --- .../IdentityServerDataSeedContributor.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/IdentityServer/IdentityServerDataSeedContributor.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/IdentityServer/IdentityServerDataSeedContributor.cs index 0b81a8106e..ebb027fa86 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/IdentityServer/IdentityServerDataSeedContributor.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/IdentityServer/IdentityServerDataSeedContributor.cs @@ -7,8 +7,8 @@ using Volo.Abp.Authorization.Permissions; using Volo.Abp.Data; using Volo.Abp.DependencyInjection; using Volo.Abp.Guids; -using Volo.Abp.IdentityServer.ApiScopes; using Volo.Abp.IdentityServer.ApiResources; +using Volo.Abp.IdentityServer.ApiScopes; using Volo.Abp.IdentityServer.Clients; using Volo.Abp.IdentityServer.IdentityResources; using Volo.Abp.PermissionManagement; @@ -130,7 +130,6 @@ namespace MyCompanyName.MyProjectName.IdentityServer "role", "phone", "address", - "MyProjectName" }; @@ -148,7 +147,7 @@ namespace MyCompanyName.MyProjectName.IdentityServer await CreateClientAsync( name: webClientId, scopes: commonScopes, - grantTypes: new[] {"hybrid"}, + grantTypes: new[] { "hybrid" }, secret: (configurationSection["MyProjectName_Web:ClientSecret"] ?? "1q2w3e*").Sha256(), redirectUri: $"{webClientRootUrl}signin-oidc", postLogoutRedirectUri: $"{webClientRootUrl}signout-callback-oidc", @@ -165,7 +164,7 @@ namespace MyCompanyName.MyProjectName.IdentityServer await CreateClientAsync( name: consoleAndAngularClientId, scopes: commonScopes, - grantTypes: new[] {"password", "client_credentials", "authorization_code"}, + grantTypes: new[] { "password", "client_credentials", "authorization_code" }, secret: (configurationSection["MyProjectName_App:ClientSecret"] ?? "1q2w3e*").Sha256(), requireClientSecret: false, redirectUri: webClientRootUrl, @@ -185,7 +184,6 @@ namespace MyCompanyName.MyProjectName.IdentityServer grantTypes: new[] { "authorization_code" }, secret: configurationSection["MyProjectName_Blazor:ClientSecret"]?.Sha256(), requireClientSecret: false, - requirePkce: true, redirectUri: $"{blazorRootUrl}/authentication/login-callback", postLogoutRedirectUri: $"{blazorRootUrl}/authentication/logout-callback" ); @@ -283,4 +281,4 @@ namespace MyCompanyName.MyProjectName.IdentityServer return await _clientRepository.UpdateAsync(client); } } -} +} \ No newline at end of file From b00abe00f5dd11f439c728462718e460f427db1b Mon Sep 17 00:00:00 2001 From: Ahmet Date: Mon, 19 Oct 2020 16:54:29 +0300 Subject: [PATCH 65/76] closes: #5824 --- .../Components/PermissionManagementModal.razor | 2 +- .../PermissionManagementModal.razor.cs | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Blazor/Components/PermissionManagementModal.razor b/modules/permission-management/src/Volo.Abp.PermissionManagement.Blazor/Components/PermissionManagementModal.razor index cc26b5370a..7d567c45bd 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Blazor/Components/PermissionManagementModal.razor +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Blazor/Components/PermissionManagementModal.razor @@ -61,7 +61,7 @@ Checked="@permission.IsGranted" CheckedChanged="@(b => PermissionChanged(b, group.Name, permission))" TValue="bool"> - @permission.DisplayName + @GetShownName(permission) } diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Blazor/Components/PermissionManagementModal.razor.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.Blazor/Components/PermissionManagementModal.razor.cs index 8ff1a99796..ec33dc5bff 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Blazor/Components/PermissionManagementModal.razor.cs +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Blazor/Components/PermissionManagementModal.razor.cs @@ -146,5 +146,22 @@ namespace Volo.Abp.PermissionManagement.Blazor.Components { return _disabledPermissions.Any(x => x == permissionGrantInfo); } + + private string GetShownName(PermissionGrantInfoDto permissionGrantInfo) + { + if (!IsDisabledPermission(permissionGrantInfo)) + { + return permissionGrantInfo.DisplayName; + } + + return string.Format( + "{0} ({1})", + permissionGrantInfo.DisplayName, + permissionGrantInfo.GrantedProviders + .Where(p => p.ProviderName != _providerName) + .Select(p => p.ProviderName) + .JoinAsString(", ") + ); + } } } From 1bb0207fbf0e7a387ec479b57af79e3927163498 Mon Sep 17 00:00:00 2001 From: Ahmet Date: Mon, 19 Oct 2020 17:01:16 +0300 Subject: [PATCH 66/76] close: #5823 --- .../Themes/Basic/LoginDisplay.razor | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/LoginDisplay.razor b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/LoginDisplay.razor index 3d3dd26fae..e4767cc031 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/LoginDisplay.razor +++ b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/LoginDisplay.razor @@ -1,13 +1,22 @@ @using Microsoft.AspNetCore.Components.WebAssembly.Authentication @using Volo.Abp.Users +@using Volo.Abp.MultiTenancy @inject ICurrentUser CurrentUser +@inject ICurrentTenant CurrentTenant @inject NavigationManager Navigation @inject SignOutSessionStateManager SignOutManager - @CurrentUser.UserName + @if (CurrentTenant.Name != null) + { + @CurrentTenant.Name\@CurrentUser.UserName + } + else + { + @CurrentUser.UserName + } @if (Menu != null) From ff6a6d63949eb1bde2ff4d90bfbfc8742873b370 Mon Sep 17 00:00:00 2001 From: maliming Date: Mon, 19 Oct 2020 22:54:27 +0800 Subject: [PATCH 67/76] Add IdentityServer-from-v3-to-v4.md Resolve #5853 --- .../IdentityServer-from-v3-to-v4.md | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 docs/en/Migration-Guides/IdentityServer-from-v3-to-v4.md diff --git a/docs/en/Migration-Guides/IdentityServer-from-v3-to-v4.md b/docs/en/Migration-Guides/IdentityServer-from-v3-to-v4.md new file mode 100644 index 0000000000..874c7b7a01 --- /dev/null +++ b/docs/en/Migration-Guides/IdentityServer-from-v3-to-v4.md @@ -0,0 +1,55 @@ +# Migration Guide for the Abp Identity Server from the v3 to the v4 + +Identity Server released the v4 version in June this year. This version brings a lot of features, enhancements and bug fixes. Unfortunately, it is also breaking changes. + +I saw that it released several bug patches in a short time, so we did not upgrade to v4 in the first time. + +We are now upgraded abp to net 5, we think it is time to upgrade Identity Server to v4. + +There are a lot of code changes for the abp team, but fortunately for developers, you don't need to do that, just like the changes we made in the application template. + +Breaking changes to the database are always tricky. In Identity Server v4 it uses `ApiScope` as an independent aggregate root. Previously it belonged to `ApiResource`. Some entities have also been changed(adding new properties, changing default values, etc.). + +## The following are the specific changes: + +`Client`: +* Added `RequireRequestObject(bool)` and `AllowedIdentityTokenSigningAlgorithms(string)` properties. +* Change `RequireConsent` from `true` to `false`. +* Change `RequirePkce` from `false` to `true`. + +`DeviceFlowCodes`: +* Added `SessionId(string)` and `Description(string)` properties. + +`PersistedGrant`: +* Added `SessionId(string)` and `ShowInDiscoveryDocument(bool,true)` properties + +`ApiResource`: +* Added `AllowedAccessTokenSigningAlgorithms(string)` and `Description(string)` and `ConsumedTime(DateTime?)` properties + +`ApiScope`: +* Before it was a property of `ApiResource`, now it becomes an independent aggregate root. +* Added `Enabled(string)` and `Description(bool,true)` properties + +Before we used `Dictionary` as aggregate root's `Properties`, now we use independent classes such as `ApiResourceProperty`, `ApiScopeProperty`, `IdentityResourceProperty`. + +These are the changes you need to pay attention to. + +## How to migrate to Identity Server v4? + +> Please backup your database before migration!!! + +* If you are using EF Core, you need to add a new migration for Identity Server v4 changes. +* Update the `IdentityServerDataSeedContributor` class in your project according to [the latest code](https://github.com/abpframework/abp/blob/dev/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/IdentityServer/IdentityServerDataSeedContributor.cs). + +If you have been using hard coding configuration to initialize the identity server just like we do in the application template project, a simple migration method is `clear all the tables related to the identity server in the database, and then execute the `DbMigrator` application. + +If you customize the `IdentityServerDataSeedContributor` or the entities mentioned above, you may need to update your code according to the actual situation. You have already understood all the changes, I think it will not be too complicated. + +If you have made some advanced changes to the Identity server, please check [the commit](https://github.com/abpframework/abp/commit/e118346f12b2fb146ab67f2655148916ba4a4518) for all our changes. + +That's all. + +## Related resources: +https://leastprivilege.com/2020/06/19/announcing-identityserver4-v4-0/ + +https://github.com/IdentityServer/IdentityServer4/issues/4592 \ No newline at end of file From 4aadff4d8f1240d95a5b17a02b5fb8e5edc089f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Mon, 19 Oct 2020 19:05:17 +0300 Subject: [PATCH 68/76] revise the IDS4 upgrade guide. --- docs/en/Migration-Guides/Abp-4_0.md | 54 ++++++++++++++++++ .../IdentityServer-from-v3-to-v4.md | 55 ------------------- 2 files changed, 54 insertions(+), 55 deletions(-) create mode 100644 docs/en/Migration-Guides/Abp-4_0.md delete mode 100644 docs/en/Migration-Guides/IdentityServer-from-v3-to-v4.md diff --git a/docs/en/Migration-Guides/Abp-4_0.md b/docs/en/Migration-Guides/Abp-4_0.md new file mode 100644 index 0000000000..a94b3027a6 --- /dev/null +++ b/docs/en/Migration-Guides/Abp-4_0.md @@ -0,0 +1,54 @@ +# ABP Framework 3.3 to 4.0 Migration Guide + +## Identity Server Changes + +ABP Framework upgrades the [IdentityServer4](https://www.nuget.org/packages/IdentityServer4) library from 3.x to 4.x with the ABP Framework version 4.0. IdentityServer 4.x has a lot of changes, some of them are **breaking changes in the data structure**. + +### Database Changes + +**So, if you are upgrading from 3.x, then there are some change should be done in your database.** + +#### ApiScope + +As the **most important breaking change**, Identity Server 4.x places the `ApiScope` as an independent aggregate root. Previously it was a part of the to `ApiResource` aggregate. This requires manual operation. See the *Database Migration* section. + +Also, added `Enabled(string)` and `Description(bool,true)` properties. + +#### Client + +* Added `RequireRequestObject (bool)` and `AllowedIdentityTokenSigningAlgorithms (string)` properties. +* Changed default value of `RequireConsent` from `true` to `false`. +* Changed default value of `RequirePkce` from `false` to `true`. + +#### DeviceFlowCodes + +* Added `SessionId (string)` and `Description (string)` properties. + +#### PersistedGrant + +* Added `SessionId (string)` and `ShowInDiscoveryDocument (bool, default: true)` properties + +#### ApiResource + +* Added `AllowedAccessTokenSigningAlgorithms (string)` and `Description (string)` and `ConsumedTime (DateTime?)` properties + +#### ApiScope + +* Before it was a property of `ApiResource`, now it becomes an independent aggregate root. + +## Migrating the Database + +> Attention: **Please backup your database** before the migration! + +If you are using **Entity Framework Core**, you need to add a new database migration, using the `Add-Migration` command, and apply changes to the database. Please **review the migration** script to understand if it effects your existing data. Otherwise, you may **loose some of your configuration**. + +If you haven't customize the `IdentityServerDataSeedContributor` and haven't customized the initial data inside the `IdentityServer*` tables; + +1. Update `IdentityServerDataSeedContributor` class by comparing to [the latest code](https://github.com/abpframework/abp/blob/dev/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/IdentityServer/IdentityServerDataSeedContributor.cs). You probably only need to add the `CreateApiScopesAsync` method and the code related to it. +2. Then you can simply clear all the **table data** in these tables then execute the `DbMigrator` application again to fill it with the new configuration. + +If you've customize your IdentityServer configuration in the database or in the seed data, you should understand the changes and upgrade your code/data accordingly. + +### Related Resources +* https://leastprivilege.com/2020/06/19/announcing-identityserver4-v4-0/ +* https://github.com/IdentityServer/IdentityServer4/issues/4592 \ No newline at end of file diff --git a/docs/en/Migration-Guides/IdentityServer-from-v3-to-v4.md b/docs/en/Migration-Guides/IdentityServer-from-v3-to-v4.md deleted file mode 100644 index 874c7b7a01..0000000000 --- a/docs/en/Migration-Guides/IdentityServer-from-v3-to-v4.md +++ /dev/null @@ -1,55 +0,0 @@ -# Migration Guide for the Abp Identity Server from the v3 to the v4 - -Identity Server released the v4 version in June this year. This version brings a lot of features, enhancements and bug fixes. Unfortunately, it is also breaking changes. - -I saw that it released several bug patches in a short time, so we did not upgrade to v4 in the first time. - -We are now upgraded abp to net 5, we think it is time to upgrade Identity Server to v4. - -There are a lot of code changes for the abp team, but fortunately for developers, you don't need to do that, just like the changes we made in the application template. - -Breaking changes to the database are always tricky. In Identity Server v4 it uses `ApiScope` as an independent aggregate root. Previously it belonged to `ApiResource`. Some entities have also been changed(adding new properties, changing default values, etc.). - -## The following are the specific changes: - -`Client`: -* Added `RequireRequestObject(bool)` and `AllowedIdentityTokenSigningAlgorithms(string)` properties. -* Change `RequireConsent` from `true` to `false`. -* Change `RequirePkce` from `false` to `true`. - -`DeviceFlowCodes`: -* Added `SessionId(string)` and `Description(string)` properties. - -`PersistedGrant`: -* Added `SessionId(string)` and `ShowInDiscoveryDocument(bool,true)` properties - -`ApiResource`: -* Added `AllowedAccessTokenSigningAlgorithms(string)` and `Description(string)` and `ConsumedTime(DateTime?)` properties - -`ApiScope`: -* Before it was a property of `ApiResource`, now it becomes an independent aggregate root. -* Added `Enabled(string)` and `Description(bool,true)` properties - -Before we used `Dictionary` as aggregate root's `Properties`, now we use independent classes such as `ApiResourceProperty`, `ApiScopeProperty`, `IdentityResourceProperty`. - -These are the changes you need to pay attention to. - -## How to migrate to Identity Server v4? - -> Please backup your database before migration!!! - -* If you are using EF Core, you need to add a new migration for Identity Server v4 changes. -* Update the `IdentityServerDataSeedContributor` class in your project according to [the latest code](https://github.com/abpframework/abp/blob/dev/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/IdentityServer/IdentityServerDataSeedContributor.cs). - -If you have been using hard coding configuration to initialize the identity server just like we do in the application template project, a simple migration method is `clear all the tables related to the identity server in the database, and then execute the `DbMigrator` application. - -If you customize the `IdentityServerDataSeedContributor` or the entities mentioned above, you may need to update your code according to the actual situation. You have already understood all the changes, I think it will not be too complicated. - -If you have made some advanced changes to the Identity server, please check [the commit](https://github.com/abpframework/abp/commit/e118346f12b2fb146ab67f2655148916ba4a4518) for all our changes. - -That's all. - -## Related resources: -https://leastprivilege.com/2020/06/19/announcing-identityserver4-v4-0/ - -https://github.com/IdentityServer/IdentityServer4/issues/4592 \ No newline at end of file From 9a0e1b086a9c149cc144b31581269c4b8045dd26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0lkay=20=C4=B0lknur?= Date: Mon, 19 Oct 2020 21:14:46 +0300 Subject: [PATCH 69/76] breadcrumbitems list added. --- framework/src/Volo.Abp.BlazoriseUI/AbpCrudPageBase.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/framework/src/Volo.Abp.BlazoriseUI/AbpCrudPageBase.cs b/framework/src/Volo.Abp.BlazoriseUI/AbpCrudPageBase.cs index 8723209c53..ffbb62ba04 100644 --- a/framework/src/Volo.Abp.BlazoriseUI/AbpCrudPageBase.cs +++ b/framework/src/Volo.Abp.BlazoriseUI/AbpCrudPageBase.cs @@ -184,6 +184,7 @@ namespace Volo.Abp.BlazoriseUI protected TUpdateViewModel EditingEntity; protected Modal CreateModal; protected Modal EditModal; + protected List BreadcrumbItems = new List(2); protected string CreatePolicyName { get; set; } protected string UpdatePolicyName { get; set; } @@ -239,6 +240,7 @@ namespace Volo.Abp.BlazoriseUI protected override async Task OnInitializedAsync() { + await SetBreadcrumbItemsAsync(); await SetPermissionsAsync(); await GetEntitiesAsync(); } @@ -438,5 +440,10 @@ namespace Volo.Abp.BlazoriseUI await AuthorizationService.CheckAsync(policyName); } + + protected virtual ValueTask SetBreadcrumbItemsAsync() + { + return ValueTask.CompletedTask; + } } } From a208f7809ea8e34ebeff1182e1f2d8cdc80d79e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0lkay=20=C4=B0lknur?= Date: Mon, 19 Oct 2020 21:17:05 +0300 Subject: [PATCH 70/76] convert icon property to object so that developer can spesify custom name. --- framework/src/Volo.Abp.BlazoriseUI/BreadcrumbItem.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/src/Volo.Abp.BlazoriseUI/BreadcrumbItem.cs b/framework/src/Volo.Abp.BlazoriseUI/BreadcrumbItem.cs index 2f918d6c55..36417e122a 100644 --- a/framework/src/Volo.Abp.BlazoriseUI/BreadcrumbItem.cs +++ b/framework/src/Volo.Abp.BlazoriseUI/BreadcrumbItem.cs @@ -6,11 +6,11 @@ namespace Volo.Abp.BlazoriseUI { public string Text { get; set; } - public IconName? Icon { get; set; } + public object Icon { get; set; } public string Url { get; set; } - public BreadcrumbItem(string text, string url = null, IconName? icon = null) + public BreadcrumbItem(string text, string url = null, object icon = null) { Text = text; Url = url; From 6fe4b138e6e0f768a16768aa3ed564e80dbf6ace Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0lkay=20=C4=B0lknur?= Date: Mon, 19 Oct 2020 21:17:23 +0300 Subject: [PATCH 71/76] page header conversion. --- .../SettingManagement/SettingManagement.razor | 27 ++++--------------- .../SettingManagement.razor.cs | 15 ++++++++--- .../_Imports.razor | 1 + 3 files changed, 17 insertions(+), 26 deletions(-) diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Pages/SettingManagement/SettingManagement.razor b/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Pages/SettingManagement/SettingManagement.razor index 8f5285ff98..ce854161ef 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Pages/SettingManagement/SettingManagement.razor +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Pages/SettingManagement/SettingManagement.razor @@ -1,26 +1,9 @@ @page "/setting-management" -@using Microsoft.Extensions.Localization -@using Volo.Abp.SettingManagement.Localization -@inject IStringLocalizer L @inherits SettingManagementBase - @* ************************* PAGE HEADER ************************* *@ -

-
-

@L["Settings"]

-
-
- -
-
-
- -
-
-
+ + + @@ -39,7 +22,7 @@

@group.DisplayName

- + @{ SettingItemRenders.Add(builder => { @@ -47,7 +30,7 @@ builder.CloseComponent(); }); } - + @SettingItemRenders.Last()
} diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Pages/SettingManagement/SettingManagement.razor.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Pages/SettingManagement/SettingManagement.razor.cs index 3d41afd05f..3c4775fd02 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Pages/SettingManagement/SettingManagement.razor.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Pages/SettingManagement/SettingManagement.razor.cs @@ -3,7 +3,10 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Components; +using Microsoft.Extensions.Localization; using Microsoft.Extensions.Options; +using Volo.Abp.BlazoriseUI; +using Volo.Abp.SettingManagement.Localization; namespace Volo.Abp.SettingManagement.Blazor.Pages.SettingManagement { @@ -11,18 +14,21 @@ namespace Volo.Abp.SettingManagement.Blazor.Pages.SettingManagement { [Inject] protected IServiceProvider ServiceProvider { get; set; } - + protected SettingComponentCreationContext SettingComponentCreationContext { get; set; } [Inject] protected IOptions _options { get; set; } + [Inject] + protected IStringLocalizer L { get; set; } protected SettingManagementComponentOptions Options => _options.Value; - + protected List SettingItemRenders { get; set; } = new List(); protected string SelectedGroup; - + protected List BreadcrumbItems = new List(); + protected override async Task OnInitializedAsync() { SettingComponentCreationContext = new SettingComponentCreationContext(ServiceProvider); @@ -31,10 +37,11 @@ namespace Volo.Abp.SettingManagement.Blazor.Pages.SettingManagement { await contributor.ConfigureAsync(SettingComponentCreationContext); } - + SettingItemRenders.Clear(); SelectedGroup = GetNormalizedString(SettingComponentCreationContext.Groups.First().Id); + BreadcrumbItems.Add(new BreadcrumbItem(L["Settings"])); } protected string GetNormalizedString(string value) diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/_Imports.razor b/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/_Imports.razor index 4685ac9893..de520acc22 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/_Imports.razor +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/_Imports.razor @@ -1,5 +1,6 @@ @using Microsoft.AspNetCore.Components.Web @using Volo.Abp.AspNetCore.Components.WebAssembly @using Volo.Abp.BlazoriseUI +@using Volo.Abp.BlazoriseUI.Components @using Blazorise @using Blazorise.DataGrid \ No newline at end of file From 80298ba15c012685d6d44897e3379b34f786602d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0lkay=20=C4=B0lknur?= Date: Mon, 19 Oct 2020 22:17:54 +0300 Subject: [PATCH 72/76] fix page header for multiple toolbar buttons. --- .../src/Volo.Abp.BlazoriseUI/Components/PageHeader.razor | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/src/Volo.Abp.BlazoriseUI/Components/PageHeader.razor b/framework/src/Volo.Abp.BlazoriseUI/Components/PageHeader.razor index d4870e6f59..4a569cfe95 100644 --- a/framework/src/Volo.Abp.BlazoriseUI/Components/PageHeader.razor +++ b/framework/src/Volo.Abp.BlazoriseUI/Components/PageHeader.razor @@ -30,8 +30,8 @@ } -
+ @ChildContent -
+
\ No newline at end of file From 33d74d4a85d5562ff202a36937ff8b04274c86b0 Mon Sep 17 00:00:00 2001 From: Ahmet Date: Tue, 20 Oct 2020 09:43:15 +0300 Subject: [PATCH 73/76] added provider name to blazor permission display name --- .../Components/PermissionManagementModal.razor | 2 +- .../PermissionManagementModal.razor.cs | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Blazor/Components/PermissionManagementModal.razor b/modules/permission-management/src/Volo.Abp.PermissionManagement.Blazor/Components/PermissionManagementModal.razor index cc26b5370a..7d567c45bd 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Blazor/Components/PermissionManagementModal.razor +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Blazor/Components/PermissionManagementModal.razor @@ -61,7 +61,7 @@ Checked="@permission.IsGranted" CheckedChanged="@(b => PermissionChanged(b, group.Name, permission))" TValue="bool"> - @permission.DisplayName + @GetShownName(permission) } diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Blazor/Components/PermissionManagementModal.razor.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.Blazor/Components/PermissionManagementModal.razor.cs index 8ff1a99796..ec33dc5bff 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Blazor/Components/PermissionManagementModal.razor.cs +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Blazor/Components/PermissionManagementModal.razor.cs @@ -146,5 +146,22 @@ namespace Volo.Abp.PermissionManagement.Blazor.Components { return _disabledPermissions.Any(x => x == permissionGrantInfo); } + + private string GetShownName(PermissionGrantInfoDto permissionGrantInfo) + { + if (!IsDisabledPermission(permissionGrantInfo)) + { + return permissionGrantInfo.DisplayName; + } + + return string.Format( + "{0} ({1})", + permissionGrantInfo.DisplayName, + permissionGrantInfo.GrantedProviders + .Where(p => p.ProviderName != _providerName) + .Select(p => p.ProviderName) + .JoinAsString(", ") + ); + } } } From c327ef073c0c0bbfaf89c56324e3695aeedff98c Mon Sep 17 00:00:00 2001 From: Ahmet Date: Tue, 20 Oct 2020 09:45:12 +0300 Subject: [PATCH 74/76] Update LoginDisplay.razor --- .../Themes/Basic/LoginDisplay.razor | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/LoginDisplay.razor b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/LoginDisplay.razor index 3d3dd26fae..e4767cc031 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/LoginDisplay.razor +++ b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/LoginDisplay.razor @@ -1,13 +1,22 @@ @using Microsoft.AspNetCore.Components.WebAssembly.Authentication @using Volo.Abp.Users +@using Volo.Abp.MultiTenancy @inject ICurrentUser CurrentUser +@inject ICurrentTenant CurrentTenant @inject NavigationManager Navigation @inject SignOutSessionStateManager SignOutManager - @CurrentUser.UserName + @if (CurrentTenant.Name != null) + { + @CurrentTenant.Name\@CurrentUser.UserName + } + else + { + @CurrentUser.UserName + } @if (Menu != null) From 9e8817f9e323282bc1e307f6a294113b154a7f1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Tue, 20 Oct 2020 13:43:28 +0300 Subject: [PATCH 75/76] Fixed #5646: Change BlazorWebAssemblyEnableLinking to false --- .../MyCompanyName.MyProjectName.Blazor.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyCompanyName.MyProjectName.Blazor.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyCompanyName.MyProjectName.Blazor.csproj index cba18ad1bd..494e07a905 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyCompanyName.MyProjectName.Blazor.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyCompanyName.MyProjectName.Blazor.csproj @@ -3,6 +3,7 @@ netstandard2.1 3.0 + false From ecbc2bcc845d3557739ed3933ffc8247f95bca5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Tue, 20 Oct 2020 14:35:55 +0300 Subject: [PATCH 76/76] Resolved #5871: Remove Boostrap JS & JQuery dependencies for the Blazor UI --- .../wwwroot/theme.js | 16 ---------------- .../wwwroot/index.html | 6 ------ 2 files changed, 22 deletions(-) delete mode 100644 framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/wwwroot/theme.js diff --git a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/wwwroot/theme.js b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/wwwroot/theme.js deleted file mode 100644 index 8a5b94c7c6..0000000000 --- a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/wwwroot/theme.js +++ /dev/null @@ -1,16 +0,0 @@ -$(function () { - $('.dropdown-menu a.dropdown-toggle').on('click', function (e) { - if (!$(this).next().hasClass('show')) { - $(this).parents('.dropdown-menu').first().find('.show').removeClass("show"); - } - - var $subMenu = $(this).next(".dropdown-menu"); - $subMenu.toggleClass('show'); - - $(this).parents('li.nav-item.dropdown.show').on('hidden.bs.dropdown', function (e) { - $('.dropdown-submenu .show').removeClass("show"); - }); - - return false; - }); -}); \ No newline at end of file diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/wwwroot/index.html b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/wwwroot/index.html index 4566bec3c1..98756a068a 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/wwwroot/index.html +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/wwwroot/index.html @@ -21,14 +21,8 @@ - - - - - -